(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+924":function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n("9AQC");function i(t,e){return void 0===e&&(e=0),"string"!=typeof t||0===e||t.length<=e?t:t.substr(0,e)+"..."}function s(t,e){var n=t,r=n.length;if(r<=150)return n;e>r&&(e=r);var i=Math.max(e-60,0);i<5&&(i=0);var s=Math.min(i+140,r);return s>r-5&&(s=r),s===r&&(i=Math.max(s-140,0)),n=n.slice(i,s),i>0&&(n="'{snip} "+n),s Global error occured"),t.setStatus(s.a.InternalError))}},"3UD+":function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},"4Ssk":function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return l})),n.d(e,"c",(function(){return u}));var r=n("z+RT"),i=n("8LbN");function s(){if(!("fetch"in Object(r.a)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function o(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function a(){if(!s())return!1;var t=Object(r.a)();if(o(t.fetch))return!0;var e=!1,n=t.document;if(n&&"function"==typeof n.createElement)try{var a=n.createElement("iframe");a.hidden=!0,n.head.appendChild(a),a.contentWindow&&a.contentWindow.fetch&&(e=o(a.contentWindow.fetch)),n.head.removeChild(a)}catch(l){i.b.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",l)}return e}function l(){if(!s())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}function u(){var t=Object(r.a)(),e=t.chrome;return!(e&&e.app&&e.app.runtime||!("history"in t)||!t.history.pushState||!t.history.replaceState)}},"6PXS":function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"f",(function(){return c})),n.d(e,"e",(function(){return d})),n.d(e,"d",(function(){return p})),n.d(e,"b",(function(){return g})),n.d(e,"a",(function(){return m}));var r=n("wmvo"),i=n("vFt6"),s=n("9AQC"),o=function(){function t(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return t.prototype.memoize=function(t){if(this._hasWeakSet)return!!this._inner.has(t)||(this._inner.add(t),!1);for(var e=0;e"}try{a.currentTarget=Object(s.c)(o.currentTarget)?Object(i.b)(o.currentTarget):Object.prototype.toString.call(o.currentTarget)}catch(u){a.currentTarget=""}for(var l in"undefined"!=typeof CustomEvent&&Object(s.g)(t,CustomEvent)&&(a.detail=o.detail),o)Object.prototype.hasOwnProperty.call(o,l)&&(a[l]=o[l]);return a}return t}function d(t,e,n){void 0===e&&(e=3),void 0===n&&(n=102400);var r=p(t,e);return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(r))>n?d(t,e-1,n):r}function f(t,e){return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":Object(s.l)(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+Object(a.a)(t)+"]":"symbol"==typeof t?"["+String(t)+"]":"bigint"==typeof t?"[BigInt: "+String(t)+"]":t}function p(t,e){try{return JSON.parse(JSON.stringify(t,(function(t,n){return function t(e,n,r,i){if(void 0===r&&(r=1/0),void 0===i&&(i=new o),0===r)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var n=f(t);return Object(s.i)(n)?n:e}(n);if(null!=n&&"function"==typeof n.toJSON)return n.toJSON();var a=f(n,e);if(Object(s.i)(a))return a;var l=h(n),u=Array.isArray(n)?[]:{};if(i.memoize(n))return"[Circular ~]";for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=t(c,l[c],r-1,i));return i.unmemoize(n),u}(t,n,e)})))}catch(n){return"**non-serializable**"}}function g(t,e){void 0===e&&(e=40);var n=Object.keys(h(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Object(l.d)(n[0],e);for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>e))return r===n.length?i:Object(l.d)(i,e)}return""}function m(t){var e,n;if(Object(s.h)(t)){var i=t,o={};try{for(var a=Object(r.g)(Object.keys(i)),l=a.next();!l.done;l=a.next()){var u=l.value;void 0!==i[u]&&(o[u]=m(i[u]))}}catch(c){e={error:c}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return o}return Array.isArray(t)?t.map(m):t}},"6hSO":function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r,i,s,o=n("wmvo"),a=n("z+RT"),l=n("9AQC"),u=n("8LbN"),c=n("6PXS"),h=n("pRiV"),d=n("4Ssk"),f=Object(a.a)(),p={},g={};function m(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(p[t.type]=p[t.type]||[],p[t.type].push(t.callback),function(t){if(!g[t])switch(g[t]=!0,t){case"console":"console"in f&&["debug","info","warn","error","log","assert"].forEach((function(t){t in f.console&&Object(c.c)(f.console,t,(function(e){return function(){for(var n=[],r=0;r2?e[2]:void 0;if(i){var s=r,o=String(i);r=o,v("history",{from:s,to:o})}return t.apply(this,e)}}}();break;case"error":w=f.onerror,f.onerror=function(t,e,n,r,i){return v("error",{column:r,error:i,line:n,msg:t,url:e}),!!w&&w.apply(this,arguments)};break;case"unhandledrejection":E=f.onunhandledrejection,f.onunhandledrejection=function(t){return v("unhandledrejection",t),!E||E.apply(this,arguments)};break;default:u.b.warn("unknown instrumentation type:",t)}}(t.type))}function v(t,e){var n,r;if(t&&p[t])try{for(var i=Object(o.g)(p[t]||[]),s=i.next();!s.done;s=i.next()){var a=s.value;try{a(e)}catch(l){u.b.error("Error while triggering instrumentation handler.\nType: "+t+"\nName: "+Object(h.a)(a)+"\nError: "+l)}}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function y(t){return void 0===t&&(t=[]),"Request"in f&&Object(l.g)(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function b(t){return void 0===t&&(t=[]),"string"==typeof t[0]?t[0]:"Request"in f&&Object(l.g)(t[0],Request)?t[0].url:String(t[0])}function _(t,e){return void 0===e&&(e=!1),function(n){if(n&&s!==n&&!function(t){if("keypress"!==t.type)return!1;try{var e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(n){}return!0}(n)){var r="keypress"===n.type?"input":n.type;(void 0===i||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(n){}return!1}(s,n))&&(t({event:n,name:r,global:e}),s=n),clearTimeout(i),i=f.setTimeout((function(){i=void 0}),1e3)}}}var w=null,E=null},"8LbN":function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return l}));var r=n("z+RT"),i=Object(r.a)(),s="Sentry Logger ";function o(t){var e=Object(r.a)();if(!("console"in e))return t();var n=e.console,i={};["debug","info","warn","error","log","assert"].forEach((function(t){t in e.console&&n[t].__sentry_original__&&(i[t]=n[t],n[t]=n[t].__sentry_original__)}));var s=t();return Object.keys(i).forEach((function(t){n[t]=i[t]})),s}var a=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e"}return t.event_id||""}function l(t,e,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function u(t,e){var n;if(t.exception&&t.exception.values){var i=t.exception.values[0],s=i.mechanism;if(i.mechanism=Object(r.a)(Object(r.a)(Object(r.a)({},{type:"generic",handled:!0}),s),e),e&&"data"in e){var o=Object(r.a)(Object(r.a)({},null===(n=s)||void 0===n?void 0:n.data),e.data);i.mechanism.data=o}}}function c(t,e){if(!e)return 6e4;var n=parseInt(""+e,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(""+e);return isNaN(r)?6e4:r-t}function h(t){return t.split(/[\?#]/,1)[0]}function d(t){var e;if(null===(e=t)||void 0===e?void 0:e.__sentry_captured__)return!0;try{Object.defineProperty(t,"__sentry_captured__",{value:!0})}catch(n){}return!1}n("+924")},"9AQC":function(t,e,n){"use strict";function r(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(t,Error)}}function i(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function s(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function o(t){return"[object DOMException]"===Object.prototype.toString.call(t)}function a(t){return"[object String]"===Object.prototype.toString.call(t)}function l(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function u(t){return"[object Object]"===Object.prototype.toString.call(t)}function c(t){return"undefined"!=typeof Event&&g(t,Event)}function h(t){return"undefined"!=typeof Element&&g(t,Element)}function d(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function f(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function p(t){return u(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function g(t,e){try{return t instanceof e}catch(n){return!1}}n.d(e,"d",(function(){return r})),n.d(e,"e",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return o})),n.d(e,"k",(function(){return a})),n.d(e,"i",(function(){return l})),n.d(e,"h",(function(){return u})),n.d(e,"f",(function(){return c})),n.d(e,"c",(function(){return h})),n.d(e,"j",(function(){return d})),n.d(e,"m",(function(){return f})),n.d(e,"l",(function(){return p})),n.d(e,"g",(function(){return g}))},Amjd:function(t,e,n){ /*! mobile-drag-drop 2.3.0-rc.1 | Copyright (c) 2019 Tim Ruffles | MIT License */ !function(t){"use strict";var e="dnd-poly-",n=["none","copy","copyLink","copyMove","link","linkMove","move","all"],r=["none","copy","move","link"],i=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}();function s(t){return t&&t.tagName}function o(t,e,n){void 0===n&&(n=!0),document.addEventListener(t,e,!!i&&{passive:n})}function a(t,e){document.removeEventListener(t,e)}function l(t,e,n,r){void 0===r&&(r=!1);var s=i?{passive:!0,capture:r}:r;return t.addEventListener(e,n,s),{off:function(){t.removeEventListener(e,n,s)}}}function u(t){return 0===t.length?0:t.reduce((function(t,e){return e+t}),0)/t.length}function c(t,e){for(var n=0;n-1&&(this.s=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"types",{get:function(){if(0!==this.t.mode)return Object.freeze(this.t.types)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectAllowed",{get:function(){return this.t.effectAllowed},set:function(t){2===this.t.mode&&n.indexOf(t)>-1&&(this.t.effectAllowed=t)},enumerable:!0,configurable:!0}),t.prototype.setData=function(t,e){if(2===this.t.mode){if(t.indexOf(" ")>-1)throw new Error("illegal arg: type contains space");this.t.data[t]=e,-1===this.t.types.indexOf(t)&&this.t.types.push(t)}},t.prototype.getData=function(t){if(1===this.t.mode||2===this.t.mode)return this.t.data[t]||""},t.prototype.clearData=function(t){if(2===this.t.mode){if(t&&this.t.data[t]){delete this.t.data[t];var e=this.t.types.indexOf(t);return void(e>-1&&this.t.types.splice(e,1))}this.t.data={},this.t.types=[]}},t.prototype.setDragImage=function(t,e,n){2===this.t.mode&&this.i(t,e,n)},t}();function g(t,e){return t?t===n[0]?r[0]:0===t.indexOf(n[1])||t===n[7]?r[1]:0===t.indexOf(n[4])?r[3]:t===n[6]?r[2]:r[1]:3===e.nodeType&&"A"===e.tagName?r[3]:r[1]}function m(t,e,n,r,i,s,o){void 0===s&&(s=!0),void 0===o&&(o=null);var a=function(t,e,n,r,i,s,o){void 0===o&&(o=null);var a=e.changedTouches[0],l=new Event(n,{bubbles:!0,cancelable:r});l.dataTransfer=s,l.relatedTarget=o,l.screenX=a.screenX,l.screenY=a.screenY,l.clientX=a.clientX,l.clientY=a.clientY,l.pageX=a.pageX,l.pageY=a.pageY;var u=t.getBoundingClientRect();return l.offsetX=l.clientX-u.left,l.offsetY=l.clientY-u.top,l}(e,n,t,s,document,i,o),l=!e.dispatchEvent(a);return r.mode=0,l}function v(t,e){if(!t||t===n[7])return e;if(e===r[1]){if(0===t.indexOf(r[1]))return r[1]}else if(e===r[3]){if(0===t.indexOf(r[3])||t.indexOf("Link")>-1)return r[3]}else if(e===r[2]&&(0===t.indexOf(r[2])||t.indexOf("Move")>-1))return r[2];return r[0]}var y,b=function(){function t(t,e,n,r){this.h=t,this.o=e,this.u=n,this.l=r,this.v=0,this.p=null,this.g=null,this.m=t,this.I=t.changedTouches[0],this.j=this.C.bind(this),this.S=this.k.bind(this),o("touchmove",this.j,!1),o("touchend",this.S,!1),o("touchcancel",this.S,!1)}return t.prototype.A=function(){var t=this;this.v=1,this.O=r[0],this.D={data:{},effectAllowed:void 0,mode:3,types:[]},this.M={x:null,y:null},this.F={x:null,y:null};var e=this.u;if(this.N=new p(this.D,(function(n,r,i){e=n,"number"!=typeof r&&"number"!=typeof i||(t.P={x:r||0,y:i||0})})),this.D.mode=2,this.N.dropEffect=r[0],m("dragstart",this.u,this.m,this.D,this.N))return this.v=3,this.T(),!1;h("page",this.m,this.F);var n,i=this.o.dragImageSetup(e);if(this.L=(n=i,d.map((function(t){var e=n.style[t+"transform"];return e&&"none"!==e?e.replace(/translate\(\D*\d+[^,]*,\D*\d+[^,]*\)\s*/g,""):""}))),i.style.position="absolute",i.style.left="0px",i.style.top="0px",i.style.zIndex="999999",i.classList.add("dnd-poly-drag-image"),i.classList.add("dnd-poly-icon"),this._=i,!this.P)if(this.o.dragImageOffset)this.P={x:this.o.dragImageOffset.x,y:this.o.dragImageOffset.y};else if(this.o.dragImageCenterOnTouch){var s=getComputedStyle(e);this.P={x:0-parseInt(s.marginLeft,10),y:0-parseInt(s.marginTop,10)}}else{var o=e.getBoundingClientRect();s=getComputedStyle(e),this.P={x:o.left-this.I.clientX-parseInt(s.marginLeft,10)+o.width/2,y:o.top-this.I.clientY-parseInt(s.marginTop,10)+o.height/2}}return f(this._,this.F,this.L,this.P,this.o.dragImageCenterOnTouch),document.body.appendChild(this._),this.V=window.setInterval((function(){t.X||(t.X=!0,t.Y(),t.X=!1)}),this.o.iterationInterval),!0},t.prototype.T=function(){this.V&&(clearInterval(this.V),this.V=null),a("touchmove",this.j),a("touchend",this.S),a("touchcancel",this.S),this._&&(this._.parentNode.removeChild(this._),this._=null),this.l(this.o,this.m,this.v)},t.prototype.C=function(t){var e=this;if(!1!==c(t,this.I.identifier)){if(this.m=t,0===this.v){var n=void 0;if(this.o.dragStartConditionOverride)try{n=this.o.dragStartConditionOverride(t)}catch(t){n=!1}else n=1===t.touches.length;return n?void(!0===this.A()&&(this.h.preventDefault(),t.preventDefault())):void this.T()}if(t.preventDefault(),h("client",t,this.M),h("page",t,this.F),this.o.dragImageTranslateOverride)try{var r=!1;if(this.o.dragImageTranslateOverride(t,{x:this.M.x,y:this.M.y},this.p,(function(t,n){e._&&(r=!0,e.M.x+=t,e.M.y+=n,e.F.x+=t,e.F.y+=n,f(e._,e.F,e.L,e.P,e.o.dragImageCenterOnTouch))})),r)return}catch(t){}f(this._,this.F,this.L,this.P,this.o.dragImageCenterOnTouch)}},t.prototype.k=function(t){if(!1!==c(t,this.I.identifier)){if(this.o.dragImageTranslateOverride)try{this.o.dragImageTranslateOverride(void 0,void 0,void 0,(function(){}))}catch(t){}0!==this.v?(t.preventDefault(),this.v="touchcancel"===t.type?3:2):this.T()}},t.prototype.Y=function(){var t=this,n=this.O;this.D.mode=3,this.N.dropEffect=r[0];var i=m("drag",this.u,this.m,this.D,this.N);if(i&&(this.O=r[0]),i||2===this.v||3===this.v)return this.q(this.v)?void function(t,e,n,r){var i=getComputedStyle(t);if("hidden"!==i.visibility&&"none"!==i.display){e.classList.add("dnd-poly-snapback");var s=getComputedStyle(e),o=parseFloat(s.transitionDuration);if(isNaN(o)||0===o)r();else{var a=t.getBoundingClientRect(),l={x:a.left,y:a.top};l.x+=document.body.scrollLeft||document.documentElement.scrollLeft,l.y+=document.body.scrollTop||document.documentElement.scrollTop,l.x-=parseInt(i.marginLeft,10),l.y-=parseInt(i.marginTop,10);var u=parseFloat(s.transitionDelay),c=Math.round(1e3*(o+u));f(e,l,n,void 0,!1),setTimeout(r,c)}}else r()}(this.u,this._,this.L,(function(){t.B()})):void this.B();var o=this.o.elementFromPoint(this.M.x,this.M.y),a=this.g;o!==this.p&&o!==this.g&&(this.p=o,null!==this.g&&(this.D.mode=3,this.N.dropEffect=r[0],m("dragexit",this.g,this.m,this.D,this.N,!1)),null===this.p?this.g=this.p:(this.D.mode=3,this.N.dropEffect=g(this.D.effectAllowed,this.u),m("dragenter",this.p,this.m,this.D,this.N)?(this.g=this.p,this.O=v(this.N.effectAllowed,this.N.dropEffect)):this.p!==document.body&&(this.g=document.body))),a!==this.g&&s(a)&&(this.D.mode=3,this.N.dropEffect=r[0],m("dragleave",a,this.m,this.D,this.N,!1,this.g)),s(this.g)&&(this.D.mode=3,this.N.dropEffect=g(this.D.effectAllowed,this.u),this.O=!1===m("dragover",this.g,this.m,this.D,this.N)?r[0]:v(this.N.effectAllowed,this.N.dropEffect)),n!==this.O&&this._.classList.remove(e+n),this._.classList.add(e+this.O)},t.prototype.q=function(t){var e=this.O===r[0]||null===this.g||3===t;return e?s(this.g)&&(this.D.mode=3,this.N.dropEffect=r[0],m("dragleave",this.g,this.m,this.D,this.N,!1)):s(this.g)&&(this.D.mode=1,this.N.dropEffect=this.O,this.O=!0===m("drop",this.g,this.m,this.D,this.N)?this.N.dropEffect:r[0]),e},t.prototype.B=function(){this.D.mode=3,this.N.dropEffect=this.O,m("dragend",this.u,this.m,this.D,this.N,!1),this.v=2,this.T()},t}(),_={iterationInterval:150,tryFindDraggableTarget:function(t){var e=t.target;do{if(!1!==e.draggable){if(!0===e.draggable)return e;if(e.getAttribute&&"true"===e.getAttribute("draggable"))return e}}while((e=e.parentNode)&&e!==document.body)},dragImageSetup:function(t){var e=t.cloneNode(!0);return function t(e,n){if(1===e.nodeType){for(var r=getComputedStyle(e),i=0;i1)||(o.b.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got "+r+"."),0))?i?(t.sampled=Math.random()0&&(e.__SENTRY__.integrations=Object(r.f)(e.__SENTRY__.integrations||[],s))}}(),Object(l.a)()}}).call(this,n("3UD+")(t))},EldZ:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n("wmvo"),i=n("lW6c"),s=n("FQKz"),o=n("9AQC"),a=n("8LbN"),l=n("6PXS"),u=n("SYqL"),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r._measurements={},r._hub=Object(i.b)(),Object(o.g)(n,i.a)&&(r._hub=n),r.name=e.name||"",r.metadata=e.metadata||{},r._trimEnd=e.trimEnd,r.transaction=r,r}return Object(r.c)(e,t),e.prototype.setName=function(t){this.name=t},e.prototype.initSpanRecorder=function(t){void 0===t&&(t=1e3),this.spanRecorder||(this.spanRecorder=new u.b(t)),this.spanRecorder.add(this)},e.prototype.setMeasurements=function(t){this._measurements=Object(r.a)({},t)},e.prototype.setMetadata=function(t){this.metadata=Object(r.a)(Object(r.a)({},this.metadata),t)},e.prototype.finish=function(e){var n,r,i,o,l,u=this;if(void 0===this.endTimestamp){if(this.name||(a.b.warn("Transaction has no name, falling back to ``."),this.name=""),t.prototype.finish.call(this,e),!0!==this.sampled)return a.b.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(null===(l=null===(i=null===(n=this._hub.getClient())||void 0===n?void 0:(r=n).getTransport)||void 0===i?void 0:(o=i.call(r)).recordLostEvent)||void 0===l||l.call(o,s.a.SampleRate,"transaction"));var c=this.spanRecorder?this.spanRecorder.spans.filter((function(t){return t!==u&&t.endTimestamp})):[];this._trimEnd&&c.length>0&&(this.endTimestamp=c.reduce((function(t,e){return t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t})).endTimestamp);var h={contexts:{trace:this.getTraceContext()},spans:c,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",debug_meta:this.metadata};return Object.keys(this._measurements).length>0&&(a.b.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),h.measurements=this._measurements),a.b.log("[Tracing] Finishing "+this.op+" transaction: "+this.name+"."),this._hub.captureEvent(h)}},e.prototype.toContext=function(){var e=t.prototype.toContext.call(this);return Object(l.a)(Object(r.a)(Object(r.a)({},e),{name:this.name,trimEnd:this._trimEnd}))},e.prototype.updateWithContext=function(e){var n;return t.prototype.updateWithContext.call(this,e),this.name=null!=(n=e.name)?n:"",this._trimEnd=e.trimEnd,this},e}(u.a)},FGHR:function(t,e,n){"use strict";n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return l})),n.d(e,"e",(function(){return u}));var r=n("lW6c"),i=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function s(t){var e;return void 0===t&&(t=null===(e=Object(r.b)().getClient())||void 0===e?void 0:e.getOptions()),!!t&&("tracesSampleRate"in t||"tracesSampler"in t)}function o(t){var e=t.match(i);if(e){var n=void 0;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}}function a(t){var e,n;return void 0===t&&(t=Object(r.b)()),null===(n=null===(e=t)||void 0===e?void 0:e.getScope())||void 0===n?void 0:n.getTransaction()}function l(t){return t/1e3}function u(t){return 1e3*t}},FQKz:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.BeforeSend="before_send",t.EventProcessor="event_processor",t.NetworkError="network_error",t.QueueOverflow="queue_overflow",t.RateLimitBackoff="ratelimit_backoff",t.SampleRate="sample_rate"}(r||(r={}))},HR75:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n("9AQC"),i=function(){function t(t){var e=this;this._state="PENDING",this._handlers=[],this._resolve=function(t){e._setResult("RESOLVED",t)},this._reject=function(t){e._setResult("REJECTED",t)},this._setResult=function(t,n){"PENDING"===e._state&&(Object(r.m)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))},this._attachHandler=function(t){e._handlers=e._handlers.concat(t),e._executeHandlers()},this._executeHandlers=function(){if("PENDING"!==e._state){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t.done||("RESOLVED"===e._state&&t.onfulfilled&&t.onfulfilled(e._value),"REJECTED"===e._state&&t.onrejected&&t.onrejected(e._value),t.done=!0)}))}};try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}return t.resolve=function(e){return new t((function(t){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.all=function(e){return new t((function(n,r){if(Array.isArray(e))if(0!==e.length){var i=e.length,s=[];e.forEach((function(e,o){t.resolve(e).then((function(t){s[o]=t,0==(i-=1)&&n(s)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},t.prototype.then=function(e,n){var r=this;return new t((function(t,i){r._attachHandler({done:!1,onfulfilled:function(n){if(e)try{return void t(e(n))}catch(r){return void i(r)}else t(n)},onrejected:function(e){if(n)try{return void t(n(e))}catch(r){return void i(r)}else i(e)}})}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(e){var n=this;return new t((function(t,r){var i,s;return n.then((function(t){s=!1,i=t,e&&e()}),(function(t){s=!0,i=t,e&&e()})).then((function(){s?r(i):t(i)}))}))},t.prototype.toString=function(){return"[object SyncPromise]"},t}()},KjyA:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return c}));var r=n("wmvo"),i=n("9AQC"),s=n("kdvv"),o=n("HR75"),a=n("z+RT"),l=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return t.clone=function(e){var n=new t;return e&&(n._breadcrumbs=Object(r.f)(e._breadcrumbs),n._tags=Object(r.a)({},e._tags),n._extra=Object(r.a)({},e._extra),n._contexts=Object(r.a)({},e._contexts),n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=Object(r.f)(e._eventProcessors),n._requestSession=e._requestSession),n},t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.getRequestSession=function(){return this._requestSession},t.prototype.setRequestSession=function(t){return this._requestSession=t,this},t.prototype.setTags=function(t){return this._tags=Object(r.a)(Object(r.a)({},this._tags),t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var n;return this._tags=Object(r.a)(Object(r.a)({},this._tags),((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=Object(r.a)(Object(r.a)({},this._extra),t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var n;return this._extra=Object(r.a)(Object(r.a)({},this._extra),((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,e){var n;return null===e?delete this._contexts[t]:this._contexts=Object(r.a)(Object(r.a)({},this._contexts),((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t,e,n,r,i=this.getSpan();return(null===(t=i)||void 0===t?void 0:t.transaction)?null===(e=i)||void 0===e?void 0:e.transaction:(null===(r=null===(n=i)||void 0===n?void 0:n.spanRecorder)||void 0===r?void 0:r.spans[0])?i.spanRecorder.spans[0]:void 0},t.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(e){if(!e)return this;if("function"==typeof e){var n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags=Object(r.a)(Object(r.a)({},this._tags),e._tags),this._extra=Object(r.a)(Object(r.a)({},this._extra),e._extra),this._contexts=Object(r.a)(Object(r.a)({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Object(i.h)(e)&&(e=e,this._tags=Object(r.a)(Object(r.a)({},this._tags),e.tags),this._extra=Object(r.a)(Object(r.a)({},this._extra),e.extra),this._contexts=Object(r.a)(Object(r.a)({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var n="number"==typeof e?Math.min(e,100):100;if(n<=0)return this;var i=Object(r.a)({timestamp:Object(s.b)()},t);return this._breadcrumbs=Object(r.f)(this._breadcrumbs,[i]).slice(-n),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(t,e){var n;if(this._extra&&Object.keys(this._extra).length&&(t.extra=Object(r.a)(Object(r.a)({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=Object(r.a)(Object(r.a)({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=Object(r.a)(Object(r.a)({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=Object(r.a)(Object(r.a)({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=Object(r.a)({trace:this._span.getTraceContext()},t.contexts);var i=null===(n=this._span.transaction)||void 0===n?void 0:n.name;i&&(t.tags=Object(r.a)({transaction:i},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=Object(r.f)(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this._notifyEventProcessors(Object(r.f)(u(),this._eventProcessors),t,e)},t.prototype._notifyEventProcessors=function(t,e,n,s){var a=this;return void 0===s&&(s=0),new o.a((function(o,l){var u=t[s];if(null===e||"function"!=typeof u)o(e);else{var c=u(Object(r.a)({},e),n);Object(i.m)(c)?c.then((function(e){return a._notifyEventProcessors(t,e,n,s+1).then(o)})).then(null,l):a._notifyEventProcessors(t,c,n,s+1).then(o).then(null,l)}}))},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(e){e(t)})),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}();function u(){var t=Object(a.a)();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function c(t){u().push(t)}},MBYv:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return d}));var r=n("wmvo"),i=n("kdvv"),s=n("8LbN"),o=n("WWQz"),a=n("SYqL"),l=n("bju/"),u=n("EldZ"),c=1e3,h=function(t){function e(e,n,r,i){void 0===r&&(r="");var s=t.call(this,i)||this;return s._pushActivity=e,s._popActivity=n,s.transactionSpanId=r,s}return Object(r.c)(e,t),e.prototype.add=function(e){var n=this;e.spanId!==this.transactionSpanId&&(e.finish=function(t){e.endTimestamp="number"==typeof t?t:Object(i.d)(),n._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),t.prototype.add.call(this,e)},e}(a.b),d=function(t){function e(e,n,r,i){void 0===r&&(r=c),void 0===i&&(i=!1);var o=t.call(this,e,n)||this;return o._idleHub=n,o._idleTimeout=r,o._onScope=i,o.activities={},o._heartbeatCounter=0,o._finished=!1,o._beforeFinishCallbacks=[],n&&i&&(f(n),s.b.log("Setting idle transaction on scope. Span ID: "+o.spanId),n.configureScope((function(t){return t.setSpan(o)}))),o._initTimeout=setTimeout((function(){o._finished||o.finish()}),o._idleTimeout),o}return Object(r.c)(e,t),e.prototype.finish=function(e){var n,o,a=this;if(void 0===e&&(e=Object(i.d)()),this._finished=!0,this.activities={},this.spanRecorder){s.b.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);try{for(var u=Object(r.g)(this._beforeFinishCallbacks),c=u.next();!c.done;c=u.next())(0,c.value)(this,e)}catch(h){n={error:h}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}this.spanRecorder.spans=this.spanRecorder.spans.filter((function(t){if(t.spanId===a.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus(l.a.Cancelled),s.b.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));var n=t.startTimestamp=3?(s.b.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus(l.a.DeadlineExceeded),this.setTag(o.a,o.b[0]),this.finish()):this._pingHeartbeat()}},e.prototype._pingHeartbeat=function(){var t=this;s.b.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),setTimeout((function(){t._beat()}),5e3)},e}(u.a);function f(t){if(t){var e=t.getScope();e&&e.getTransaction()&&e.setSpan(void 0)}}},SYqL:function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return u}));var r=n("wmvo"),i=n("9/Zf"),s=n("kdvv"),o=n("6PXS"),a=n("bju/"),l=function(){function t(t){void 0===t&&(t=1e3),this.spans=[],this._maxlen=t}return t.prototype.add=function(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)},t}(),u=function(){function t(t){if(this.traceId=Object(i.h)(),this.spanId=Object(i.h)().substring(16),this.startTimestamp=Object(s.d)(),this.tags={},this.data={},!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp)}return t.prototype.child=function(t){return this.startChild(t)},t.prototype.startChild=function(e){var n=new t(Object(r.a)(Object(r.a)({},e),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));return n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n),n.transaction=this.transaction,n},t.prototype.setTag=function(t,e){var n;return this.tags=Object(r.a)(Object(r.a)({},this.tags),((n={})[t]=e,n)),this},t.prototype.setData=function(t,e){var n;return this.data=Object(r.a)(Object(r.a)({},this.data),((n={})[t]=e,n)),this},t.prototype.setStatus=function(t){return this.status=t,this},t.prototype.setHttpStatus=function(t){this.setTag("http.status_code",String(t));var e=a.a.fromHttpCode(t);return e!==a.a.UnknownError&&this.setStatus(e),this},t.prototype.isSuccess=function(){return this.status===a.a.Ok},t.prototype.finish=function(t){this.endTimestamp="number"==typeof t?t:Object(s.d)()},t.prototype.toTraceparent=function(){var t="";return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),this.traceId+"-"+this.spanId+t},t.prototype.toContext=function(){return Object(o.a)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})},t.prototype.updateWithContext=function(t){var e,n,r,i,s;return this.data=null!=(e=t.data)?e:{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=null!=(n=t.spanId)?n:this.spanId,this.startTimestamp=null!=(r=t.startTimestamp)?r:this.startTimestamp,this.status=t.status,this.tags=null!=(i=t.tags)?i:{},this.traceId=null!=(s=t.traceId)?s:this.traceId,this},t.prototype.getTraceContext=function(){return Object(o.a)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})},t.prototype.toJSON=function(){return Object(o.a)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})},t}()},T7iU:function(t,e,n){"object"==typeof navigator&&(t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n(n=100/l.width*(i.clientX-l.left))?n=0:100n?n-=(100-2*n)*u:50e){var n=function(t){var e="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}(e);return parseFloat(t.toFixed(n))}return Math.round(t/e)*e}(n/100*(o-s),a)}},{key:"set",value:function(e){t.enabled&&x(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),function(t,e){if(t&&e){var n=new Event(e,{bubbles:!0});t.dispatchEvent(n)}}(e.target,"touchend"===e.type?"change":"input"))}}],[{key:"setup",value:function(e){var n=10&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0?e.cloneNode(!0):e,i=t.parentNode,s=t.nextSibling;r.appendChild(t),s?i.insertBefore(r,s):i.appendChild(r)}))}function ot(t,e){$(t)&&!J(e)&&Object.entries(e).filter((function(t){var e=o(t,2)[1];return!U(e)})).forEach((function(e){var n=o(e,2);return t.setAttribute(n[0],n[1])}))}function at(t,e,n){var r=document.createElement(t);return V(e)&&ot(r,e),G(n)&&(r.innerText=n),r}function lt(t,e,n,r){$(e)&&e.appendChild(at(t,n,r))}function ut(t){W(t)||K(t)?Array.from(t).forEach(ut):$(t)&&$(t.parentNode)&&t.parentNode.removeChild(t)}function ct(t){if($(t))for(var e=t.childNodes.length;e>0;)t.removeChild(t.lastChild),e-=1}function ht(t,e){return $(e)&&$(e.parentNode)&&$(t)?(e.parentNode.replaceChild(t,e),t):null}function dt(t,e){if(!G(t)||J(t))return{};var n={},r=it({},e);return t.split(",").forEach((function(t){var e=t.trim(),i=e.replace(".",""),s=e.replace(/[[\]]/g,"").split("="),a=o(s,1)[0],l=s.length>1?s[1].replace(/["']/g,""):"";switch(e.charAt(0)){case".":n.class=G(r.class)?"".concat(r.class," ").concat(i):i;break;case"#":n.id=e.replace("#","");break;case"[":n[a]=l}})),it(r,n)}function ft(t,e){if($(t)){var n=e;q(n)||(n=!t.hidden),t.hidden=n}}function pt(t,e,n){if(W(t))return Array.from(t).map((function(t){return pt(t,e,n)}));if($(t)){var r="toggle";return void 0!==n&&(r=n?"add":"remove"),t.classList[r](e),t.classList.contains(e)}return!1}function gt(t,e){return $(t)&&t.classList.contains(e)}function mt(t,e){var n=Element.prototype;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(t,e)}function vt(t){return this.elements.container.querySelectorAll(t)}function yt(t){return this.elements.container.querySelector(t)}function bt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];$(t)&&(t.focus({preventScroll:!0}),e&&pt(t,this.config.classNames.tabFocus))}var _t,wt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Et={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(t,e,n){var r=Et[t]||"html5"!==e;return{api:r,ui:r&&Et.rangeInput&&("video"!==t||!nt.isIPhone||nt.isIPhone&&n&&Et.playsinline)}},pip:!(nt.isIPhone||!z(at("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||at("video").disablePictureInPicture)),airplay:z(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(t){if(J(t))return!1;var e=o(t.split("/"),1)[0],n=t;if(!this.isHTML5||e!==this.type)return!1;Object.keys(wt).includes(n)&&(n+='; codecs="'.concat(wt[t],'"'));try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch(t){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(_t=document.createElement("input"),_t.type="range","range"===_t.type),touch:"ontouchstart"in document.documentElement,transitions:!1!==tt,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Ct=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Tt(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t&&"addEventListener"in t&&!J(e)&&z(n)){var a=e.split(" "),l=o;Ct&&(l={passive:s,capture:o}),a.forEach((function(e){r&&r.eventListeners&&i&&r.eventListeners.push({element:t,type:e,callback:n,options:l}),t[i?"addEventListener":"removeEventListener"](e,n,l)}))}}function St(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Tt.call(this,t,e,n,!0,r,i)}function Ot(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Tt.call(this,t,e,n,!1,r,i)}function kt(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function o(){Ot(t,n,o,i,s);for(var a=arguments.length,l=new Array(a),u=0;u1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if($(t)&&!J(e)){var i=new CustomEvent(e,{bubbles:n,detail:s(s({},r),{},{plyr:this})});t.dispatchEvent(i)}}function At(){this&&this.eventListeners&&(this.eventListeners.forEach((function(t){t.element.removeEventListener(t.type,t.callback,t.options)})),this.eventListeners=[])}function Dt(){var t=this;return new Promise((function(e){return t.ready?setTimeout(e,0):St.call(t,t.elements.container,"ready",e)})).then((function(){}))}function Pt(t){(function(t){return R(t,Promise)&&F(t.then)})(t)&&t.then(null,(function(){}))}function Rt(t){return!!(K(t)||G(t)&&t.includes(":"))&&(K(t)?t:t.split(":")).map(Number).every(H)}function It(t){if(!K(t)||!t.every(H))return null;var e=o(t,2),n=e[0],r=e[1],i=function t(e,n){return 0===n?e:t(n,e%n)}(n,r);return[n/i,r/i]}function Mt(t){var e=function(t){return Rt(t)?t.split(":").map(Number):null},n=e(t);if(null===n&&(n=e(this.config.ratio)),null===n&&!J(this.embed)&&K(this.embed.ratio)&&(n=this.embed.ratio),null===n&&this.isHTML5){var r=this.media;n=It([r.videoWidth,r.videoHeight])}return n}function Lt(t){if(!this.isVideo)return{};var e=this.elements.wrapper,n=Mt.call(this,t),r=o(K(n)?n:[0,0],2),i=100/r[0]*r[1];if(e.style.paddingBottom="".concat(i,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var s=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),a=(s-i)/(s/50);this.fullscreen.active?e.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(a,"%)")}else this.isHTML5&&e.classList.toggle(this.config.classNames.videoFixedRatio,null!==n);return{padding:i,ratio:n}}var Ft={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(e){var n=e.getAttribute("type");return!!J(n)||Et.mime.call(t,n)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:Ft.getSources.call(this).map((function(t){return Number(t.getAttribute("size"))})).filter(Boolean)},setup:function(){if(this.isHTML5){var t=this;t.options.speed=t.config.speed.options,J(this.config.ratio)||Lt.call(t),Object.defineProperty(t.media,"quality",{get:function(){var e=Ft.getSources.call(t).find((function(e){return e.getAttribute("src")===t.source}));return e&&Number(e.getAttribute("size"))},set:function(e){if(t.quality!==e){if(t.config.quality.forced&&z(t.config.quality.onChange))t.config.quality.onChange(e);else{var n=Ft.getSources.call(t).find((function(t){return Number(t.getAttribute("size"))===e}));if(!n)return;var r=t.media,i=r.currentTime,s=r.paused,o=r.preload,a=r.readyState,l=r.playbackRate;t.media.src=n.getAttribute("src"),("none"!==o||a)&&(t.once("loadedmetadata",(function(){t.speed=l,t.currentTime=i,s||Pt(t.play())})),t.media.load())}xt.call(t,t.media,"qualitychange",!1,{quality:e})}}})}},cancelRequests:function(){this.isHTML5&&(ut(Ft.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Nt(t){return K(t)?t.filter((function(e,n){return t.indexOf(e)===n})):t}function jt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),n.toString())},Ut=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.toString().replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))};function Vt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t.toString();return e=Bt(e,"-"," "),e=Bt(e,"_"," "),e=Ut(e),Bt(e," ","")}function Ht(t){var e=document.createElement("div");return e.appendChild(t),e.innerHTML}var Gt={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},qt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(J(t)||J(e))return"";var n=rt(e.i18n,t);if(J(n))return Object.keys(Gt).includes(t)?Gt[t]:"";var r={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(r).forEach((function(t){var e=o(t,2);n=Bt(n,e[0],e[1])})),n},zt=function(){function e(n){t(this,e),this.enabled=n.config.storage.enabled,this.key=n.config.storage.key}return n(e,[{key:"get",value:function(t){if(!e.supported||!this.enabled)return null;var n=window.localStorage.getItem(this.key);if(J(n))return null;var r=JSON.parse(n);return G(t)&&t.length?r[t]:r}},{key:"set",value:function(t){if(e.supported&&this.enabled&&V(t)){var n=this.get();J(n)&&(n={}),it(n,t),window.localStorage.setItem(this.key,JSON.stringify(n))}}}],[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}}]),e}();function Kt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(n,r){try{var i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",(function(){if("text"===e)try{n(JSON.parse(i.responseText))}catch(t){n(i.responseText)}else n(i.response)})),i.addEventListener("error",(function(){throw new Error(i.status)})),i.open("GET",t,!0),i.responseType=e,i.send()}catch(t){r(t)}}))}function Wt(t,e){if(G(t)){var n="cache",r=G(e),i=function(){return null!==document.getElementById(e)},s=function(t,e){t.innerHTML=e,r&&i()||document.body.insertAdjacentElement("afterbegin",t)};if(!r||!i()){var o=zt.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),r&&a.setAttribute("id",e),o){var l=window.localStorage.getItem("".concat(n,"-").concat(e));if(null!==l){var u=JSON.parse(l);s(a,u.content)}}Kt(t).then((function(t){J(t)||(o&&window.localStorage.setItem("".concat(n,"-").concat(e),JSON.stringify({content:t})),s(a,t))})).catch((function(){}))}}}var $t=function(t){return Math.trunc(t/60/60%60,10)},Yt=function(t){return Math.trunc(t/60%60,10)},Xt=function(t){return Math.trunc(t%60,10)};function Zt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!H(t))return Zt(void 0,e,n);var r=function(t){return"0".concat(t).slice(-2)},i=$t(t),s=Yt(t),o=Xt(t);return i=e||i>0?"".concat(i,":"):"","".concat(n&&t>0?"-":"").concat(i).concat(r(s),":").concat(r(o))}var Qt={getIconUrl:function(){var t=new URL(this.config.iconUrl,window.location).host!==window.location.host||nt.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements:function(){try{return this.elements.controls=yt.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:vt.call(this,this.config.selectors.buttons.play),pause:yt.call(this,this.config.selectors.buttons.pause),restart:yt.call(this,this.config.selectors.buttons.restart),rewind:yt.call(this,this.config.selectors.buttons.rewind),fastForward:yt.call(this,this.config.selectors.buttons.fastForward),mute:yt.call(this,this.config.selectors.buttons.mute),pip:yt.call(this,this.config.selectors.buttons.pip),airplay:yt.call(this,this.config.selectors.buttons.airplay),settings:yt.call(this,this.config.selectors.buttons.settings),captions:yt.call(this,this.config.selectors.buttons.captions),fullscreen:yt.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=yt.call(this,this.config.selectors.progress),this.elements.inputs={seek:yt.call(this,this.config.selectors.inputs.seek),volume:yt.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:yt.call(this,this.config.selectors.display.buffer),currentTime:yt.call(this,this.config.selectors.display.currentTime),duration:yt.call(this,this.config.selectors.display.duration)},$(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(t){return this.debug.warn("It looks like there is a problem with your custom controls HTML",t),this.toggleNativeControls(!0),!1}},createIcon:function(t,e){var n="http://www.w3.org/2000/svg",r=Qt.getIconUrl.call(this),i="".concat(r.cors?"":r.url,"#").concat(this.config.iconPrefix),s=document.createElementNS(n,"svg");ot(s,it(e,{"aria-hidden":"true",focusable:"false"}));var o=document.createElementNS(n,"use"),a="".concat(i,"-").concat(t);return"href"in o&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",a),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),s.appendChild(o),s},createLabel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=qt(t,this.config),r=s(s({},e),{},{class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")});return at("span",r,n)},createBadge:function(t){if(J(t))return null;var e=at("span",{class:this.config.classNames.menu.value});return e.appendChild(at("span",{class:this.config.classNames.menu.badge},t)),e},createButton:function(t,e){var n=this,r=it({},e),i=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(t=Vt(t)).charAt(0).toLowerCase()+t.slice(1)}(t),s={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((function(t){Object.keys(r).includes(t)&&(s[t]=r[t],delete r[t])})),"button"!==s.element||Object.keys(r).includes("type")||(r.type="button"),Object.keys(r).includes("class")?r.class.split(" ").some((function(t){return t===n.config.classNames.control}))||it(r,{class:"".concat(r.class," ").concat(this.config.classNames.control)}):r.class=this.config.classNames.control,t){case"play":s.toggle=!0,s.label="play",s.labelPressed="pause",s.icon="play",s.iconPressed="pause";break;case"mute":s.toggle=!0,s.label="mute",s.labelPressed="unmute",s.icon="volume",s.iconPressed="muted";break;case"captions":s.toggle=!0,s.label="enableCaptions",s.labelPressed="disableCaptions",s.icon="captions-off",s.iconPressed="captions-on";break;case"fullscreen":s.toggle=!0,s.label="enterFullscreen",s.labelPressed="exitFullscreen",s.icon="enter-fullscreen",s.iconPressed="exit-fullscreen";break;case"play-large":r.class+=" ".concat(this.config.classNames.control,"--overlaid"),i="play",s.label="play",s.icon="play";break;default:J(s.label)&&(s.label=i),J(s.icon)&&(s.icon=t)}var o=at(s.element);return s.toggle?(o.appendChild(Qt.createIcon.call(this,s.iconPressed,{class:"icon--pressed"})),o.appendChild(Qt.createIcon.call(this,s.icon,{class:"icon--not-pressed"})),o.appendChild(Qt.createLabel.call(this,s.labelPressed,{class:"label--pressed"})),o.appendChild(Qt.createLabel.call(this,s.label,{class:"label--not-pressed"}))):(o.appendChild(Qt.createIcon.call(this,s.icon)),o.appendChild(Qt.createLabel.call(this,s.label))),it(r,dt(this.config.selectors.buttons[i],r)),ot(o,r),"play"===i?(K(this.elements.buttons[i])||(this.elements.buttons[i]=[]),this.elements.buttons[i].push(o)):this.elements.buttons[i]=o,o},createRange:function(t,e){var n=at("input",it(dt(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":qt(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[t]=n,Qt.updateRangeFill.call(this,n),D.setup(n),n},createProgress:function(t,e){var n=at("progress",it(dt(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if("volume"!==t){n.appendChild(at("span",null,"0"));var r={played:"played",buffer:"buffered"}[t],i=r?qt(r,this.config):"";n.innerText="% ".concat(i.toLowerCase())}return this.elements.display[t]=n,n},createTime:function(t,e){var n=dt(this.config.selectors.display[t],e),r=at("div",it(n,{class:"".concat(n.class?n.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":qt(t,this.config)}),"00:00");return this.elements.display[t]=r,r},bindMenuItemShortcuts:function(t,e){var n=this;St.call(this,t,"keydown keyup",(function(r){if([32,38,39,40].includes(r.which)&&(r.preventDefault(),r.stopPropagation(),"keydown"!==r.type)){var i,s=mt(t,'[role="menuitemradio"]');!s&&[32,39].includes(r.which)?Qt.showMenuPanel.call(n,e,!0):32!==r.which&&(40===r.which||s&&39===r.which?$(i=t.nextElementSibling)||(i=t.parentNode.firstElementChild):$(i=t.previousElementSibling)||(i=t.parentNode.lastElementChild),bt.call(n,i,!0))}}),!1),St.call(this,t,"keyup",(function(t){13===t.which&&Qt.focusFirstMenuItem.call(n,null,!0)}))},createMenuItem:function(t){var e=this,n=t.value,r=t.list,i=t.type,s=t.title,o=t.badge,a=void 0===o?null:o,l=t.checked,u=void 0!==l&&l,c=dt(this.config.selectors.inputs[i]),h=at("button",it(c,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(c.class?c.class:"").trim(),"aria-checked":u,value:n})),d=at("span");d.innerHTML=s,$(a)&&d.appendChild(a),h.appendChild(d),Object.defineProperty(h,"checked",{enumerable:!0,get:function(){return"true"===h.getAttribute("aria-checked")},set:function(t){t&&Array.from(h.parentNode.children).filter((function(t){return mt(t,'[role="menuitemradio"]')})).forEach((function(t){return t.setAttribute("aria-checked","false")})),h.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(h,"click keyup",(function(t){if(!X(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),h.checked=!0,i){case"language":e.currentTrack=Number(n);break;case"quality":e.quality=n;break;case"speed":e.speed=parseFloat(n)}Qt.showMenuPanel.call(e,"home",X(t))}}),i,!1),Qt.bindMenuItemShortcuts.call(this,h,i),r.appendChild(h)},formatTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!H(t))return t;var n=$t(this.duration)>0;return Zt(t,n,e)},updateTimeDisplay:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];$(t)&&H(e)&&(t.innerText=Qt.formatTime(e,n))},updateVolume:function(){this.supported.ui&&($(this.elements.inputs.volume)&&Qt.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),$(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;$(t)&&(t.value=e,Qt.updateRangeFill.call(this,t))},updateProgress:function(t){var e=this;if(this.supported.ui&&Y(t)){var n,r,i=0;if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":r=this.duration,i=0===(n=this.currentTime)||0===r||Number.isNaN(n)||Number.isNaN(r)?0:(n/r*100).toFixed(2),"timeupdate"===t.type&&Qt.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":!function(t,n){var r=H(n)?n:0,i=$(t)?t:e.elements.display.buffer;if($(i)){i.value=r;var s=i.getElementsByTagName("span")[0];$(s)&&(s.childNodes[0].nodeValue=r)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(t){var e=Y(t)?t.target:t;if($(e)&&"range"===e.getAttribute("type")){if(mt(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);var n=Qt.formatTime(this.currentTime),r=Qt.formatTime(this.duration),i=qt("seekLabel",this.config);e.setAttribute("aria-valuetext",i.replace("{currentTime}",n).replace("{duration}",r))}else if(mt(e,this.config.selectors.inputs.volume)){var s=100*e.value;e.setAttribute("aria-valuenow",s),e.setAttribute("aria-valuetext","".concat(s.toFixed(1),"%"))}else e.setAttribute("aria-valuenow",e.value);nt.isWebkit&&e.style.setProperty("--value","".concat(e.value/e.max*100,"%"))}},updateSeekTooltip:function(t){var e=this;if(this.config.tooltips.seek&&$(this.elements.inputs.seek)&&$(this.elements.display.seekTooltip)&&0!==this.duration){var n="".concat(this.config.classNames.tooltip,"--visible"),r=function(t){return pt(e.elements.display.seekTooltip,n,t)};if(this.touch)r(!1);else{var i=0,s=this.elements.progress.getBoundingClientRect();if(Y(t))i=100/s.width*(t.pageX-s.left);else{if(!gt(this.elements.display.seekTooltip,n))return;i=parseFloat(this.elements.display.seekTooltip.style.left,10)}i<0?i=0:i>100&&(i=100),Qt.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*i),this.elements.display.seekTooltip.style.left="".concat(i,"%"),Y(t)&&["mouseenter","mouseleave"].includes(t.type)&&r("mouseenter"===t.type)}}},timeUpdate:function(t){var e=!$(this.elements.display.duration)&&this.config.invertTime;Qt.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),t&&"timeupdate"===t.type&&this.media.seeking||Qt.updateProgress.call(this,t)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return ft(this.elements.display.currentTime,!0),void ft(this.elements.progress,!0);$(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var t=$(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&Qt.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&Qt.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Qt.updateSeekTooltip.call(this)}},toggleMenuButton:function(t,e){ft(this.elements.settings.buttons[t],!e)},updateSetting:function(t,e,n){var r=this.elements.settings.panels[t],i=null,s=e;if("captions"===t)i=this.currentTrack;else{if(i=J(n)?this[t]:n,J(i)&&(i=this.config[t].default),!J(this.options[t])&&!this.options[t].includes(i))return void this.debug.warn("Unsupported value of '".concat(i,"' for ").concat(t));if(!this.config[t].options.includes(i))return void this.debug.warn("Disabled value of '".concat(i,"' for ").concat(t))}if($(s)||(s=r&&r.querySelector('[role="menu"]')),$(s)){this.elements.settings.buttons[t].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Qt.getLabel.call(this,t,i);var o=s&&s.querySelector('[value="'.concat(i,'"]'));$(o)&&(o.checked=!0)}},getLabel:function(t,e){switch(t){case"speed":return 1===e?qt("normal",this.config):"".concat(e,"×");case"quality":if(H(e)){var n=qt("qualityLabel.".concat(e),this.config);return n.length?n:"".concat(e,"p")}return Ut(e);case"captions":return ee.getLabel.call(this);default:return null}},setQualityMenu:function(t){var e=this;if($(this.elements.settings.panels.quality)){var n="quality",r=this.elements.settings.panels.quality.querySelector('[role="menu"]');K(t)&&(this.options.quality=Nt(t).filter((function(t){return e.config.quality.options.includes(t)})));var i=!J(this.options.quality)&&this.options.quality.length>1;if(Qt.toggleMenuButton.call(this,n,i),ct(r),Qt.checkMenu.call(this),i){var s=function(t){var n=qt("qualityBadge.".concat(t),e.config);return n.length?Qt.createBadge.call(e,n):null};this.options.quality.sort((function(t,n){var r=e.config.quality.options;return r.indexOf(t)>r.indexOf(n)?1:-1})).forEach((function(t){Qt.createMenuItem.call(e,{value:t,list:r,type:n,title:Qt.getLabel.call(e,"quality",t),badge:s(t)})})),Qt.updateSetting.call(this,n,r)}}},setCaptionsMenu:function(){var t=this;if($(this.elements.settings.panels.captions)){var e="captions",n=this.elements.settings.panels.captions.querySelector('[role="menu"]'),r=ee.getTracks.call(this),i=Boolean(r.length);if(Qt.toggleMenuButton.call(this,e,i),ct(n),Qt.checkMenu.call(this),i){var s=r.map((function(e,r){return{value:r,checked:t.captions.toggled&&t.currentTrack===r,title:ee.getLabel.call(t,e),badge:e.language&&Qt.createBadge.call(t,e.language.toUpperCase()),list:n,type:"language"}}));s.unshift({value:-1,checked:!this.captions.toggled,title:qt("disabled",this.config),list:n,type:"language"}),s.forEach(Qt.createMenuItem.bind(this)),Qt.updateSetting.call(this,e,n)}}},setSpeedMenu:function(){var t=this;if($(this.elements.settings.panels.speed)){var e="speed",n=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(e){return e>=t.minimumSpeed&&e<=t.maximumSpeed}));var r=!J(this.options.speed)&&this.options.speed.length>1;Qt.toggleMenuButton.call(this,e,r),ct(n),Qt.checkMenu.call(this),r&&(this.options.speed.forEach((function(r){Qt.createMenuItem.call(t,{value:r,list:n,type:e,title:Qt.getLabel.call(t,"speed",r)})})),Qt.updateSetting.call(this,e,n))}},checkMenu:function(){var t=this.elements.settings.buttons,e=!J(t)&&Object.values(t).some((function(t){return!t.hidden}));ft(this.elements.settings.menu,!e)},focusFirstMenuItem:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var n=t;$(n)||(n=Object.values(this.elements.settings.panels).find((function(t){return!t.hidden})));var r=n.querySelector('[role^="menuitem"]');bt.call(this,r,e)}},toggleMenu:function(t){var e=this.elements.settings.popup,n=this.elements.buttons.settings;if($(e)&&$(n)){var r=e.hidden,i=r;if(q(t))i=t;else if(X(t)&&27===t.which)i=!1;else if(Y(t)){var s=z(t.composedPath)?t.composedPath()[0]:t.target,o=e.contains(s);if(o||!o&&t.target!==n&&i)return}n.setAttribute("aria-expanded",i),ft(e,!i),pt(this.elements.container,this.config.classNames.menu.open,i),i&&X(t)?Qt.focusFirstMenuItem.call(this,null,!0):i||r||bt.call(this,n,X(t))}},getMenuSize:function(t){var e=t.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),t.parentNode.appendChild(e);var n=e.scrollWidth,r=e.scrollHeight;return ut(e),{width:n,height:r}},showMenuPanel:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(e));if($(r)){var i=r.parentNode,s=Array.from(i.children).find((function(t){return!t.hidden}));if(Et.transitions&&!Et.reducedMotion){i.style.width="".concat(s.scrollWidth,"px"),i.style.height="".concat(s.scrollHeight,"px");var o=Qt.getMenuSize.call(this,r),a=function e(n){n.target===i&&["width","height"].includes(n.propertyName)&&(i.style.width="",i.style.height="",Ot.call(t,i,tt,e))};St.call(this,i,tt,a),i.style.width="".concat(o.width,"px"),i.style.height="".concat(o.height,"px")}ft(s,!0),ft(r,!1),Qt.focusFirstMenuItem.call(this,r,n)}},setDownloadUrl:function(){var t=this.elements.buttons.download;$(t)&&t.setAttribute("href",this.download)},create:function(t){var e=this,n=Qt.bindMenuItemShortcuts,r=Qt.createButton,i=Qt.createProgress,s=Qt.createRange,o=Qt.createTime,a=Qt.setQualityMenu,l=Qt.setSpeedMenu,u=Qt.showMenuPanel;this.elements.controls=null,K(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(r.call(this,"play-large"));var c=at("div",dt(this.config.selectors.controls.wrapper));this.elements.controls=c;var h={class:"plyr__controls__item"};return Nt(K(this.config.controls)?this.config.controls:[]).forEach((function(a){if("restart"===a&&c.appendChild(r.call(e,"restart",h)),"rewind"===a&&c.appendChild(r.call(e,"rewind",h)),"play"===a&&c.appendChild(r.call(e,"play",h)),"fast-forward"===a&&c.appendChild(r.call(e,"fast-forward",h)),"progress"===a){var l=at("div",{class:"".concat(h.class," plyr__progress__container")}),d=at("div",dt(e.config.selectors.progress));if(d.appendChild(s.call(e,"seek",{id:"plyr-seek-".concat(t.id)})),d.appendChild(i.call(e,"buffer")),e.config.tooltips.seek){var f=at("span",{class:e.config.classNames.tooltip},"00:00");d.appendChild(f),e.elements.display.seekTooltip=f}e.elements.progress=d,l.appendChild(e.elements.progress),c.appendChild(l)}if("current-time"===a&&c.appendChild(o.call(e,"currentTime",h)),"duration"===a&&c.appendChild(o.call(e,"duration",h)),"mute"===a||"volume"===a){var p=e.elements.volume;$(p)&&c.contains(p)||(p=at("div",it({},h,{class:"".concat(h.class," plyr__volume").trim()})),e.elements.volume=p,c.appendChild(p)),"mute"===a&&p.appendChild(r.call(e,"mute")),"volume"!==a||nt.isIos||p.appendChild(s.call(e,"volume",it({max:1,step:.05,value:e.config.volume},{id:"plyr-volume-".concat(t.id)})))}if("captions"===a&&c.appendChild(r.call(e,"captions",h)),"settings"===a&&!J(e.config.settings)){var g=at("div",it({},h,{class:"".concat(h.class," plyr__menu").trim(),hidden:""}));g.appendChild(r.call(e,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(t.id),"aria-expanded":!1}));var m=at("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(t.id),hidden:""}),v=at("div"),y=at("div",{id:"plyr-settings-".concat(t.id,"-home")}),b=at("div",{role:"menu"});y.appendChild(b),v.appendChild(y),e.elements.settings.panels.home=y,e.config.settings.forEach((function(r){var i=at("button",it(dt(e.config.selectors.buttons.settings),{type:"button",class:"".concat(e.config.classNames.control," ").concat(e.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));n.call(e,i,r),St.call(e,i,"click",(function(){u.call(e,r,!1)}));var s=at("span",null,qt(r,e.config)),o=at("span",{class:e.config.classNames.menu.value});o.innerHTML=t[r],s.appendChild(o),i.appendChild(s),b.appendChild(i);var a=at("div",{id:"plyr-settings-".concat(t.id,"-").concat(r),hidden:""}),l=at("button",{type:"button",class:"".concat(e.config.classNames.control," ").concat(e.config.classNames.control,"--back")});l.appendChild(at("span",{"aria-hidden":!0},qt(r,e.config))),l.appendChild(at("span",{class:e.config.classNames.hidden},qt("menuBack",e.config))),St.call(e,a,"keydown",(function(t){37===t.which&&(t.preventDefault(),t.stopPropagation(),u.call(e,"home",!0))}),!1),St.call(e,l,"click",(function(){u.call(e,"home",!1)})),a.appendChild(l),a.appendChild(at("div",{role:"menu"})),v.appendChild(a),e.elements.settings.buttons[r]=i,e.elements.settings.panels[r]=a})),m.appendChild(v),g.appendChild(m),c.appendChild(g),e.elements.settings.popup=m,e.elements.settings.menu=g}if("pip"===a&&Et.pip&&c.appendChild(r.call(e,"pip",h)),"airplay"===a&&Et.airplay&&c.appendChild(r.call(e,"airplay",h)),"download"===a){var _=it({},h,{element:"a",href:e.download,target:"_blank"});e.isHTML5&&(_.download=""),!Q(e.config.urls.download)&&e.isEmbed&&it(_,{icon:"logo-".concat(e.provider),label:e.provider}),c.appendChild(r.call(e,"download",_))}"fullscreen"===a&&c.appendChild(r.call(e,"fullscreen",h))})),this.isHTML5&&a.call(this,Ft.getQualityOptions.call(this)),l.call(this),c},inject:function(){var t=this;if(this.config.loadSprite){var e=Qt.getIconUrl.call(this);e.cors&&Wt(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var n=null;this.elements.controls=null;var r,i,s={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(z(this.config.controls)&&(this.config.controls=this.config.controls.call(this,s)),this.config.controls||(this.config.controls=[]),$(this.config.controls)||G(this.config.controls)?n=this.config.controls:(n=Qt.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:ee.getLabel.call(this)}),a=!1),a&&G(this.config.controls)&&(r=n,Object.entries(s).forEach((function(t){var e=o(t,2),n=e[1];r=Bt(r,"{".concat(e[0],"}"),n)})),n=r),G(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),$(i)||(i=this.elements.container),i[$(n)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",n),$(this.elements.controls)||Qt.findElements.call(this),!J(this.elements.buttons)){var l=function(e){var n=t.config.classNames.controlPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:function(){return gt(e,n)},set:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];pt(e,n,t)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(t){K(t)||W(t)?Array.from(t).filter(Boolean).forEach(l):l(t)}))}if(nt.isEdge&&et(i),this.config.tooltips.controls){var u=this.config,c=u.classNames,h=u.selectors,d="".concat(h.controls.wrapper," ").concat(h.labels," .").concat(c.hidden),f=vt.call(this,d);Array.from(f).forEach((function(e){pt(e,t.config.classNames.hidden,!1),pt(e,t.config.classNames.tooltip,!0)}))}}};function Jt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t;if(e){var r=document.createElement("a");r.href=n,n=r.href}try{return new URL(n)}catch(t){return null}}function te(t){var e=new URLSearchParams;return V(t)&&Object.entries(t).forEach((function(t){var n=o(t,2);e.set(n[0],n[1])})),e}var ee={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!Et.textTracks)K(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Qt.setCaptionsMenu.call(this);else{if($(this.elements.captions)||(this.elements.captions=at("div",dt(this.config.selectors.captions)),function(t,e){$(t)&&$(e)&&e.parentNode.insertBefore(t,e.nextSibling)}(this.elements.captions,this.elements.wrapper)),nt.isIE&&window.URL){var t=this.media.querySelectorAll("track");Array.from(t).forEach((function(t){var e=t.getAttribute("src"),n=Jt(e);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&Kt(e,"blob").then((function(e){t.setAttribute("src",window.URL.createObjectURL(e))})).catch((function(){ut(t)}))}))}var e=Nt((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(t){return t.split("-")[0]}))),n=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===n&&(n=o(e,1)[0]);var r=this.storage.get("captions");q(r)||(r=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:r,language:n,languages:e}),this.isHTML5&&St.call(this,this.media.textTracks,this.config.captions.update?"addtrack removetrack":"removetrack",ee.update.bind(this)),setTimeout(ee.update.bind(this),0)}},update:function(){var t=this,e=ee.getTracks.call(this,!0),n=this.captions,r=n.active,i=n.language,s=n.meta,o=n.currentTrackNode,a=Boolean(e.find((function(t){return t.language===i})));this.isHTML5&&this.isVideo&&e.filter((function(t){return!s.get(t)})).forEach((function(e){t.debug.log("Track added",e),s.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),St.call(t,e,"cuechange",(function(){return ee.updateCues.call(t)}))})),(a&&this.language!==i||!e.includes(o))&&(ee.setLanguage.call(this,i),ee.toggle.call(this,r&&a)),pt(this.elements.container,this.config.classNames.captions.enabled,!J(e)),K(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Qt.setCaptionsMenu.call(this)},toggle:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var r=this.captions.toggled,i=this.config.classNames.captions.active,s=U(t)?!r:t;if(s!==r){if(n||(this.captions.active=s,this.storage.set({captions:s})),!this.language&&s&&!n){var o=ee.getTracks.call(this),l=ee.findTrack.call(this,[this.captions.language].concat(a(this.captions.languages)),!0);return this.captions.language=l.language,void ee.set.call(this,o.indexOf(l))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=s),pt(this.elements.container,i,s),this.captions.toggled=s,Qt.updateSetting.call(this,"captions"),xt.call(this,this.media,s?"captionsenabled":"captionsdisabled")}setTimeout((function(){s&&e.captions.toggled&&(e.captions.currentTrackNode.mode="hidden")}))}},set:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=ee.getTracks.call(this);if(-1!==t)if(H(t))if(t in n){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;var r=n[t],i=r||{},s=i.language;this.captions.currentTrackNode=r,Qt.updateSetting.call(this,"captions"),e||(this.captions.language=s,this.storage.set({language:s})),this.isVimeo&&this.embed.enableTextTrack(s),xt.call(this,this.media,"languagechange")}ee.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&ee.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else ee.toggle.call(this,!1,e)},setLanguage:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(G(t)){var n=t.toLowerCase();this.captions.language=n;var r=ee.getTracks.call(this),i=ee.findTrack.call(this,[n]);ee.set.call(this,r.indexOf(i),e)}else this.debug.warn("Invalid language argument",t)},getTracks:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Array.from((this.media||{}).textTracks||[]);return n.filter((function(n){return!t.isHTML5||e||t.captions.meta.has(n)})).filter((function(t){return["captions","subtitles"].includes(t.kind)}))},findTrack:function(t){var e,n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=ee.getTracks.call(this),s=function(t){return Number((n.captions.meta.get(t)||{}).default)},o=Array.from(i).sort((function(t,e){return s(e)-s(t)}));return t.every((function(t){return!(e=o.find((function(e){return e.language===t})))})),e||(r?o[0]:void 0)},getCurrentTrack:function(){return ee.getTracks.call(this)[this.currentTrack]},getLabel:function(t){var e=t;return!Z(e)&&Et.textTracks&&this.captions.toggled&&(e=ee.getCurrentTrack.call(this)),Z(e)?J(e.label)?J(e.language)?qt("enabled",this.config):t.language.toUpperCase():e.label:qt("disabled",this.config)},updateCues:function(t){if(this.supported.ui)if($(this.elements.captions))if(U(t)||Array.isArray(t)){var e=t;if(!e){var n=ee.getCurrentTrack.call(this);e=Array.from((n||{}).activeCues||[]).map((function(t){return t.getCueAsHTML()})).map(Ht)}var r=e.map((function(t){return t.trim()})).join("\n");if(r!==this.elements.captions.innerHTML){ct(this.elements.captions);var i=at("span",dt(this.config.selectors.caption));i.innerHTML=r,this.elements.captions.appendChild(i),xt.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",t);else this.debug.warn("No captions element to render to")}},ne={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.3/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},re="picture-in-picture",ie={html5:"html5",youtube:"youtube",vimeo:"vimeo"},se=function(){},oe=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t(this,e),this.enabled=window.console&&n,this.enabled&&this.log("Debugging enabled")}return n(e,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):se}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):se}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):se}}]),e}(),ae=function(){function e(n){var r=this;t(this,e),this.player=n,this.prefix=e.prefix,this.property=e.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===n.config.fullscreen.fallback,this.player.elements.fullscreen=n.config.fullscreen.container&&function(t,e){return(Element.prototype.closest||function(){var t=this;do{if(mt.matches(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,e)}(this.player.elements.container,n.config.fullscreen.container),St.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){r.onChange()})),St.call(this.player,this.player.elements.container,"dblclick",(function(t){$(r.player.elements.controls)&&r.player.elements.controls.contains(t.target)||r.player.listeners.proxy(t,r.toggle,"fullscreen")})),St.call(this,this.player.elements.container,"keydown",(function(t){return r.trapFocus(t)})),this.update()}return n(e,[{key:"onChange",value:function(){if(this.enabled){var t=this.player.elements.buttons.fullscreen;$(t)&&(t.pressed=this.active),xt.call(this.player,this.target===this.player.media?this.target:this.player.elements.container,this.active?"enterfullscreen":"exitfullscreen",!0)}}},{key:"toggleFallback",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",pt(this.target,this.player.config.classNames.fullscreen.fallback,t),nt.isIos){var e=document.head.querySelector('meta[name="viewport"]'),n="viewport-fit=cover";e||(e=document.createElement("meta")).setAttribute("name","viewport");var r=G(e.content)&&e.content.includes(n);t?(this.cleanupViewport=!r,r||(e.content+=",".concat(n))):this.cleanupViewport&&(e.content=e.content.split(",").filter((function(t){return t.trim()!==n})).join(","))}this.onChange()}},{key:"trapFocus",value:function(t){if(!nt.isIos&&this.active&&"Tab"===t.key&&9===t.keyCode){var e=document.activeElement,n=vt.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),r=o(n,1)[0],i=n[n.length-1];e!==i||t.shiftKey?e===r&&t.shiftKey&&(i.focus(),t.preventDefault()):(r.focus(),t.preventDefault())}}},{key:"update",value:function(){this.player.debug.log(this.enabled?"".concat(this.forceFallback?"Fallback (forced)":e.native?"Native":"Fallback"," fullscreen enabled"):"Fullscreen not supported and fallback disabled"),pt(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}},{key:"enter",value:function(){this.enabled&&(nt.isIos&&this.player.config.fullscreen.iosNative?this.target.webkitEnterFullscreen():!e.native||this.forceFallback?this.toggleFallback(!0):this.prefix?J(this.prefix)||this.target["".concat(this.prefix,"Request").concat(this.property)]():this.target.requestFullscreen({navigationUI:"hide"}))}},{key:"exit",value:function(){if(this.enabled)if(nt.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),Pt(this.player.play());else if(!e.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!J(this.prefix)){var t="moz"===this.prefix?"Cancel":"Exit";document["".concat(this.prefix).concat(t).concat(this.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}},{key:"toggle",value:function(){this.active?this.exit():this.enter()}},{key:"usingNative",get:function(){return e.native&&!this.forceFallback}},{key:"enabled",get:function(){return(e.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!e.native||this.forceFallback)return gt(this.target,this.player.config.classNames.fullscreen.fallback);var t=this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement;return t&&t.shadowRoot?t===this.target.getRootNode().host:t===this.target}},{key:"target",get:function(){return nt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(z(document.exitFullscreen))return"";var t="";return["webkit","moz","ms"].some((function(e){return!(!z(document["".concat(e,"ExitFullscreen")])&&!z(document["".concat(e,"CancelFullScreen")])||(t=e,0))})),t}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),e}();function le(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(n,r){var i=new Image,s=function(){delete i.onload,delete i.onerror,(i.naturalWidth>=e?n:r)(i)};Object.assign(i,{onload:s,onerror:s,src:t})}))}var ue={addStyleHook:function(){pt(this.elements.container,this.config.selectors.container.replace(".",""),!0),pt(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var t=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void ue.toggleNativeControls.call(this,!0);$(this.elements.controls)||(Qt.inject.call(this),this.listeners.controls()),ue.toggleNativeControls.call(this),this.isHTML5&&ee.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Qt.updateVolume.call(this),Qt.timeUpdate.call(this),ue.checkPlaying.call(this),pt(this.elements.container,this.config.classNames.pip.supported,Et.pip&&this.isHTML5&&this.isVideo),pt(this.elements.container,this.config.classNames.airplay.supported,Et.airplay&&this.isHTML5),pt(this.elements.container,this.config.classNames.isIos,nt.isIos),pt(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){xt.call(t,t.media,"ready")}),0),ue.setTitle.call(this),this.poster&&ue.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&Qt.durationUpdate.call(this)},setTitle:function(){var t=qt("play",this.config);if(G(this.config.title)&&!J(this.config.title)&&(t+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(e){e.setAttribute("aria-label",t)})),this.isEmbed){var e=yt.call(this,"iframe");if(!$(e))return;var n=J(this.config.title)?"video":this.config.title,r=qt("frameTitle",this.config);e.setAttribute("title",r.replace("{title}",n))}},togglePoster:function(t){pt(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),Dt.call(this).then((function(){return le(t)})).catch((function(n){throw t===e.poster&&ue.togglePoster.call(e,!1),n})).then((function(){if(t!==e.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(e.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),ue.togglePoster.call(e,!0),t})))},checkPlaying:function(t){var e=this;pt(this.elements.container,this.config.classNames.playing,this.playing),pt(this.elements.container,this.config.classNames.paused,this.paused),pt(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(t){Object.assign(t,{pressed:e.playing}),t.setAttribute("aria-label",qt(e.playing?"pause":"play",e.config))})),Y(t)&&"timeupdate"===t.type||ue.toggleControls.call(this)},checkLoading:function(t){var e=this;this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){pt(e.elements.container,e.config.classNames.loading,e.loading),ue.toggleControls.call(e)}),this.loading?250:0)},toggleControls:function(t){var e=this.elements.controls;if(e&&this.config.hideControls){var n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||e.pressed||e.hover||n))}},migrateStyles:function(){var t=this;Object.values(s({},this.media.style)).filter((function(t){return!J(t)&&G(t)&&t.startsWith("--plyr")})).forEach((function(e){t.elements.container.style.setProperty(e,t.media.style.getPropertyValue(e)),t.media.style.removeProperty(e)})),J(this.media.style)&&this.media.removeAttribute("style")}},ce=function(){function e(n){t(this,e),this.player=n,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return n(e,[{key:"handleKey",value:function(t){var e=this.player,n=e.elements,r=t.keyCode?t.keyCode:t.which,i="keydown"===t.type,s=i&&r===this.lastKey;if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)&&H(r))if(i){var o=document.activeElement;if($(o)){if(o!==n.inputs.seek&&mt(o,e.config.selectors.editable))return;if(32===t.which&&mt(o,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(r)&&(t.preventDefault(),t.stopPropagation()),r){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:s||(e.currentTime=e.duration/10*(r-48));break;case 32:case 75:s||Pt(e.togglePlay());break;case 38:e.increaseVolume(.1);break;case 40:e.decreaseVolume(.1);break;case 77:s||(e.muted=!e.muted);break;case 39:e.forward();break;case 37:e.rewind();break;case 70:e.fullscreen.toggle();break;case 67:s||e.toggleCaptions();break;case 76:e.loop=!e.loop}27===r&&!e.fullscreen.usingNative&&e.fullscreen.active&&e.fullscreen.toggle(),this.lastKey=r}else this.lastKey=null}},{key:"toggleMenu",value:function(t){Qt.toggleMenu.call(this.player,t)}},{key:"firstTouch",value:function(){var t=this.player,e=t.elements;t.touch=!0,pt(e.container,t.config.classNames.isTouch,!0)}},{key:"setTabFocus",value:function(t){var e,n=this.player,r=n.elements;clearTimeout(this.focusTimer),("keydown"!==t.type||9===t.which)&&("keydown"===t.type&&(this.lastKeyDown=t.timeStamp),("focus"!==t.type||t.timeStamp-this.lastKeyDown<=20)&&(pt(vt.call(n,".".concat(e=n.config.classNames.tabFocus)),e,!1),"focusout"!==t.type&&(this.focusTimer=setTimeout((function(){var t=document.activeElement;r.container.contains(t)&&pt(document.activeElement,n.config.classNames.tabFocus,!0)}),10))))}},{key:"global",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.player;e.config.keyboard.global&&Tt.call(e,window,"keydown keyup",this.handleKey,t,!1),Tt.call(e,document.body,"click",this.toggleMenu,t),kt.call(e,document.body,"touchstart",this.firstTouch),Tt.call(e,document.body,"keydown focus blur focusout",this.setTabFocus,t,!1,!0)}},{key:"container",value:function(){var t=this.player,e=t.config,n=t.elements,r=t.timers;!e.keyboard.global&&e.keyboard.focused&&St.call(t,n.container,"keydown keyup",this.handleKey,!1),St.call(t,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(e){var i=n.controls;i&&"enterfullscreen"===e.type&&(i.pressed=!1,i.hover=!1);var s=0;["touchstart","touchmove","mousemove"].includes(e.type)&&(ue.toggleControls.call(t,!0),s=t.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout((function(){return ue.toggleControls.call(t,!1)}),s)}));var i=function(e){if(!e)return Lt.call(t);var r=n.container.getBoundingClientRect(),i=r.height;return Lt.call(t,"".concat(r.width,":").concat(i))},s=function(){clearTimeout(r.resized),r.resized=setTimeout(i,50)};St.call(t,n.container,"enterfullscreen exitfullscreen",(function(e){var r=t.fullscreen,a=r.usingNative;if(r.target===n.container&&(t.isEmbed||!J(t.config.ratio))){var l="enterfullscreen"===e.type;!function(e,n,r){if(t.isVimeo&&!t.config.vimeo.premium){var i=t.elements.wrapper.firstChild,s=o(e,2)[1],a=o(Mt.call(t),2);i.style.maxWidth=r?"".concat(s/a[1]*a[0],"px"):null,i.style.margin=r?"0 auto":null}}(i(l).ratio,0,l),l&&setTimeout((function(){return et(n.container)}),100),a||(l?St.call(t,window,"resize",s):Ot.call(t,window,"resize",s))}}))}},{key:"media",value:function(){var t=this,e=this.player,n=e.elements;if(St.call(e,e.media,"timeupdate seeking seeked",(function(t){return Qt.timeUpdate.call(e,t)})),St.call(e,e.media,"durationchange loadeddata loadedmetadata",(function(t){return Qt.durationUpdate.call(e,t)})),St.call(e,e.media,"ended",(function(){e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),St.call(e,e.media,"progress playing seeking seeked",(function(t){return Qt.updateProgress.call(e,t)})),St.call(e,e.media,"volumechange",(function(t){return Qt.updateVolume.call(e,t)})),St.call(e,e.media,"playing play pause ended emptied timeupdate",(function(t){return ue.checkPlaying.call(e,t)})),St.call(e,e.media,"waiting canplay seeked playing",(function(t){return ue.checkLoading.call(e,t)})),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){var r=yt.call(e,".".concat(e.config.classNames.video));if(!$(r))return;St.call(e,n.container,"click",(function(i){([n.container,r].includes(i.target)||r.contains(i.target))&&(e.touch&&e.config.hideControls||(e.ended?(t.proxy(i,e.restart,"restart"),t.proxy(i,(function(){Pt(e.play())}),"play")):t.proxy(i,(function(){Pt(e.togglePlay())}),"play")))}))}e.supported.ui&&e.config.disableContextMenu&&St.call(e,n.wrapper,"contextmenu",(function(t){t.preventDefault()}),!1),St.call(e,e.media,"volumechange",(function(){e.storage.set({volume:e.volume,muted:e.muted})})),St.call(e,e.media,"ratechange",(function(){Qt.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})})),St.call(e,e.media,"qualitychange",(function(t){Qt.updateSetting.call(e,"quality",null,t.detail.quality)})),St.call(e,e.media,"ready qualitychange",(function(){Qt.setDownloadUrl.call(e)}));var i=e.config.events.concat(["keyup","keydown"]).join(" ");St.call(e,e.media,i,(function(t){var r=t.detail,i=void 0===r?{}:r;"error"===t.type&&(i=e.media.error),xt.call(e,n.container,t.type,!0,i)}))}},{key:"proxy",value:function(t,e,n){var r=this.player,i=r.config.listeners[n],s=!0;z(i)&&(s=i.call(r,t)),!1!==s&&z(e)&&e.call(r,t)}},{key:"bind",value:function(t,e,n,r){var i=this,s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.player,a=o.config.listeners[r],l=z(a);St.call(o,t,e,(function(t){return i.proxy(t,n,r)}),s&&!l)}},{key:"controls",value:function(){var t=this,e=this.player,n=e.elements,r=nt.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach((function(n){t.bind(n,"click",(function(){Pt(e.togglePlay())}),"play")})),this.bind(n.buttons.restart,"click",e.restart,"restart"),this.bind(n.buttons.rewind,"click",(function(){e.lastSeekTime=Date.now(),e.rewind()}),"rewind"),this.bind(n.buttons.fastForward,"click",(function(){e.lastSeekTime=Date.now(),e.forward()}),"fastForward"),this.bind(n.buttons.mute,"click",(function(){e.muted=!e.muted}),"mute"),this.bind(n.buttons.captions,"click",(function(){return e.toggleCaptions()})),this.bind(n.buttons.download,"click",(function(){xt.call(e,e.media,"download")}),"download"),this.bind(n.buttons.fullscreen,"click",(function(){e.fullscreen.toggle()}),"fullscreen"),this.bind(n.buttons.pip,"click",(function(){e.pip="toggle"}),"pip"),this.bind(n.buttons.airplay,"click",e.airplay,"airplay"),this.bind(n.buttons.settings,"click",(function(t){t.stopPropagation(),t.preventDefault(),Qt.toggleMenu.call(e,t)}),null,!1),this.bind(n.buttons.settings,"keyup",(function(t){var n=t.which;[13,32].includes(n)&&(13!==n?(t.preventDefault(),t.stopPropagation(),Qt.toggleMenu.call(e,t)):Qt.focusFirstMenuItem.call(e,null,!0))}),null,!1),this.bind(n.settings.menu,"keydown",(function(t){27===t.which&&Qt.toggleMenu.call(e,t)})),this.bind(n.inputs.seek,"mousedown mousemove",(function(t){var e=n.progress.getBoundingClientRect();t.currentTarget.setAttribute("seek-value",100/e.width*(t.pageX-e.left))})),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(t){var n=t.currentTarget,r=t.keyCode?t.keyCode:t.which,i="play-on-seeked";if(!X(t)||39===r||37===r){e.lastSeekTime=Date.now();var s=n.hasAttribute(i),o=["mouseup","touchend","keyup"].includes(t.type);s&&o?(n.removeAttribute(i),Pt(e.play())):!o&&e.playing&&(n.setAttribute(i,""),e.pause())}})),nt.isIos){var i=vt.call(e,'input[type="range"]');Array.from(i).forEach((function(e){return t.bind(e,r,(function(t){return et(t.target)}))}))}this.bind(n.inputs.seek,r,(function(t){var n=t.currentTarget,r=n.getAttribute("seek-value");J(r)&&(r=n.value),n.removeAttribute("seek-value"),e.currentTime=r/n.max*e.duration}),"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",(function(t){return Qt.updateSeekTooltip.call(e,t)})),this.bind(n.progress,"mousemove touchmove",(function(t){var n=e.previewThumbnails;n&&n.loaded&&n.startMove(t)})),this.bind(n.progress,"mouseleave touchend click",(function(){var t=e.previewThumbnails;t&&t.loaded&&t.endMove(!1,!0)})),this.bind(n.progress,"mousedown touchstart",(function(t){var n=e.previewThumbnails;n&&n.loaded&&n.startScrubbing(t)})),this.bind(n.progress,"mouseup touchend",(function(t){var n=e.previewThumbnails;n&&n.loaded&&n.endScrubbing(t)})),nt.isWebkit&&Array.from(vt.call(e,'input[type="range"]')).forEach((function(n){t.bind(n,"input",(function(t){return Qt.updateRangeFill.call(e,t.target)}))})),e.config.toggleInvert&&!$(n.display.duration)&&this.bind(n.display.currentTime,"click",(function(){0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,Qt.timeUpdate.call(e))})),this.bind(n.inputs.volume,r,(function(t){e.volume=t.target.value}),"volume"),this.bind(n.controls,"mouseenter mouseleave",(function(t){n.controls.hover=!e.touch&&"mouseenter"===t.type})),n.fullscreen&&Array.from(n.fullscreen.children).filter((function(t){return!t.contains(n.container)})).forEach((function(r){t.bind(r,"mouseenter mouseleave",(function(t){n.controls.hover=!e.touch&&"mouseenter"===t.type}))})),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",(function(t){n.controls.pressed=["mousedown","touchstart"].includes(t.type)})),this.bind(n.controls,"focusin",(function(){var r=e.config,i=e.timers;pt(n.controls,r.classNames.noTransition,!0),ue.toggleControls.call(e,!0),setTimeout((function(){pt(n.controls,r.classNames.noTransition,!1)}),0);var s=t.touch?3e3:4e3;clearTimeout(i.controls),i.controls=setTimeout((function(){return ue.toggleControls.call(e,!1)}),s)})),this.bind(n.inputs.volume,"wheel",(function(t){var n=t.webkitDirectionInvertedFromDevice,r=o([t.deltaX,-t.deltaY].map((function(t){return n?-t:t})),2),i=r[0],s=r[1],a=Math.sign(Math.abs(i)>Math.abs(s)?i:s);e.increaseVolume(a/50);var l=e.media.volume;(1===a&&l<1||-1===a&&l>0)&&t.preventDefault()}),"volume",!1)}}]),e}();"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var he=function(t,e){return function(t,e){t.exports=function(){var t=function(){},e={},n={},r={};function i(t,e){if(t){var i=r[t];if(n[t]=e,i)for(;i.length;)i[0](t,e),i.splice(0,1)}}function s(e,n){e.call&&(e={success:e}),n.length?(e.error||t)(n):(e.success||t)(e)}function o(e,n,r,i){var s,a,l=document,u=r.async,c=(r.numRetries||0)+1,h=r.before||t,d=e.replace(/[\?|#].*$/,""),f=e.replace(/^(css|img)!/,"");i=i||0,/(^css!|\.css$)/.test(d)?((a=l.createElement("link")).rel="stylesheet",a.href=f,(s="hideFocus"in a)&&a.relList&&(s=0,a.rel="preload",a.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(d)?(a=l.createElement("img")).src=f:((a=l.createElement("script")).src=e,a.async=void 0===u||u),a.onload=a.onerror=a.onbeforeload=function(t){var l=t.type[0];if(s)try{a.sheet.cssText.length||(l="e")}catch(t){18!=t.code&&(l="e")}if("e"==l){if((i+=1)=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(n,["premium","referrerPolicy"]);r&&Object.assign(a,{controls:!1,sidedock:!1});var l=te(s({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},a)),u=e.media.getAttribute("src");J(u)&&(u=e.media.getAttribute(e.config.attributes.embed.id));var c,h=J(c=u)?null:H(Number(c))?c:c.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:c,d=at("iframe"),f=jt(e.config.urls.vimeo.iframe,h,l);if(d.setAttribute("src",f),d.setAttribute("allowfullscreen",""),d.setAttribute("allow","autoplay,fullscreen,picture-in-picture"),J(i)||d.setAttribute("referrerPolicy",i),r||!n.customControls)d.setAttribute("data-poster",e.poster),e.media=ht(d,e.media);else{var p=at("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});p.appendChild(d),e.media=ht(p,e.media)}n.customControls||Kt(jt(e.config.urls.vimeo.api,f)).then((function(t){!J(t)&&t.thumbnail_url&&ue.setPoster.call(e,t.thumbnail_url).catch((function(){}))})),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=function(){return fe.call(e,!0),e.embed.play()},e.media.pause=function(){return fe.call(e,!1),e.embed.pause()},e.media.stop=function(){e.pause(),e.currentTime=0};var g=e.media.currentTime;Object.defineProperty(e.media,"currentTime",{get:function(){return g},set:function(t){var n=e.embed,r=e.media,i=e.volume,s=e.paused&&!n.hasPlayed;r.seeking=!0,xt.call(e,r,"seeking"),Promise.resolve(s&&n.setVolume(0)).then((function(){return n.setCurrentTime(t)})).then((function(){return s&&n.pause()})).then((function(){return s&&n.setVolume(i)})).catch((function(){}))}});var m=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:function(){return m},set:function(t){e.embed.setPlaybackRate(t).then((function(){m=t,xt.call(e,e.media,"ratechange")})).catch((function(){e.options.speed=[1]}))}});var v=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return v},set:function(t){e.embed.setVolume(t).then((function(){v=t,xt.call(e,e.media,"volumechange")}))}});var y=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return y},set:function(t){var n=!!q(t)&&t;e.embed.setVolume(n?0:e.config.volume).then((function(){y=n,xt.call(e,e.media,"volumechange")}))}});var b,_=e.config.loop;Object.defineProperty(e.media,"loop",{get:function(){return _},set:function(t){var n=q(t)?t:e.config.loop.active;e.embed.setLoop(n).then((function(){_=n}))}}),e.embed.getVideoUrl().then((function(t){b=t,Qt.setDownloadUrl.call(e)})).catch((function(e){t.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:function(){return b}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((function(n){var r=o(n,2);e.embed.ratio=[r[0],r[1]],Lt.call(t)})),e.embed.setAutopause(e.config.autopause).then((function(t){e.config.autopause=t})),e.embed.getVideoTitle().then((function(n){e.config.title=n,ue.setTitle.call(t)})),e.embed.getCurrentTime().then((function(t){g=t,xt.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((function(t){e.media.duration=t,xt.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((function(t){e.media.textTracks=t,ee.setup.call(e)})),e.embed.on("cuechange",(function(t){var n=t.cues,r=(void 0===n?[]:n).map((function(t){return function(t){var e=document.createDocumentFragment(),n=document.createElement("div");return e.appendChild(n),n.innerHTML=t,e.firstChild.innerText}(t.text)}));ee.updateCues.call(e,r)})),e.embed.on("loaded",(function(){e.embed.getPaused().then((function(t){fe.call(e,!t),t||xt.call(e,e.media,"playing")})),$(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(function(){xt.call(e,e.media,"waiting")})),e.embed.on("bufferend",(function(){xt.call(e,e.media,"playing")})),e.embed.on("play",(function(){fe.call(e,!0),xt.call(e,e.media,"playing")})),e.embed.on("pause",(function(){fe.call(e,!1)})),e.embed.on("timeupdate",(function(t){e.media.seeking=!1,g=t.seconds,xt.call(e,e.media,"timeupdate")})),e.embed.on("progress",(function(t){e.media.buffered=t.percent,xt.call(e,e.media,"progress"),1===parseInt(t.percent,10)&&xt.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((function(t){t!==e.media.duration&&(e.media.duration=t,xt.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(function(){e.media.seeking=!1,xt.call(e,e.media,"seeked")})),e.embed.on("ended",(function(){e.media.paused=!0,xt.call(e,e.media,"ended")})),e.embed.on("error",(function(t){e.media.error=t,xt.call(e,e.media,"error")})),n.customControls&&setTimeout((function(){return ue.build.call(e)}),0)}};function ge(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,xt.call(this,this.media,t?"play":"pause"))}function me(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var ve={setup:function(){var t=this;if(pt(this.elements.wrapper,this.config.classNames.embed,!0),V(window.YT)&&z(window.YT.Player))ve.ready.call(this);else{var e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){z(e)&&e(),ve.ready.call(t)},de(this.config.urls.youtube.sdk).catch((function(e){t.debug.warn("YouTube API failed to load",e)}))}},getTitle:function(t){var e=this;Kt(jt(this.config.urls.youtube.api,t)).then((function(t){if(V(t)){var n=t.height,r=t.width;e.config.title=t.title,ue.setTitle.call(e),e.embed.ratio=[r,n]}Lt.call(e)})).catch((function(){Lt.call(e)}))},ready:function(){var t=this,e=t.config.youtube,n=t.media&&t.media.getAttribute("id");if(J(n)||!n.startsWith("youtube-")){var r=t.media.getAttribute("src");J(r)&&(r=t.media.getAttribute(this.config.attributes.embed.id));var i,s,o=J(i=r)?null:i.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:i,a=at("div",{id:(s=t.provider,"".concat(s,"-").concat(Math.floor(1e4*Math.random()))),"data-poster":e.customControls?t.poster:void 0});if(t.media=ht(a,t.media),e.customControls){var l=function(t){return"https://i.ytimg.com/vi/".concat(o,"/").concat(t,"default.jpg")};le(l("maxres"),121).catch((function(){return le(l("sd"),121)})).catch((function(){return le(l("hq"))})).then((function(e){return ue.setPoster.call(t,e.src)})).then((function(e){e.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}t.embed=new window.YT.Player(t.media,{videoId:o,host:me(e),playerVars:it({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:t.config.fullscreen.iosNative?0:1,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError:function(e){if(!t.media.error){var n=e.data;t.media.error={code:n,message:{2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[n]||"An unknown error occured"},xt.call(t,t.media,"error")}},onPlaybackRateChange:function(e){t.media.playbackRate=e.target.getPlaybackRate(),xt.call(t,t.media,"ratechange")},onReady:function(n){if(!z(t.media.play)){var r=n.target;ve.getTitle.call(t,o),t.media.play=function(){ge.call(t,!0),r.playVideo()},t.media.pause=function(){ge.call(t,!1),r.pauseVideo()},t.media.stop=function(){r.stopVideo()},t.media.duration=r.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:function(){return Number(r.getCurrentTime())},set:function(e){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,xt.call(t,t.media,"seeking"),r.seekTo(e)}}),Object.defineProperty(t.media,"playbackRate",{get:function(){return r.getPlaybackRate()},set:function(t){r.setPlaybackRate(t)}});var i=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return i},set:function(e){r.setVolume(100*(i=e)),xt.call(t,t.media,"volumechange")}});var s=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return s},set:function(e){var n=q(e)?e:s;s=n,r[n?"mute":"unMute"](),r.setVolume(100*i),xt.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:function(){return r.getVideoUrl()}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}});var a=r.getAvailablePlaybackRates();t.options.speed=a.filter((function(e){return t.config.speed.options.includes(e)})),t.supported.ui&&e.customControls&&t.media.setAttribute("tabindex",-1),xt.call(t,t.media,"timeupdate"),xt.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval((function(){t.media.buffered=r.getVideoLoadedFraction(),(null===t.media.lastBuffered||t.media.lastBuffered0&&void 0!==arguments[0]&&arguments[0];if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");var n=function(){var e=Zt(Math.max(t.manager.getRemainingTime(),0)),n="".concat(qt("advertisement",t.player.config)," - ").concat(e);t.elements.container.setAttribute("data-badge-text",n)};this.countdownTimer=setInterval(n,100)}},{key:"onAdsManagerLoaded",value:function(t){var e=this;if(this.enabled){var n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=t.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)})),Object.keys(google.ima.AdEvent.Type).forEach((function(t){e.manager.addEventListener(google.ima.AdEvent.Type[t],(function(t){return e.onAdEvent(t)}))})),this.trigger("loaded")}}},{key:"addCuePoints",value:function(){var t=this;J(this.cuePoints)||this.cuePoints.forEach((function(e){if(0!==e&&-1!==e&&e1?n-1:0),i=1;ie.width/e.height?(n.width=e.width,n.height=1/t*e.width):(n.height=e.height,n.width=t*e.height),n},we=function(){function e(n){t(this,e),this.player=n,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return n(e,[{key:"load",value:function(){var t=this;this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((function(){t.enabled&&(t.render(),t.determineContainerAutoSizing(),t.loaded=!0)}))}},{key:"getThumbnails",value:function(){var t=this;return new Promise((function(e){var n=t.player.config.previewThumbnails.src;if(J(n))throw new Error("Missing previewThumbnails.src config attribute");var r=function(){t.thumbnails.sort((function(t,e){return t.height-e.height})),t.player.debug.log("Preview thumbnails",t.thumbnails),e()};if(z(n))n((function(e){t.thumbnails=e,r()}));else{var i=(G(n)?[n]:n).map((function(e){return t.getThumbnail(e)}));Promise.all(i).then(r)}}))}},{key:"getThumbnail",value:function(t){var e=this;return new Promise((function(n){Kt(t).then((function(r){var i,s,a={frames:(i=r,s=[],i.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(t){var e={};t.split(/\r\n|\n|\r/).forEach((function(t){if(H(e.startTime)){if(!J(t.trim())&&J(e.text)){var n=t.trim().split("#xywh="),r=o(n,1);if(e.text=r[0],n[1]){var i=o(n[1].split(","),4);e.x=i[0],e.y=i[1],e.w=i[2],e.h=i[3]}}}else{var s=t.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);s&&(e.startTime=60*Number(s[1]||0)*60+60*Number(s[2])+Number(s[3])+Number("0.".concat(s[4])),e.endTime=60*Number(s[6]||0)*60+60*Number(s[7])+Number(s[8])+Number("0.".concat(s[9])))}})),e.text&&s.push(e)})),s),height:null,urlPrefix:""};a.frames[0].text.startsWith("/")||a.frames[0].text.startsWith("http://")||a.frames[0].text.startsWith("https://")||(a.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));var l=new Image;l.onload=function(){a.height=l.naturalHeight,a.width=l.naturalWidth,e.thumbnails.push(a),n()},l.src=a.urlPrefix+a.frames[0].text}))}))}},{key:"startMove",value:function(t){if(this.loaded&&Y(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if("touchmove"===t.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var e=this.player.elements.progress.getBoundingClientRect();this.seekTime=this.player.media.duration*(100/e.width*(t.pageX-e.left)/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=Zt(this.seekTime)}this.showImageAtCurrentTime()}}},{key:"endMove",value:function(){this.toggleThumbContainer(!1,!0)}},{key:"startScrubbing",value:function(t){(U(t.button)||!1===t.button||0===t.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}},{key:"endScrubbing",value:function(){var t=this;this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):kt.call(this.player,this.player.media,"timeupdate",(function(){t.mouseDown||t.toggleScrubbingContainer(!1)}))}},{key:"listeners",value:function(){var t=this;this.player.on("play",(function(){t.toggleThumbContainer(!1,!0)})),this.player.on("seeked",(function(){t.toggleThumbContainer(!1)})),this.player.on("timeupdate",(function(){t.lastTime=t.player.media.currentTime}))}},{key:"render",value:function(){this.elements.thumb.container=at("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=at("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);var t=at("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=at("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.container.appendChild(t),$(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=at("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}},{key:"destroy",value:function(){this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}},{key:"showImageAtCurrentTime",value:function(){var t=this;this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();var e=this.thumbnails[0].frames.findIndex((function(e){return t.seekTime>=e.startTime&&t.seekTime<=e.endTime})),n=e>=0,r=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((function(n,i){t.loadedImages.includes(n.frames[e].text)&&(r=i)})),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(r)))}},{key:"loadImage",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=this.showingThumb,r=this.thumbnails[e],i=r.urlPrefix,s=r.frames[n],o=r.frames[n].text,a=i+o;if(this.currentImageElement&&this.currentImageElement.dataset.filename===o)this.showImage(this.currentImageElement,s,e,n,o,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);var l=new Image;l.src=a,l.dataset.index=n,l.dataset.filename=o,this.showingThumbFilename=o,this.player.debug.log("Loading image: ".concat(a)),l.onload=function(){return t.showImage(l,s,e,n,o,!0)},this.loadingImage=l,this.removeOldImages(l)}}},{key:"showImage",value:function(t,e,n,r,i){var s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];this.player.debug.log("Showing thumb: ".concat(i,". num: ").concat(r,". qual: ").concat(n,". newimg: ").concat(s)),this.setImageSizeAndOffset(t,e),s&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(i)||this.loadedImages.push(i)),this.preloadNearby(r,!0).then(this.preloadNearby(r,!1)).then(this.getHigherQuality(n,t,e,i))}},{key:"removeOldImages",value:function(t){var e=this;Array.from(this.currentImageContainer.children).forEach((function(n){if("img"===n.tagName.toLowerCase()){var r=e.usingSprites?500:1e3;if(n.dataset.index!==t.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;var i=e.currentImageContainer;setTimeout((function(){i.removeChild(n),e.player.debug.log("Removing thumb: ".concat(n.dataset.filename))}),r)}}}))}},{key:"preloadNearby",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(r){setTimeout((function(){var i=e.thumbnails[0].frames[t].text;if(e.showingThumbFilename===i){var s;s=n?e.thumbnails[0].frames.slice(t):e.thumbnails[0].frames.slice(0,t).reverse();var o=!1;s.forEach((function(t){var n=t.text;if(n!==i&&!e.loadedImages.includes(n)){o=!0,e.player.debug.log("Preloading thumb filename: ".concat(n));var s=e.thumbnails[0].urlPrefix+n,a=new Image;a.src=s,a.onload=function(){e.player.debug.log("Preloaded thumb filename: ".concat(n)),e.loadedImages.includes(n)||e.loadedImages.push(n),r()}}})),o||r()}}),300)}))}},{key:"getHigherQuality",value:function(t,e,n,r){var i=this;if(t0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,t),!t&&e&&(this.showingThumb=null,this.showingThumbFilename=null)}},{key:"toggleScrubbingContainer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(e,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}},{key:"determineContainerAutoSizing",value:function(){(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}},{key:"setThumbContainerSizeAndPos",value:function(){if(this.sizeSpecifiedInCSS){if(this.elements.thumb.imageContainer.clientHeight>20&&this.elements.thumb.imageContainer.clientWidth<20){var t=Math.floor(this.elements.thumb.imageContainer.clientHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.width="".concat(t,"px")}else if(this.elements.thumb.imageContainer.clientHeight<20&&this.elements.thumb.imageContainer.clientWidth>20){var e=Math.floor(this.elements.thumb.imageContainer.clientWidth/this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height="".concat(e,"px")}}else{var n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height="".concat(this.thumbContainerHeight,"px"),this.elements.thumb.imageContainer.style.width="".concat(n,"px")}this.setThumbContainerPos()}},{key:"setThumbContainerPos",value:function(){var t=this.player.elements.progress.getBoundingClientRect(),e=this.player.elements.container.getBoundingClientRect(),n=this.elements.thumb.container,r=e.left-t.left+10,i=e.right-t.left-n.clientWidth-10,s=this.mousePosX-t.left-n.clientWidth/2;si&&(s=i),n.style.left="".concat(s,"px")}},{key:"setScrubbingContainerSize",value:function(){var t=_e(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}),e=t.height;this.elements.scrubbing.container.style.width="".concat(t.width,"px"),this.elements.scrubbing.container.style.height="".concat(e,"px")}},{key:"setImageSizeAndOffset",value:function(t,e){if(this.usingSprites){var n=this.thumbContainerHeight/e.h;t.style.height="".concat(t.naturalHeight*n,"px"),t.style.width="".concat(t.naturalWidth*n,"px"),t.style.left="-".concat(e.x*n,"px"),t.style.top="-".concat(e.y*n,"px")}}},{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?_e(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}]),e}(),Ee={insertElements:function(t,e){var n=this;G(e)?lt(t,this.media,{src:e}):K(e)&&e.forEach((function(e){lt(t,n.media,e)}))},change:function(t){var e=this;rt(t,"sources.length")?(Ft.cancelRequests.call(this),this.destroy.call(this,(function(){e.options.quality=[],ut(e.media),e.media=null,$(e.elements.container)&&e.elements.container.removeAttribute("class");var n=t.sources,r=t.type,i=o(n,1)[0],s=i.provider,a=void 0===s?ie.html5:s,l="html5"===a?r:"div",u="html5"===a?{}:{src:i.src};Object.assign(e,{provider:a,type:r,supported:Et.check(r,a,e.config.playsinline),media:at(l,u)}),e.elements.container.appendChild(e.media),q(t.autoplay)&&(e.config.autoplay=t.autoplay),e.isHTML5&&(e.config.crossorigin&&e.media.setAttribute("crossorigin",""),e.config.autoplay&&e.media.setAttribute("autoplay",""),J(t.poster)||(e.poster=t.poster),e.config.loop.active&&e.media.setAttribute("loop",""),e.config.muted&&e.media.setAttribute("muted",""),e.config.playsinline&&e.media.setAttribute("playsinline","")),ue.addStyleHook.call(e),e.isHTML5&&Ee.insertElements.call(e,"source",n),e.config.title=t.title,ye.setup.call(e),e.isHTML5&&Object.keys(t).includes("tracks")&&Ee.insertElements.call(e,"track",t.tracks),(e.isHTML5||e.isEmbed&&!e.supported.ui)&&ue.build.call(e),e.isHTML5&&e.media.load(),J(t.previewThumbnails)||(Object.assign(e.config.previewThumbnails,t.previewThumbnails),e.previewThumbnails&&e.previewThumbnails.loaded&&(e.previewThumbnails.destroy(),e.previewThumbnails=null),e.config.previewThumbnails.enabled&&(e.previewThumbnails=new we(e))),e.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},Ce=function(){function e(n,r){var i=this;if(t(this,e),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Et.touch,this.media=n,G(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||W(this.media)||K(this.media))&&(this.media=this.media[0]),this.config=it({},ne,e.defaults,r||{},function(){try{return JSON.parse(i.media.getAttribute("data-plyr-config"))}catch(t){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new oe(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Et),!U(this.media)&&$(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(Et.check().api){var s=this.media.cloneNode(!0);s.autoplay=!1,this.elements.original=s;var o=this.media.tagName.toLowerCase(),a=null,l=null;switch(o){case"div":if(a=this.media.querySelector("iframe"),$(a)){if(l=Jt(a.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?ie.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?ie.vimeo:null}(l.toString()),this.elements.container=this.media,this.media=a,this.elements.container.className="",l.search.length){var u=["1","true"];u.includes(l.searchParams.get("autoplay"))&&(this.config.autoplay=!0),u.includes(l.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=u.includes(l.searchParams.get("playsinline")),this.config.youtube.hl=l.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(J(this.provider)||!Object.keys(ie).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type="video";break;case"video":case"audio":this.type=o,this.provider=ie.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=Et.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new ce(this),this.storage=new zt(this),this.media.plyr=this,$(this.elements.container)||(this.elements.container=at("div",{tabindex:0}),st(this.media,this.elements.container)),ue.migrateStyles.call(this),ue.addStyleHook.call(this),ye.setup.call(this),this.config.debug&&St.call(this,this.elements.container,this.config.events.join(" "),(function(t){i.debug.log("event: ".concat(t.type))})),this.fullscreen=new ae(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&ue.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new be(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return Pt(i.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new we(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return n(e,[{key:"play",value:function(){var t=this;return z(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((function(){return t.ads.play()})).catch((function(){return Pt(t.media.play())})),this.media.play()):null}},{key:"pause",value:function(){return this.playing&&z(this.media.pause)?this.media.pause():null}},{key:"togglePlay",value:function(t){return(q(t)?t:!this.playing)?this.play():this.pause()}},{key:"stop",value:function(){this.isHTML5?(this.pause(),this.restart()):z(this.media.stop)&&this.media.stop()}},{key:"restart",value:function(){this.currentTime=0}},{key:"rewind",value:function(t){this.currentTime-=H(t)?t:this.config.seekTime}},{key:"forward",value:function(t){this.currentTime+=H(t)?t:this.config.seekTime}},{key:"increaseVolume",value:function(t){this.volume=(this.media.muted?0:this.volume)+(H(t)?t:0)}},{key:"decreaseVolume",value:function(t){this.increaseVolume(-t)}},{key:"toggleCaptions",value:function(t){ee.toggle.call(this,t,!1)}},{key:"airplay",value:function(){Et.airplay&&this.media.webkitShowPlaybackTargetPicker()}},{key:"toggleControls",value:function(t){if(this.supported.ui&&!this.isAudio){var e=gt(this.elements.container,this.config.classNames.hideControls),n=pt(this.elements.container,this.config.classNames.hideControls,void 0===t?void 0:!t);return n&&K(this.config.controls)&&this.config.controls.includes("settings")&&!J(this.config.settings)&&Qt.toggleMenu.call(this,!1),n!==e&&xt.call(this,this.media,n?"controlshidden":"controlsshown"),!n}return!1}},{key:"on",value:function(t,e){St.call(this,this.elements.container,t,e)}},{key:"once",value:function(t,e){kt.call(this,this.elements.container,t,e)}},{key:"off",value:function(t,e){Ot(this.elements.container,t,e)}},{key:"destroy",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.ready){var r=function(){document.body.style.overflow="",e.embed=null,n?(Object.keys(e.elements).length&&(ut(e.elements.buttons.play),ut(e.elements.captions),ut(e.elements.controls),ut(e.elements.wrapper),e.elements.buttons.play=null,e.elements.captions=null,e.elements.controls=null,e.elements.wrapper=null),z(t)&&t()):(At.call(e),Ft.cancelRequests.call(e),ht(e.elements.original,e.elements.container),xt.call(e,e.elements.original,"destroyed",!0),z(t)&&t.call(e.elements.original),e.ready=!1,setTimeout((function(){e.elements=null,e.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(ue.toggleNativeControls.call(this,!0),r()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&z(this.embed.destroy)&&this.embed.destroy(),r()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(r),setTimeout(r,200))}}},{key:"supports",value:function(t){return Et.mime.call(this,t)}},{key:"isHTML5",get:function(){return this.provider===ie.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===ie.youtube}},{key:"isVimeo",get:function(){return this.provider===ie.vimeo}},{key:"isVideo",get:function(){return"video"===this.type}},{key:"isAudio",get:function(){return"audio"===this.type}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",set:function(t){if(this.duration){var e=H(t)&&t>0;this.media.currentTime=e?Math.min(t,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}},get:function(){return Number(this.media.currentTime)}},{key:"buffered",get:function(){var t=this.media.buffered;return H(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var t=parseFloat(this.config.duration),e=(this.media||{}).duration,n=H(e)&&e!==1/0?e:0;return t||n}},{key:"volume",set:function(t){var e=t;G(e)&&(e=Number(e)),H(e)||(e=this.storage.get("volume")),H(e)||(e=this.config.volume),e>1&&(e=1),e<0&&(e=0),this.config.volume=e,this.media.volume=e,!J(t)&&this.muted&&e>0&&(this.muted=!1)},get:function(){return Number(this.media.volume)}},{key:"muted",set:function(t){var e=t;q(e)||(e=this.storage.get("muted")),q(e)||(e=this.config.muted),this.config.muted=e,this.media.muted=e},get:function(){return Boolean(this.media.muted)}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",set:function(t){var e=this,n=null;H(t)&&(n=t),H(n)||(n=this.storage.get("speed")),H(n)||(n=this.config.speed.selected),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(t,e),n)}(n,this.minimumSpeed,this.maximumSpeed),this.config.speed.selected=n,setTimeout((function(){e.media.playbackRate=n}),0)},get:function(){return Number(this.media.playbackRate)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,a(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,a(this.options.speed)):this.isVimeo?2:16}},{key:"quality",set:function(t){var e=this.config.quality,n=this.options.quality;if(n.length){var r=[!J(t)&&Number(t),this.storage.get("quality"),e.selected,e.default].find(H),i=!0;if(!n.includes(r)){var s=function(t,e){return K(t)&&t.length?t.reduce((function(t,n){return Math.abs(n-e)1&&void 0!==arguments[1]?arguments[1]:{},r=null;return G(t)?r=Array.from(document.querySelectorAll(t)):W(t)?r=Array.from(t):K(t)&&(r=t.filter($)),J(r)?null:r.map((function(t){return new e(t,n)}))}}]),e}();return Ce.defaults=JSON.parse(JSON.stringify(ne)),Ce}())},WWQz:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r="finishReason",i=["heartbeatFailed","idleTimeout","documentHidden"]},"bju/":function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(r||(r={})),function(t){t.fromHttpCode=function(e){if(e<400&&e>=100)return t.Ok;if(e>=400&&e<500)switch(e){case 401:return t.Unauthenticated;case 403:return t.PermissionDenied;case 404:return t.NotFound;case 409:return t.AlreadyExists;case 413:return t.FailedPrecondition;case 429:return t.ResourceExhausted;default:return t.InvalidArgument}if(e>=500&&e<600)switch(e){case 501:return t.Unimplemented;case 503:return t.Unavailable;case 504:return t.DeadlineExceeded;default:return t.InternalError}return t.UnknownError}}(r||(r={}))},jrpr:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.Explicit="explicitly_set",t.Sampler="client_sampler",t.Rate="client_rate",t.Inheritance="inheritance"}(r||(r={}))},kdvv:function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return c})),n.d(e,"a",(function(){return h}));var r=n("z+RT"),i=n("+A1k"),s={nowSeconds:function(){return Date.now()/1e3}},o=Object(i.b)()?function(){try{return Object(i.a)(t,"perf_hooks").performance}catch(e){return}}():function(){var t=Object(r.a)().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),a=void 0===o?s:{nowSeconds:function(){return(o.timeOrigin+o.now())/1e3}},l=s.nowSeconds.bind(s),u=a.nowSeconds.bind(a),c=u,h=function(){var t=Object(r.a)().performance;if(t&&t.now){var e=t.now(),n=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+e-n):36e5,s=i<36e5,o=t.timing&&t.timing.navigationStart,a="number"==typeof o?Math.abs(o+e-n):36e5;return s||a<36e5?i<=a?t.timeOrigin:o:n}}()}).call(this,n("3UD+")(t))},lW6c:function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"c",(function(){return p})),n.d(e,"b",(function(){return m}));var r=n("wmvo"),i=n("yksw"),s=n("9/Zf"),o=n("kdvv"),a=n("8LbN"),l=n("z+RT"),u=n("+A1k"),c=n("KjyA"),h=n("6PXS"),d=function(){function t(t){this.errors=0,this.sid=Object(s.h)(),this.duration=0,this.status=i.a.Ok,this.init=!0,this.ignoreDuration=!1;var e=Object(o.c)();this.timestamp=e,this.started=e,t&&this.update(t)}return t.prototype.update=function(t){if(void 0===t&&(t={}),t.user&&(!this.ipAddress&&t.user.ip_address&&(this.ipAddress=t.user.ip_address),this.did||t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Object(o.c)(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:Object(s.h)()),void 0!==t.init&&(this.init=t.init),!this.did&&t.did&&(this.did=""+t.did),"number"==typeof t.started&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof t.duration)this.duration=t.duration;else{var e=this.timestamp-this.started;this.duration=e>=0?e:0}t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),!this.ipAddress&&t.ipAddress&&(this.ipAddress=t.ipAddress),!this.userAgent&&t.userAgent&&(this.userAgent=t.userAgent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)},t.prototype.close=function(t){t?this.update({status:t}):this.status===i.a.Ok?this.update({status:i.a.Exited}):this.update()},t.prototype.toJSON=function(){return Object(h.a)({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:Object(h.a)({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},t}(),f=function(){function t(t,e,n){void 0===e&&(e=new c.a),void 0===n&&(n=4),this._version=n,this._stack=[{}],this.getStackTop().scope=e,t&&this.bindClient(t)}return t.prototype.isOlderThan=function(t){return this._versiont.clientHeight&&("scroll"===e.overflowY||"auto"===e.overflowY)||t.scrollWidth>t.clientWidth&&("scroll"===e.overflowX||"auto"===e.overflowX)}function o(t,e,n){return t=(0===t?n.scrollWidth-n.width:n.scrollHeight-n.height):-1!==e||r<=0}var u,c,h,d,f,p=function(t,e){var n=t/e;return n*n*n*e},g={horizontal:0,vertical:0},m={x:0,y:0};function v(){u||(u=window.requestAnimationFrame(y))}function y(){var t=0,n=0,r=e(d);0!==g.horizontal&&(t=Math.round(p(m.x,75)*g.horizontal),i(d,0,t)),0!==g.vertical&&(n=Math.round(p(m.y,75)*g.vertical),i(d,1,n)),r?f(t,n):f(0,0),u=null,b(c,d,75,g,m)&&v()}function b(t,e,s,u,c){if(!t||!e)return!1;var h={x:n(e,0),y:n(e,1),width:r(e,0),height:r(e,1),scrollX:i(e,0),scrollY:i(e,1),scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight},d={x:t.x-h.x,y:t.y-h.y};return u.horizontal=o(d.x,h.width,s),u.vertical=o(d.y,h.height,s),u.horizontal&&l(0,u.horizontal,h)?u.horizontal=0:u.horizontal&&(c.x=a(u.horizontal,d.x,h.width,s)),u.vertical&&l(1,u.vertical,h)?u.vertical=0:u.vertical&&(c.y=a(u.vertical,d.y,h.height,s)),!(!u.horizontal&&!u.vertical)}t.scrollBehaviourDragImageTranslateOverride=function(t,e,n,r){c=e,f=r,h!==n&&(d=function(t){do{if(!t)return;if(s(t))return t;if(t===document.documentElement)return null}while(t=t.parentNode);return null}(h=n)),b(c,d,75,g,m)?v():u&&(window.cancelAnimationFrame(u),u=null)},Object.defineProperty(t,"__esModule",{value:!0})}(e)},pRiV:function(t,e,n){"use strict";function r(t){try{return t&&"function"==typeof t&&t.name||""}catch(e){return""}}n.d(e,"a",(function(){return r}))},ulZh:function(t,e,n){var r;"undefined"!=typeof window&&(r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,(function(e){return t[e]}).bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js": /*!*********************************************!*\ !*** ./node_modules/eventemitter3/index.js ***! \*********************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function s(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(t,e,n,r,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,r||t,s),l=i?i+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],a]:t._events[l].push(a):(t._events[l]=a,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function u(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=this._events[i?i+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,s=new Array(r);n0}),!1)}t.exports=function(t,e){var i={main:n.m},a=(e=e||{}).all?{main:Object.keys(i.main)}:function(t,e){for(var n={main:[e]},r={main:[]},i={main:{}};o(n);)for(var a=Object.keys(n),l=0;l>>8^255&m^99,e[m]=f;var v=d[f],y=d[v],b=d[y],_=257*d[m]^16843008*m;r[f]=_<<24|_>>>8,i[f]=_<<16|_>>>16,s[f]=_<<8|_>>>24,o[f]=_,l[m]=(_=16843009*b^65537*y^257*v^16843008*f)<<24|_>>>8,u[m]=_<<16|_>>>16,c[m]=_<<8|_>>>24,h[m]=_,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),n=!0,r=0;r>>5}function d(t,e){return!!(e+1=t.length)return!1;var r=h(t,e);if(r<=n)return!1;var i=e+r;if(i===t.length||i+1>>6),!((l=(60&e[n+2])>>>2)>p.length-1))return c=(1&e[n+2])<<2,a.logger.log("manifest codec:"+s+",ADTS data:type:"+o+",sampleingIndex:"+l+"["+p[l]+"Hz],channelConfig:"+(c|=(192&e[n+3])>>>6)),/firefox/i.test(d)?l>=6?(o=5,h=new Array(4),u=l-3):(o=2,h=new Array(2),u=l):-1!==d.indexOf("android")?(o=2,h=new Array(2),u=l):(o=5,h=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&l>=6?u=l-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(l>=6&&1===c||/vivaldi/i.test(d))||!s&&1===c)&&(o=2,h=new Array(2)),u=l)),h[0]=o<<3,h[0]|=(14&l)>>1,h[1]|=(1&l)<<7,h[1]|=c<<3,5===o&&(h[1]|=(14&u)>>1,h[2]=(1&u)<<7,h[2]|=8,h[3]=0),{config:h,samplerate:p[l],channelCount:c,codec:"mp4a.40."+o,manifestCodec:f};t.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}(e,n,s,o);t.config=l.config,t.samplerate=l.samplerate,t.channelCount=l.channelCount,t.codec=l.codec,t.manifestCodec=l.manifestCodec,a.logger.log("parsed codec:"+t.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)}}function g(t){return 9216e4/t}function m(t,e,n,r,i){var s=function(t,e,n,r,i){var s,o,a=t.length;if(s=c(t,e),o=h(t,e),(o-=s)>0&&e+s+o<=a)return{headerLength:s,frameLength:o,stamp:n+r*i}}(e,n,r,i,g(t.samplerate));if(s){var o=s.stamp,a=s.headerLength,l=s.frameLength,u={unit:e.subarray(n+a,n+a+l),pts:o,dts:o};return t.samples.push(u),{sample:u,length:l+a}}}var v=n("./src/demux/id3.js"),y=function(){function t(t,e,n){this.observer=t,this.config=n,this.remuxer=e}var e=t.prototype;return e.resetInitSegment=function(t,e,n,r){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:r,inputTimeScale:9e4}},e.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=(v.default.getID3Data(t,0)||[]).length,n=t.length;ee.length)){var s=this.parseHeader(e,n);if(s&&n+s.frameLength<=e.length){var o=r+i*(9e4*s.samplesPerFrame/s.sampleRate),a={unit:e.subarray(n,n+s.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=s.channelCount,t.samplerate=s.sampleRate,t.samples.push(a),{sample:a,length:s.frameLength}}}},parseHeader:function(t,e){var n=t[e+1]>>3&3,r=t[e+1]>>1&3,i=t[e+2]>>4&15,s=t[e+2]>>2&3;if(1!==n&&0!==i&&15!==i&&3!==s){var o=_.SamplingRateMap[3*(3===n?0:2===n?1:2)+s],a=_.SamplesCoefficients[n][r],l=_.BytesInSlot[r],u=8*a*l;return{sampleRate:o,channelCount:t[e+3]>>6==3?1:2,frameLength:parseInt(a*(1e3*_.BitratesMap[14*(3===n?3-r:3===r?3:4)+i-1])/o+(t[e+2]>>1&1),10)*l,samplesPerFrame:u}}},isHeaderPattern:function(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])},isHeader:function(t,e){return!!(e+1t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),n=this.word>>>32-e;return t>32&&a.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?n<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){var e,n=8,r=8;for(e=0;e=t.length)return void n();if(!(t[e].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(t,e,n,r),!r)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,n=new Int8Array(e),r=0,i=32;i<=t.length-16;i+=160,r+=16)n.set(t.subarray(i,i+16),r);return n},e.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var n=0,r=32;r<=t.length-16;r+=160,n+=16)t.set(e.subarray(n,n+16),r);return t},e.decryptAvcSample=function(t,e,n,r,i,s){var o=this.discardEPB(i.data),a=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(a.buffer,(function(a){i.data=l.getAvcDecryptedUnit(o,a),s||l.decryptAvcSamples(t,e,n+1,r)}))},e.decryptAvcSamples=function(t,e,n,r){for(;;e++,n=0){if(e>=t.length)return void r();for(var i=t[e].units;!(n>=i.length);n++){var s=i[n];if(!(s.length<=48||1!==s.type&&5!==s.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,n,r,s,o),!o)return}}}},t}(),T={video:1,audio:2,id3:3,text:4},S=function(){function t(t,e,n,r){this.observer=t,this.config=n,this.typeSupported=r,this.remuxer=e,this.sampleAes=null,this.pmtUnknownTypes={}}var e=t.prototype;return e.setDecryptData=function(t){this.sampleAes=null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?new C(this.observer,this.config,t,this.discardEPB):null},t.probe=function(e){var n=t._syncOffset(e);return!(n<0||(n&&a.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},t._syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),n=0;n>4>1){if((h=l+5+e[l+4])===l+188)continue}else h=l+4;switch(c){case b:u&&(C&&(d=x(C))&&A(d,!1),C={data:[],size:0}),C&&(C.data.push(e.subarray(h,l+188)),C.size+=l+188-h);break;case _:u&&(T&&(d=x(T))&&(v.isAAC?D(d):P(d)),T={data:[],size:0}),T&&(T.data.push(e.subarray(h,l+188)),T.size+=l+188-h);break;case w:u&&(S&&(d=x(S))&&R(d),S={data:[],size:0}),S&&(S.data.push(e.subarray(h,l+188)),S.size+=l+188-h);break;case 0:u&&(h+=e[h]+1),E=this._pmtId=O(e,h);break;case E:u&&(h+=e[h]+1);var M=k(e,h,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=M.avc)>0&&(m.pid=b),(_=M.audio)>0&&(v.pid=_,v.isAAC=M.isAAC),(w=M.id3)>0&&(y.pid=w),p&&!g&&(a.logger.log("reparse from beginning"),p=!1,l=I-188),g=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});C&&(d=x(C))?(A(d,!0),m.pesData=null):m.pesData=C,T&&(d=x(T))?(v.isAAC?D(d):P(d),v.pesData=null):(T&&T.size&&a.logger.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=T),S&&(d=x(S))?(R(d),y.pesData=null):y.pesData=S,null==this.sampleAes?this.remuxer.remux(v,m,y,this._txtTrack,n,s,o):this.decryptAndRemux(v,m,y,this._txtTrack,n,s,o)},e.decryptAndRemux=function(t,e,n,r,i,s,o){if(t.samples&&t.isAAC){var a=this;this.sampleAes.decryptAacSamples(t.samples,0,(function(){a.decryptAndRemuxAvc(t,e,n,r,i,s,o)}))}else this.decryptAndRemuxAvc(t,e,n,r,i,s,o)},e.decryptAndRemuxAvc=function(t,e,n,r,i,s,o){if(e.samples){var a=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,(function(){a.remuxer.remux(t,e,n,r,i,s,o)}))}else this.remuxer.remux(t,e,n,r,i,s,o)},e.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},e._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},e._trackUnknownPmt=function(t,e,n){var r=this.pmtUnknownTypes[t]||0;return 0===r&&(this.pmtUnknownTypes[t]=0,e.call(a.logger,n)),this.pmtUnknownTypes[t]++,r},e._parsePMT=function(t,e,n,r){var i,s,o={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=e+3+((15&t[e+1])<<8|t[e+2])-4,e+=12+((15&t[e+10])<<8|t[e+11]);e1;){var d=new Uint8Array(h[0].length+h[1].length);d.set(h[0]),d.set(h[1],h[0].length),h[0]=d,h.splice(1,1)}if(1===((e=h[0])[0]<<16)+(e[1]<<8)+e[2]){if((r=(e[4]<<8)+e[5])&&r>t.size-6)return null;if(192&(n=e[7])&&(o=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&n?o-(l=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(a.logger.warn(Math.round((o-l)/9e4)+"s delta between PTS and DTS, align them"),o=l):l=o),t.size<=(u=(i=e[8])+9))return null;t.size-=u,s=new Uint8Array(t.size);for(var f=0,p=h.length;fg){u-=g;continue}e=e.subarray(u),g-=u,u=0}s.set(e,c),c+=g}return r&&(r-=i+3),{data:s,pts:o,dts:l,len:r}}return null},e.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var n=e.samples,r=n.length;if(isNaN(t.pts)){if(!r)return void e.dropped++;var i=n[r-1];t.pts=i.pts,t.dts=i.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(r||this.contiguous)?(t.id=r,n.push(t)):e.dropped++}t.debug.length&&a.logger.log(t.pts+"/"+t.dts+":"+t.debug)},e._parseAVCPES=function(t,e){var n,r,i,s=this,o=this._avcTrack,a=this._parseAVCNALu(t.data),l=this.avcSample,u=!1,c=this.pushAccesUnit.bind(this),h=function(t,e,n,r){return{key:t,pts:e,dts:n,units:[],debug:r}};t.data=null,l&&a.length&&!o.audFound&&(c(l,o),l=this.avcSample=h(!1,t.pts,t.dts,"")),a.forEach((function(e){switch(e.type){case 1:r=!0,l||(l=s.avcSample=h(!0,t.pts,t.dts,"")),l.frame=!0;var a=e.data;if(u&&a.length>4){var d=new E(a).readSliceType();2!==d&&4!==d&&7!==d&&9!==d||(l.key=!0)}break;case 5:r=!0,l||(l=s.avcSample=h(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:r=!0,(n=new E(s.discardEPB(e.data))).readUByte();for(var f=0,p=0,g=!1,m=0;!g&&n.bytesAvailable>1;){f=0;do{f+=m=n.readUByte()}while(255===m);p=0;do{p+=m=n.readUByte()}while(255===m);if(4===f&&0!==n.bytesAvailable){if(g=!0,181===n.readUByte()&&49===n.readUShort()&&1195456820===n.readUInt()&&3===n.readUByte()){var y=n.readUByte(),b=31&y,_=[y,n.readUByte()];for(i=0;i16){var w=[];for(i=0;i<16;i++)w.push(n.readUByte().toString(16)),3!==i&&5!==i&&7!==i&&9!==i||w.push("-");var C=p-16,T=new Uint8Array(C);for(i=0;i0){if(e.pts>=t[n-1].pts)t.push(e);else for(var r=n-1;r>=0;r--)if(e.pts=0)r={data:t.subarray(h,s-l-1),type:i},c.push(r);else{var d=this._getLastNalUnit();if(d&&(u&&s<=4-u&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-u)),(n=s-l-1)>0)){var f=new Uint8Array(d.data.byteLength+n);f.set(d.data,0),f.set(t.subarray(0,n),d.data.byteLength),d.data=f}}s=0&&l>=0&&(r={data:t.subarray(h,o),type:i,state:l},c.push(r)),0===c.length){var p=this._getLastNalUnit();if(p){var g=new Uint8Array(p.data.byteLength+t.byteLength);g.set(p.data,0),g.set(t,p.data.byteLength),p.data=g}}return a.naluState=l,c},e.discardEPB=function(t){for(var e,n,r=t.byteLength,i=[],s=1;s1&&(a.logger.log("AAC: align PTS for overlapping frames by "+Math.round((w-v)/90)),v=w)}for(;s>24&255,e[1]=r>>16&255,e[2]=r>>8&255,e[3]=255&r,e.set(t,4),i=0,r=8;i>24&255,e>>16&255,e>>8&255,255&e,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return t.box(t.types.minf,"audio"===e.type?t.box(t.types.smhd,t.SMHD):t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,n,r){return t.box(t.types.moof,t.mfhd(e),t.traf(r,n))},t.moov=function(e){for(var n=e.length,r=[];n--;)r[n]=t.trak(e[n]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(t.mvex(e)))},t.mvex=function(e){for(var n=e.length,r=[];n--;)r[n]=t.trex(e[n]);return t.box.apply(null,[t.types.mvex].concat(r))},t.mvhd=function(e,n){n*=e;var r=Math.floor(n/(x+1)),i=Math.floor(n%(x+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,s)},t.sdtp=function(e){var n,r,i=e.samples||[],s=new Uint8Array(4+i.length);for(r=0;r>>8&255),s.push(255&i),s=s.concat(Array.prototype.slice.call(r));for(n=0;n>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var a=t.box(t.types.avcC,new Uint8Array([1,s[3],s[4],s[5],255,224|e.sps.length].concat(s).concat([e.pps.length]).concat(o))),l=e.width,u=e.height,c=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var n=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var n=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},t.stsd=function(e){return t.box(t.types.stsd,t.STSD,"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.mp4a(e):t.mp3(e):t.avc1(e))},t.tkhd=function(e){var n=e.id,r=e.duration*e.timescale,i=e.width,s=e.height,o=Math.floor(r/(x+1)),a=Math.floor(r%(x+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,a>>24,a>>16&255,a>>8&255,255&a,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,s>>8&255,255&s,0,0]))},t.traf=function(e,n){var r=t.sdtp(e),i=e.id,s=Math.floor(n/(x+1)),o=Math.floor(n%(x+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,o>>24,o>>16&255,o>>8&255,255&o])),t.trun(e,r.length+16+20+8+16+8+8),r)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var n=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,n){var r,i,s,o,a,l,u=e.samples||[],c=u.length,h=12+16*c,d=new Uint8Array(h);for(d.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,(n+=8+h)>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r>>24&255,s>>>16&255,s>>>8&255,255&s,(o=i.size)>>>24&255,o>>>16&255,o>>>8&255,255&o,(a=i.flags).isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,61440&a.degradPrio,15&a.degradPrio,(l=i.cts)>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return t.box(t.types.trun,d)},t.initSegment=function(e){t.types||t.init();var n,r=t.moov(e);return(n=new Uint8Array(t.FTYP.byteLength+r.byteLength)).set(t.FTYP),n.set(r,t.FTYP.byteLength),n},t}();function D(t,e,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=t*e*n;return r?Math.round(i):i}function P(t,e){return void 0===e&&(e=!1),D(t,1e3,1/9e4,e)}function R(t,e){return void 0===e&&(e=1),D(t,9e4,1/e)}var I=R(10),M=R(.2);function L(t,e){var n;if(void 0===e)return t;for(n=e4294967296;)t+=n;return t}var F,N=function(){function t(t,e,n,r){this.observer=t,this.config=e,this.typeSupported=n,this.ISGenerated=!1}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},e.resetInitSegment=function(){this.ISGenerated=!1},e.getVideoStartPts=function(t){var e=!1,n=t.reduce((function(t,n){var r=n.pts-t;return r<-4294967296?(e=!0,t):r>0?t:n.pts}),t[0].pts);return e&&a.logger.debug("PTS rollover detected"),n},e.remux=function(t,e,n,i,s,o,l){if(this.ISGenerated||this.generateIS(t,e,s),this.ISGenerated){var u=t.samples.length,c=e.samples.length,h=s,d=s;if(u&&c){var f=this.getVideoStartPts(e.samples),p=(t.samples[0].pts-f)/e.inputTimeScale;h+=Math.max(0,p),d+=Math.max(0,-p)}if(u){t.timescale||(a.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,s));var g,m=this.remuxAudio(t,h,o,l);c&&(m&&(g=m.endPTS-m.startPTS),e.timescale||(a.logger.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,s)),this.remuxVideo(e,d,o,g))}else if(c){var v=this.remuxVideo(e,d,o,0,l);v&&t.codec&&this.remuxEmptyAudio(t,h,o,v)}}n.samples.length&&this.remuxID3(n,s),i.samples.length&&this.remuxText(i,s),this.observer.trigger(r.default.FRAG_PARSED)},e.generateIS=function(t,e,n){var s,o,l=this.observer,u=t.samples,c=e.samples,h=this.typeSupported,d="audio/mp4",f={},p={tracks:f},g=void 0===this._initPTS;if(g&&(s=o=1/0),t.config&&u.length&&(t.timescale=t.samplerate,a.logger.log("audio sampling rate : "+t.samplerate),t.isAAC||(h.mpeg?(d="audio/mpeg",t.codec=""):h.mp3&&(t.codec="mp3")),f.audio={container:d,codec:t.codec,initSegment:!t.isAAC&&h.mpeg?new Uint8Array:A.initSegment([t]),metadata:{channelCount:t.channelCount}},g&&(s=o=u[0].pts-Math.round(t.inputTimeScale*n))),e.sps&&e.pps&&c.length){var m=e.inputTimeScale;if(e.timescale=m,f.video={container:"video/mp4",codec:e.codec,initSegment:A.initSegment([e]),metadata:{width:e.width,height:e.height}},g){var v=this.getVideoStartPts(c),y=Math.round(m*n);o=Math.min(o,c[0].dts-y),s=Math.min(s,v-y),this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:s})}}else g&&f.audio&&this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:s});Object.keys(f).length?(l.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,g&&(this._initPTS=s,this._initDTS=o)):l.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},e.remuxVideo=function(t,e,n,s){var o,l,u,c,h,d=t.timescale,f=t.samples,p=[],g=f.length,m=this._initPTS,v=8,y=Number.POSITIVE_INFINITY,b=Number.NEGATIVE_INFINITY,_=0,w=!1,E=this.nextAvcDts;if(0!==g){n||(E=e*d-(f[0].pts-L(f[0].dts,f[0].pts)));for(var C=0;CT.pts&&(_=Math.max(Math.min(_,T.pts-T.dts),-1*M)),T.dts0?C-1:C].dts&&(w=!0)}w&&f.sort((function(t,e){return t.dts-e.dts||t.pts-e.pts||t.id-e.id})),c=f[0].dts,h=f[g-1].dts;var S=Math.round((h-c)/(g-1));if(_<0){if(_<-2*S){a.logger.warn("PTS < DTS detected in video samples, offsetting DTS to PTS "+P(-S,!0)+" ms");for(var O=0;OS;if(D||x<-1){a.logger.warn(D?"AVC: "+P(x,!0)+" ms ("+x+"dts) hole between fragments detected, filling it":"AVC: "+P(-x,!0)+" ms ("+x+"dts) overlapping between fragments detected");var R=f[0].pts-x;f[0].dts=c=E,f[0].pts=R,a.logger.log("Video: First PTS/DTS adjusted: "+P(R,!0)+"/"+P(c,!0)+", delta: "+P(x,!0)+" ms")}}for(var I=0,F=0,N=0;N0?z-1:z].dts;if(et.stretchShortVideoTrack){var rt=Math.floor(et.maxBufferHole*d),it=(s?y+s*d:this.nextAudioPts)-W.pts;it>rt?((o=it-nt)<0&&(o=nt),a.logger.log("It is approximately "+P(it,!1)+" ms to the next segment; using duration "+P(o,!1)+" ms for the last video frame.")):o=nt}else o=nt}K=Math.round(W.pts-W.dts),p.push({size:Y,duration:o,cts:K,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:W.key?2:1,isNonSync:W.key?0:1}})}this.nextAvcDts=h+o;var st=t.dropped;if(t.nbNalu=0,t.dropped=0,p.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var ot=p[0].flags;ot.dependsOn=2,ot.isNonSync=0}t.samples=p,u=A.moof(t.sequenceNumber++,c,t),t.samples=[];var at={data1:u,data2:l,startPTS:y/d,endPTS:(b+o)/d,startDTS:c/d,endDTS:this.nextAvcDts/d,type:"video",hasAudio:!1,hasVideo:!0,nb:p.length,dropped:st};return this.observer.trigger(r.default.FRAG_PARSING_DATA,at),at}},e.remuxAudio=function(t,e,n,s){var o,l,u,c,h,d,f=t.inputTimeScale,p=f/t.timescale,g=(t.isAAC?1024:1152)*p,m=this._initPTS,v=!t.isAAC&&this.typeSupported.mpeg,y=v?0:8,b=t.samples,_=[],w=this.nextAudioPts;if(n|=b.length&&w&&(s&&Math.abs(e-w/f)<.1||Math.abs(b[0].pts-w-m)<20*g),b.forEach((function(t){t.pts=t.dts=L(t.pts-m,e*f)})),0!==(b=b.filter((function(t){return t.pts>=0}))).length){if(n||(w=s?Math.max(0,e*f):b[0].pts),t.isAAC)for(var E=this.config.maxAudioFramesDrift,C=0,T=w;C0?(a.logger.warn("Dropping 1 audio frame @ "+P(T,!0)/1e3+"s due to "+P(x,!0)+" ms overlap."),b.splice(C,1)):(a.logger.warn("Audio frame @ "+P(O,!0)/1e3+"s overlaps nextAudioPts by "+P(x,!0)+" ms."),T=O+g,C++);else if(x>=E*g&&x0&&G0&&((l=k.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(l=V.subarray()),N+=q*l.length);else if(G<-12){a.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+P(w,!0)+" ms / "+P(H,!0)+" ms / "+P(-G,!0)+" ms"),N-=V.byteLength;continue}H=w}if(h=H,!(N>0))return;N+=y;try{u=new Uint8Array(N)}catch(Z){return void this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MUX_ERROR,details:i.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:N,reason:"fail allocating audio mdat "+N})}v||(new DataView(u.buffer).setUint32(0,N),u.set(A.types.mdat,4));for(var z=0;z=2&&(o.duration=W=_[F-2].duration),F){this.nextAudioPts=w=d+p*W,t.samples=_,c=v?new Uint8Array:A.moof(t.sequenceNumber++,h/p,t),t.samples=[];var $=h/f,Y=w/f,X={data1:c,data2:u,startPTS:$,endPTS:Y,startDTS:$,endDTS:Y,type:"audio",hasAudio:!0,hasVideo:!1,nb:F};return this.observer.trigger(r.default.FRAG_PARSING_DATA,X),X}return null}},e.remuxEmptyAudio=function(t,e,n,r){var i=t.inputTimeScale,s=this.nextAudioPts,o=(void 0!==s?s:r.startDTS*i)+this._initDTS,l=i/(t.samplerate?t.samplerate:i)*1024,u=Math.ceil((r.endDTS*i+this._initDTS-o)/l),c=k.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(a.logger.warn("remux empty Audio"),c){for(var h=[],d=0;d0&&null!=e&&null!=e.key&&"AES-128"===e.method){var g=this.decrypter;null==g&&(g=this.decrypter=new s.default(this.observer,this.config));var m=F();g.decrypt(t,e.key.buffer,e.iv.buffer,(function(t){var s=F();p.observer.trigger(r.default.FRAG_DECRYPTED,{stats:{tstart:m,tdecrypt:s}}),p.pushDecrypted(new Uint8Array(t),e,new Uint8Array(n),i,o,a,l,u,c,h,d,f)}))}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(n),i,o,a,l,u,c,h,d,f)},e.pushDecrypted=function(t,e,n,s,o,a,l,u,c,h,d,f){var p=this.demuxer,g=this.remuxer;if(!p||l||u){for(var m,v=this.observer,_=this.typeSupported,w=this.config,E=[{demux:S,remux:N},{demux:b.default,remux:j},{demux:y,remux:N},{demux:O,remux:N}],C=0,T=E.length;C1?n-1:0),i=1;i1?n-1:0),i=1;i0)return e.subarray(r,r+i)},t._readSize=function(t,e){var n=0;return n=(127&t[e])<<21,n|=(127&t[e+1])<<14,(n|=(127&t[e+2])<<7)|127&t[e+3]},t.getTimeStamp=function(e){for(var n=t.getID3Frames(e),r=0;r>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(s);break;case 12:case 13:a=t[h++],c+=String.fromCharCode((31&s)<<6|63&a);break;case 14:a=t[h++],l=t[h++],c+=String.fromCharCode((15&s)<<12|(63&a)<<6|(63&l)<<0)}}return c},t}();function o(){var t=Object(i.getSelfScope)();return r||void 0===t.TextDecoder||(r=new t.TextDecoder("utf-8")),r}var a=s._utf8ArrayToStr;e.default=s},"./src/demux/mp4demuxer.js": /*!*********************************!*\ !*** ./src/demux/mp4demuxer.js ***! \*********************************/ /*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../utils/logger */"./src/utils/logger.js"),i=n(/*! ../events */"./src/events.js"),s=Math.pow(2,32)-1;e.default=function(){function t(t,e){this.observer=t,this.remuxer=e}var e=t.prototype;return e.resetTimeStamp=function(t){this.initPTS=t},e.resetInitSegment=function(e,n,r,s){if(e&&e.byteLength){var o=this.initData=t.parseInitSegment(e);null==n&&(n="mp4a.40.5"),null==r&&(r="avc1.42e01e");var a={};o.audio&&o.video?a.audiovideo={container:"video/mp4",codec:n+","+r,initSegment:s?e:null}:(o.audio&&(a.audio={container:"audio/mp4",codec:n,initSegment:s?e:null}),o.video&&(a.video={container:"video/mp4",codec:r,initSegment:s?e:null})),this.observer.trigger(i.default.FRAG_PARSING_INIT_SEGMENT,{tracks:a})}else n&&(this.audioCodec=n),r&&(this.videoCodec=r)},t.probe=function(e){return t.findBox({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint16=function(t,e){t.data&&(e+=t.start,t=t.data);var n=t[e]<<8|t[e+1];return n<0?65536+n:n},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var n=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return n<0?4294967296+n:n},t.writeUint32=function(t,e,n){t.data&&(e+=t.start,t=t.data),t[e]=n>>24,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n},t.findBox=function(e,n){var r,i,s,o,a,l,u=[];if(e.data?(a=e.start,s=e.end,e=e.data):(a=0,s=e.byteLength),!n.length)return null;for(r=a;r1?r+i:s,t.bin2str(e.subarray(r+4,r+8))===n[0]&&(1===n.length?u.push({data:e,start:r+8,end:l}):(o=t.findBox({data:e,start:r+8,end:l},n.slice(1))).length&&(u=u.concat(o))),r=l;return u},t.parseSegmentIndex=function(e){var n,r=t.findBox(e,["moov"])[0],i=r?r.end:null,s=0,o=t.findBox(e,["sidx"]);if(!o||!o[0])return null;n=[];var a=(o=o[0]).data[0],l=t.readUint32(o,s=0===a?8:16);s+=4,s+=0===a?8:16;var u=o.end+0,c=t.readUint16(o,s+=2);s+=2;for(var h=0;h>>31)return void console.warn("SIDX has hierarchical references (not supported)");var g=t.readUint32(o,d);d+=4,n.push({referenceSize:p,subsegmentDuration:g,info:{duration:g/l,start:u,end:u+p-1}}),u+=p,s=d+=4}return{earliestPresentationTime:0,timescale:l,version:a,referencesCount:c,references:n,moovEndOffset:i}},t.parseInitSegment=function(e){var n=[];return t.findBox(e,["moov","trak"]).forEach((function(e){var i=t.findBox(e,["tkhd"])[0];if(i){var s=i.data[i.start],o=0===s?12:20,a=t.readUint32(i,o),l=t.findBox(e,["mdia","mdhd"])[0];if(l){var u=t.readUint32(l,o=0===(s=l.data[l.start])?12:20),c=t.findBox(e,["mdia","hdlr"])[0];if(c){var h={soun:"audio",vide:"video"}[t.bin2str(c.data.subarray(c.start+8,c.start+12))];if(h){var d=t.findBox(e,["mdia","minf","stbl","stsd"]);if(d.length){var f=t.bin2str((d=d[0]).data.subarray(d.start+12,d.start+16));r.logger.log("MP4Demuxer:"+h+":"+f+" found")}n[a]={timescale:u,type:h},n[h]={timescale:u,id:a}}}}}})),n},t.getStartDTS=function(e,n){var r,i,s;return r=t.findBox(n,["moof","traf"]),i=[].concat.apply([],r.map((function(n){return t.findBox(n,["tfhd"]).map((function(r){var i,s;return i=t.readUint32(r,4),s=e[i].timescale||9e4,t.findBox(n,["tfdt"]).map((function(e){var n,r;return n=e.data[e.start],r=t.readUint32(e,4),1===n&&(r*=Math.pow(2,32),r+=t.readUint32(e,8)),r}))[0]/s}))}))),s=Math.min.apply(null,i),isFinite(s)?s:0},t.offsetStartDTS=function(e,n,r){t.findBox(n,["moof","traf"]).map((function(n){return t.findBox(n,["tfhd"]).map((function(i){var o=t.readUint32(i,4),a=e[o].timescale||9e4;t.findBox(n,["tfdt"]).map((function(e){var n=e.data[e.start],i=t.readUint32(e,4);if(0===n)t.writeUint32(e,4,i-r*a);else{i*=Math.pow(2,32),i+=t.readUint32(e,8),i-=r*a,i=Math.max(i,0);var o=Math.floor(i/(s+1)),l=Math.floor(i%(s+1));t.writeUint32(e,4,o),t.writeUint32(e,8,l)}}))}))}))},e.append=function(e,n,r,s){var o=this.initData;o||(this.resetInitSegment(e,this.audioCodec,this.videoCodec,!1),o=this.initData);var a,l=this.initPTS;if(void 0===l){var u=t.getStartDTS(o,e);this.initPTS=l=u-n,this.observer.trigger(i.default.INIT_PTS_FOUND,{initPTS:l})}t.offsetStartDTS(o,e,l),a=t.getStartDTS(o,e),this.remuxer.remux(o.audio,o.video,null,null,a,r,s,e)},e.destroy=function(){},t}()},"./src/errors.ts": /*!***********************!*\ !*** ./src/errors.ts ***! \***********************/ /*! exports provided: ErrorTypes, ErrorDetails */function(t,e,n){"use strict";var r,i;n.r(e),n.d(e,"ErrorTypes",(function(){return r})),n.d(e,"ErrorDetails",(function(){return i})),function(t){t.NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError"}(r||(r={})),function(t){t.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_EMPTY_ERROR="levelEmptyError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.INTERNAL_EXCEPTION="internalException"}(i||(i={}))},"./src/events.js": /*!***********************!*\ !*** ./src/events.js ***! \***********************/ /*! exports provided: default */function(t,e,n){"use strict";n.r(e),e.default={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVELS_UPDATED:"hlsLevelsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",CUES_PARSED:"hlsCuesParsed",NON_NATIVE_TEXT_TRACKS_FOUND:"hlsNonNativeTextTracksFound",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"}},"./src/hls.ts": /*!*********************************!*\ !*** ./src/hls.ts + 50 modules ***! \*********************************/ /*! exports provided: default */ /*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/demux/demuxer-worker.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/demux/demuxer-inline.js because of ./src/demux/demuxer-worker.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/demux/demuxer-worker.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/demux/demuxer-worker.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/demux/demuxer-worker.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/demux/demuxer-worker.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number.js because of ./src/demux/demuxer-worker.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/demux/demuxer-worker.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/demux/demuxer-worker.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/eventemitter3/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/url-toolkit/src/url-toolkit.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return Ae}));var r={};n.r(r),n.d(r,"newCue",(function(){return Ut}));var i,s,o=n("./node_modules/url-toolkit/src/url-toolkit.js"),a=n("./src/errors.ts"),l=n("./src/polyfills/number.js"),u=n("./src/events.js"),c=n("./src/utils/logger.js"),h={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},d=function(){function t(t){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=t,this.onEvent=this.onEvent.bind(this);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r>8*(15-n)&255;return e},n.setDecryptDataFromLevelKey=function(t,e){var n=t;return(null==t?void 0:t.method)&&t.uri&&!t.iv&&((n=new g(t.baseuri,t.reluri)).method=t.method,n.iv=this.createInitializationVector(e)),n},(e=[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(o.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&c.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(l.isFiniteNumber)(this.programDateTime))return null;var t=Object(l.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&function(t,e){for(var n=0;nNumber.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var n=new Uint8Array(e.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.enumeratedString=function(t){return this[t]},e.decimalResolution=function(t){var e=y.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,n={};for(b.lastIndex=0;null!==(e=b.exec(t));){var r=e[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[e[1]]=r}return n},t}(),w={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function E(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}var C=/(?:#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)|#EXT-X-SESSION-DATA:([^\n\r]*)[\r\n]+)/g,T=/#EXT-X-MEDIA:(.*)/g,S=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),O=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,k=/\.(mp4|m4s|m4v|m4a)$/i,x=function(){function t(){}return t.findGroup=function(t,e){for(var n=0;n2?(e=n.shift()+".",e+=parseInt(n.shift()).toString(16),e+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):e=t,e},t.resolve=function(t,e){return o.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,n){var r,i=[],s={},o=!1;function a(t,e){["video","audio"].forEach((function(n){var r=t.filter((function(t){return function(t,e){var n=w[e];return!!n&&!0===n[t.slice(0,4)]}(t,n)}));if(r.length){var i=r.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[n+"Codec"]=i.length>0?i[0]:r[0],t=t.filter((function(t){return-1===r.indexOf(t)}))}})),e.unknownCodecs=t}for(C.lastIndex=0;null!=(r=C.exec(e));)if(r[1]){var l={},u=l.attrs=new _(r[1]);l.url=t.resolve(r[2],n);var c=u.decimalResolution("RESOLUTION");c&&(l.width=c.width,l.height=c.height),l.bitrate=u.decimalInteger("AVERAGE-BANDWIDTH")||u.decimalInteger("BANDWIDTH"),l.name=u.NAME,a([].concat((u.CODECS||"").split(/[ ,]+/)),l),l.videoCodec&&-1!==l.videoCodec.indexOf("avc1")&&(l.videoCodec=t.convertAVC1ToAVCOTI(l.videoCodec)),i.push(l)}else if(r[3]){var h=new _(r[3]);h["DATA-ID"]&&(o=!0,s[h["DATA-ID"]]=h)}return{levels:i,sessionData:o?s:null}},t.parseMasterPlaylistMedia=function(e,n,r,i){var s;void 0===i&&(i=[]);var o=[],a=0;for(T.lastIndex=0;null!==(s=T.exec(e));){var l=new _(s[1]);if(l.TYPE===r){var u={attrs:l,id:a++,groupId:l["GROUP-ID"],instreamId:l["INSTREAM-ID"],name:l.NAME||l.LANGUAGE,type:r,default:"YES"===l.DEFAULT,autoselect:"YES"===l.AUTOSELECT,forced:"YES"===l.FORCED,lang:l.LANGUAGE};if(l.URI&&(u.url=t.resolve(l.URI,n)),i.length){var c=t.findGroup(i,u.groupId);u.audioCodec=c?c.codec:i[0].codec}o.push(u)}}return o},t.parseLevelPlaylist=function(t,e,n,r,i){var s,o,a,u=0,h=0,d=new v(e),f=0,p=null,y=new m,b=null;for(S.lastIndex=0;null!==(s=S.exec(t));){var w=s[1];if(w){y.duration=parseFloat(w);var E=(" "+s[2]).slice(1);y.title=E||null,y.tagList.push(E?["INF",w,E]:["INF",w])}else if(s[3]){if(Object(l.isFiniteNumber)(y.duration)){var C=u++;y.type=r,y.start=h,a&&(y.levelkey=a),y.sn=C,y.level=n,y.cc=f,y.urlId=i,y.baseurl=e,y.relurl=(" "+s[3]).slice(1),A(y,p),d.fragments.push(y),p=y,h+=y.duration,y=new m}}else if(s[4]){var T=(" "+s[4]).slice(1);p?y.setByteRange(T,p):y.setByteRange(T)}else if(s[5])y.rawProgramDateTime=(" "+s[5]).slice(1),y.tagList.push(["PROGRAM-DATE-TIME",y.rawProgramDateTime]),null===b&&(b=d.fragments.length);else{if(!(s=s[0].match(O))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(o=1;o=0&&(a.method=R,a.key=null,a.iv=M));break;case"START":var L=new _(x).decimalFloatingPoint("TIME-OFFSET");Object(l.isFiniteNumber)(L)&&(d.startTimeOffset=L);break;case"MAP":var F=new _(x);y.relurl=F.URI,F.BYTERANGE&&y.setByteRange(F.BYTERANGE),y.baseurl=e,y.level=n,y.type=r,y.sn="initSegment",d.initSegment=y,(y=new m).rawProgramDateTime=d.initSegment.rawProgramDateTime;break;default:c.logger.warn("line parsed but not handled: "+s)}}}return(y=p)&&!y.relurl&&(d.fragments.pop(),h-=y.duration),d.totalduration=h,d.averagetargetduration=h/d.fragments.length,d.endSN=u-1,d.startCC=d.fragments[0]?d.fragments[0].cc:0,d.endCC=f,!d.initSegment&&d.fragments.length&&d.fragments.every((function(t){return k.test(t.relurl)}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(y=new m).relurl=d.fragments[0].relurl,y.baseurl=e,y.level=n,y.type=r,y.sn="initSegment",d.initSegment=y,d.needSidxRanges=!0),b&&function(t,e){for(var n=t[e],r=e-1;r>=0;r--){var i=t[r];i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(d.fragments,b),d},t}();function A(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):(null==e?void 0:e.programDateTime)&&(t.programDateTime=e.endProgramDateTime),Object(l.isFiniteNumber)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}var D=window.performance,P=function(t){var e,n;function r(e){var n;return(n=t.call(this,e,u.default.MANIFEST_LOADING,u.default.LEVEL_LOADING,u.default.AUDIO_TRACK_LOADING,u.default.SUBTITLE_TRACK_LOADING)||this).loaders={},n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.canHaveQualityLevels=function(t){return t!==i.AUDIO_TRACK&&t!==i.SUBTITLE_TRACK},r.mapContextToLevelType=function(t){switch(t.type){case i.AUDIO_TRACK:return s.AUDIO;case i.SUBTITLE_TRACK:return s.SUBTITLE;default:return s.MAIN}},r.getResponseUrl=function(t,e){var n=t.url;return void 0!==n&&0!==n.indexOf("data:")||(n=e.url),n};var o=r.prototype;return o.createInternalLoader=function(t){var e=this.hls.config,n=new(e.pLoader||e.loader)(e);return t.loader=n,this.loaders[t.type]=n,n},o.getInternalLoader=function(t){return this.loaders[t.type]},o.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},o.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},o.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},o.onManifestLoading=function(t){this.load({url:t.url,type:i.MANIFEST,level:0,id:null,responseType:"text"})},o.onLevelLoading=function(t){this.load({url:t.url,type:i.LEVEL,level:t.level,id:t.id,responseType:"text"})},o.onAudioTrackLoading=function(t){this.load({url:t.url,type:i.AUDIO_TRACK,level:null,id:t.id,responseType:"text"})},o.onSubtitleTrackLoading=function(t){this.load({url:t.url,type:i.SUBTITLE_TRACK,level:null,id:t.id,responseType:"text"})},o.load=function(t){var e=this.hls.config;c.logger.debug("Loading playlist of type "+t.type+", level: "+t.level+", id: "+t.id);var n,r,s,o,a=this.getInternalLoader(t);if(a){var l=a.context;if(l&&l.url===t.url)return c.logger.trace("playlist request ongoing"),!1;c.logger.warn("aborting previous loader for type: "+t.type),a.abort()}switch(t.type){case i.MANIFEST:n=e.manifestLoadingMaxRetry,r=e.manifestLoadingTimeOut,s=e.manifestLoadingRetryDelay,o=e.manifestLoadingMaxRetryTimeout;break;case i.LEVEL:n=0,o=0,s=0,r=e.levelLoadingTimeOut;break;default:n=e.levelLoadingMaxRetry,r=e.levelLoadingTimeOut,s=e.levelLoadingRetryDelay,o=e.levelLoadingMaxRetryTimeout}a=this.createInternalLoader(t);var u={timeout:r,maxRetry:n,retryDelay:s,maxRetryDelay:o},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return c.logger.debug("Calling internal loader delegate for URL: "+t.url),a.load(t,u,h),!0},o.loadsuccess=function(t,e,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this._handleSidxRequest(t,n),void this._handlePlaylistLoaded(t,e,n,r);if(this.resetInternalLoader(n.type),"string"!=typeof t.data)throw new Error('expected responseType of "text" for PlaylistLoader');var i=t.data;e.tload=D.now(),0===i.indexOf("#EXTM3U")?i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(t,e,n,r):this._handleMasterPlaylist(t,e,n,r):this._handleManifestParsingError(t,n,"no EXTM3U delimiter",r)},o.loaderror=function(t,e,n){void 0===n&&(n=null),this._handleNetworkError(e,n,!1,t)},o.loadtimeout=function(t,e,n){void 0===n&&(n=null),this._handleNetworkError(e,n,!0)},o._handleMasterPlaylist=function(t,e,n,i){var s=this.hls,o=t.data,a=r.getResponseUrl(t,n),l=x.parseMasterPlaylist(o,a),h=l.levels,d=l.sessionData;if(h.length){var f=h.map((function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}})),p=x.parseMasterPlaylistMedia(o,a,"AUDIO",f),g=x.parseMasterPlaylistMedia(o,a,"SUBTITLES"),m=x.parseMasterPlaylistMedia(o,a,"CLOSED-CAPTIONS");if(p.length){var v=!1;p.forEach((function(t){t.url||(v=!0)})),!1===v&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(c.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),p.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:{},url:""}))}s.trigger(u.default.MANIFEST_LOADED,{levels:h,audioTracks:p,subtitles:g,captions:m,url:a,stats:e,networkDetails:i,sessionData:d})}else this._handleManifestParsingError(t,n,"no level found in manifest",i)},o._handleTrackOrLevelPlaylist=function(t,e,n,s){var o=this.hls,c=n.id,h=n.level,d=n.type,f=r.getResponseUrl(t,n),p=Object(l.isFiniteNumber)(c)?c:0,g=Object(l.isFiniteNumber)(h)?h:p,m=r.mapContextToLevelType(n),v=x.parseLevelPlaylist(t.data,f,g,m,p);v.tload=e.tload,v.fragments.length?(d===i.MANIFEST&&o.trigger(u.default.MANIFEST_LOADED,{levels:[{url:f,details:v}],audioTracks:[],url:f,stats:e,networkDetails:s,sessionData:null}),e.tparsed=D.now(),v.needSidxRanges?this.load({url:v.initSegment.url,isSidxRequest:!0,type:d,level:h,levelDetails:v,id:c,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"}):(n.levelDetails=v,this._handlePlaylistLoaded(t,e,n,s))):o.trigger(u.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:f,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},o._handleSidxRequest=function(t,e){if("string"==typeof t.data)throw new Error("sidx request must be made with responseType of array buffer");var n=f.default.parseSegmentIndex(new Uint8Array(t.data));if(n){var r=e.levelDetails;n.references.forEach((function(t,e){var n=t.info;if(r){var i=r.fragments[e];0===i.byteRange.length&&i.setByteRange(String(1+n.end-n.start)+"@"+String(n.start))}})),r&&r.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}},o._handleManifestParsingError=function(t,e,n,r){this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:t.url,reason:n,networkDetails:r})},o._handleNetworkError=function(t,e,n,r){var s,o;void 0===n&&(n=!1),void 0===r&&(r=null),c.logger.info("A network error occured while loading a "+t.type+"-type playlist");var l=this.getInternalLoader(t);switch(t.type){case i.MANIFEST:s=n?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,o=!0;break;case i.LEVEL:s=n?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,o=!1;break;case i.AUDIO_TRACK:s=n?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,o=!1;break;default:o=!1}l&&(l.abort(),this.resetInternalLoader(t.type));var h={type:a.ErrorTypes.NETWORK_ERROR,details:s,fatal:o,url:t.url,loader:l,context:t,networkDetails:e};r&&(h.response=r),this.hls.trigger(u.default.ERROR,h)},o._handlePlaylistLoaded=function(t,e,n,s){var o=n.type,a=n.level,l=n.id,c=n.levelDetails;if(c&&c.targetduration)if(r.canHaveQualityLevels(n.type))this.hls.trigger(u.default.LEVEL_LOADED,{details:c,level:a||0,id:l||0,stats:e,networkDetails:s});else switch(o){case i.AUDIO_TRACK:this.hls.trigger(u.default.AUDIO_TRACK_LOADED,{details:c,id:l,stats:e,networkDetails:s});break;case i.SUBTITLE_TRACK:this.hls.trigger(u.default.SUBTITLE_TRACK_LOADED,{details:c,id:l,stats:e,networkDetails:s})}else this._handleManifestParsingError(t,n,"invalid target duration",s)},r}(d),R=function(t){var e,n;function r(e){var n;return(n=t.call(this,e,u.default.FRAG_LOADING)||this).loaders={},n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.destroy=function(){var e=this.loaders;for(var n in e){var r=e[n];r&&r.destroy()}this.loaders={},t.prototype.destroy.call(this)},i.onFragLoading=function(t){var e=t.frag,n=e.type,r=this.loaders,i=this.hls.config,s=i.fLoader,o=i.loader;e.loaded=0;var a,u,h,d=r[n];d&&(c.logger.warn("abort previous fragment loader for type: "+n),d.abort()),d=r[n]=e.loader=i.fLoader?new s(i):new o(i),a={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var f=e.byteRangeStartOffset,p=e.byteRangeEndOffset;Object(l.isFiniteNumber)(f)&&Object(l.isFiniteNumber)(p)&&(a.rangeStart=f,a.rangeEnd=p),u={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},d.load(a,u,h)},i.loadsuccess=function(t,e,n,r){void 0===r&&(r=null);var i=t.data,s=n.frag;s.loader=void 0,this.loaders[s.type]=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:i,frag:s,stats:e,networkDetails:r})},i.loaderror=function(t,e,n){void 0===n&&(n=null);var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:n})},i.loadtimeout=function(t,e,n){void 0===n&&(n=null);var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:n})},i.loadprogress=function(t,e,n,r){void 0===r&&(r=null);var i=e.frag;i.loaded=t.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:i,stats:t,networkDetails:r})},r}(d),I=function(t){var e,n;function r(e){var n;return(n=t.call(this,e,u.default.KEY_LOADING)||this).loaders={},n.decryptkey=null,n.decrypturl=null,n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.destroy=function(){for(var e in this.loaders){var n=this.loaders[e];n&&n.destroy()}this.loaders={},t.prototype.destroy.call(this)},i.onKeyLoading=function(t){var e=t.frag,n=e.type,r=this.loaders[n];if(e.decryptdata){var i=e.decryptdata.uri;if(i!==this.decrypturl||null===this.decryptkey){var s=this.hls.config;if(r&&(c.logger.warn("abort previous key loader for type:"+n),r.abort()),!i)return void c.logger.warn("key uri is falsy");e.loader=this.loaders[n]=new s.loader(s),this.decrypturl=i,this.decryptkey=null;var o={url:i,frag:e,responseType:"arraybuffer"},a={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};e.loader.load(o,a,l)}else this.decryptkey&&(e.decryptdata.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:e}))}else c.logger.warn("Missing decryption data on fragment in onKeyLoading")},i.loadsuccess=function(t,e,n){var r=n.frag;r.decryptdata?(this.decryptkey=r.decryptdata.key=new Uint8Array(t.data),r.loader=void 0,delete this.loaders[r.type],this.hls.trigger(u.default.KEY_LOADED,{frag:r})):c.logger.error("after key load, decryptdata unset")},i.loaderror=function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:t})},i.loadtimeout=function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},r}(d),M=function(t){var e,n;function r(e){var n;return(n=t.call(this,e,u.default.BUFFER_APPENDED,u.default.FRAG_BUFFERED,u.default.FRAG_LOADED)||this).bufferPadding=.2,n.fragments=Object.create(null),n.timeRanges=Object.create(null),n.config=e.config,n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,d.prototype.destroy.call(this),t.prototype.destroy.call(this)},i.getBufferedFrag=function(t,e){var n=this.fragments,r=Object.keys(n).filter((function(r){var i=n[r];if(i.body.type!==e)return!1;if(!i.buffered)return!1;var s=i.body;return s.startPTS<=t&&t<=s.endPTS}));if(0===r.length)return null;var i=r.pop();return n[i].body},i.detectEvictedFragments=function(t,e){var n=this;Object.keys(this.fragments).forEach((function(r){var i=n.fragments[r];if(i&&i.buffered){var s=i.range[t];if(s)for(var o=s.time,a=0;a=r&&e<=i){s.push({startPTS:Math.max(t,n.start(a)),endPTS:Math.min(e,n.end(a))});break}if(tr)s.push({startPTS:Math.max(t,n.start(a)),endPTS:Math.min(e,n.end(a))}),o=!0;else if(e<=r)break}return{time:s,partial:o}},i.getFragmentKey=function(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn},i.getPartialFragment=function(t){var e,n,r,i=this,s=null,o=0;return Object.keys(this.fragments).forEach((function(a){var l=i.fragments[a];i.isPartial(l)&&(r=l.body.endPTS+i.bufferPadding,t>=(n=l.body.startPTS-i.bufferPadding)&&t<=r&&(e=Math.min(t-n,r-t),o<=e&&(s=l.body,o=e)))})),s},i.getState=function(t){var e=this.getFragmentKey(t),n=this.fragments[e],r="NOT_LOADED";return void 0!==n&&(r=n.buffered?!0===this.isPartial(n)?"PARTIAL":"OK":"APPENDING"),r},i.isPartial=function(t){return!0===t.buffered&&(void 0!==t.range.video&&!0===t.range.video.partial||void 0!==t.range.audio&&!0===t.range.audio.partial)},i.isTimeBuffered=function(t,e,n){for(var r,i,s=0;s=r&&e<=i)return!0;if(e<=r)return!1}return!1},i.onFragLoaded=function(t){var e=t.frag;Object(l.isFiniteNumber)(e.sn)&&!e.bitrateTest&&(this.fragments[this.getFragmentKey(e)]={body:e,range:Object.create(null),buffered:!1})},i.onBufferAppended=function(t){var e=this;this.timeRanges=t.timeRanges,Object.keys(this.timeRanges).forEach((function(t){e.detectEvictedFragments(t,e.timeRanges[t])}))},i.onFragBuffered=function(t){this.detectPartialFragments(t.frag)},i.hasFragment=function(t){var e=this.getFragmentKey(t);return void 0!==this.fragments[e]},i.removeFragment=function(t){var e=this.getFragmentKey(t);delete this.fragments[e]},i.removeAllFragments=function(){this.fragments=Object.create(null)},r}(d),L=function(t,e){for(var n=0,r=t.length-1,i=null,s=null;n<=r;){var o=e(s=t[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return s;r=i-1}}return null},F=function(){function t(){}return t.isBuffered=function(t,e){try{if(t)for(var n=t.buffered,r=0;r=n.start(r)&&e<=n.end(r))return!0}catch(i){}return!1},t.bufferInfo=function(t,e,n){try{if(t){var r,i=t.buffered,s=[];for(r=0;ro&&(r[s-1].end=t[i].end):r.push(t[i])}else r.push(t[i])}else r=t;for(var a,l=0,u=e,c=e,h=0;h=d&&e1?e-1:0),r=1;re?(r.duration=s-r.start,r.duration<0&&c.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):(i.duration=r.start-s,i.duration<0&&c.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):i.start=n>e?r.start+(r.cc===i.cc&&r.minEndPTS?r.minEndPTS-r.start:r.duration):Math.max(r.start-i.duration,0)}function $(t,e,n,r,i,s){var o=n,a=r;if(Object(l.isFiniteNumber)(e.startPTS)){var u=Math.abs(e.startPTS-n);e.deltaPTS=Object(l.isFiniteNumber)(e.deltaPTS)?Math.max(u,e.deltaPTS):u,o=Math.max(n,e.startPTS),n=Math.min(n,e.startPTS),a=Math.min(r,e.endPTS),r=Math.max(r,e.endPTS),i=Math.min(i,e.startDTS),s=Math.max(s,e.endDTS)}var c=n-e.start;e.start=e.startPTS=n,e.maxStartPTS=o,e.endPTS=r,e.minEndPTS=a,e.startDTS=i,e.endDTS=s,e.duration=r-n;var h,d,f,p=e.sn;if(!t||pt.endSN)return 0;for((d=t.fragments)[h=p-t.startSN]=e,f=h;f>0;f--)W(d,f,f-1);for(f=h;fr.length))for(var s=0;sn.startCC||t&&t.cc=(t[t.length-1].endProgramDateTime||0))return null;n=n||0;for(var r=0;rt&&n.start?-1:0}function it(t,e,n){var r=1e3*Math.min(e,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>t}var st=function(){function t(t,e,n,r){this.config=t,this.media=e,this.fragmentTracker=n,this.hls=r,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var e=t.prototype;return e.poll=function(t){var e=this.config,n=this.media,r=this.stalled,i=n.currentTime,s=n.seeking,o=this.seeking&&!s,a=!this.seeking&&s;if(this.seeking=s,i===t){if((a||o)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&n.buffered.length){var l=F.bufferInfo(n,i,0),u=l.nextStart||0;if(l.len>0||u){if(s){var h=l.len>2,d=!u||u-i>2&&!this.fragmentTracker.getPartialFragment(i);if(h||d)return;this.moved=!1}if(!this.moved&&this.stalled){var f=Math.max(u,l.start||0)-i;if(f>0&&f<=2)return void this._trySkipBufferHole(null)}var p=self.performance.now();if(null!==r){var g=p-r;!s&&g>=250&&this._reportStall(l.len);var m=F.bufferInfo(n,i,e.maxBufferHole);this._tryFixBufferStall(m,g)}else this.stalled=p}}}else if(this.moved=!0,null!==r){if(this.stallReported){var v=self.performance.now()-r;c.logger.warn("playback not stuck anymore @"+i+", after "+Math.round(v)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var n=this.config,r=this.fragmentTracker.getPartialFragment(this.media.currentTime);r&&this._trySkipBufferHole(r)||t.len>n.maxBufferHole&&e>1e3*n.highBufferWatchdogPeriod&&(c.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,c.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(u.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,n=this.hls,r=this.media,i=r.currentTime,s=0,o=0;o=s&&i1?r-1:0),s=1;s1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},i.doTick=function(){},r}(d),lt=function(t){var e,n;function r(){return t.apply(this,arguments)||this}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.doTick=function(){},i.startLoad=function(){},i.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state="STOPPED"},i._streamEnded=function(t,e){var n=this.fragCurrent;if(!e.live&&n&&!n.backtracked&&n.sn===e.endSN&&!t.nextStart){var r=this.fragmentTracker.getState(n);return"PARTIAL"===r||"OK"===r}return!1},i.onMediaSeeking=function(){var t=this.config,e=this.media,n=this.state,r=e?e.currentTime:null,i=F.bufferInfo(this.mediaBuffer||e,r,this.config.maxBufferHole);if(c.logger.log("media seeking to "+(Object(l.isFiniteNumber)(r)?r.toFixed(3):r)),"FRAG_LOADING"===n){var s=this.fragCurrent;if(0===i.len&&s){var o=t.maxFragLookUpTolerance;rs.start+s.duration+o?(s.loader&&(c.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),s.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state="IDLE"):c.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else"ENDED"===n&&(0===i.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state="IDLE");e&&(this.lastCurrentTime=r),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=r),this.tick()},i.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},i.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},i.onHandlerDestroyed=function(){this.state="STOPPED",this.fragmentTracker=null},i.computeLivePosition=function(t,e){return t+Math.max(0,e.totalduration-(void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*e.targetduration))},r}(at);var ut,ct=function(t){var e,n;function r(e,n){var r;return(r=t.call(this,e,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.LEVEL_LOADED,u.default.LEVELS_UPDATED,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.FRAG_LOAD_EMERGENCY_ABORTED,u.default.FRAG_PARSING_INIT_SEGMENT,u.default.FRAG_PARSING_DATA,u.default.FRAG_PARSED,u.default.ERROR,u.default.AUDIO_TRACK_SWITCHING,u.default.AUDIO_TRACK_SWITCHED,u.default.BUFFER_CREATED,u.default.BUFFER_APPENDED,u.default.BUFFER_FLUSHED)||this).fragmentTracker=n,r.config=e.config,r.audioCodecSwap=!1,r._state="STOPPED",r.stallReported=!1,r.gapController=null,r.altAudio=!1,r.audioOnly=!1,r.bitrateTest=!1,r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i,o=r.prototype;return o.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(n.config.testBandwidth?(r=0,this.bitrateTest=!0):r=n.nextAutoLevel),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}e>0&&-1===t&&(c.logger.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state="IDLE",this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state="STOPPED"},o.stopLoad=function(){this.forceStartLoad=!1,t.prototype.stopLoad.call(this)},o.doTick=function(){switch(this.state){case"BUFFER_FLUSHING":this.fragLoadError=0;break;case"IDLE":this._doTickIdle();break;case"WAITING_LEVEL":var t=this.levels[this.level];t&&t.details&&(this.state="IDLE");break;case"FRAG_LOADING_WAITING_RETRY":var e=window.performance.now(),n=this.retryDate;(!n||e>=n||this.media&&this.media.seeking)&&(c.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state="IDLE")}this._checkBuffer(),this._checkFragmentChanged()},o._doTickIdle=function(){var t=this.hls,e=t.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&e.startFragPrefetch))if(this.altAudio&&this.audioOnly)this.demuxer.frag=null;else{var r;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=t.nextLoadLevel,s=this.levels[i];if(s){var o,a=s.bitrate;o=a?Math.max(8*e.maxBufferSize/a,e.maxBufferLength):e.maxBufferLength,o=Math.min(o,e.maxMaxBufferLength);var l=r=o)){c.logger.trace("buffer length of "+d.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=i;var f=s.details;if(!f||f.live&&this.levelLastLoaded!==i)this.state="WAITING_LEVEL";else{if(this._streamEnded(h,f)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(u.default.BUFFER_EOS,p),void(this.state="ENDED")}this._fetchPayloadOrEos(r,h,f)}}}}},o._fetchPayloadOrEos=function(t,e,n){var r=this.fragPrevious,i=n.fragments,s=i.length;if(0!==s){var o,a=i[0].start,l=i[s-1].start+i[s-1].duration,u=e.end;if(n.initSegment&&!n.initSegment.data)o=n.initSegment;else if(n.live){var h=this.config.initialLiveManifestSize;if(sd&&d>u.currentTime&&(c.logger.log("buffer end: "+e.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+d.toFixed(3)),u.currentTime=d),this.nextLoadPosition=d}if(t.PTSKnown&&e>r&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown&&i)if(t.hasProgramDateTime)c.logger.log("live playlist, switching playlist, load frag with same PDT: "+i.programDateTime),o=et(s,i.endProgramDateTime,a.maxFragLookUpTolerance);else{var f=i.sn+1;if(f>=t.startSN&&f<=t.endSN){var p=s[f-t.startSN];i.cc===p.cc&&c.logger.log("live playlist, switching playlist, load frag with next SN: "+(o=p).sn)}o||(o=L(s,(function(t){return i.cc-t.cc})))&&c.logger.log("live playlist, switching playlist, load frag with same CC: "+o.sn)}return o},o._findFragment=function(t,e,n,r,i,s,o){var a,l=this.hls.config;if(a=is-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance):r[n-1]){var u=a.sn-o.startSN,h=r[u-1],d=r[u+1];if(e&&a.sn===e.sn)if(e&&a.level===e.level&&!a.backtracked)if(a.snl.maxBufferHole&&e.dropped&&u?(a=h,c.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):"OK"!==this.fragmentTracker.getState(a=d)&&c.logger.log("Re-loading fragment with SN: "+a.sn)}else a=null;else a.backtracked&&(d&&d.backtracked?(c.logger.warn("Already backtracked from fragment "+d.sn+", will not backtrack to fragment "+a.sn+". Loading fragment "+d.sn),a=d):(c.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),a.dropped=0,h?(a=h).backtracked=!0:u&&(a=null)))}return a},o._loadKey=function(t,e){c.logger.log("Loading key for "+t.sn+" of ["+e.startSN+"-"+e.endSN+"], level "+this.level),this.state="KEY_LOADING",this.hls.trigger(u.default.KEY_LOADING,{frag:t})},o._loadFragment=function(t,e,n,r){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,"initSegment"!==t.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(t.sn)&&!t.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),t.backtracked||"NOT_LOADED"===i||"PARTIAL"===i?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,c.logger.log("Loading "+t.sn+" of ["+e.startSN+"-"+e.endSN+"], level "+this.level+", "+(this.loadedmetadata?"currentTime":"nextLoadPosition")+": "+parseFloat(n.toFixed(3))+", bufferEnd: "+parseFloat(r.toFixed(3))),this.hls.trigger(u.default.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new z(this.hls,"main")),this.state="FRAG_LOADING"):"APPENDING"===i&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)},o.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,s.MAIN)},o.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},o._checkFragmentChanged=function(){var t,e,n=this.media;if(n&&n.readyState&&!1===n.seeking&&((e=n.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=e),F.isBuffered(n,e)?t=this.getBufferedFrag(e):F.isBuffered(n,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var r=t;if(r!==this.fragPlaying){this.hls.trigger(u.default.FRAG_CHANGED,{frag:r});var i=r.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(u.default.LEVEL_SWITCHED,{level:i}),this.fragPlaying=r}}},o.immediateLevelSwitch=function(){if(c.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t,e=this.media;e?(t=e.paused)||e.pause():t=!0,this.previouslyPaused=t}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},o.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,t.currentTime>0&&F.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},o.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e,n=this.getBufferedFrag(t.currentTime);if(n&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),t.paused)e=0;else{var r=this.fragLastKbps;e=r&&this.fragCurrent?this.fragCurrent.duration*this.levels[this.hls.nextLoadLevel].bitrate/(1e3*r)+1:0}var i=this.getBufferedFrag(t.currentTime+e);if(i){var s=this.followingBufferedFrag(i);if(s){var o=this.fragCurrent;o&&o.loader&&o.loader.abort(),this.fragCurrent=null;var a=Math.max(i.endPTS,s.maxStartPTS+Math.min(this.config.maxFragLookUpTolerance,s.duration));this.flushMainBuffer(a,Number.POSITIVE_INFINITY)}}}},o.flushMainBuffer=function(t,e){this.state="BUFFER_FLUSHING";var n={startOffset:t,endOffset:e};this.altAudio&&(n.type="video"),this.hls.trigger(u.default.BUFFER_FLUSHING,n)},o.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition),this.gapController=new st(n,e,this.fragmentTracker,this.hls)},o.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(c.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach((function(t){t.details&&t.details.fragments.forEach((function(t){t.backtracked=void 0}))})),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},o.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;Object(l.isFiniteNumber)(e)&&c.logger.log("media seeked to "+e.toFixed(3)),this.tick()},o.onManifestLoading=function(){c.logger.log("trigger BUFFER_RESET"),this.hls.trigger(u.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},o.onManifestParsed=function(t){var e,n=!1,r=!1;t.levels.forEach((function(t){(e=t.audioCodec)&&(-1!==e.indexOf("mp4a.40.2")&&(n=!0),-1!==e.indexOf("mp4a.40.5")&&(r=!0))})),this.audioCodecSwitch=n&&r,this.audioCodecSwitch&&c.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=t.altAudio,this.levels=t.levels,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)},o.onLevelLoaded=function(t){var e=t.details,n=t.level,r=this.levels[this.levelLastLoaded],i=this.levels[n],s=e.totalduration,o=0;if(c.logger.log("level "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+s),e.live){var a=i.details;a&&e.fragments.length>0?(Y(a,e),this.liveSyncPosition=this.computeLivePosition(o=e.fragments[0].start,a),e.PTSKnown&&Object(l.isFiniteNumber)(o)?c.logger.log("live playlist sliding:"+o.toFixed(3)):(c.logger.log("live playlist - outdated PTS, unknown sliding"),tt(this.fragPrevious,r,e))):(c.logger.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,tt(this.fragPrevious,r,e))}else e.PTSKnown=!1;if(i.details=e,this.levelLastLoaded=n,this.hls.trigger(u.default.LEVEL_UPDATED,{details:e,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var h=e.startTimeOffset;Object(l.isFiniteNumber)(h)?(h<0&&(c.logger.log("negative start time offset "+h+", count from end of last fragment"),h=o+s+h),c.logger.log("start time offset found in playlist, adjust startPosition to "+h),this.startPosition=h):e.live?(this.startPosition=this.computeLivePosition(o,e),c.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}"WAITING_LEVEL"===this.state&&(this.state="IDLE"),this.tick()},o.onKeyLoaded=function(){"KEY_LOADING"===this.state&&(this.state="IDLE",this.tick())},o.onFragLoaded=function(t){var e=this.fragCurrent,n=this.hls,r=this.media,i=t.frag;if("FRAG_LOADING"===this.state&&e&&"main"===i.type&&i.level===e.level&&i.sn===e.sn){var s=t.stats,o=this.levels[e.level],a=o.details;if(this.bitrateTest=!1,this.stats=s,c.logger.log("Loaded "+e.sn+" of ["+a.startSN+" ,"+a.endSN+"],level "+e.level),i.bitrateTest&&n.nextLoadLevel)this.state="IDLE",this.startFragRequested=!1,s.tparsed=s.tbuffered=window.performance.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:s,frag:e,id:"main"}),this.tick();else if("initSegment"===i.sn)this.state="IDLE",s.tparsed=s.tbuffered=window.performance.now(),a.initSegment.data=t.payload,n.trigger(u.default.FRAG_BUFFERED,{stats:s,frag:e,id:"main"}),this.tick();else{c.logger.log("Parsing "+e.sn+" of ["+a.startSN+" ,"+a.endSN+"],level "+e.level+", cc "+e.cc),this.state="PARSING",this.pendingBuffering=!0,this.appended=!1,i.bitrateTest&&(i.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:i}));var l=!(r&&r.seeking)&&(a.PTSKnown||!a.live),h=a.initSegment?a.initSegment.data:[],d=this._getAudioCodec(o);(this.demuxer=this.demuxer||new z(this.hls,"main")).push(t.payload,h,d,o.videoCodec,e,a.totalduration,l)}}this.fragLoadError=0},o.onFragParsingInitSegment=function(t){var e=this.fragCurrent,n=t.frag;if(e&&"main"===t.id&&n.sn===e.sn&&n.level===e.level&&"PARSING"===this.state){var r,i,s=t.tracks;if(this.audioOnly=s.audio&&!s.video,this.altAudio&&!this.audioOnly&&delete s.audio,i=s.audio){var o=this.levels[this.level].audioCodec,a=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(c.logger.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&-1===a.indexOf("firefox")&&(o="mp4a.40.5"),-1!==a.indexOf("android")&&"audio/mpeg"!==i.container&&c.logger.log("Android: force audio codec to "+(o="mp4a.40.2")),i.levelCodec=o,i.id=t.id}for(r in(i=s.video)&&(i.levelCodec=this.levels[this.level].videoCodec,i.id=t.id),this.hls.trigger(u.default.BUFFER_CODECS,s),s){c.logger.log("main track:"+r+",container:"+(i=s[r]).container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var l=i.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,{type:r,data:l,parent:"main",content:"initSegment"}))}this.tick()}},o.onFragParsingData=function(t){var e=this,n=this.fragCurrent,r=t.frag;if(n&&"main"===t.id&&r.sn===n.sn&&r.level===n.level&&("audio"!==t.type||!this.altAudio)&&"PARSING"===this.state){var i=this.levels[this.level],s=n;if(Object(l.isFiniteNumber)(t.endPTS)||(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),!0===t.hasAudio&&s.addElementaryStream(p.AUDIO),!0===t.hasVideo&&s.addElementaryStream(p.VIDEO),c.logger.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(s.dropped=t.dropped,s.dropped)if(s.backtracked)c.logger.warn("Already backtracked on this fragment, appending with the gap",s.sn);else{var o=i.details;if(!o||s.sn!==o.startSN)return c.logger.warn("missing video frame(s), backtracking fragment",s.sn),this.fragmentTracker.removeFragment(s),s.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state="IDLE",this.fragPrevious=s,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),void this.tick();c.logger.warn("missing video frame(s) on first frag, appending with gap",s.sn)}else s.backtracked=!1;var a=$(i.details,s,t.startPTS,t.endPTS,t.startDTS,t.endDTS),h=this.hls;h.trigger(u.default.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:a,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach((function(n){n&&n.length&&"PARSING"===e.state&&(e.appended=!0,e.pendingBuffering=!0,h.trigger(u.default.BUFFER_APPENDING,{type:t.type,data:n,parent:"main",content:"data"}))})),this.tick()}},o.onFragParsed=function(t){var e=this.fragCurrent,n=t.frag;e&&"main"===t.id&&n.sn===e.sn&&n.level===e.level&&"PARSING"===this.state&&(this.stats.tparsed=window.performance.now(),this.state="PARSED",this._checkAppendedParsed())},o.onAudioTrackSwitching=function(t){var e=this.altAudio,n=t.id;if(!t.url){if(this.mediaBuffer!==this.media){c.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(c.logger.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state="IDLE"}var i=this.hls;e&&i.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),i.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:n})}},o.onAudioTrackSwitched=function(t){var e=!!this.hls.audioTracks[t.id].url;if(e){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(c.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=e,this.tick()},o.onBufferCreated=function(t){var e,n,r=t.tracks,i=!1;for(var s in r){var o=r[s];"main"===o.id?(n=s,e=o,"video"===s&&(this.videoBuffer=r[s].buffer)):i=!0}i&&e?(c.logger.log("alternate track found, use "+n+".buffered to schedule main fragment loading"),this.mediaBuffer=e.buffer):this.mediaBuffer=this.media},o.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;"PARSING"!==e&&"PARSED"!==e||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},o._checkAppendedParsed=function(){if(!("PARSED"!==this.state||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){c.logger.log("main buffered : "+Q((this.mediaBuffer?this.mediaBuffer:this.media).buffered)),this.fragPrevious=t;var e=this.stats;e.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*e.total/(e.tbuffered-e.tfirst)),this.hls.trigger(u.default.FRAG_BUFFERED,{stats:e,frag:t,id:"main"}),this.state="IDLE"}(this.loadedmetadata||this.startPosition<=0)&&this.tick()}},o.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var n=!!this.media&&F.isBuffered(this.media,this.media.currentTime)&&F.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:case a.ErrorDetails.KEY_LOAD_ERROR:case a.ErrorDetails.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var r=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);c.logger.warn("mediaController: frag loading failed, retry in "+r+" ms"),this.retryDate=window.performance.now()+r,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state="FRAG_LOADING_WAITING_RETRY"}else c.logger.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state="ERROR";break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:"ERROR"!==this.state&&(t.fatal?(this.state="ERROR",c.logger.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||"WAITING_LEVEL"!==this.state||(this.state="IDLE"));break;case a.ErrorDetails.BUFFER_FULL_ERROR:"main"!==t.parent||"PARSING"!==this.state&&"PARSED"!==this.state||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state="IDLE"):(c.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},o._reduceMaxBufferLength=function(t){var e=this.config;return e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,c.logger.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},o._checkBuffer=function(){var t=this.media;if(t&&0!==t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,e)}},o.onFragLoadEmergencyAborted=function(){this.state="IDLE",this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},o.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;t&&this.fragmentTracker.detectEvictedFragments(this.audioOnly?p.AUDIO:p.VIDEO,t.buffered),this.state="IDLE",this.fragPrevious=null},o.onLevelsUpdated=function(t){this.levels=t.levels},o.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},o._seekToStartPos=function(){var t=this.media,e=t.currentTime,n=this.startPosition;if(e!==n&&n>=0){if(t.seeking)return void c.logger.log("could not seek to "+n+", already seeking at "+e);var r=(t.buffered.length?t.buffered.start(0):0)-n;r>0&&r"+t),this.hls.trigger(u.default.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}])&&function(t,e){for(var n=0;n0){e=n[0].bitrate,n.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=n;for(var h=0;h=0&&t1&&h.loadError0){var e=this.currentLevelIndex,n=t.urlId,r=t.url[n];c.logger.log("Attempt loading level index "+e+" with URL-id "+n),this.hls.trigger(u.default.LEVEL_LOADING,{url:r,level:e,id:n})}}},s.removeLevel=function(t,e){var n=this.levels.filter((function(n,r){return r!==t||n.url.length>1&&void 0!==e&&(n.url=n.url.filter((function(t,n){return n!==e})),n.urlId=0,!0)})).map((function(t,e){var n=t.details;return n&&n.fragments&&n.fragments.forEach((function(t){t.level=e})),t}));this._levels=n,this.hls.trigger(u.default.LEVELS_UPDATED,{levels:n})},(i=[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&function(t,e){for(var n=0;n0;)t.removeCue(t.cues[0])}var gt=function(t){var e,n;function r(e){var n;return(n=t.call(this,e,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_METADATA,u.default.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,n.media=void 0,n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.destroy=function(){d.prototype.destroy.call(this)},i.onMediaAttached=function(t){this.media=t.media},i.onMediaDetaching=function(){pt(this.id3Track),this.id3Track=void 0,this.media=void 0},i.getID3Track=function(t){for(var e=0;et[t.length-1].endTime)return t[t.length-1];for(var n=0,r=t.length-1;n<=r;){var i=Math.floor((r+n)/2);if(et[i].endTime))return t[i];n=i+1}}return t[n].endTime-e=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();var yt=window.performance,bt=function(t){var e,n;function r(e){var n;return(n=t.call(this,e,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR)||this).lastLoadedFragLevel=0,n._nextAutoLevel=-1,n.hls=e,n.timer=null,n._bwEstimator=null,n.onCheck=n._abandonRulesCheck.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n)),n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i,s=r.prototype;return s.destroy=function(){this.clearTimer(),d.prototype.destroy.call(this)},s.onFragLoading=function(t){var e=t.frag;if("main"===e.type&&(this.timer||(this.fragCurrent=e,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var n,r,i=this.hls,s=i.config;i.levels[e.level].details.live?(n=s.abrEwmaFastLive,r=s.abrEwmaSlowLive):(n=s.abrEwmaFastVoD,r=s.abrEwmaSlowVoD),this._bwEstimator=new vt(i,r,n,s.abrEwmaDefaultEstimate)}},s._abandonRulesCheck=function(){var t=this.hls,e=t.media,n=this.fragCurrent;if(n){var r=n.loader;if(!r||r.stats&&r.stats.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var i=r.stats;if(e&&i&&(!e.paused&&0!==e.playbackRate||!e.readyState)&&n.autoLevel&&n.level){var s=yt.now()-i.trequest,o=Math.abs(e.playbackRate);if(s>500*n.duration/o){var a=t.levels,l=Math.max(1,i.bw?i.bw/8:1e3*i.loaded/s),h=a[n.level];if(!h)return;var d=h.realBitrate?Math.max(h.realBitrate,h.bitrate):h.bitrate,f=i.total?i.total:Math.max(i.loaded,Math.round(n.duration*d/8)),p=e.currentTime,g=(f-i.loaded)/l,m=(F.bufferInfo(e,p,t.config.maxBufferHole).end-p)/o;if(m<2*n.duration/o&&g>m){var v,y=t.minAutoLevel;for(v=n.level-1;v>y;v--){var b=a[v].realBitrate?Math.max(a[v].realBitrate,a[v].bitrate):a[v].bitrate;if(n.duration*b/(6.4*l)=r;u--){var h=l[u];if(h){var d,f=h.details,p=f?f.totalduration/f.fragments.length:e,g=!!f&&f.live;d=u<=t?o*n:a*n;var m=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,v=m*p/d;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(d)+"/"+m+"/"+p+"/"+s+"/"+v),d>m&&(!v||g&&!this.bitrateTestDelay||v=0)return f;c.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=a?Math.min(a,r.maxStarvationDelay):r.maxStarvationDelay,g=r.abrBandWidthFactor,m=r.abrBandWidthUpFactor;if(0===d){var v=this.bitrateTestDelay;v&&(p=(a?Math.min(a,r.maxLoadingDelay):r.maxLoadingDelay)-v,c.logger.trace("bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),g=m=1)}return f=this._findBestLevel(o,a,h,i,e,d+p,g,m,n),Math.max(f,0)}}])&&function(t,e){for(var n=0;n.1){var r=n.updating;try{n.abort()}catch(i){c.logger.warn("can not abort audio buffer: "+i)}r?this.audioTimestampOffset=t.start:(c.logger.warn("change mpeg audio timestamp offset from "+n.timestampOffset+" to "+t.start),n.timestampOffset=t.start)}}},i.onManifestParsed=function(t){var e=2;(t.audio&&!t.video||!t.altAudio)&&(e=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=e,c.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},i.onMediaAttaching=function(t){var e=this.media=t.media;if(e&&_t){var n=this.mediaSource=new _t;n.addEventListener("sourceopen",this._onMediaSourceOpen),n.addEventListener("sourceended",this._onMediaSourceEnded),n.addEventListener("sourceclose",this._onMediaSourceClose),e.src=window.URL.createObjectURL(n),this._objectUrl=e.src}},i.onMediaDetaching=function(){c.logger.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(e){c.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):c.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(u.default.MEDIA_DETACHED)},i.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.pendingTracks,n=Object.keys(e).length;(n&&!t||2===n)&&(this.createSourceBuffers(e),this.pendingTracks={},this.doAppending())},i.onBufferReset=function(){var t=this.sourceBuffer;for(var e in t){var n=t[e];try{n&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this._onSBUpdateEnd),n.removeEventListener("error",this._onSBUpdateError))}catch(r){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},i.onBufferCodecs=function(t){var e=this;Object.keys(this.sourceBuffer).length||(Object.keys(t).forEach((function(n){e.pendingTracks[n]=t[n]})),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},i.createSourceBuffers=function(t){var e=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(var r in t)if(!e[r]){var i=t[r];if(!i)throw Error("source buffer exists for track "+r+", however track does not");var s=i.levelCodec||i.codec,o=i.container+";codecs="+s;c.logger.log("creating sourceBuffer("+o+")");try{var l=e[r]=n.addSourceBuffer(o);l.addEventListener("updateend",this._onSBUpdateEnd),l.addEventListener("error",this._onSBUpdateError),this.tracks[r]={buffer:l,codec:s,id:i.id,container:i.container,levelCodec:i.levelCodec}}catch(h){c.logger.error("error while trying to add sourceBuffer:"+h.message),this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:h,mimeType:o})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:this.tracks})},i.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},i.onBufferEos=function(t){for(var e in this.sourceBuffer)if(!t.type||t.type===e){var n=this.sourceBuffer[e];n&&!n.ended&&(n.ended=!0,c.logger.log(e+" sourceBuffer now EOS"))}this.checkEos()},i.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(e&&"open"===e.readyState){for(var n in t){var r=t[n];if(r){if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}}c.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(i){c.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},i.onBufferFlushing=function(t){t.type?this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}):(this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"video"}),this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},i.flushLiveBackBuffer=function(){if(this._live){var t=this.config.liveBackBufferLength;if(isFinite(t)&&!(t<0))if(this.media)for(var e=this.media.currentTime,n=this.sourceBuffer,r=Object.keys(n),i=e-Math.max(t,this._levelTargetDuration),s=r.length-1;s>=0;s--){var o=r[s],a=n[o];if(a){var l=a.buffered;l.length>0&&i>l.start(0)&&this.removeBufferRange(o,a,0,i)&&this.hls.trigger(u.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:i})}}else c.logger.error("flushLiveBackBuffer called without attaching media")}},i.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._levelTargetDuration=e.averagetargetduration||e.targetduration||10,this._live=e.live,this.updateMediaElementDuration())},i.updateMediaElementDuration=function(){var t,e=this.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var n in this.sourceBuffer){var r=this.sourceBuffer[n];if(r&&!0===r.updating)return}t=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===e.liveDurationInfinity?(c.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>t||!Object(l.isFiniteNumber)(t))&&(c.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},i.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,n=this.sourceBuffer;try{for(var r in n){var i=n[r];i&&(e+=i.buffered.length)}}catch(s){c.logger.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(u.default.BUFFER_FLUSHED)}},i.doAppending=function(){var t=this.config,e=this.hls,n=this.segments,r=this.sourceBuffer;if(Object.keys(r).length){if(!this.media||this.media.error)return this.segments=[],void c.logger.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var i=n.shift();if(i)try{var s=r[i.type];if(!s)return void this._onSBUpdateEnd();if(s.updating)return void n.unshift(i);s.ended=!1,this.parent=i.parent,s.appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0}catch(l){c.logger.error("error while trying to append buffer:"+l.message),n.unshift(i);var o={type:a.ErrorTypes.MEDIA_ERROR,parent:i.parent,details:"",fatal:!1};22===l.code?(this.segments=[],o.details=a.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,o.details=a.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>t.appendErrorMaxRetry&&(c.logger.log("fail "+t.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],o.fatal=!0)),e.trigger(u.default.ERROR,o)}}}},i.flushBuffer=function(t,e,n){var r=this.sourceBuffer;if(!Object.keys(r).length)return!0;var i="null";if(this.media&&(i=this.media.currentTime.toFixed(3)),c.logger.log("flushBuffer,pos/start/end: "+i+"/"+t+"/"+e),this.flushBufferCounter>=this.appended)return c.logger.warn("abort flushing too many retries"),!0;var s=r[n];if(s){if(s.ended=!1,s.updating)return c.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(n,s,t,e))return this.flushBufferCounter++,!1}return c.logger.log("buffer flushed"),!0},i.removeBufferRange=function(t,e,n,r){try{for(var i=0;i.5){var u="null";return this.media&&(u=this.media.currentTime.toString()),c.logger.log("sb remove "+t+" ["+a+","+l+"], of ["+s+","+o+"], pos:"+u),e.remove(a,l),!0}}}catch(h){c.logger.warn("removeBufferRange failed",h)}return!1},r}(d);function Et(t,e){for(var n=0;nthis.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},a.getMaxLevel=function(t){var e=this;if(!this.levels)return-1;var n=this.levels.filter((function(n,i){return r.isLevelAllowed(i,e.restrictedLevels)&&i<=t}));return this.clientRect=null,r.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},a.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},a.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},a.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var n=t.getBoundingClientRect();e.width=n.width,e.height=n.height,e.width||e.height||(e.width=n.right-n.left||t.width||0,e.height=n.bottom-n.top||t.height||0)}return this.clientRect=e,e},r.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},r.getMaxLevelByMediaSize=function(t,e,n){if(!t||t&&!t.length)return-1;for(var r,i,s=t.length-1,o=0;o=e||a.height>=n)&&(r=a,!(i=t[o+1])||r.width!==i.width||r.height!==i.height)){s=o;break}}return s},i=r,o=[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(e){}return t}}],(s=[{key:"mediaWidth",get:function(){return this.getDimensions().width*r.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*r.contentScaleFactor}}])&&Et(i.prototype,s),o&&Et(i,o),r}(d),Tt=window.performance,St=function(t){var e,n;function r(e){return t.call(this,e,u.default.MEDIA_ATTACHING)||this}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},i.onMediaAttaching=function(t){var e=this.hls.config;e.capLevelOnFPSDrop&&("function"==typeof(this.video=t.media instanceof window.HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod))},i.checkFPS=function(t,e,n){var r=Tt.now();if(e){if(this.lastTime){var i=n-this.lastDroppedFrames,s=e-this.lastDecodedFrames,o=1e3*i/(r-this.lastTime),a=this.hls;if(a.trigger(u.default.FPS_DROP,{currentDropped:i,currentDecoded:s,totalDroppedFrames:n}),o>0&&i>a.config.fpsDroppedMonitoringThreshold*s){var l=a.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(-1===a.autoLevelCapping||a.autoLevelCapping>=l)&&(a.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:l-=1,droppedLevel:a.currentLevel}),a.autoLevelCapping=l,a.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=e}},i.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},r}(d),Ot=function(){function t(t){t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}var e=t.prototype;return e.destroy=function(){this.abort(),this.loader=null},e.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},e.load=function(t,e,n){this.context=t,this.config=e,this.callbacks=n,this.stats={trequest:window.performance.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t,e=this.context;t=this.loader=new window.XMLHttpRequest;var n=this.stats;n.tfirst=0,n.loaded=0;var r=this.xhrSetup;try{if(r)try{r(t,e.url)}catch(i){t.open("GET",e.url,!0),r(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(i){return void this.callbacks.onError({code:t.status,text:i.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},e.readystatechange=function(t){var e=t.currentTarget,n=e.readyState,r=this.stats,i=this.context,s=this.config;if(!r.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===r.tfirst&&(r.tfirst=Math.max(window.performance.now(),r.trequest)),4===n){var o,a,l=e.status;l>=200&&l<300?(r.tload=Math.max(r.tfirst,window.performance.now()),a="arraybuffer"===i.responseType?(o=e.response).byteLength:(o=e.responseText).length,r.loaded=r.total=a,this.callbacks.onSuccess({url:e.responseURL,data:o},r,i,e)):r.retry>=s.maxRetry||l>=400&&l<499?(c.logger.error(l+" while loading "+i.url),this.callbacks.onError({code:l,text:e.statusText},i,e)):(c.logger.warn(l+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),r.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.timeout)},e.loadtimeout=function(){c.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},e.loadprogress=function(t){var e=t.currentTarget,n=this.stats;n.loaded=t.loaded,t.lengthComputable&&(n.total=t.total);var r=this.callbacks.onProgress;r&&r(n,this.context,null,e)},t}();var kt=function(t){var e,n;function r(e){var n;return(n=t.call(this,e,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.AUDIO_TRACK_LOADED,u.default.AUDIO_TRACK_SWITCHED,u.default.LEVEL_LOADED,u.default.ERROR)||this)._trackId=-1,n._selectDefaultTrack=!0,n.tracks=[],n.trackIdBlacklist=Object.create(null),n.audioGroupId=null,n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i,s=r.prototype;return s.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},s.onManifestParsed=function(t){var e=this.tracks=t.audioTracks||[];this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:e}),this._selectAudioGroup(this.hls.nextLoadLevel)},s.onAudioTrackLoaded=function(t){t.id>=this.tracks.length?c.logger.warn("Invalid audio track id:",t.id):(c.logger.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.hasInterval()&&this.setInterval(1e3*t.details.targetduration),!t.details.live&&this.hasInterval()&&this.clearInterval())},s.onAudioTrackSwitched=function(t){var e=this.tracks[t.id].groupId;e&&this.audioGroupId!==e&&(this.audioGroupId=e)},s.onLevelLoaded=function(t){this._selectAudioGroup(t.level)},s.onError=function(t){t.type===a.ErrorTypes.NETWORK_ERROR&&(t.fatal&&this.clearInterval(),t.details===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(c.logger.warn("Network failure on audio-track id:",t.context.id),this._handleLoadError()))},s._setAudioTrack=function(t){if(this._trackId===t&&this.tracks[this._trackId].details)c.logger.debug("Same id as current audio-track passed, and track details available -> no-op");else if(t<0||t>=this.tracks.length)c.logger.warn("Invalid id passed to audio-track controller");else{var e=this.tracks[t];c.logger.log("Now switching to audio-track index "+t),this.clearInterval(),this._trackId=t,this.hls.trigger(u.default.AUDIO_TRACK_SWITCHING,{id:e.id,type:e.type,url:e.url}),this._loadTrackDetailsIfNeeded(e)}},s.doTick=function(){this._updateTrack(this._trackId)},s._selectAudioGroup=function(t){var e=this.hls.levels[t];if(e&&e.audioGroupIds){var n=e.audioGroupIds[e.urlId];this.audioGroupId!==n&&(this.audioGroupId=n,this._selectInitialAudioTrack())}},s._selectInitialAudioTrack=function(){var t=this,e=this.tracks;if(e.length){var n=this.tracks[this._trackId],r=null;if(n&&(r=n.name),this._selectDefaultTrack){var i=e.filter((function(t){return t.default}));i.length?e=i:c.logger.warn("No default audio tracks defined")}var s=!1,o=function(){e.forEach((function(e){s||t.audioGroupId&&e.groupId!==t.audioGroupId||r&&r!==e.name||(t._setAudioTrack(e.id),s=!0)}))};o(),s||(r=null,o()),s||(c.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},s._needsTrackLoading=function(t){var e=t.details;return!(e&&!e.live||!t.url)},s._loadTrackDetailsIfNeeded=function(t){if(this._needsTrackLoading(t)){var e=t.url,n=t.id;c.logger.log("loading audio-track playlist for id: "+n),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:e,id:n})}},s._updateTrack=function(t){t<0||t>=this.tracks.length||(this.clearInterval(),this._trackId=t,c.logger.log("trying to update audio-track "+t),this._loadTrackDetailsIfNeeded(this.tracks[t]))},s._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var t=this._trackId,e=this.tracks[t],n=e.name,r=e.language;c.logger.warn("Loading failed on audio track id: "+t+", group-id: "+e.groupId+', name/language: "'+n+'" / "'+r+'"');for(var i=t,s=0;s0&&-1===t?(c.logger.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state="IDLE"):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state="STARTING"),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state="STOPPED"},s.doTick=function(){var t,e,n,r=this.hls,i=r.config;switch(this.state){case"ERROR":case"PAUSED":case"BUFFER_FLUSHING":break;case"STARTING":this.state="WAITING_TRACK",this.loadedmetadata=!1;break;case"IDLE":var s=this.tracks;if(!s)break;if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var o=this.mediaBuffer?this.mediaBuffer:this.media,a=this.videoBuffer?this.videoBuffer:this.media,h=tT||d.nextStart))return;c.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=T+.05}if(n.initSegment&&!n.initSegment.data)w=n.initSegment;else if(g<=T){if(w=E[0],null!==this.videoTrackCC&&w.cc!==this.videoTrackCC&&(w=function(t,e){return L(t,(function(t){return t.cce?-1:0}))}(E,this.videoTrackCC)),n.live&&w.loadIdx&&w.loadIdx===this.fragLoadIdx){var O=d.nextStart?d.nextStart:T;return c.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(O+.05)),void(this.media.currentTime=O+.05)}}else{var k,x=i.maxFragLookUpTolerance,A=m?E[m.sn-E[0].sn+1]:void 0;gS-x&&(x=0),k=A&&!rt(g,x,A)?A:L(E,(function(t){return rt(g,x,t)}))):k=E[C-1],k&&(w=k,T=k.start,m&&w.level===m.level&&w.sn===m.sn&&(w.sn=P||o&&o.seeking)&&(c.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state="IDLE");break;case"WAITING_INIT_PTS":var R=this.waitingFragment;if(R){var I=R.frag.cc;if(void 0!==this.initPTS[I])this.waitingFragment=null,this.state="FRAG_LOADING",this.onFragLoaded(R);else if(this.videoTrackCC!==this.waitingVideoCC)c.logger.log("Waiting fragment cc ("+I+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var M=F.bufferInfo(this.mediaBuffer,this.media.currentTime,i.maxBufferHole);rt(M.end,i.maxFragLookUpTolerance,R.frag)<0&&(c.logger.log("Waiting fragment cc ("+I+") @ "+R.frag.start+" cancelled because another fragment at "+M.end+" is needed"),this.clearWaitingFragment())}}else this.state="IDLE"}},s.clearWaitingFragment=function(){var t=this.waitingFragment;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingFragment=null,this.waitingVideoCC=null,this.state="IDLE")},s.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)},s.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(c.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},s.onAudioTracksUpdated=function(t){c.logger.log("audio tracks updated"),this.tracks=t.audioTracks},s.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.clearWaitingFragment(),this.state="PAUSED",e?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state="IDLE"),this.tick()},s.onAudioTrackLoaded=function(t){var e=t.details,n=t.id,r=this.tracks[n],i=0;if(c.logger.log("track "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+e.totalduration),e.live){var s=r.details;s&&e.fragments.length>0?(Y(s,e),i=e.fragments[0].start,c.logger.log(e.PTSKnown?"live audio playlist sliding:"+i.toFixed(3):"live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,c.logger.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(r.details=e,!this.startFragRequested){if(-1===this.startPosition){var o=e.startTimeOffset;Object(l.isFiniteNumber)(o)?(c.logger.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o):e.live?(this.startPosition=this.computeLivePosition(i,e),c.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}"WAITING_TRACK"===this.state&&(this.state="IDLE"),this.tick()},s.onKeyLoaded=function(){"KEY_LOADING"===this.state&&(this.state="IDLE",this.tick())},s.onFragLoaded=function(t){var e=this.fragCurrent,n=t.frag;if("FRAG_LOADING"===this.state&&e&&"audio"===n.type&&n.level===e.level&&n.sn===e.sn){var r=this.tracks[this.trackId],i=r.details,s=i.totalduration,o=e.level,a=e.sn,l=e.cc,h=this.config.defaultAudioCodec||r.audioCodec||"mp4a.40.2",d=this.stats=t.stats;if("initSegment"===a)this.state="IDLE",d.tparsed=d.tbuffered=xt.now(),i.initSegment.data=t.payload,this.hls.trigger(u.default.FRAG_BUFFERED,{stats:d,frag:e,id:"audio"}),this.tick();else{this.state="PARSING",this.appended=!1,this.demuxer||(this.demuxer=new z(this.hls,"audio"));var f=this.initPTS[l],p=i.initSegment?i.initSegment.data:[];void 0!==f?(this.pendingBuffering=!0,c.logger.log("Demuxing "+a+" of ["+i.startSN+" ,"+i.endSN+"],track "+o),this.demuxer.push(t.payload,p,h,null,e,s,!1,f)):(c.logger.log("Unknown video PTS for cc "+l+", waiting for video PTS before demuxing audio frag "+a+" of ["+i.startSN+" ,"+i.endSN+"],track "+o),this.waitingFragment=t,this.waitingVideoCC=this.videoTrackCC,this.state="WAITING_INIT_PTS")}}this.fragLoadError=0},s.onFragParsingInitSegment=function(t){var e=this.fragCurrent,n=t.frag;if(e&&"audio"===t.id&&n.sn===e.sn&&n.level===e.level&&"PARSING"===this.state){var r,i=t.tracks;if(i.video&&delete i.video,r=i.audio){r.levelCodec=r.codec,r.id=t.id,this.hls.trigger(u.default.BUFFER_CODECS,i),c.logger.log("audio track:audio,container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var s=r.initSegment;if(s){var o={type:"audio",data:s,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,o))}this.tick()}}},s.onFragParsingData=function(t){var e=this,n=this.fragCurrent,r=t.frag;if(n&&"audio"===t.id&&"audio"===t.type&&r.sn===n.sn&&r.level===n.level&&"PARSING"===this.state){var i=this.trackId,s=this.tracks[i],o=this.hls;Object(l.isFiniteNumber)(t.endPTS)||(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),n.addElementaryStream(p.AUDIO),c.logger.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),$(s.details,n,t.startPTS,t.endPTS);var h=this.media,d=!1;if(this.audioSwitch)if(h&&h.readyState){var f=h.currentTime;c.logger.log("switching audio track : currentTime:"+f),f>=t.startPTS&&(c.logger.log("switching audio track : flushing all audio"),this.state="BUFFER_FLUSHING",o.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),d=!0,this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:i}))}else this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:i});var g=this.pendingData;if(!g)return c.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void o.trigger(u.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach((function(e){e&&e.length&&g.push({type:t.type,data:e,parent:"audio",content:"data"})})),!d&&g.length&&(g.forEach((function(t){"PARSING"===e.state&&(e.pendingBuffering=!0,e.hls.trigger(u.default.BUFFER_APPENDING,t))})),this.pendingData=[],this.appended=!0)),this.tick()}},s.onFragParsed=function(t){var e=this.fragCurrent,n=t.frag;e&&"audio"===t.id&&n.sn===e.sn&&n.level===e.level&&"PARSING"===this.state&&(this.stats.tparsed=xt.now(),this.state="PARSED",this._checkAppendedParsed())},s.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},s.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},s.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;"PARSING"!==e&&"PARSED"!==e||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},s._checkAppendedParsed=function(){if(!("PARSED"!==this.state||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,n=this.hls;if(t){this.fragPrevious=t,e.tbuffered=xt.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;r&&c.logger.log("audio buffered : "+Q(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state="IDLE"}this.tick()}},s.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:var n=t.frag;if(n&&"audio"!==n.type)break;if(!t.fatal){var r=this.fragLoadError;r?r++:r=1;var i=this.config;if(r<=i.fragLoadingMaxRetry){this.fragLoadError=r;var s=Math.min(Math.pow(2,r-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);c.logger.warn("AudioStreamController: frag loading failed, retry in "+s+" ms"),this.retryDate=xt.now()+s,this.state="FRAG_LOADING_WAITING_RETRY"}else c.logger.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state="ERROR"}break;case a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case a.ErrorDetails.KEY_LOAD_ERROR:case a.ErrorDetails.KEY_LOAD_TIMEOUT:"ERROR"!==this.state&&(this.state=t.fatal?"ERROR":"IDLE",c.logger.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case a.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===t.parent&&("PARSING"===this.state||"PARSED"===this.state)){var o=this.mediaBuffer,l=this.media.currentTime;if(o&&F.isBuffered(o,l)&&F.isBuffered(o,l+.5)){var h=this.config;h.maxMaxBufferLength>=h.maxBufferLength&&(h.maxMaxBufferLength/=2,c.logger.warn("AudioStreamController: reduce max buffer length to "+h.maxMaxBufferLength+"s")),this.state="IDLE"}else c.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state="BUFFER_FLUSHING",this.hls.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},s.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(c.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),e.forEach((function(e){t.hls.trigger(u.default.BUFFER_APPENDING,e)})),this.appended=!0,this.pendingData=[],this.state="PARSED"):(this.state="IDLE",this.fragPrevious=null,this.tick())},(i=[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,c.logger.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}])&&function(t,e){for(var n=0;n100)throw new Error("Position must be between 0 and 100.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",r({},a,{get:function(){return b},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",r({},a,{get:function(){return _},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",r({},a,{get:function(){return w},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");w=e,this.hasBeenReset=!0}})),o.displayState=void 0}return i.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},i}(),Pt=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};function Rt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new Pt,this.regionList=[]}function It(){this.values=Object.create(null)}function Mt(t,e,n,r){var i=r?t.split(r):[t];for(var s in i)if("string"==typeof i[s]){var o=i[s].split(n);2===o.length&&e(o[0],o[1])}}It.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r=0&&e<=100)&&(this.set(t,e),!0)}};var Lt=new Dt(0,0,0),Ft="middle"===Lt.align?"middle":"center";function Nt(t,e,n){var r=t;function i(){var e=function(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}(t);if(null===e)throw new Error("Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function s(){t=t.replace(/^\s+/,"")}if(s(),e.startTime=i(),s(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);t=t.substr(3),s(),e.endTime=i(),s(),function(t,e){var r=new It;Mt(t,(function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var s=e.split(","),o=s[0];r.integer(t,o),r.percent(t,o)&&r.set("snapToLines",!1),r.alt(t,o,["auto"]),2===s.length&&r.alt("lineAlign",s[1],["start",Ft,"end"]);break;case"position":s=e.split(","),r.percent(t,s[0]),2===s.length&&r.alt("positionAlign",s[1],["start",Ft,"end","line-left","line-right","auto"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start",Ft,"end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===Lt.line&&(i=-1),e.line=i,e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align",Ft);var s=r.get("position","auto");"auto"===s&&50===Lt.position&&(s="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=s}(t,e)}function jt(t){return t.replace(//gi,"\n")}Rt.prototype={parse:function(t){var e=this;function n(){var t=e.buffer,n=0;for(t=jt(t);n=16?a--:a++,(s=new c(e,n,jt(l.trim()))).line=navigator.userAgent.match(/Firefox\//)?h+1:h>7?h-2:h+1,s.align="left",s.position=Math.max(0,Math.min(100,a/32*100)),u.push(s),t&&t.addCue(s)}return u}var Vt,Ht={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Gt=function(t){var e=t;return Ht.hasOwnProperty(t)&&(e=Ht[t]),String.fromCharCode(e)},qt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},zt={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Kt={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Wt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},$t=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(t){t[t.ERROR=0]="ERROR",t[t.TEXT=1]="TEXT",t[t.WARNING=2]="WARNING",t[t.INFO=2]="INFO",t[t.DEBUG=3]="DEBUG",t[t.DATA=3]="DATA"}(Vt||(Vt={}));var Yt=function(){function t(){this.time=null,this.verboseLevel=Vt.ERROR}return t.prototype.log=function(t,e){this.verboseLevel>=t&&c.logger.log(this.time+" ["+t+"] "+e)},t}(),Xt=function(t){for(var e=[],n=0;n100&&(this.logger.log(Vt.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var n=this.pos+1;n=144&&this.backSpace();var e=Gt(t);this.pos>=100?this.logger.log(Vt.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<100;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(e=!1),t.push(r)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),te=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new Jt(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<15;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,n=0;n<15;n++)if(!this.rows[n].equals(t.rows[n])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<15;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<15;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(Vt.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(Vt.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e0&&(n=t?"["+e.join(" | ")+"]":e.join("\n")),n},e.getTextAndFormat=function(){return this.rows},t}(),ee=function(){function t(t,e,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new te(n),this.nonDisplayedMemory=new te(n),this.lastOutputScreen=new te(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(Vt.INFO,"MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},e.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var n=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(Vt.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}();function ne(t,e,n){n.a=t,n.b=e}function re(t,e,n){return n.a===t&&n.b===e}var ie=function(){function t(t,e,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new Yt;this.channels=[null,new ee(t,e,r),new ee(t+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var n,r,i,s=!1;this.logger.time=t;for(var o=0;o ("+Xt([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(s=this.parseChars(r,i))){var a=this.currentChannel;a&&a>0?this.channels[a].insertChars(s):this.logger.log(Vt.WARNING,"No channel found yet. TEXT-MODE?")}n||s||this.logger.log(Vt.WARNING,"Couldn't parse cleaned data "+Xt([r,i])+" orig: "+Xt([e[o],e[o+1]]))}},e.parseCmd=function(t,e){var n=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(re(t,e,n))return ne(null,null,n),this.logger.log(Vt.DEBUG,"Repeated command ("+Xt([t,e])+") is dropped"),!0;var r=20===t||21===t||23===t?1:2,i=this.channels[r];return 20===t||21===t||28===t||29===t?32===e?i.ccRCL():33===e?i.ccBS():34===e?i.ccAOF():35===e?i.ccAON():36===e?i.ccDER():37===e?i.ccRU(2):38===e?i.ccRU(3):39===e?i.ccRU(4):40===e?i.ccFON():41===e?i.ccRDC():42===e?i.ccTR():43===e?i.ccRTD():44===e?i.ccEDM():45===e?i.ccCR():46===e?i.ccENM():47===e&&i.ccEOC():i.ccTO(e-32),ne(t,e,n),this.currentChannel=r,!0},e.parseMidrow=function(t,e){var n=0;if((17===t||25===t)&&e>=32&&e<=47){if((n=17===t?1:2)!==this.currentChannel)return this.logger.log(Vt.ERROR,"Mismatch channel in midrow parsing"),!1;var r=this.channels[n];return!!r&&(r.ccMIDROW(e),this.logger.log(Vt.DEBUG,"MIDROW ("+Xt([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var n=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(re(t,e,n))return ne(null,null,n),!0;var r=t<=23?1:2,i=this.channels[r];return!!i&&(i.setPAC(this.interpretPAC(e>=64&&e<=95?1===r?qt[t]:Kt[t]:1===r?zt[t]:Wt[t],e)),ne(t,e,n),this.currentChannel=r,!0)},e.interpretPAC=function(t,e){var n,r={color:null,italics:!1,indent:null,underline:!1,row:t};return r.underline=1==(1&(n=e>95?e-96:e-64)),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},e.parseChars=function(t,e){var n,r,i=null,s=null;(t>=25?(n=2,s=t-8):(n=1,s=t),s>=17&&s<=19)?(this.logger.log(Vt.INFO,"Special char '"+Gt(r=17===s?e+80:18===s?e+112:e+144)+"' in channel "+n),i=[r]):t>=32&&t<=127&&(i=0===e?[t]:[t,e]);if(i){var o=Xt(i);this.logger.log(Vt.DEBUG,"Char codes = "+o.join(",")),ne(t,e,this.cmdHistory)}return i},e.parseBackgroundAttributes=function(t,e){var n;if(!((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47))return!1;var r={};return 16===t||24===t?(n=Math.floor((e-32)/2),r.background=$t[n],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0)),this.channels[t<=23?1:2].setBkgData(r),ne(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;tt)&&(this.startTime=t),this.endTime=e,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}(),oe=function(t,e,n){return t.substr(n||0,e.length)===e},ae=function(t){for(var e=5381,n=t.length;n;)e=33*e^t.charCodeAt(--n);return(e>>>0).toString()};function le(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ue(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}var ce=function(t){var e,n;function r(e){var n;if((n=t.call(this,e,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_USERDATA,u.default.FRAG_DECRYPTED,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.FRAG_LOADED,u.default.INIT_PTS_FOUND)||this).media=null,n.config=void 0,n.enabled=!0,n.Cues=void 0,n.textTracks=[],n.tracks=[],n.initPTS=[],n.unparsedVttFrags=[],n.captionsTracks={},n.nonNativeCaptionsTracks={},n.captionsProperties=void 0,n.cea608Parser1=void 0,n.cea608Parser2=void 0,n.lastSn=-1,n.prevCC=-1,n.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},n.hls=e,n.config=e.config,n.Cues=e.config.cueHandler,n.captionsProperties={textTrack1:{label:n.config.captionsTextTrack1Label,languageCode:n.config.captionsTextTrack1LanguageCode},textTrack2:{label:n.config.captionsTextTrack2Label,languageCode:n.config.captionsTextTrack2LanguageCode},textTrack3:{label:n.config.captionsTextTrack3Label,languageCode:n.config.captionsTextTrack3LanguageCode},textTrack4:{label:n.config.captionsTextTrack4Label,languageCode:n.config.captionsTextTrack4LanguageCode}},n.config.enableCEA708Captions){var r=new se(le(n),"textTrack1"),i=new se(le(n),"textTrack2"),s=new se(le(n),"textTrack3"),o=new se(le(n),"textTrack4");n.cea608Parser1=new ie(1,r,i),n.cea608Parser2=new ie(3,s,o)}return n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.addCues=function(t,e,n,r,i){for(var s,o,a=!1,l=i.length;l--;){var c=i[l],h=(s=c[0],o=e,Math.min(c[1],n)-Math.max(s,o));if(h>=0&&(c[0]=Math.min(c[0],e),c[1]=Math.max(c[1],n),a=!0,h/(n-e)>.5))return}if(a||i.push([e,n]),this.config.renderTextTracksNatively)this.Cues.newCue(this.captionsTracks[t],e,n,r);else{var d=this.Cues.newCue(null,e,n,r);this.hls.trigger(u.default.CUES_PARSED,{type:"captions",cues:d,track:t})}},i.onInitPtsFound=function(t){var e=this,n=this.unparsedVttFrags;"main"===t.id&&(this.initPTS[t.frag.cc]=t.initPTS),n.length&&(this.unparsedVttFrags=[],n.forEach((function(t){e.onFragLoaded(t)})))},i.getExistingTrack=function(t){var e=this.media;if(e)for(var n=0;n0&&f.push(t)},m.onparsingerror=function(t){o=t},m.onflush=function(){o&&s?s(o):i(f)},a.forEach((function(t){if(p){if(oe(t,"X-TIMESTAMP-MAP=")){p=!1,g=!0,t.substr(16).split(",").forEach((function(t){oe(t,"LOCAL:")?u=t.substr(6):oe(t,"MPEGTS:")&&(c=parseInt(t.substr(7)))}));try{e+(9e4*n[r].start||0)<0&&(e+=8589934592),c-=e,h=function(t){var e=parseInt(t.substr(-3)),n=parseInt(t.substr(-6,2)),r=parseInt(t.substr(-9,2)),i=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(l.isFiniteNumber)(e)&&Object(l.isFiniteNumber)(n)&&Object(l.isFiniteNumber)(r)&&Object(l.isFiniteNumber)(i)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*n,(e+=6e4*r)+36e5*i}(u)/1e3,d=c/9e4}catch(i){g=!1,o=i}return}""===t&&(p=!1)}m.parse(t+"\n")})),m.flush()}(e,this.initPTS[t.cc],s,t.cc,(function(e){if(n.config.renderTextTracksNatively){var s=i[t.level];if("disabled"===s.mode)return void r.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t});e.forEach((function(t){if(!s.cues.getCueById(t.id))try{if(s.addCue(t),!s.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){c.logger.debug("Failed occurred on adding cues: "+n);var e=new window.TextTrackCue(t.startTime,t.endTime,t.text);e.id=t.id,s.addCue(e)}}))}else r.trigger(u.default.CUES_PARSED,{type:"subtitles",cues:e,track:n.tracks[t.level].default?"default":"subtitles"+t.level});r.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})}),(function(e){c.logger.log("Failed to parse VTT cue: "+e),r.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})}))},i.onFragDecrypted=function(t){var e=t.frag,n=t.payload;if("subtitle"===e.type){if(!Object(l.isFiniteNumber)(this.initPTS[e.cc]))return void this.unparsedVttFrags.push(t);this._parseVTTs(e,n)}},i.onFragParsingUserdata=function(t){var e=this.cea608Parser1,n=this.cea608Parser2;if(this.enabled&&e&&n)for(var r=0;r=s.length||n!==i||!o||this.stopped)this._clearReloadTimer();else if(c.logger.log("subtitle track "+n+" loaded"),r.live){var a=Z(o.details,r,t.stats.trequest);c.logger.log("Reloading live subtitle playlist in "+a+"ms"),this.timer=setTimeout((function(){e._loadCurrentTrack()}),a)}else this._clearReloadTimer()},s.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},s.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},s._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},s._loadCurrentTrack=function(){var t=this.trackId,e=this.hls,n=this.tracks[t];t<0||!n||n.details&&!n.details.live||(c.logger.log("Loading subtitle track "+t),e.trigger(u.default.SUBTITLE_TRACK_LOADING,{url:n.url,id:t}))},s._toggleTrackModes=function(t){var e=this.media,n=this.subtitleDisplay,r=this.trackId;if(e){var i=he(e.textTracks);if(-1===t)[].slice.call(i).forEach((function(t){t.mode="disabled"}));else{var s=i[r];s&&(s.mode="disabled")}var o=i[t];o&&(o.mode=n?"showing":"hidden")}},s._setSubtitleTrackInternal=function(t){var e=this.hls,n=this.tracks;!Object(l.isFiniteNumber)(t)||t<-1||t>=n.length||(this.trackId=t,c.logger.log("Switching to subtitle track "+t),e.trigger(u.default.SUBTITLE_TRACK_SWITCH,{id:t}),this._loadCurrentTrack())},s._onTextTracksChanged=function(){if(this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=he(this.media.textTracks),n=0;n=r[o].start&&s<=r[o].end){i=r[o];break}var a=e.start+e.duration;i?i.end=a:r.push(i={start:s,end:a})}}},i.onMediaAttached=function(t){var e=t.media;this.media=e,e.addEventListener("seeking",this._onMediaSeeking),this.state="IDLE"},i.onMediaDetaching=function(){var t=this;this.media&&(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach((function(e){t.tracksBuffered[e.id]=[]})),this.media=null,this.state="STOPPED")},i.onError=function(t){var e=t.frag;e&&"subtitle"===e.type&&(this.state="IDLE")},i.onSubtitleTracksUpdated=function(t){var e=this;c.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=t.subtitleTracks,this.tracks.forEach((function(t){e.tracksBuffered[t.id]=[]}))},i.onSubtitleTrackSwitch=function(t){if(this.currentTrackId=t.id,this.tracks&&this.tracks.length&&-1!==this.currentTrackId){var e=this.tracks[this.currentTrackId];e&&e.details&&this.setInterval(500)}else this.clearInterval()},i.onSubtitleTrackLoaded=function(t){var e=t.id,n=t.details,r=this.currentTrackId,i=this.tracks,s=i[r];e>=i.length||e!==r||!s||(n.live&&function(t,e,n){void 0===n&&(n=0);var r=-1;X(t,e,(function(t,e,n){e.start=t.start,r=n}));var i=e.fragments;if(r<0)i.forEach((function(t){t.start+=n}));else for(var s=r+1;s0&&n&&n.key&&"AES-128"===n.method){var s=ge.now();this.decrypter.decrypt(t.payload,n.key.buffer,n.iv.buffer,(function(t){var e=ge.now();i.trigger(u.default.FRAG_DECRYPTED,{frag:r,payload:t,stats:{tstart:s,tdecrypt:e}})}))}},i.onLevelUpdated=function(t){var e=t.details.fragments;this.lastAVStart=e.length?e[0].start:0},i.doTick=function(){if(this.media)switch(this.state){case"IDLE":var t=this.config,e=this.currentTrackId,n=this.fragmentTracker,r=this.media,i=this.tracks;if(!i||!i[e]||!i[e].details)break;var s,o=t.maxBufferHole,a=t.maxFragLookUpTolerance,l=Math.min(t.maxBufferLength,t.maxMaxBufferLength),h=F.bufferedInfo(this._getBuffered(),r.currentTime,o),d=h.end,f=i[e].details,p=f.fragments,g=p.length;if(h.len>l)return;var m=this.fragPrevious;d3)return void this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});c.logger.warn("Retrying license request, "+(3-this._requestLicenseFailureCount+1)+" attempts left"),this._requestLicense(n,r)}}},s._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case de.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},s._requestLicense=function(t,e){c.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return c.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var r=this.getLicenseServerUrl(n.mediaKeySystemDomain),i=this._createLicenseXhr(r,t,e);c.logger.log("Sending license request to URL: "+r);var s=this._generateLicenseRequestChallenge(n,t);i.send(s)}catch(o){c.logger.error("Failure requesting DRM license: "+o),this.hls.trigger(u.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(t){if(this._emeEnabled){var e=t.media;this._media=e,e.addEventListener("encrypted",this._onMediaEncrypted)}},s.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map((function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch((function(){}))}))).then((function(){return t.setMediaKeys(null)})).catch((function(){})))},s.onManifestParsed=function(t){if(this._emeEnabled){var e=t.levels.map((function(t){return t.audioCodec})),n=t.levels.map((function(t){return t.videoCodec}));this._attemptKeySystemAccess(de.WIDEVINE,e,n)}},(i=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&function(t,e){for(var n=0;ne)return r;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),r}(H);Ae.defaultConfig=void 0},"./src/polyfills/number.js": /*!*********************************!*\ !*** ./src/polyfills/number.js ***! \*********************************/ /*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(t,e,n){"use strict";n.r(e),n.d(e,"isFiniteNumber",(function(){return r})),n.d(e,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/utils/get-self-scope.js": /*!*************************************!*\ !*** ./src/utils/get-self-scope.js ***! \*************************************/ /*! exports provided: getSelfScope */function(t,e,n){"use strict";function r(){return"undefined"==typeof window?self:window}n.r(e),n.d(e,"getSelfScope",(function(){return r}))},"./src/utils/logger.js": /*!*****************************!*\ !*** ./src/utils/logger.js ***! \*****************************/ /*! exports provided: enableLogs, logger */function(t,e,n){"use strict";n.r(e),n.d(e,"enableLogs",(function(){return c})),n.d(e,"logger",(function(){return h}));var r=n(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function i(){}var s={trace:i,debug:i,log:i,warn:i,info:i,error:i},o=s;function a(t,e){return"["+t+"] > "+e}var l=Object(r.getSelfScope)();function u(t){var e=l.console[t];return e?function(){for(var n=arguments.length,r=new Array(n),i=0;i1?e-1:0),r=1;r ".length,l=void 0;n&&i++<5&&!("html"===(l=o(n,e))||i>1&&s+r.length*a+l.length>=80);)r.push(l),s+=l.length,n=n.parentNode;return r.reverse().join(" > ")}catch(u){return""}}function o(t,e){var n,r,s,o,a,l,u,c=t,h=[];if(!c||!c.tagName)return"";h.push(c.tagName.toLowerCase());var d=(null===(n=e)||void 0===n?void 0:n.length)?e.filter((function(t){return c.getAttribute(t)})).map((function(t){return[t,c.getAttribute(t)]})):null;if(null===(r=d)||void 0===r?void 0:r.length)d.forEach((function(t){h.push("["+t[0]+'="'+t[1]+'"]')}));else if(c.id&&h.push("#"+c.id),(s=c.className)&&Object(i.k)(s))for(o=s.split(/\s+/),u=0;u=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o}function l(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,s=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}function c(){for(var t=[],e=0;e{throw t},0)}const u={closed:!0,next(t){},error(t){if(a.useDeprecatedSynchronousErrorHandling)throw t;l(t)},complete(){}},c=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function h(t){return null!==t&&"object"==typeof t}const d=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let f=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_unsubscribe:r,_subscriptions:i}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;tt.concat(e instanceof d?e.errors:e),[])}const g=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class m extends f{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=u;break;case 1:if(!t){this.destination=u;break}if("object"==typeof t){t instanceof m?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new v(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new v(this,t,e,n)}}[g](){return this}static create(t,e,n){const r=new m(t,e,n);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class v extends m{constructor(t,e,n,r){let i;super(),this._parentSubscriber=t;let o=this;s(e)?i=e:e&&(i=e.next,n=e.error,r=e.complete,e!==u&&(o=Object.create(e),s(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=i,this._error=n,this._complete=r}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=a;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):l(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;l(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),a.useDeprecatedSynchronousErrorHandling)throw n;l(n)}}__tryOrSetError(t,e,n){if(!a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(l(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const y=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function b(t){return t}let _=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:r}=this,i=function(t,e,n){if(t){if(t instanceof m)return t;if(t[g])return t[g]()}return t||e||n?new m(t,e,n):new m(u)}(t,e,n);if(i.add(r?r.call(i,this.source):this.source||a.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),a.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i}_trySubscribe(t){try{return this._subscribe(t)}catch(e){a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:r}=t;if(e||r)return!1;t=n&&n instanceof m?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=w(e))((e,n)=>{let r;r=this.subscribe(e=>{try{t(e)}catch(i){n(i),r&&r.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[y](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?b:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=w(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function w(t){if(t||(t=a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const E=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class C extends f{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class T extends m{constructor(t){super(t),this.destination=t}}let S=(()=>{class t extends _{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[g](){return new T(this)}lift(t){const e=new O(this,this);return e.operator=t,e}next(t){if(this.closed)throw new E;if(!this.isStopped){const{observers:e}=this,n=e.length,r=e.slice();for(let i=0;inew O(t,e),t})();class O extends S{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):f.EMPTY}}function k(t){return t&&"function"==typeof t.schedule}class x extends m{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}const A=t=>e=>{for(let n=0,r=t.length;nt&&"number"==typeof t.length&&"function"!=typeof t;function I(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const M=t=>{if(t&&"function"==typeof t[y])return r=t,t=>{const e=r[y]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(R(t))return A(t);if(I(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,l),t);if(t&&"function"==typeof t[P])return e=t,t=>{const n=e[P]();for(;;){const e=n.next();if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=h(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,r};function L(t,e,n,r,i=new x(t,n,r)){if(!i.closed)return e instanceof _?e.subscribe(i):M(e)(i)}class F extends m{notifyNext(t,e,n,r,i){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}function N(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new j(t,e))}}class j{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new B(t,this.project,this.thisArg))}}class B extends m{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function U(t,e){return new _(n=>{const r=new f;let i=0;return r.add(e.schedule((function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()}))),r})}function V(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[y]}(t))return function(t,e){return new _(n=>{const r=new f;return r.add(e.schedule(()=>{const i=t[y]();r.add(i.subscribe({next(t){r.add(e.schedule(()=>n.next(t)))},error(t){r.add(e.schedule(()=>n.error(t)))},complete(){r.add(e.schedule(()=>n.complete()))}}))})),r})}(t,e);if(I(t))return function(t,e){return new _(n=>{const r=new f;return r.add(e.schedule(()=>t.then(t=>{r.add(e.schedule(()=>{n.next(t),r.add(e.schedule(()=>n.complete()))}))},t=>{r.add(e.schedule(()=>n.error(t)))}))),r})}(t,e);if(R(t))return U(t,e);if(function(t){return t&&"function"==typeof t[P]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new _(n=>{const r=new f;let i;return r.add(()=>{i&&"function"==typeof i.return&&i.return()}),r.add(e.schedule(()=>{i=t[P](),r.add(e.schedule((function(){if(n.closed)return;let t,e;try{const n=i.next();t=n.value,e=n.done}catch(r){return void n.error(r)}e?n.complete():(n.next(t),this.schedule())})))})),r})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof _?t:new _(M(t))}function H(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?r=>r.pipe(H((n,r)=>V(t(n,r)).pipe(N((t,i)=>e(n,t,r,i))),n)):("number"==typeof e&&(n=e),e=>e.lift(new G(t,n)))}class G{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new q(t,this.project,this.concurrent))}}class q extends F{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function z(t=Number.POSITIVE_INFINITY){return H(b,t)}function K(t,e){return e?U(t,e):new _(A(t))}function W(){return function(t){return t.lift(new $(t))}}class ${constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const r=new Y(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i}}class Y extends m{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}class X extends _{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new f,t.add(this.source.subscribe(new Q(this.getSubject(),this))),t.closed&&(this._connection=null,t=f.EMPTY)),t}refCount(){return W()(this)}}const Z=(()=>{const t=X.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Q extends T{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function J(){return new S} /** * @license Angular v10.0.8 * (c) 2010-2020 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function tt(t){return{toString:t}.toString()} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const et="__annotations__",nt="__parameters__",rt="__prop__metadata__";function it(t,e,n,r,i){return tt(()=>{const s=st(e);function o(...t){if(this instanceof o)return s.call(this,...t),this;const e=new o(...t);return function(n){return i&&i(n,...t),(n.hasOwnProperty(et)?n[et]:Object.defineProperty(n,et,{value:[]})[et]).push(e),r&&r(n),n}}return n&&(o.prototype=Object.create(n.prototype)),o.prototype.ngMetadataName=t,o.annotationCls=o,o})}function st(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}function ot(t,e,n){return tt(()=>{const r=st(e);function i(...t){if(this instanceof i)return r.apply(this,t),this;const e=new i(...t);return n.annotation=e,n;function n(t,n,r){const i=t.hasOwnProperty(nt)?t[nt]:Object.defineProperty(t,nt,{value:[]})[nt];for(;i.length<=r;)i.push(null);return(i[r]=i[r]||[]).push(e),t}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}function at(t,e,n,r){return tt(()=>{const i=st(e);function s(...t){if(this instanceof s)return i.apply(this,t),this;const e=new s(...t);return function(n,i){const s=n.constructor,o=s.hasOwnProperty(rt)?s[rt]:Object.defineProperty(s,rt,{value:{}})[rt];o[i]=o.hasOwnProperty(i)&&o[i]||[],o[i].unshift(e),r&&r(n,i,...t)}}return n&&(s.prototype=Object.create(n.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s})} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const lt=ot("Inject",t=>({token:t})),ut=ot("Optional"),ct=ot("Self"),ht=ot("SkipSelf"),dt=ot("Host"),ft=ot("Attribute",t=>({attributeName:t})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var pt=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({}); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function gt(t){for(let e in t)if(t[e]===gt)return e;throw Error("Could not find renamed property on target object.")}function mt(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function vt(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function yt(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function bt(t){return _t(t,t[Et])||_t(t,t[St])}function _t(t,e){return e&&e.token===t?e:null}function wt(t){return t&&(t.hasOwnProperty(Ct)||t.hasOwnProperty(Ot))?t[Ct]:null}const Et=gt({"\u0275prov":gt}),Ct=gt({"\u0275inj":gt}),Tt=gt({"\u0275provFallback":gt}),St=gt({ngInjectableDef:gt}),Ot=gt({ngInjectorDef:gt}); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function kt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(kt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function xt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const At=gt({__forward_ref__:gt});function Dt(t){return t.__forward_ref__=Dt,t.toString=function(){return kt(this())},t}function Pt(t){return Rt(t)?t():t}function Rt(t){return"function"==typeof t&&t.hasOwnProperty(At)&&t.__forward_ref__===Dt} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const It="undefined"!=typeof globalThis&&globalThis,Mt="undefined"!=typeof window&&window,Lt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Ft="undefined"!=typeof global&&global,Nt=It||Ft||Mt||Lt; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var jt=function(t){return t[t.Token=0]="Token",t[t.Attribute=1]="Attribute",t[t.ChangeDetectorRef=2]="ChangeDetectorRef",t[t.Invalid=3]="Invalid",t}({}); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function Bt(){const t=Nt.ng;if(!t||!t.\u0275compilerFacade)throw new Error("Angular JIT compilation failed: '@angular/compiler' not loaded!\n - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.");return t.\u0275compilerFacade} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const Ut=gt({"\u0275cmp":gt}),Vt=gt({"\u0275dir":gt}),Ht=gt({"\u0275pipe":gt}),Gt=gt({"\u0275mod":gt}),qt=gt({"\u0275loc":gt}),zt=gt({"\u0275fac":gt}),Kt=gt({__NG_ELEMENT_ID__:gt}); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Wt{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=vt({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return"InjectionToken "+this._desc}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const $t=new Wt("INJECTOR",-1),Yt={},Xt=/\n/gm,Zt=gt({provide:String,useValue:gt});let Qt,Jt=void 0;function te(t){const e=Jt;return Jt=t,e}function ee(t){const e=Qt;return Qt=t,e}function ne(t,e=pt.Default){if(void 0===Jt)throw new Error("inject() must be called from an injection context");return null===Jt?se(t,void 0,e):Jt.get(t,e&pt.Optional?null:void 0,e)}function re(t,e=pt.Default){return(Qt||ne)(Pt(t),e)}function ie(t){throw new Error("invalid")}function se(t,e,n){const r=bt(t);if(r&&"root"==r.providedIn)return void 0===r.value?r.value=r.factory():r.value;if(n&pt.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${kt(t)}]`)}function oe(t){const e=[];for(let n=0;n{const e=t(Pt(n));return e?e():null};const r=bt(n)||wt(n);return r&&void 0!==r.factory?r.factory:null} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */,"\u0275\u0275invalidFactoryDep":ie};class ue{}class ce{} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function he(t,e){for(let n=0;nArray.isArray(t)?fe(t,e):e(t))}function pe(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function ge(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function me(t,e){const n=[];for(let r=0;r=0?t[1|r]=n:(r=~r,function(t,e,n,r){let i=t.length;if(i==e)t.push(n,r);else if(1===i)t.push(r,t[0]),t[0]=n;else{for(i--,t.push(t[i-1],t[i]);i>e;)t[i]=t[i-2],i--;t[e]=n,t[e+1]=r}}(t,r,e,n)),r}function ye(t,e){const n=be(t,e);if(n>=0)return t[1|n]}function be(t,e){return function(t,e,n){let r=0,i=t.length>>1;for(;i!==r;){const n=r+(i-r>>1),s=t[n<<1];if(e===s)return n<<1;s>e?i=n:r=n+1}return~(i<<1)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(t,e)}var _e=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),we=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({}); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const Ee={},Ce=[]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let Te=0;function Se(t){return tt(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===_e.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||Ce,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||we.Emulated,id:"c",styles:t.styles||Ce,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,i=t.features,s=t.pipes;return n.id+=Te++,n.inputs=Re(t.inputs,e),n.outputs=Re(t.outputs),i&&i.forEach(t=>t(n)),n.directiveDefs=r?()=>("function"==typeof r?r():r).map(ke):null,n.pipeDefs=s?()=>("function"==typeof s?s():s).map(xe):null,n})}function Oe(t,e,n){const r=t.\u0275cmp;r.directiveDefs=()=>e.map(ke),r.pipeDefs=()=>n.map(xe)}function ke(t){return Le(t)||Fe(t)}function xe(t){return function(t){return t[Ht]||null}(t)}const Ae={};function De(t){const e={type:t.type,bootstrap:t.bootstrap||Ce,declarations:t.declarations||Ce,imports:t.imports||Ce,exports:t.exports||Ce,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&tt(()=>{Ae[t.id]=t.type}),e}function Pe(t,e){return tt(()=>{const n=je(t,!0);n.declarations=e.declarations||Ce,n.imports=e.imports||Ce,n.exports=e.exports||Ce})}function Re(t,e){if(null==t)return Ee;const n={};for(const r in t)if(t.hasOwnProperty(r)){let i=t[r],s=i;Array.isArray(i)&&(s=i[1],i=i[0]),n[i]=r,e&&(e[i]=s)}return n}const Ie=Se;function Me(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Le(t){return t[Ut]||null}function Fe(t){return t[Vt]||null}function Ne(t,e){return t.hasOwnProperty(zt)?t[zt]:null}function je(t,e){const n=t[Gt]||null;if(!n&&!0===e)throw new Error(`Type ${kt(t)} does not have '\u0275mod' property.`);return n} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function Be(t){return Array.isArray(t)&&"object"==typeof t[1]}function Ue(t){return Array.isArray(t)&&!0===t[1]}function Ve(t){return 0!=(8&t.flags)}function He(t){return 2==(2&t.flags)}function Ge(t){return 1==(1&t.flags)}function qe(t){return null!==t.template}function ze(t){return 0!=(512&t[2])} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Ke{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function We(){return $e}function $e(t){return t.type.prototype.ngOnChanges&&(t.setInput=Xe),Ye}function Ye(){const t=Ze(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===Ee)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}}function Xe(t,e,n,r){const i=Ze(t)||function(t,e){return t.__ngSimpleChanges__=e} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(t,{previous:Ee,current:null}),s=i.current||(i.current={}),o=i.previous,a=this.declaredInputs[n],l=o[a];s[a]=new Ke(l&&l.currentValue,e,o===Ee),t[r]=e}function Ze(t){return t.__ngSimpleChanges__||null}We.ngInherit=!0; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let Qe=void 0;function Je(){return void 0!==Qe?Qe:"undefined"!=typeof document?document:void 0} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function tn(t){return!!t.listen}const en={createRenderer:(t,e)=>Je()}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function nn(t){for(;Array.isArray(t);)t=t[0];return t}function rn(t,e){return nn(e[t+20])}function sn(t,e){return nn(e[t.index])}function on(t,e){return t.data[e+20]}function an(t,e){return t[e+20]}function ln(t,e){const n=e[t];return Be(n)?n:n[0]}function un(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function cn(t){return 4==(4&t[2])}function hn(t){return 128==(128&t[2])}function dn(t,e){return null===t||null==e?null:t[e]}function fn(t){t[18]=0}function pn(t,e){t[5]+=e;let n=t,r=t[3];for(;null!==r&&(1===e&&1===n[5]||-1===e&&0===n[5]);)r[5]+=e,n=r,r=r[3]} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const gn={lFrame:Vn(null),bindingsEnabled:!0,checkNoChangesMode:!1};function mn(){return gn.bindingsEnabled}function vn(){gn.bindingsEnabled=!0}function yn(){gn.bindingsEnabled=!1}function bn(){return gn.lFrame.lView}function _n(){return gn.lFrame.tView}function wn(t){gn.lFrame.contextLView=t}function En(){return gn.lFrame.previousOrParentTNode}function Cn(t,e){gn.lFrame.previousOrParentTNode=t,gn.lFrame.isParent=e}function Tn(){return gn.lFrame.isParent}function Sn(){gn.lFrame.isParent=!1}function On(){return gn.checkNoChangesMode}function kn(t){gn.checkNoChangesMode=t}function xn(){const t=gn.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function An(){return gn.lFrame.bindingIndex}function Dn(t){return gn.lFrame.bindingIndex=t}function Pn(){return gn.lFrame.bindingIndex++}function Rn(t){const e=gn.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function In(t,e){const n=gn.lFrame;n.bindingIndex=n.bindingRootIndex=t,Mn(e)}function Mn(t){gn.lFrame.currentDirectiveIndex=t}function Ln(t){const e=gn.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function Fn(){return gn.lFrame.currentQueryIndex}function Nn(t){gn.lFrame.currentQueryIndex=t}function jn(t,e){const n=Un();gn.lFrame=n,n.previousOrParentTNode=e,n.lView=t}function Bn(t,e){const n=Un(),r=t[1];gn.lFrame=n,n.previousOrParentTNode=e,n.lView=t,n.tView=r,n.contextLView=t,n.bindingIndex=r.bindingStartIndex}function Un(){const t=gn.lFrame,e=null===t?null:t.child;return null===e?Vn(t):e}function Vn(t){const e={previousOrParentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function Hn(){const t=gn.lFrame;return gn.lFrame=t.parent,t.previousOrParentTNode=null,t.lView=null,t}const Gn=Hn;function qn(){const t=Hn();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function zn(){return gn.lFrame.selectedIndex}function Kn(t){gn.lFrame.selectedIndex=t}function Wn(){const t=gn.lFrame;return on(t.tView,t.selectedIndex)}function $n(){gn.lFrame.currentNamespace="http://www.w3.org/2000/svg"}function Yn(){gn.lFrame.currentNamespace="http://www.w3.org/1998/MathML/"}function Xn(){gn.lFrame.currentNamespace=null}function Zn(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n=r)break}else e[o]<0&&(t[18]+=65536),(s>11>16&&(3&t[2])===e&&(t[2]+=2048,s.call(o)):s.call(o)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class rr{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function ir(t,e,n){const r=tn(t);let i=0;for(;ie){o=s-1;break}}}for(;s>16}function dr(t,e){let n=hr(t),r=e;for(;n>0;)r=r[15],n--;return r} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function fr(t){return"string"==typeof t?t:null==t?"":""+t}function pr(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():fr(t)}const gr=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Nt))();function mr(t){return{name:"window",target:t.ownerDocument.defaultView}}function vr(t){return{name:"document",target:t.ownerDocument}}function yr(t){return{name:"body",target:t.ownerDocument.body}}function br(t){return t instanceof Function?t():t} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */let _r=!0;function wr(t){const e=_r;return _r=t,e}let Er=0;function Cr(t,e){const n=Sr(t,e);if(-1!==n)return n;const r=e[1];r.firstCreatePass&&(t.injectorIndex=e.length,Tr(r.data,t),Tr(e,null),Tr(r.blueprint,null));const i=Or(t,e),s=t.injectorIndex;if(ur(i)){const t=cr(i),n=dr(i,e),r=n[1].data;for(let i=0;i<8;i++)e[s+i]=n[t+i]|r[t+i]}return e[s+8]=i,s}function Tr(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Sr(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null==e[t.injectorIndex+8]?-1:t.injectorIndex}function Or(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=e[6],r=1;for(;n&&-1===n.injectorIndex;)n=(e=e[15])?e[6]:null,r++;return n?n.injectorIndex|r<<16:-1}function kr(t,e,n){!function(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Kt)&&(r=n[Kt]),null==r&&(r=n[Kt]=Er++);const i=255&r,s=1<0?255&e:e}(n);if("function"==typeof i){jn(e,t);try{const t=i();if(null!=t||r&pt.Optional)return t;throw new Error(`No provider for ${pr(n)}!`)}finally{Gn()}}else if("number"==typeof i){if(-1===i)return new Lr(t,e);let s=null,o=Sr(t,e),a=-1,l=r&pt.Host?e[16][6]:null;for((-1===o||r&pt.SkipSelf)&&(a=-1===o?Or(t,e):e[o+8],Mr(r,!1)?(s=e[1],o=cr(a),e=dr(a,e)):o=-1);-1!==o;){a=e[o+8];const t=e[1];if(Ir(i,o,t.data)){const t=Dr(o,e,n,s,r,l);if(t!==Ar)return t}Mr(r,e[1].data[o+8]===l)&&Ir(i,o,e)?(s=t,o=cr(a),e=dr(a,e)):o=-1}}}if(r&pt.Optional&&void 0===i&&(i=null),0==(r&(pt.Self|pt.Host))){const t=e[9],s=ee(void 0);try{return t?t.get(n,i,r&pt.Optional):se(n,i,r&pt.Optional)}finally{ee(s)}}if(r&pt.Optional)return i;throw new Error(`NodeInjector: NOT_FOUND [${pr(n)}]`)}const Ar={};function Dr(t,e,n,r,i,s){const o=e[1],a=o.data[t+8],l=Pr(a,o,n,null==r?He(a)&&_r:r!=o&&3===a.type,i&pt.Host&&s===a);return null!==l?Rr(e,o,l,a):Ar}function Pr(t,e,n,r,i){const s=t.providerIndexes,o=e.data,a=1048575&s,l=t.directiveStart,u=s>>20,c=i?a+u:t.directiveEnd;for(let h=r?a:a+u;h=l&&t.type===n)return h}if(i){const t=o[l];if(t&&qe(t)&&t.type===n)return l}return null}function Rr(t,e,n,r){let i=t[n];const s=e.data;if(i instanceof rr){const o=i;if(o.resolving)throw new Error("Circular dep for "+pr(s[n]));const a=wr(o.canSeeViewProviders);let l;o.resolving=!0,o.injectImpl&&(l=ee(o.injectImpl)),jn(t,r);try{i=t[n]=o.factory(void 0,s,t,r),e.firstCreatePass&&n>=r.directiveStart&& /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function(t,e,n){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=e.type.prototype;if(r){const r=$e(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,r),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,r)}i&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,i),s&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,s))}(n,s[n],e)}finally{o.injectImpl&&ee(l),wr(a),o.resolving=!1,Gn()}}return i}function Ir(t,e,n){const r=64&t,i=32&t;let s;return s=128&t?r?i?n[e+7]:n[e+6]:i?n[e+5]:n[e+4]:r?i?n[e+3]:n[e+2]:i?n[e+1]:n[e],!!(s&1<{const t=Fr(Pt(e));return t?t():null};let n=Ne(e);if(null===n){const t=wt(e);n=t&&t.factory}return n||null}function Nr(t){return tt(()=>{const e=t.prototype.constructor,n=e[zt]||Fr(e),r=Object.prototype;let i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==r;){const t=i[zt]||Fr(i);if(t&&t!==n)return t;i=Object.getPrototypeOf(i)}return t=>new t})} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function jr(t){return t.ngDebugContext}function Br(t){return t.ngOriginalError}function Ur(t,...e){t.error(...e)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class Vr{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),r=function(t){return t.ngErrorLogger||Ur}(t);r(this._console,"ERROR",t),e&&r(this._console,"ORIGINAL ERROR",e),n&&r(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?jr(t)?jr(t):this._findContext(Br(t)):null}_findOriginalError(t){let e=Br(t);for(;e&&Br(e);)e=Br(e);return e}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Hr{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}class Gr extends Hr{getTypeName(){return"HTML"}}class qr extends Hr{getTypeName(){return"Style"}}class zr extends Hr{getTypeName(){return"Script"}}class Kr extends Hr{getTypeName(){return"URL"}}class Wr extends Hr{getTypeName(){return"ResourceURL"}}function $r(t){return t instanceof Hr?t.changingThisBreaksApplicationSecurity:t}function Yr(t,e){const n=Xr(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see http://g.co/ng/security#xss)`)}return n===e}function Xr(t){return t instanceof Hr&&t.getTypeName()||null} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let Zr=!0,Qr=!1;function Jr(){return Qr=!0,Zr} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function ti(t){return function(){try{return!!(new window.DOMParser).parseFromString("","text/html")}catch(t){return!1}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */()?new ei:new ni(t)}class ei{getInertBodyElement(t){t=""+t+"";try{const e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(e){return null}}}class ni{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=t,e;const n=this.inertDocument.createElement("body");return n.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0si(t.trim())).join(", ")} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function ai(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function li(...t){const e={};for(const n of t)for(const t in n)n.hasOwnProperty(t)&&(e[t]=!0);return e}const ui=ai("area,br,col,hr,img,wbr"),ci=ai("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),hi=ai("rp,rt"),di=li(hi,ci),fi=li(ui,li(ci,ai("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),li(hi,ai("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),di),pi=ai("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),gi=ai("srcset"),mi=li(pi,gi,ai("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),ai("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),vi=ai("script,style,template");class yi{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!fi.hasOwnProperty(e))return this.sanitizedSomething=!0,!vi.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let r=0;r"),!0}endElement(t){const e=t.nodeName.toLowerCase();fi.hasOwnProperty(e)&&!ui.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(wi(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e}}const bi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_i=/([^\#-~ |!])/g;function wi(t){return t.replace(/&/g,"&").replace(bi,(function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"})).replace(_i,(function(t){return"&#"+t.charCodeAt(0)+";"})).replace(//g,">")}let Ei;function Ci(t,e){let n=null;try{Ei=Ei||ti(t);let r=e?String(e):"";n=Ei.getInertBodyElement(r);let i=5,s=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=s,s=n.innerHTML,n=Ei.getInertBodyElement(r)}while(r!==s);const o=new yi,a=o.sanitizeChildren(Ti(n)||n);return Jr()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const t=Ti(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function Ti(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(t)?t.content:null}var Si=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({}); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Oi(t){const e=Ri();return e?e.sanitize(Si.HTML,t)||"":Yr(t,"HTML")?$r(t):Ci(Je(),fr(t))}function ki(t){const e=Ri();return e?e.sanitize(Si.STYLE,t)||"":Yr(t,"Style")?$r(t):fr(t)}function xi(t){const e=Ri();return e?e.sanitize(Si.URL,t)||"":Yr(t,"URL")?$r(t):si(fr(t))}function Ai(t){const e=Ri();if(e)return e.sanitize(Si.RESOURCE_URL,t)||"";if(Yr(t,"ResourceURL"))return $r(t);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)")}function Di(t){const e=Ri();if(e)return e.sanitize(Si.SCRIPT,t)||"";if(Yr(t,"Script"))return $r(t);throw new Error("unsafe value used in a script context")}function Pi(t,e,n){return function(t,e){return"src"===e&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===e&&("base"===t||"link"===t)?Ai:xi}(e,n)(t)}function Ri(){const t=bn();return t&&t[12]} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Ii(t,e){t.__ngContext__=e}function Mi(t){throw new Error("Multiple components match node with tagname "+t.tagName)}function Li(){throw new Error("Cannot mix multi providers and regular providers")} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function Fi(t,e,n){let r=t.length;for(;;){const i=t.indexOf(e,n);if(-1===i)return i;if(0===i||t.charCodeAt(i-1)<=32){const n=e.length;if(i+n===r||t.charCodeAt(i+n)<=32)return i}n=i+1}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Ni(t,e,n){let r=0;for(;rs?"":i[c+1].toLowerCase();const e=8&r?t:null;if(e&&-1!==Fi(e,u,0)||2&r&&u!==t){if(Vi(r))return!1;o=!0}}}}else{if(!o&&!Vi(r)&&!Vi(l))return!1;if(o&&Vi(l))continue;o=!1,r=l|1&r}}return Vi(r)||o}function Vi(t){return 0==(1&t)}function Hi(t,e,n,r){if(null===e)return-1;let i=0;if(r||!n){let n=!1;for(;i-1)for(n++;n0?'="'+e+'"':"")+"]"}else 8&r?i+="."+o:4&r&&(i+=" "+o);else""===i||Vi(o)||(e+=zi(s,i),i=""),r=o,s=s||!Vi(r);n++}return""!==i&&(e+=zi(s,i)),e} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const Wi={}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function $i(t){const e=t[3];return Ue(e)?e[3]:e}function Yi(t){return Zi(t[13])}function Xi(t){return Zi(t[4])}function Zi(t){for(;null!==t&&!Ue(t);)t=t[4];return t} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Qi(t){ts(_n(),bn(),zn()+t,On())}function Ji(t){ts(_n(),bn(),t,On())}function ts(t,e,n,r){if(!r)if(3==(3&e[2])){const r=t.preOrderCheckHooks;null!==r&&Qn(e,r,n)}else{const r=t.preOrderHooks;null!==r&&Jn(e,r,0,n)}Kn(n)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const es={marker:"element"},ns={marker:"comment"}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function rs(t,e){return t<<17|e<<2}function is(t){return t>>17&32767}function ss(t){return 2|t}function os(t){return(131068&t)>>2}function as(t,e){return-131069&t|e<<2}function ls(t){return 1|t}function us(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;r20&&ts(t,e,0,On()),n(r,i)}finally{Kn(s)}}function vs(t,e,n){if(Ve(e)){const r=e.directiveEnd;for(let i=e.directiveStart;i0&&function t(e){for(let r=Yi(e);null!==r;r=Xi(r))for(let e=10;e0&&t(n)}const n=e[1].components;if(null!==n)for(let r=0;r0&&t(i)}}(n)}}function Vs(t,e){const n=ln(e,t),r=n[1];!function(t,e){for(let n=e.length;nPromise.resolve(null))();function $s(t){return t[7]||(t[7]=[])}function Ys(t,e,n){return(null===t||qe(t))&&(n=function(t){for(;Array.isArray(t);){if("object"==typeof t[1])return t;t=t[0]}return null}(n[e.index])),n[11]}function Xs(t,e){const n=t[9],r=n?n.get(Vr,null):null;r&&r.handleError(e)}function Zs(t,e,n,r,i){for(let s=0;s0&&(t[n-1][4]=r[4]);const s=ge(t,10+e);ro(r[1],r,!1,null);const o=s[19];null!==o&&o.detachView(s[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function oo(t,e){if(!(256&e[2])){const n=e[11];tn(n)&&n.destroyNode&&_o(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return lo(t[1],t);for(;e;){let n=null;if(Be(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)Be(e)&&lo(e[1],e),e=ao(e,t);null===e&&(e=t),Be(e)&&lo(e[1],e),n=e&&e[4]}e=n}}(e)}}function ao(t,e){let n;return Be(t)&&(n=t[6])&&2===n.type?Js(n,t):t[3]===e?null:t[3]}function lo(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let r=0;r=0?t[a]():t[-a].unsubscribe(),r+=2}else n[r].call(t[n[r+1]]);e[7]=null}}(t,e);const n=e[6];n&&3===n.type&&tn(e[11])&&e[11].destroy();const r=e[17];if(null!==r&&Ue(e[3])){r!==e[3]&&io(r,e);const n=e[19];null!==n&&n.detachView(t)}}}function uo(t,e,n){let r=e.parent;for(;null!=r&&(4===r.type||5===r.type);)r=(e=r).parent;if(null==r){const t=n[6];return 2===t.type?to(t,n):n[0]}if(e&&5===e.type&&4&e.flags)return sn(e,n).parentNode;if(2&r.flags){const e=t.data,n=e[e[r.index].directiveStart].encapsulation;if(n!==we.ShadowDom&&n!==we.Native)return null}return sn(r,n)}function co(t,e,n,r){tn(t)?t.insertBefore(e,n,r):e.insertBefore(n,r,!0)}function ho(t,e,n){tn(t)?t.appendChild(e,n):e.appendChild(n)}function fo(t,e,n,r){null!==r?co(t,e,n,r):ho(t,e,n)}function po(t,e){return tn(t)?t.parentNode(e):e.parentNode}function go(t,e){if(2===t.type){const n=Js(t,e);return null===n?null:vo(n.indexOf(e,10)-10,n)}return 4===t.type||5===t.type?sn(t,e):null}function mo(t,e,n,r){const i=uo(t,r,e);if(null!=i){const t=e[11],s=go(r.parent||e[6],e);if(Array.isArray(n))for(let e=0;e-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}oo(this._lView[1],this._lView)}onDestroy(t){Es(this._lView[1],this._lView,null,t)}markForCheck(){Gs(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){qs(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){kn(!0);try{qs(t,e,n)}finally{kn(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,_o(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class Oo extends So{constructor(t){super(t),this._view=t}detectChanges(){zs(this._view)}checkNoChanges(){!function(t){kn(!0);try{zs(t)}finally{kn(!1)}}(this._view)}get context(){return null}}let ko,xo,Ao;function Do(t,e,n){return ko||(ko=class extends t{}),new ko(sn(e,n))}function Po(t,e,n,r){return xo||(xo=class extends t{constructor(t,e,n){super(),this._declarationView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t){const e=this._declarationTContainer.tViews,n=hs(this._declarationView,e,t,16,null,e.node);n[17]=this._declarationView[this._declarationTContainer.index];const r=this._declarationView[19];return null!==r&&(n[19]=r.createEmbeddedView(e)),fs(e,n,t),new So(n)}}),0===n.type?new xo(r,n,Do(e,n,r)):null}function Ro(t,e,n,r){let i;Ao||(Ao=class extends t{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostView=n}get element(){return Do(e,this._hostTNode,this._hostView)}get injector(){return new Lr(this._hostTNode,this._hostView)}get parentInjector(){const t=Or(this._hostTNode,this._hostView),e=dr(t,this._hostView),n=function(t,e,n){if(n.parent&&-1!==n.parent.injectorIndex){const t=n.parent.injectorIndex;let e=n.parent;for(;null!=e.parent&&t==e.parent.injectorIndex;)e=e.parent;return e}let r=hr(t),i=e,s=e[6];for(;r>1;)i=i[15],s=i[6],r--;return s}(t,this._hostView,this._hostTNode);return ur(t)&&null!=n?new Lr(n,e):new Lr(null,this._hostView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,n){const r=t.createEmbeddedView(e||{});return this.insert(r,n),r}createComponent(t,e,n,r,i){const s=n||this.parentInjector;if(!i&&null==t.ngModule&&s){const t=s.get(ue,null);t&&(i=t)}const o=t.create(s,r,void 0,i);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,r=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),Ue(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],r=new Ao(e,e[6],e[3]);r.detach(r.indexOf(t))}}const i=this._adjustIndex(e);return function(t,e,n,r){const i=10+r,s=n.length;r>0&&(n[i-1][4]=e),r{class t{}return t.__NG_ELEMENT_ID__=()=>Lo(),t})();const Lo=Io,Fo=Function;function No(t){return"function"==typeof t} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const jo=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,Bo=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,Uo=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,Vo=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/;class Ho{constructor(t){this._reflect=t||Nt.Reflect}isReflectionEnabled(){return!0}factory(t){return(...e)=>new t(...e)}_zipTypesAndAnnotations(t,e){let n;n=me(void 0===t?e.length:t.length);for(let r=0;rt&&t.type),n=t.map(t=>t&&Go(t.decorators));return this._zipTypesAndAnnotations(e,n)}const i=t.hasOwnProperty(nt)&&t[nt],s=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return s||i?this._zipTypesAndAnnotations(s,i):me(t.length)}parameters(t){if(!No(t))return[];const e=qo(t);let n=this._ownParameters(t,e);return n||e===Object||(n=this.parameters(e)),n||[]}_ownAnnotations(t,e){if(t.annotations&&t.annotations!==e.annotations){let e=t.annotations;return"function"==typeof e&&e.annotations&&(e=e.annotations),e}return t.decorators&&t.decorators!==e.decorators?Go(t.decorators):t.hasOwnProperty(et)?t[et]:null}annotations(t){if(!No(t))return[];const e=qo(t),n=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(n)}_ownPropMetadata(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){let e=t.propMetadata;return"function"==typeof e&&e.propMetadata&&(e=e.propMetadata),e}if(t.propDecorators&&t.propDecorators!==e.propDecorators){const e=t.propDecorators,n={};return Object.keys(e).forEach(t=>{n[t]=Go(e[t])}),n}return t.hasOwnProperty(rt)?t[rt]:null}propMetadata(t){if(!No(t))return{};const e=qo(t),n={};if(e!==Object){const t=this.propMetadata(e);Object.keys(t).forEach(e=>{n[e]=t[e]})}const r=this._ownPropMetadata(t,e);return r&&Object.keys(r).forEach(t=>{const e=[];n.hasOwnProperty(t)&&e.push(...n[t]),e.push(...r[t]),n[t]=e}),n}ownPropMetadata(t){return No(t)&&this._ownPropMetadata(t,qo(t))||{}}hasLifecycleHook(t,e){return t instanceof Fo&&e in t.prototype}guards(t){return{}}getter(t){return new Function("o","return o."+t+";")}setter(t){return new Function("o","v","return o."+t+" = v;")}method(t){return new Function("o","args",`if (!o.${t}) throw new Error('"${t}" is undefined');\n return o.${t}.apply(o, args);`)}importUri(t){return"object"==typeof t&&t.filePath?t.filePath:"./"+kt(t)}resourceUri(t){return"./"+kt(t)}resolveIdentifier(t,e,n,r){return r}resolveEnum(t,e){return t[e]}}function Go(t){return t?t.map(t=>new(0,t.type.annotationCls)(...t.args?t.args:[])):[]}function qo(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */let zo=null;function Ko(){return zo=zo||new Ho}function Wo(t){return $o(Ko().parameters(t))}function $o(t){const e=Bt();return t.map(t=>function(t,e){const n={token:null,host:!1,optional:!1,resolved:t.R3ResolvedDependencyType.Token,self:!1,skipSelf:!1};function r(e){n.resolved=t.R3ResolvedDependencyType.Token,n.token=e}if(Array.isArray(e)&&e.length>0)for(let i=0;ita(t,e)),ta=function(t,e){let n=null,r=null;t.hasOwnProperty(Et)||(Object.defineProperty(t,Et,{get:()=>(null===n&&(n=Bt().compileInjectable(le,`ng:///${t.name}/\u0275prov.js`,Qo(t,e))),n)}),t.hasOwnProperty(Tt)||(t[Tt]=()=>t[Et])),t.hasOwnProperty(zt)||Object.defineProperty(t,zt,{get:()=>{if(null===r){const n=Qo(t,e),i=Bt();r=i.compileFactory(le,`ng:///${t.name}/\u0275fac.js`,{name:n.name,type:n.type,typeArgumentCount:n.typeArgumentCount,deps:Wo(t),injectFn:"inject",target:i.R3FactoryTarget.Injectable})}return r},configurable:!0})},ea=new Wt("Set Injector scope."),na={},ra={},ia=[];let sa=void 0;function oa(){return void 0===sa&&(sa=new ae),sa}function aa(t,e=null,n=null,r){return new la(t,n,e||oa(),r)}class la{constructor(t,e,n,r=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const i=[];e&&fe(e,n=>this.processProvider(n,t,e)),fe([t],t=>this.processInjectorType(t,[],i)),this.records.set($t,ha(void 0,this));const s=this.records.get(ea);this.scope=null!=s?s.value:null,this.source=r||("object"==typeof t?null:kt(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Yt,n=pt.Default){this.assertNotDestroyed();const r=te(this);try{if(!(n&pt.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(i=t)||"object"==typeof i&&i instanceof Wt)&&bt(t);e=n&&this.injectableDefInScope(n)?ha(ua(t),na):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&pt.Self?oa():this.parent).get(t,e=n&pt.Optional&&e===Yt?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(kt(t)),r)throw s;return function(t,e,n,r){const i=t.ngTempTokenPath;throw e.__source&&i.unshift(e.__source),t.message=function(t,e,n,r=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let i=kt(e);if(Array.isArray(e))i=e.map(kt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let r=e[n];t.push(n+":"+("string"==typeof r?JSON.stringify(r):kt(r)))}i=`{${t.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${t.replace(Xt,"\n ")}`}("\n"+t.message,i,n,r),t.ngTokenPath=i,t.ngTempTokenPath=null,t}(s,t,"R3InjectorError",this.source)}throw s}finally{te(r)}var i; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(kt(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=Pt(t)))return!1;let r=wt(t);const i=null==r&&t.ngModule||void 0,s=void 0===i?t:i,o=-1!==n.indexOf(s);if(void 0!==i&&(r=wt(i)),null==r)return!1;if(null!=r.imports&&!o){let t;n.push(s);try{fe(r.imports,r=>{this.processInjectorType(r,e,n)&&(void 0===t&&(t=[]),t.push(r))})}finally{}if(void 0!==t)for(let e=0;ethis.processProvider(t,n,r||ia))}}this.injectorDefTypes.add(s),this.records.set(s,ha(r.factory,na));const a=r.providers;if(null!=a&&!o){const e=t;fe(a,t=>this.processProvider(t,e,a))}return void 0!==i&&void 0!==t.providers}processProvider(t,e,n){let r=fa(t=Pt(t))?t:Pt(t&&t.provide);const i=function(t,e,n){return da(t)?ha(void 0,t.useValue):ha(ca(t,e,n),na)}(t,e,n);if(fa(t)||!0!==t.multi){const t=this.records.get(r);t&&void 0!==t.multi&&Li()}else{let e=this.records.get(r);e?void 0===e.multi&&Li():(e=ha(void 0,na,!0),e.factory=()=>oe(e.multi),this.records.set(r,e)),r=t,e.multi.push(t)}this.records.set(r,i)}hydrate(t,e){var n;return e.value===ra?function(t){throw new Error("Cannot instantiate cyclic dependency! "+t)}(kt(t)):e.value===na&&(e.value=ra,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function ua(t){const e=bt(t),n=null!==e?e.factory:Ne(t);if(null!==n)return n;const r=wt(t);if(null!==r)return r.factory;if(t instanceof Wt)throw new Error(`Token ${kt(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=me(e,"?");throw new Error(`Can't resolve all parameters for ${kt(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[Et]||t[St]||t[Tt]&&t[Tt]());if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function ca(t,e,n){let r=void 0;if(fa(t)){const e=Pt(t);return Ne(e)||ua(e)}if(da(t))r=()=>Pt(t.useValue);else if((i=t)&&i.useFactory)r=()=>t.useFactory(...oe(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))r=()=>re(Pt(t.useExisting));else{const i=Pt(t&&(t.useClass||t.provide));if(i||function(t,e,n){let r="";throw t&&e&&(r=` - only instances of Provider and Type are allowed, got: [${e.map(t=>t==n?"?"+n+"?":"...").join(", ")}]`),new Error(`Invalid provider for the NgModule '${kt(t)}'`+r)}(e,n,t),!function(t){return!!t.deps}(t))return Ne(i)||ua(i);r=()=>new i(...oe(t.deps))}var i;return r}function ha(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function da(t){return null!==t&&"object"==typeof t&&Zt in t}function fa(t){return"function"==typeof t}const pa=function(t,e,n){return function(t,e=null,n=null,r){const i=aa(t,e,n,r);return i._resolveInjectorDefTypes(),i}({name:n},e,t,n)};let ga=(()=>{class t{static create(t,e){return Array.isArray(t)?pa(t,e,""):pa(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Yt,t.NULL=new ae,t.\u0275prov=vt({token:t,providedIn:"any",factory:()=>re($t)}),t.__NG_ELEMENT_ID__=-1,t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ma=new Wt("AnalyzeForEntryComponents"); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function va(t,e,n){let r=n?t.styles:null,i=n?t.classes:null,s=0;if(null!==e)for(let o=0;oa(nn(t[r.index])).target:r.index;if(tn(n)){let o=null;if(!a&&l&&(o=function(t,e,n,r){const i=t.cleanup;if(null!=i)for(let s=0;sn?t[n]:null}"string"==typeof t&&(s+=2)}return null}(t,e,i,r.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,h=!1;else{s=pl(r,e,s,!1);const t=n.listen(f.name||p,i,s);c.push(s,t),u&&u.push(i,m,g,g+1)}}else s=pl(r,e,s,!0),p.addEventListener(i,s,o),c.push(s),u&&u.push(i,m,g,o)}const d=r.outputs;let f;if(h&&null!==d&&(f=d[i])){const t=f.length;if(t)for(let n=0;n0;)e=e[15],t--;return e}(t,gn.lFrame.contextLView))[8]}(t)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function ml(t,e){let n=null;const r=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let i=0;i=0} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const Ml={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Ll(t){return t.substring(Ml.key,Ml.keyEnd)}function Fl(t){return t.substring(Ml.value,Ml.valueEnd)}function Nl(t,e){const n=Ml.textEnd;return n===e?-1:(e=Ml.keyEnd=function(t,e,n){for(;e32;)e++;return e}(t,Ml.key=e,n),Ul(t,e,n))}function jl(t,e){const n=Ml.textEnd;let r=Ml.key=Ul(t,e,n);return n===r?-1:(r=Ml.keyEnd=function(t,e,n){let r;for(;e=65&&(-33&r)<=90);)e++;return e}(t,r,n),r=Vl(t,r,n),r=Ml.value=Ul(t,r,n),r=Ml.valueEnd=function(t,e,n){let r=-1,i=-1,s=-1,o=e,a=o;for(;o32&&(a=o),s=i,i=r,r=-33&l}return a}(t,r,n),Vl(t,r,n))}function Bl(t){Ml.key=0,Ml.keyEnd=0,Ml.value=0,Ml.valueEnd=0,Ml.textEnd=t.length}function Ul(t,e,n){for(;e=0;n=jl(e,n))eu(t,Ll(e),Fl(e))}function Wl(t){Xl(ve,$l,t,!0)}function $l(t,e){for(let n=function(t){return Bl(t),Nl(t,Ul(t,0,Ml.textEnd))}(e);n>=0;n=Nl(e,n))ve(t,Ll(e),!0)}function Yl(t,e,n,r){const i=bn(),s=_n(),o=Rn(2);s.firstUpdatePass&&Ql(s,t,o,r),e!==Wi&&Sa(i,o,e)&&nu(s,s.data[zn()+20],i,i[11],t,i[o+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=kt($r(t)))),t}(e,n),r,o)}function Xl(t,e,n,r){const i=_n(),s=Rn(2);i.firstUpdatePass&&Ql(i,null,s,r);const o=bn();if(n!==Wi&&Sa(o,s,n)){const a=i.data[zn()+20];if(su(a,r)&&!Zl(i,s)){let t=r?a.classesWithoutHost:a.stylesWithoutHost;null!==t&&(n=xt(t,n||"")),tl(i,a,o,n,r)}else!function(t,e,n,r,i,s,o,a){i===Wi&&(i=Pl);let l=0,u=0,c=0=t.expandoStartIndex}function Ql(t,e,n,r){const i=t.data;if(null===i[n+1]){const s=i[zn()+20],o=Zl(t,n);su(s,r)&&null===e&&!o&&(e=!1),e=function(t,e,n,r){const i=Ln(t);let s=r?e.residualClasses:e.residualStyles;if(null===i)0===(r?e.classBindings:e.styleBindings)&&(n=tu(n=Jl(null,t,e,n,r),e.attrs,r),s=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==i)if(n=Jl(i,t,e,n,r),null===s){let n=function(t,e,n){const r=n?e.classBindings:e.styleBindings;if(0!==os(r))return t[is(r)]}(t,e,r);void 0!==n&&Array.isArray(n)&&(n=Jl(null,t,e,n[1],r),n=tu(n,e.attrs,r),function(t,e,n,r){t[is(n?e.classBindings:e.styleBindings)]=r}(t,e,r,n))}else s=function(t,e,n){let r=void 0;const i=e.directiveEnd;for(let s=1+e.directiveStylingLast;s0)&&(c=!0)}else u=n;if(i)if(0!==l){const e=is(t[a+1]);t[r+1]=rs(e,a),0!==e&&(t[e+1]=as(t[e+1],r)),t[a+1]=131071&t[a+1]|r<<17}else t[r+1]=rs(a,0),0!==a&&(t[a+1]=as(t[a+1],r)),a=r;else t[r+1]=rs(l,0),0===a?a=r:t[l+1]=as(t[l+1],r),l=r;c&&(t[r+1]=ss(t[r+1])),Rl(t,u,r,!0),Rl(t,u,r,!1),function(t,e,n,r,i){const s=i?t.residualClasses:t.residualStyles;null!=s&&"string"==typeof e&&be(s,e)>=0&&(n[r+1]=ls(n[r+1]))}(e,u,t,r,s),o=rs(a,l),s?e.classBindings=o:e.styleBindings=o}(i,s,e,n,o,r)}}function Jl(t,e,n,r,i){let s=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a0;){const e=t[i],s=Array.isArray(e),l=s?e[1]:e,u=null===l;let c=n[i+1];c===Wi&&(c=u?Pl:void 0);let h=u?ye(c,r):l===r?c:void 0;if(s&&!iu(h)&&(h=ye(e,r)),iu(h)&&(a=h,o))return a;const d=t[i+1];i=o?is(d):os(d)}if(null!==e){let t=s?e.residualClasses:e.residualStyles;null!=t&&(a=ye(t,r))}return a}function iu(t){return void 0!==t}function su(t,e){return 0!=(t.flags&(e?16:32))} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function ou(t,e=""){const n=bn(),r=_n(),i=t+20,s=r.firstCreatePass?ds(r,n[6],t,3,null,null):r.data[i],o=n[i]=no(e,n[11]);mo(r,n,o,s),Cn(s,!1)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function au(t){return lu("",t,""),au}function lu(t,e,n){const r=bn(),i=Pa(r,t,e,n);return i!==Wi&&Qs(r,zn(),i),lu}function uu(t,e,n,r,i){const s=bn(),o=Ra(s,t,e,n,r,i);return o!==Wi&&Qs(s,zn(),o),uu}function cu(t,e,n,r,i,s,o){const a=bn(),l=Ia(a,t,e,n,r,i,s,o);return l!==Wi&&Qs(a,zn(),l),cu}function hu(t,e,n,r,i,s,o,a,l){const u=bn(),c=Ma(u,t,e,n,r,i,s,o,a,l);return c!==Wi&&Qs(u,zn(),c),hu}function du(t,e,n,r,i,s,o,a,l,u,c){const h=bn(),d=La(h,t,e,n,r,i,s,o,a,l,u,c);return d!==Wi&&Qs(h,zn(),d),du}function fu(t,e,n,r,i,s,o,a,l,u,c,h,d){const f=bn(),p=Fa(f,t,e,n,r,i,s,o,a,l,u,c,h,d);return p!==Wi&&Qs(f,zn(),p),fu}function pu(t,e,n,r,i,s,o,a,l,u,c,h,d,f,p){const g=bn(),m=Na(g,t,e,n,r,i,s,o,a,l,u,c,h,d,f,p);return m!==Wi&&Qs(g,zn(),m),pu}function gu(t,e,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m){const v=bn(),y=ja(v,t,e,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m);return y!==Wi&&Qs(v,zn(),y),gu}function mu(t){const e=bn(),n=Da(e,t);return n!==Wi&&Qs(e,zn(),n),mu} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function vu(t,e,n){Xl(ve,$l,Pa(bn(),t,e,n),!0)}function yu(t,e,n,r,i){Xl(ve,$l,Ra(bn(),t,e,n,r,i),!0)}function bu(t,e,n,r,i,s,o){Xl(ve,$l,Ia(bn(),t,e,n,r,i,s,o),!0)}function _u(t,e,n,r,i,s,o,a,l){Xl(ve,$l,Ma(bn(),t,e,n,r,i,s,o,a,l),!0)}function wu(t,e,n,r,i,s,o,a,l,u,c){Xl(ve,$l,La(bn(),t,e,n,r,i,s,o,a,l,u,c),!0)}function Eu(t,e,n,r,i,s,o,a,l,u,c,h,d){Xl(ve,$l,Fa(bn(),t,e,n,r,i,s,o,a,l,u,c,h,d),!0)}function Cu(t,e,n,r,i,s,o,a,l,u,c,h,d,f,p){Xl(ve,$l,Na(bn(),t,e,n,r,i,s,o,a,l,u,c,h,d,f,p),!0)}function Tu(t,e,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m){Xl(ve,$l,ja(bn(),t,e,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m),!0)}function Su(t){Xl(ve,$l,Da(bn(),t),!0)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Ou(t,e,n){zl(Pa(bn(),t,e,n))}function ku(t,e,n,r,i){zl(Ra(bn(),t,e,n,r,i))}function xu(t,e,n,r,i,s,o){zl(Ia(bn(),t,e,n,r,i,s,o))}function Au(t,e,n,r,i,s,o,a,l){zl(Ma(bn(),t,e,n,r,i,s,o,a,l))}function Du(t,e,n,r,i,s,o,a,l,u,c){zl(La(bn(),t,e,n,r,i,s,o,a,l,u,c))}function Pu(t,e,n,r,i,s,o,a,l,u,c,h,d){zl(Fa(bn(),t,e,n,r,i,s,o,a,l,u,c,h,d))}function Ru(t,e,n,r,i,s,o,a,l,u,c,h,d,f,p){zl(Na(bn(),t,e,n,r,i,s,o,a,l,u,c,h,d,f,p))}function Iu(t,e,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m){zl(ja(bn(),t,e,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m))}function Mu(t){zl(Da(bn(),t))} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Lu(t,e,n,r,i){return Yl(t,Pa(bn(),e,n,r),i,!1),Lu}function Fu(t,e,n,r,i,s,o){return Yl(t,Ra(bn(),e,n,r,i,s),o,!1),Fu}function Nu(t,e,n,r,i,s,o,a,l){return Yl(t,Ia(bn(),e,n,r,i,s,o,a),l,!1),Nu}function ju(t,e,n,r,i,s,o,a,l,u,c){return Yl(t,Ma(bn(),e,n,r,i,s,o,a,l,u),c,!1),ju}function Bu(t,e,n,r,i,s,o,a,l,u,c,h,d){return Yl(t,La(bn(),e,n,r,i,s,o,a,l,u,c,h),d,!1),Bu}function Uu(t,e,n,r,i,s,o,a,l,u,c,h,d,f,p){return Yl(t,Fa(bn(),e,n,r,i,s,o,a,l,u,c,h,d,f),p,!1),Uu}function Vu(t,e,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m){return Yl(t,Na(bn(),e,n,r,i,s,o,a,l,u,c,h,d,f,p,g),m,!1),Vu}function Hu(t,e,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m,v,y){return Yl(t,ja(bn(),e,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m,v),y,!1),Hu}function Gu(t,e,n){return Yl(t,Da(bn(),e),n,!1),Gu} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function qu(t,e,n){const r=bn();return Sa(r,Pn(),e)&&Ss(_n(),Wn(),r,t,e,r[11],n,!0),qu}function zu(t,e,n){const r=bn();if(Sa(r,Pn(),e)){const i=_n(),s=Wn();Ss(i,s,r,t,e,Ys(Ln(i.data),s,r),n,!0)}return zu} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Ku(t,e){const n=un(t)[1],r=n.data.length-1;Zn(n,{directiveStart:r,directiveEnd:r+1})} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function Wu(t){return Object.getPrototypeOf(t.prototype).constructor}function $u(t){let e=Wu(t.type),n=!0;const r=[t];for(;e;){let i=void 0;if(qe(t))i=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");i=e.\u0275dir}if(i){if(n){r.push(i);const e=t;e.inputs=Yu(t.inputs),e.declaredInputs=Yu(t.declaredInputs),e.outputs=Yu(t.outputs);const n=i.hostBindings;n&&Qu(t,n);const s=i.viewQuery,o=i.contentQueries;if(s&&Xu(t,s),o&&Zu(t,o),mt(t.inputs,i.inputs),mt(t.declaredInputs,i.declaredInputs),mt(t.outputs,i.outputs),qe(i)&&i.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(i.data.animation)}}const e=i.features;if(e)for(let r=0;r=0;r--){const i=t[r];i.hostVars=e+=i.hostVars,i.hostAttrs=ar(i.hostAttrs,n=ar(n,i.hostAttrs))}}(r)}function Yu(t){return t===Ee?{}:t===Ce?[]:t}function Xu(t,e){const n=t.viewQuery;t.viewQuery=n?(t,r)=>{e(t,r),n(t,r)}:e}function Zu(t,e){const n=t.contentQueries;t.contentQueries=n?(t,r,i)=>{e(t,r,i),n(t,r,i)}:e}function Qu(t,e){const n=t.hostBindings;t.hostBindings=n?(t,r)=>{e(t,r),n(t,r)}:e} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const Ju=["providersResolver"],tc=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function ec(t){let e=Wu(t.type),n=void 0;n=qe(t)?e.\u0275cmp:e.\u0275dir;const r=t;for(const i of Ju)r[i]=n[i];if(qe(n))for(const i of tc)r[i]=n[i]} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function nc(t,e,n,r,i){if(t=Pt(t),Array.isArray(t))for(let s=0;s>20;if(fa(t)||!t.multi){const r=new rr(l,i,Xa),f=sc(a,e,i?c:c+d,h);-1===f?(kr(Cr(u,o),s,a),rc(s,t,e.length),e.push(a),u.directiveStart++,u.directiveEnd++,i&&(u.providerIndexes+=1048576),n.push(r),o.push(r)):(n[f]=r,o[f]=r)}else{const f=sc(a,e,c+d,h),p=sc(a,e,c,c+d),g=f>=0&&n[f],m=p>=0&&n[p];if(i&&!m||!i&&!g){kr(Cr(u,o),s,a);const c=function(t,e,n,r,i){const s=new rr(t,n,Xa);return s.multi=[],s.index=e,s.componentProviders=0,ic(s,i,r&&!n),s}(i?ac:oc,n.length,i,r,l);!i&&m&&(n[p].providerFactory=c),rc(s,t,e.length,0),e.push(a),u.directiveStart++,u.directiveEnd++,i&&(u.providerIndexes+=1048576),n.push(c),o.push(c)}else rc(s,t,f>-1?f:p,ic(n[i?p:f],l,!i&&r));!i&&r&&m&&n[p].componentProviders++}}}function rc(t,e,n,r){const i=fa(e);if(i||e.useClass){const s=(e.useClass||e).prototype.ngOnDestroy;if(s){const o=t.destroyHooks||(t.destroyHooks=[]);if(!i&&e.multi){const t=o.indexOf(n);-1===t?o.push(n,[r,s]):o[t+1].push(r,s)}else o.push(n,s)}}}function ic(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function sc(t,e,n,r){for(let i=n;i{n.providersResolver=(n,r)=>function(t,e,n){const r=_n();if(r.firstCreatePass){const i=qe(t);nc(n,r.data,r.blueprint,i,!0),nc(e,r.data,r.blueprint,i,!1)}}(n,r?r(t):t,e)}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class cc{} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class hc{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${kt(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let dc=(()=>{class t{}return t.NULL=new hc,t})(),fc=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=()=>pc(t),t})();const pc=function(t){return Do(t,En(),bn())};class gc{}var mc=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});let vc=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>yc(),t})();const yc=function(){const t=bn(),e=ln(En().index,t);return function(t){const e=t[11];if(tn(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Be(e)?e:t)};let bc=(()=>{class t{}return t.\u0275prov=vt({token:t,providedIn:"root",factory:()=>null}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class _c{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const wc=new _c("10.0.8"); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class Ec{constructor(){}supports(t){return wa(t)}create(t){return new Tc(t)}}const Cc=(t,e)=>e;class Tc{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||Cc}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,r=0,i=null;for(;e||n;){const s=!n||e&&e.currentIndex{r=this._trackByFn(e,t),null!==i&&Object.is(i.trackById,r)?(s&&(i=this._verifyReinsertion(i,t,r,e)),Object.is(i.item,t)||this._addIdentityChange(i,t)):(i=this._mismatch(i,t,r,e),s=!0),i=i._next,e++}),this.length=e;return this._truncate(i),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t,e;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,r){let i;return null===t?i=this._itTail:(i=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,i,r)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,i,r)):t=this._addAfter(new Sc(e,n),i,r),t}_verifyReinsertion(t,e,n,r){let i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?t=this._reinsertAfter(i,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,i=t._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new kc),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new kc),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class Sc{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Oc{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class kc{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new Oc,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function xc(t,e,n){const r=t.previousIndex;if(null===r)return r;let i=0;return n&&r{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const r=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const r=n._prev,i=n._next;return r&&(r._next=i),i&&(i._prev=r),n._next=null,n._prev=null,n}const n=new Pc(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class Pc{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let Rc=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new ht,new ut]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=vt({token:t,providedIn:"root",factory:()=>new t([new Ec])}),t})(),Ic=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new ht,new ut]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=vt({token:t,providedIn:"root",factory:()=>new t([new Ac])}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const Mc=[new Ac],Lc=new Rc([new Ec]),Fc=new Ic(Mc);let Nc=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>jc(t,fc),t})();const jc=function(t,e){return Po(t,e,En(),bn())};let Bc=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Uc(t,fc),t})();const Uc=function(t,e){return Ro(t,e,En(),bn())},Vc={}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Hc extends dc{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Le(t);return new zc(e,this.ngModule)}}function Gc(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const qc=new Wt("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>gr});class zc extends cc{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(Ki).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Gc(this.componentDef.inputs)}get outputs(){return Gc(this.componentDef.outputs)}create(t,e,n,r){const i=(r=r||this.ngModule)?function(t,e){return{get:(n,r,i)=>{const s=t.get(n,Vc,i);return s!==Vc||r===Vc?s:e.get(n,r,i)}}}(t,r.injector):t,s=i.get(gc,en),o=i.get(bc,null),a=s.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",u=n?function(t,e,n){if(tn(t))return t.selectRootElement(e,n===we.ShadowDom);let r="string"==typeof e?t.querySelector(e):e;return r.textContent="",r}(a,n,this.componentDef.encapsulation):cs(l,s.createRenderer(null,this.componentDef),function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),c=this.componentDef.onPush?576:528,h={components:[],scheduler:gr,clean:Ws,playerHandler:null,flags:0},d=ws(0,-1,null,1,0,null,null,null,null,null),f=hs(null,d,h,c,null,null,s,a,o,i);let p,g;Bn(f,null);try{const t=function(t,e,n,r,i,s){const o=n[1];n[20]=t;const a=ds(o,null,0,3,null,null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(va(a,l,!0),null!==t&&(ir(i,t,l),null!==a.classes&&To(i,t,a.classes),null!==a.styles&&Co(i,t,a.styles)));const u=r.createRenderer(t,e),c=hs(n,_s(e),null,e.onPush?64:16,n[20],a,r,u,void 0);return o.firstCreatePass&&(kr(Cr(a,n),o,e.type),Ps(o,a),Is(a,n.length,1)),Hs(n,c),n[20]=c}(u,this.componentDef,f,s,a);if(u)if(n)ir(a,u,["ng-version",wc.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let r=1,i=2;for(;r0&&To(a,u,e.join(" "))}if(g=on(d,0),void 0!==e){const t=g.projection=[];for(let n=0;nt(o,e)),e.contentQueries&&e.contentQueries(1,o,n.length-1);const a=En();if(s.firstCreatePass&&(null!==e.hostBindings||null!==e.hostAttrs)){Kn(a.index-20);const t=n[1];ks(t,e),xs(t,n,e.hostVars),As(e,o)}return o}(t,this.componentDef,f,h,[Ku]),fs(d,f,null)}finally{qn()}const m=new Kc(this.componentType,p,Do(fc,g,f),f,g);return d.node.child=g,m}}class Kc extends class{}{constructor(t,e,n,r,i){super(),this.location=n,this._rootLView=r,this._tNode=i,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new Oo(r),function(t,e,n,r){let i=t.node;null==i&&(t.node=i=Cs(0,null,2,-1,null,null)),r[6]=i}(r[1],0,0,r),this.componentType=t}get injector(){return new Lr(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const Wc=void 0;var $c=["en",[["a","p"],["AM","PM"],Wc],[["AM","PM"],Wc,Wc],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Wc,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Wc,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Wc,"{1} 'at' {0}",Wc],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */let Yc={};function Xc(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(t);let n=Qc(e);if(n)return n;const r=e.split("-")[0];if(n=Qc(r),n)return n;if("en"===r)return $c;throw new Error(`Missing locale data for the locale "${t}".`)}function Zc(t){return Xc(t)[Jc.PluralCase]}function Qc(t){return t in Yc||(Yc[t]=Nt.ng&&Nt.ng.common&&Nt.ng.common.locales&&Nt.ng.common.locales[t]),Yc[t]}var Jc=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});const th=["zero","one","two","few","many"],eh=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,nh=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,rh=/\ufffd(\/?[#*!]\d+):?\d*\ufffd/gi,ih=/\ufffd(\d+):?\d*\ufffd/gi,sh=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,oh=/\[(\ufffd.+?\ufffd?)\]/,ah=/\[(\ufffd.+?\ufffd?)\]|(\ufffd\/?\*\d+:\d+\ufffd)/g,lh=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,uh=/{([A-Z0-9_]+)}/g,ch=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g,hh=/\/\*/,dh=/\d+\:(\d+)/;function fh(t){if(!t)return[];let e=0;const n=[],r=[],i=/[{}]/g;let s;for(i.lastIndex=0;s=i.exec(t);){const i=s.index;if("}"==s[0]){if(n.pop(),0==n.length){const n=t.substring(e,i);eh.test(n)?r.push(ph(n)):r.push(n),e=i+1}}else{if(0==n.length){const n=t.substring(e,i);r.push(n),e=i+1}n.push("{")}}const o=t.substring(e);return r.push(o),r}function ph(t){const e=[],n=[];let r=1,i=0;const s=fh(t=t.replace(eh,(function(t,e,n){return r="select"===n?0:1,i=parseInt(e.substr(1),10),""})));for(let o=0;on.length&&n.push(i)}return{type:r,mainBinding:i,cases:e,values:n}}function gh(t){let e,n,r="",i=0,s=!1;for(;null!==(e=nh.exec(t));)s?e[0]===`\ufffd/*${n}\ufffd`&&(i=e.index,s=!1):(r+=t.substring(i,e.index+e[0].length),n=e[1],s=!0);return r+=t.substr(i),r}function mh(t,e,n,r=null){const i=[null,null],s=t.split(ih);let o=0;for(let a=0;a0&&o!==a){let t=o.index-20;Tn()||(t=~t),c.push(t<<3|0)}const h=[],d=[];if(""===r&&Oh(i))c.push(r,Th(s),l<<17|1);else{const t=function(t,e){if(Oh(e))return gh(t);{const n=t.indexOf(`:${e}\ufffd`)+2+e.toString().length,r=t.search(new RegExp(`\ufffd\\/\\*\\d+:${e}\ufffd`));return gh(t.substring(n,r))}}(r,i),e=(f=t,f.replace(Hh," ")).split(rh);for(let n=0;n0&&function(t,e,n){if(n>0&&t.firstCreatePass){for(let r=0;r{const s=r||i,o=t[s]||[];if(o.length||(s.split("|").forEach(t=>{const e=t.match(dh),n=e?parseInt(e[1],10):0,r=hh.test(t);o.push([n,r,t])}),t[s]=o),!o.length)throw new Error("i18n postprocess: unmatched placeholder - "+s);const a=e[e.length-1];let l=0;for(let t=0;te.hasOwnProperty(r)?`${n}${e[r]}${o}`:t),n=n.replace(uh,(t,n)=>e.hasOwnProperty(n)?e[n]:t),n=n.replace(ch,(t,n)=>{if(e.hasOwnProperty(n)){const r=e[n];if(!r.length)throw new Error(`i18n postprocess: unmatched ICU - ${t} with key: ${n}`);return r.shift()}return t}),n):n}function xh(){const t=bn();!function(t,e){const n=yh[bh--],r=t.data[n+20],i=En(),s=Dh(n,r.create,t,e);let o=n+1;for(;o<=i.index-20;){-1===s.indexOf(o)&&Ph(t,e,o,!0);const n=on(t,o);!n||0!==n.type&&3!==n.type&&4!==n.type||null===n.localNames||(o+=n.localNames.length>>1),o++}}(_n(),t),bl(!1)}function Ah(t,e,n,r,i,s){const o=En();e[n+20]=i;const a=ds(t,e[6],n,r,s,null);return o&&o.next===a&&(o.next=null),a}function Dh(t,e,n,r){const i=r[11];let s=null,o=null;const a=[];for(let l=0;l>>17;let c;c=i===t?r[6]:on(n,i),o=Sh(n,s,c,o,r);break;case 0:const h=u>=0,d=(h?u:~u)>>>3;a.push(d),o=s,s=on(n,d),s&&Cn(s,h);break;case 5:o=s=on(n,u>>>3),Cn(s,!1);break;case 4:const f=e[++l],p=e[++l];Fs(on(n,u>>>3),r,f,p,null,null);break;default:throw new Error(`Unable to determine the type of mutate operation for "${u}"`)}else switch(u){case ns:const t=e[++l],c=e[++l],h=i.createComment(t);o=s,s=Ah(n,r,c,5,h,null),a.push(c),Ii(h,r),s.activeCaseIndex=null,Sn();break;case es:const d=e[++l],f=e[++l];o=s,s=Ah(n,r,f,3,i.createElement(d),d),a.push(f);break;default:throw new Error(`Unable to determine the type of mutate operation for "${u}"`)}}return Sn(),a}function Ph(t,e,n,r){const i=on(t,n),s=rn(n,e);s&&yo(e[11],s);const o=an(e,n);if(Ue(o)){const t=o;0!==i.type&&yo(e[11],t[7])}r&&(i.flags|=64)}function Rh(t,e,n){Eh(t,e,n),xh()}function Ih(t,e){!function(t,e,n,r){const i=En().index-20,s=[];for(let o=0;o>>2;let d,f,p;switch(3&u){case 1:const u=e[++c],g=e[++c];Ss(s,on(s,h),o,u,a,o[11],g,!1);break;case 0:Qs(o,h,a);break;case 2:if(d=e[++c],f=n[d],p=on(s,h),null!==p.activeCaseIndex){const t=f.remove[p.activeCaseIndex];for(let e=0;e>>3,!1);break;case 6:const i=on(s,t[e+1]>>>3).activeCaseIndex;null!==i&&he(n[r>>>3].remove[i],t)}}}const m=jh(f,a);p.activeCaseIndex=-1!==m?m:null,m>-1&&(Dh(-1,f.create[m],s,o),l=!0);break;case 3:d=e[++c],f=n[d],p=on(s,h),null!==p.activeCaseIndex&&t(f.update[p.activeCaseIndex],n,r,i,s,o,l)}}}}u+=h}}(r,i,s,Mh,e,o),Mh=0,Lh=0}}function jh(t,e){let n=t.cases.indexOf(e);if(-1===n)switch(t.type){case 1:{const r=function(t,e){const n=Zc(e)(parseInt(t,10)),r=th[n];return void 0!==r?r:"other"}(e,Gh);n=t.cases.indexOf(r),-1===n&&"other"!==r&&(n=t.cases.indexOf("other"));break}case 0:n=t.cases.indexOf("other")}return n}function Bh(t,e,n,r){const i=[],s=[],o=[],a=[],l=[];for(let u=0;u null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(Gh=t.toLowerCase().replace(/_/g,"-"))} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const zh=new Map; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Kh extends ue{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Hc(this);const n=je(t),r=t[qt]||null;r&&qh(r),this._bootstrapComponents=br(n.bootstrap),this._r3Injector=aa(t,e,[{provide:ue,useValue:this},{provide:dc,useValue:this.componentFactoryResolver}],kt(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=ga.THROW_IF_NOT_FOUND,n=pt.Default){return t===ga||t===ue||t===$t?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Wh extends ce{constructor(t){super(),this.moduleType=t,null!==je(t)&&function t(e){if(null!==e.\u0275mod.id){const t=e.\u0275mod.id;(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${kt(e)} vs ${kt(e.name)}`)})(t,zh.get(t),e),zh.set(t,e)}let n=e.\u0275mod.imports;n instanceof Function&&(n=n()),n&&n.forEach(e=>t(e))}(t)}create(t){return new Kh(this.moduleType,t)}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function $h(t,e,n){const r=xn()+t,i=bn();return i[r]===Wi?Ca(i,r,n?e.call(n):e()):Ta(i,r)}function Yh(t,e,n,r){return sd(bn(),xn(),t,e,n,r)}function Xh(t,e,n,r,i){return od(bn(),xn(),t,e,n,r,i)}function Zh(t,e,n,r,i,s){return ad(bn(),xn(),t,e,n,r,i,s)}function Qh(t,e,n,r,i,s,o){return ld(bn(),xn(),t,e,n,r,i,s,o)}function Jh(t,e,n,r,i,s,o,a){const l=xn()+t,u=bn(),c=xa(u,l,n,r,i,s);return Sa(u,l+4,o)||c?Ca(u,l+5,a?e.call(a,n,r,i,s,o):e(n,r,i,s,o)):Ta(u,l+5)}function td(t,e,n,r,i,s,o,a,l){const u=xn()+t,c=bn(),h=xa(c,u,n,r,i,s);return Oa(c,u+4,o,a)||h?Ca(c,u+6,l?e.call(l,n,r,i,s,o,a):e(n,r,i,s,o,a)):Ta(c,u+6)}function ed(t,e,n,r,i,s,o,a,l,u){const c=xn()+t,h=bn();let d=xa(h,c,n,r,i,s);return ka(h,c+4,o,a,l)||d?Ca(h,c+7,u?e.call(u,n,r,i,s,o,a,l):e(n,r,i,s,o,a,l)):Ta(h,c+7)}function nd(t,e,n,r,i,s,o,a,l,u,c){const h=xn()+t,d=bn(),f=xa(d,h,n,r,i,s);return xa(d,h+4,o,a,l,u)||f?Ca(d,h+8,c?e.call(c,n,r,i,s,o,a,l,u):e(n,r,i,s,o,a,l,u)):Ta(d,h+8)}function rd(t,e,n,r){return ud(bn(),xn(),t,e,n,r)}function id(t,e){const n=t[e];return n===Wi?void 0:n}function sd(t,e,n,r,i,s){const o=e+n;return Sa(t,o,i)?Ca(t,o+1,s?r.call(s,i):r(i)):id(t,o+1)}function od(t,e,n,r,i,s,o){const a=e+n;return Oa(t,a,i,s)?Ca(t,a+2,o?r.call(o,i,s):r(i,s)):id(t,a+2)}function ad(t,e,n,r,i,s,o,a){const l=e+n;return ka(t,l,i,s,o)?Ca(t,l+3,a?r.call(a,i,s,o):r(i,s,o)):id(t,l+3)}function ld(t,e,n,r,i,s,o,a,l){const u=e+n;return xa(t,u,i,s,o,a)?Ca(t,u+4,l?r.call(l,i,s,o,a):r(i,s,o,a)):id(t,u+4)}function ud(t,e,n,r,i,s){let o=e+n,a=!1;for(let l=0;l=0;n--){const r=e[n];if(t===r.name)return r}throw new Error(`The pipe '${t}' could not be found!`)}(e,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(i,r.onDestroy)):r=n.data[i];const s=r.factory||(r.factory=Ne(r.type)),o=ee(Xa),a=wr(!1),l=s();return wr(a),ee(o),function(t,e,n,r){const i=n+20;i>=t.data.length&&(t.data[i]=null,t.blueprint[i]=null),e[i]=r}(n,bn(),t,l),l}function hd(t,e,n){const r=bn(),i=an(r,t);return vd(r,md(r,t)?sd(r,xn(),e,i.transform,n,i):i.transform(n))}function dd(t,e,n,r){const i=bn(),s=an(i,t);return vd(i,md(i,t)?od(i,xn(),e,s.transform,n,r,s):s.transform(n,r))}function fd(t,e,n,r,i){const s=bn(),o=an(s,t);return vd(s,md(s,t)?ad(s,xn(),e,o.transform,n,r,i,o):o.transform(n,r,i))}function pd(t,e,n,r,i,s){const o=bn(),a=an(o,t);return vd(o,md(o,t)?ld(o,xn(),e,a.transform,n,r,i,s,a):a.transform(n,r,i,s))}function gd(t,e,n){const r=bn(),i=an(r,t);return vd(r,md(r,t)?ud(r,xn(),e,i.transform,n,i):i.transform.apply(i,n))}function md(t,e){return t[1].data[e+20].pure}function vd(t,e){return _a.isWrapped(e)&&(e=_a.unwrap(e),t[An()]=Wi),e} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const yd=class extends S{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let r,i=t=>null,s=()=>null;t&&"object"==typeof t?(r=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(i=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(s=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(r=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(i=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(s=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const o=super.subscribe(r,i,s);return t instanceof f&&t.add(o),o}}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function bd(){return this._results[ba()]()}class _d{constructor(){this.dirty=!0,this._results=[],this.changes=new yd,this.length=0;const t=ba(),e=_d.prototype;e[t]||(e[t]=bd)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=de(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class wd{constructor(t){this.queryList=t,this.matches=null}clone(){return new wd(this.queryList)}setDirty(){this.queryList.setDirty()}}class Ed{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,r=[];for(let t=0;t0)i.push(a[e/2]);else{const s=o[e+1],a=n[-r];for(let e=10;e({"\u0275\u0275attribute":Aa,"\u0275\u0275attributeInterpolate1":Ba,"\u0275\u0275attributeInterpolate2":Ua,"\u0275\u0275attributeInterpolate3":Va,"\u0275\u0275attributeInterpolate4":Ha,"\u0275\u0275attributeInterpolate5":Ga,"\u0275\u0275attributeInterpolate6":qa,"\u0275\u0275attributeInterpolate7":za,"\u0275\u0275attributeInterpolate8":Ka,"\u0275\u0275attributeInterpolateV":Wa,"\u0275\u0275defineComponent":Se,"\u0275\u0275defineDirective":Ie,"\u0275\u0275defineInjectable":vt,"\u0275\u0275defineInjector":yt,"\u0275\u0275defineNgModule":De,"\u0275\u0275definePipe":Me,"\u0275\u0275directiveInject":Xa,"\u0275\u0275getFactoryOf":Fr,"\u0275\u0275getInheritedFactory":Nr,"\u0275\u0275inject":re,"\u0275\u0275injectAttribute":Za,"\u0275\u0275invalidFactory":Qa,"\u0275\u0275invalidFactoryDep":ie,"\u0275\u0275injectPipeChangeDetectorRef":Vd,"\u0275\u0275templateRefExtractor":Ud,"\u0275\u0275NgOnChangesFeature":We,"\u0275\u0275ProvidersFeature":uc,"\u0275\u0275CopyDefinitionFeature":ec,"\u0275\u0275InheritDefinitionFeature":$u,"\u0275\u0275nextContext":gl,"\u0275\u0275namespaceHTML":Xn,"\u0275\u0275namespaceMathML":Yn,"\u0275\u0275namespaceSVG":$n,"\u0275\u0275enableBindings":vn,"\u0275\u0275disableBindings":yn,"\u0275\u0275elementStart":el,"\u0275\u0275elementEnd":nl,"\u0275\u0275element":rl,"\u0275\u0275elementContainerStart":il,"\u0275\u0275elementContainerEnd":sl,"\u0275\u0275elementContainer":ol,"\u0275\u0275pureFunction0":$h,"\u0275\u0275pureFunction1":Yh,"\u0275\u0275pureFunction2":Xh,"\u0275\u0275pureFunction3":Zh,"\u0275\u0275pureFunction4":Qh,"\u0275\u0275pureFunction5":Jh,"\u0275\u0275pureFunction6":td,"\u0275\u0275pureFunction7":ed,"\u0275\u0275pureFunction8":nd,"\u0275\u0275pureFunctionV":rd,"\u0275\u0275getCurrentView":al,"\u0275\u0275restoreView":wn,"\u0275\u0275listener":cl,"\u0275\u0275projection":_l,"\u0275\u0275syntheticHostProperty":zu,"\u0275\u0275syntheticHostListener":hl,"\u0275\u0275pipeBind1":hd,"\u0275\u0275pipeBind2":dd,"\u0275\u0275pipeBind3":fd,"\u0275\u0275pipeBind4":pd,"\u0275\u0275pipeBindV":gd,"\u0275\u0275projectionDef":vl,"\u0275\u0275hostProperty":qu,"\u0275\u0275property":Ja,"\u0275\u0275propertyInterpolate":wl,"\u0275\u0275propertyInterpolate1":El,"\u0275\u0275propertyInterpolate2":Cl,"\u0275\u0275propertyInterpolate3":Tl,"\u0275\u0275propertyInterpolate4":Sl,"\u0275\u0275propertyInterpolate5":Ol,"\u0275\u0275propertyInterpolate6":kl,"\u0275\u0275propertyInterpolate7":xl,"\u0275\u0275propertyInterpolate8":Al,"\u0275\u0275propertyInterpolateV":Dl,"\u0275\u0275pipe":cd,"\u0275\u0275queryRefresh":Ad,"\u0275\u0275viewQuery":Pd,"\u0275\u0275staticViewQuery":Dd,"\u0275\u0275staticContentQuery":Md,"\u0275\u0275loadQuery":Fd,"\u0275\u0275contentQuery":Id,"\u0275\u0275reference":Ya,"\u0275\u0275classMap":Wl,"\u0275\u0275classMapInterpolate1":vu,"\u0275\u0275classMapInterpolate2":yu,"\u0275\u0275classMapInterpolate3":bu,"\u0275\u0275classMapInterpolate4":_u,"\u0275\u0275classMapInterpolate5":wu,"\u0275\u0275classMapInterpolate6":Eu,"\u0275\u0275classMapInterpolate7":Cu,"\u0275\u0275classMapInterpolate8":Tu,"\u0275\u0275classMapInterpolateV":Su,"\u0275\u0275styleMap":zl,"\u0275\u0275styleMapInterpolate1":Ou,"\u0275\u0275styleMapInterpolate2":ku,"\u0275\u0275styleMapInterpolate3":xu,"\u0275\u0275styleMapInterpolate4":Au,"\u0275\u0275styleMapInterpolate5":Du,"\u0275\u0275styleMapInterpolate6":Pu,"\u0275\u0275styleMapInterpolate7":Ru,"\u0275\u0275styleMapInterpolate8":Iu,"\u0275\u0275styleMapInterpolateV":Mu,"\u0275\u0275styleProp":Gl,"\u0275\u0275stylePropInterpolate1":Lu,"\u0275\u0275stylePropInterpolate2":Fu,"\u0275\u0275stylePropInterpolate3":Nu,"\u0275\u0275stylePropInterpolate4":ju,"\u0275\u0275stylePropInterpolate5":Bu,"\u0275\u0275stylePropInterpolate6":Uu,"\u0275\u0275stylePropInterpolate7":Vu,"\u0275\u0275stylePropInterpolate8":Hu,"\u0275\u0275stylePropInterpolateV":Gu,"\u0275\u0275classProp":ql,"\u0275\u0275select":Ji,"\u0275\u0275advance":Qi,"\u0275\u0275template":$a,"\u0275\u0275text":ou,"\u0275\u0275textInterpolate":au,"\u0275\u0275textInterpolate1":lu,"\u0275\u0275textInterpolate2":uu,"\u0275\u0275textInterpolate3":cu,"\u0275\u0275textInterpolate4":hu,"\u0275\u0275textInterpolate5":du,"\u0275\u0275textInterpolate6":fu,"\u0275\u0275textInterpolate7":pu,"\u0275\u0275textInterpolate8":gu,"\u0275\u0275textInterpolateV":mu,"\u0275\u0275i18n":Rh,"\u0275\u0275i18nAttributes":Ih,"\u0275\u0275i18nExp":Fh,"\u0275\u0275i18nStart":Eh,"\u0275\u0275i18nEnd":xh,"\u0275\u0275i18nApply":Nh,"\u0275\u0275i18nPostprocess":kh,"\u0275\u0275resolveWindow":mr,"\u0275\u0275resolveDocument":vr,"\u0275\u0275resolveBody":yr,"\u0275\u0275setComponentScope":Oe,"\u0275\u0275setNgModuleScope":Pe,"\u0275\u0275sanitizeHtml":Oi,"\u0275\u0275sanitizeStyle":ki,"\u0275\u0275sanitizeResourceUrl":Ai,"\u0275\u0275sanitizeScript":Di,"\u0275\u0275sanitizeUrl":xi,"\u0275\u0275sanitizeUrlOrResourceUrl":Pi}))(),Gd=[],qd=[];function zd(t){return function(t){return void 0!==t.ngModule}(t)?t.ngModule:t}function Kd(t,e){let n=null;(function(t,e){let n=null;Object.defineProperty(t,zt,{get:()=>{if(null===n){const r=Wd(t,e),i=Bt();n=i.compileFactory(Hd,`ng:///${t.name}/\u0275fac.js`,Object.assign(Object.assign({},r.metadata),{injectFn:"directiveInject",target:i.R3FactoryTarget.Directive}))}return n},configurable:!1})})(t,e||{}),Object.defineProperty(t,Vt,{get:()=>{if(null===n){const r=Wd(t,e||{});n=Bt().compileDirective(Hd,r.sourceMapUrl,r.metadata)}return n},configurable:!1})}function Wd(t,e){const n=t&&t.name,r=`ng:///${n}/\u0275dir.js`,i=Bt(),s=function(t,e){const n=Ko(),r=n.ownPropMetadata(t);return{name:t.name,type:t,typeArgumentCount:0,selector:void 0!==e.selector?e.selector:null,deps:Wo(t),host:e.host||Ee,propMetadata:r,inputs:e.inputs||Ce,outputs:e.outputs||Ce,queries:Xd(t,r,Zd),lifecycle:{usesOnChanges:n.hasLifecycleHook(t,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!$d(t),exportAs:(i=e.exportAs,void 0===i?null:tf(i)),providers:e.providers||null,viewQueries:Xd(t,r,Qd)};var i}(t,e);return s.typeSourceSpan=i.createParseSourceSpan("Directive",n,r),s.usesInheritance&&function(t){const e=Object.prototype;let n=Object.getPrototypeOf(t.prototype).constructor;for(;n&&n!==e;)Fe(n)||Le(n)||!nf(n)||Kd(n,null),n=Object.getPrototypeOf(n)}(t),{metadata:s,sourceMapUrl:r}}function $d(t){return Object.getPrototypeOf(t.prototype)===Object.prototype}function Yd(t,e){return{propertyName:t,predicate:(n=e.selector,"string"==typeof n?tf(n):Pt(n)),descendants:e.descendants,first:e.first,read:e.read?e.read:null,static:!!e.static};var n}function Xd(t,e,n){const r=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];s.forEach(e=>{if(n(e)){if(!e.selector)throw new Error(`Can't construct a query for the property "${i}" of "${pr(t)}" since the query selector wasn't defined.`);if(s.some(Jd))throw new Error("Cannot combine @Input decorators with query decorators");r.push(Yd(i,e))}})}return r}function Zd(t){const e=t.ngMetadataName;return"ContentChild"===e||"ContentChildren"===e}function Qd(t){const e=t.ngMetadataName;return"ViewChild"===e||"ViewChildren"===e}function Jd(t){return"Input"===t.ngMetadataName}function tf(t){return t.split(",").map(t=>t.trim())}const ef=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function nf(t){const e=Ko();if(ef.some(n=>e.hasLifecycleHook(t,n)))return!0;const n=e.propMetadata(t);for(const r in n){const t=n[r];for(let e=0;et,void 0,void 0,(t,e)=>of(t,e)),sf=at("Input",t=>({bindingPropertyName:t})),of=Kd,af=it("NgModule",t=>t,void 0,void 0,(t,e)=>lf(t,e)),lf=function(t,e={}){!function(t,e,n=!1){const r=de(e.declarations||Gd);let i=null;Object.defineProperty(t,Gt,{configurable:!0,get:()=>(null===i&&(i=Bt().compileNgModule(Hd,`ng:///${t.name}/\u0275mod.js`,{type:t,bootstrap:de(e.bootstrap||Gd).map(Pt),declarations:r.map(Pt),imports:de(e.imports||Gd).map(Pt).map(zd),exports:de(e.exports||Gd).map(Pt).map(zd),schemas:e.schemas?de(e.schemas):null,id:e.id||null}),i.schemas||(i.schemas=[])),i)});let s=null;Object.defineProperty(t,Ct,{get:()=>{if(null===s){const n={name:t.name,type:t,deps:Wo(t),providers:e.providers||Gd,imports:[(e.imports||Gd).map(Pt),(e.exports||Gd).map(Pt)]};s=Bt().compileInjector(Hd,`ng:///${t.name}/\u0275inj.js`,n)}return s},configurable:!1})}(t,e),function(t,e){qd.push({moduleType:t,ngModule:e})}(t,e)},uf=new Wt("Application Initializer");let cf=(()=>{class t{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(re(uf,8))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const hf=new Wt("AppId"),df={provide:hf,useFactory:function(){return`${ff()}${ff()}${ff()}`},deps:[]};function ff(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pf=new Wt("Platform Initializer"),gf=new Wt("Platform ID"),mf=new Wt("appBootstrapListener");let vf=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const yf=new Wt("LocaleId"),bf=new Wt("DefaultCurrencyCode"); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class _f{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const wf=function(t){return new Wh(t)},Ef=wf,Cf=function(t){return Promise.resolve(wf(t))},Tf=function(t){const e=wf(t),n=br(je(t).declarations).reduce((t,e)=>{const n=Le(e);return n&&t.push(new zc(n)),t},[]);return new _f(e,n)},Sf=Tf,Of=function(t){return Promise.resolve(Tf(t))};let kf=(()=>{class t{constructor(){this.compileModuleSync=Ef,this.compileModuleAsync=Cf,this.compileModuleAndAllComponentsSync=Sf,this.compileModuleAndAllComponentsAsync=Of}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})();const xf=(()=>Promise.resolve(0))();function Af(t){"undefined"==typeof Zone?xf.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Df{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new yd(!1),this.onMicrotaskEmpty=new yd(!1),this.onStable=new yd(!1),this.onError=new yd(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=e,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){let t=Nt.requestAnimationFrame,e=Nt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Nt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Mf(t),If(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Mf(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(n,r,i,s,o,a)=>{try{return Lf(t),n.invokeTask(i,s,o,a)}finally{e&&"eventTask"===s.type&&e(),Ff(t)}},onInvoke:(e,n,r,i,s,o,a)=>{try{return Lf(t),e.invoke(r,i,s,o,a)}finally{Ff(t)}},onHasTask:(e,n,r,i)=>{e.hasTask(r,i),n===r&&("microTask"==i.change?(t._hasPendingMicrotasks=i.microTask,Mf(t),If(t)):"macroTask"==i.change&&(t.hasPendingMacrotasks=i.macroTask))},onHandleError:(e,n,r,i)=>(e.handleError(r,i),t.runOutsideAngular(()=>t.onError.emit(i)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Df.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Df.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,r){const i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+r,t,Rf,Pf,Pf);try{return i.runTask(s,e,n)}finally{i.cancelTask(s)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function Pf(){}const Rf={};function If(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Mf(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function Lf(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Ff(t){t._nesting--,If(t)}class Nf{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new yd,this.onMicrotaskEmpty=new yd,this.onStable=new yd,this.onError=new yd}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}}let jf=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Df.assertNotInAngularZone(),Af(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Af(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let r=-1;e&&e>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==r),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(re(Df))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),Bf=(()=>{class t{constructor(){this._applications=new Map,Hf.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Hf.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})();class Uf{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let Vf,Hf=new Uf; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const Gf=new Wt("AllowMultipleToken");class qf{constructor(t,e){this.name=t,this.token=e}}function zf(t,e,n=[]){const r="Platform: "+e,i=new Wt(r);return(e=[])=>{let s=Kf();if(!s||s.injector.get(Gf,!1))if(t)t(n.concat(e).concat({provide:i,useValue:!0}));else{const t=n.concat(e).concat({provide:i,useValue:!0},{provide:ea,useValue:"platform"});!function(t){if(Vf&&!Vf.destroyed&&!Vf.injector.get(Gf,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Vf=t.get(Wf);const e=t.get(pf,null);e&&e.forEach(t=>t())}(ga.create({providers:t,name:r}))}return function(t){const e=Kf();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(i)}}function Kf(){return Vf&&!Vf.destroyed?Vf:null}let Wf=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new Nf:("zone.js"===t?void 0:t)||new Df({enableLongStackTrace:Jr(),shouldCoalesceEventChangeDetection:e}),n}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),r=[{provide:Df,useValue:n}];return n.run(()=>{const e=ga.create({providers:r,parent:this.injector,name:t.moduleType.name}),i=t.create(e),s=i.injector.get(Vr,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return i.onDestroy(()=>Xf(this._modules,i)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{s.handleError(t)}})),function(t,e,n){try{const r=n();return ll(r)?r.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}(s,n,()=>{const t=i.injector.get(cf);return t.runInitializers(),t.donePromise.then(()=>(qh(i.injector.get(yf,"en-US")||"en-US"),this._moduleDoBootstrap(i),i))})})}bootstrapModule(t,e=[]){const n=$f({},e);return function(t,e,n){const r=new Wh(n);return Promise.resolve(r)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(Yf);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${kt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(re(ga))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})();function $f(t,e){return Array.isArray(e)?e.reduce($f,t):Object.assign(Object.assign({},t),e)}let Yf=(()=>{class t{constructor(t,e,n,r,i,s){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=i,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Jr(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new _(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),a=new _(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{Df.assertNotInAngularZone(),Af(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{Df.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=function(...t){let e=Number.POSITIVE_INFINITY,n=null,r=t[t.length-1];return k(r)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof r&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof _?t[0]:z(e)(K(t,n))}(o,a.pipe(t=>{return W()((e=J,function(t){let n;n="function"==typeof e?e:function(){return e};const r=Object.create(t,Z);return r.source=t,r.subjectFactory=n,r})(t));var e}))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof cc?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const r=n.isBoundToModule?void 0:this._injector.get(ue),i=n.create(ga.NULL,[],e||n.selector,r);i.onDestroy(()=>{this._unloadComponent(i)});const s=i.injector.get(jf,null);return s&&i.injector.get(Bf).registerApplication(i.location.nativeElement,s),this._loadComponent(i),Jr()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),i}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Xf(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(mf,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),Xf(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(re(Df),re(vf),re(ga),re(Vr),re(dc),re(cf))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})();function Xf(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Zf{}class Qf{}const Jf={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let tp=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||Jf}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,r]=t.split("#");return void 0===r&&(r="default"),n("zn8P")(e).then(t=>t[r]).then(t=>ep(t,e,r)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,r]=t.split("#"),i="NgFactory";return void 0===r&&(r="default",i=""),n("zn8P")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[r+i]).then(t=>ep(t,e,r))}}return t.\u0275fac=function(e){return new(e||t)(re(kf),re(Qf,8))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})();function ep(t,e,n){if(!t)throw new Error(`Cannot find '${n}' in '${e}'`);return t} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const np=zf(null,"core",[{provide:gf,useValue:"unknown"},{provide:Wf,deps:[ga]},{provide:Bf,deps:[]},{provide:vf,deps:[]}]),rp=[{provide:Yf,useClass:Yf,deps:[Df,vf,ga,Vr,dc,cf]},{provide:qc,deps:[Df],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:cf,useClass:cf,deps:[[new ut,uf]]},{provide:kf,useClass:kf,deps:[]},df,{provide:Rc,useFactory: /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function(){return Lc},deps:[]},{provide:Ic,useFactory:function(){return Fc},deps:[]},{provide:yf,useFactory:function(t){return qh(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new lt(yf),new ut,new ht]]},{provide:bf,useValue:"USD"}];let ip=(()=>{class t{constructor(t){}}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)(re(Yf))},providers:rp}),t})();var sp,op=n("wmvo"),ap=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){sp=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],e=0;e=0;r--){var i=t[r];if(""!==(null===(e=i)||void 0===e?void 0:e.filename)&&"[native code]"!==(null===(n=i)||void 0===n?void 0:n.filename))return i.filename||null}return null},t.prototype._getEventFilterUrl=function(t){try{return t.stacktrace?this._getLastValidUrl(t.stacktrace.frames):t.exception?this._getLastValidUrl(t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames):null}catch(e){return cp.b.error("Cannot extract url for event "+Object(hp.d)(t)),null}},t.id="InboundFilters",t}(),gp=n("z+RT"),mp=n("HR75"),vp=n("6hSO"),yp=n("yksw"),bp=n("FQKz"),_p=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n]);return t}),wp=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.message=e,r.name=n.prototype.constructor.name,_p(r,n.prototype),r}return Object(op.c)(e,t),e}(Error),Ep=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Cp=function(){function t(t){"string"==typeof t?this._fromString(t):this._fromComponents(t),this._validate()}return t.prototype.toString=function(t){void 0===t&&(t=!1);var e=this,n=e.path,r=e.pass,i=e.port;return e.protocol+"://"+e.publicKey+(t&&r?":"+r:"")+"@"+e.host+(i?":"+i:"")+"/"+(n?n+"/":n)+e.projectId},t.prototype._fromString=function(t){var e=Ep.exec(t);if(!e)throw new wp("Invalid Dsn");var n=Object(op.d)(e.slice(1),6),r=n[0],i=n[1],s=n[2],o=void 0===s?"":s,a=n[3],l=n[4],u=void 0===l?"":l,c="",h=n[5],d=h.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),h=d.pop()),h){var f=h.match(/^\d+/);f&&(h=f[0])}this._fromComponents({host:a,pass:o,path:c,projectId:h,port:u,protocol:r,publicKey:i})},t.prototype._fromComponents=function(t){"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),this.user=t.publicKey||"",this.protocol=t.protocol,this.publicKey=t.publicKey||"",this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype._validate=function(){var t=this;if(["protocol","publicKey","host","projectId"].forEach((function(e){if(!t[e])throw new wp("Invalid Dsn: "+e+" missing")})),!this.projectId.match(/^\d+$/))throw new wp("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new wp("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new wp("Invalid Dsn: Invalid port "+this.port)},t}(),Tp=n("9AQC"),Sp=n("kdvv"),Op=n("6PXS"),kp=[];function xp(t){return t.reduce((function(t,e){return t.every((function(t){return e.name!==t.name}))&&t.push(e),t}),[])}var Ap,Dp="Not capturing exception because it's already been captured.",Pp=function(){function t(t,e){this._integrations={},this._numProcessing=0,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=new Cp(e.dsn))}return t.prototype.captureException=function(t,e,n){var r=this;if(!Object(hp.c)(t)){var i=e&&e.event_id;return this._process(this._getBackend().eventFromException(t,e).then((function(t){return r._captureEvent(t,e,n)})).then((function(t){i=t}))),i}cp.b.log(Dp)},t.prototype.captureMessage=function(t,e,n,r){var i=this,s=n&&n.event_id,o=Object(Tp.i)(t)?this._getBackend().eventFromMessage(String(t),e,n):this._getBackend().eventFromException(t,n);return this._process(o.then((function(t){return i._captureEvent(t,n,r)})).then((function(t){s=t}))),s},t.prototype.captureEvent=function(t,e,n){var r;if(!(null===(r=e)||void 0===r?void 0:r.originalException)||!Object(hp.c)(e.originalException)){var i=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then((function(t){i=t}))),i}cp.b.log(Dp)},t.prototype.captureSession=function(t){this._isEnabled()?"string"!=typeof t.release?cp.b.warn("Discarded session because of missing or non-string release"):(this._sendSession(t),t.update({init:!1})):cp.b.warn("SDK not enabled, will not capture session.")},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.getTransport=function(){return this._getBackend().getTransport()},t.prototype.flush=function(t){var e=this;return this._isClientDoneProcessing(t).then((function(n){return e.getTransport().close(t).then((function(t){return n&&t}))}))},t.prototype.close=function(t){var e=this;return this.flush(t).then((function(t){return e.getOptions().enabled=!1,t}))},t.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=function(t){var e={};return function(t){var e=t.defaultIntegrations&&Object(op.f)(t.defaultIntegrations)||[],n=t.integrations,r=Object(op.f)(xp(e));Array.isArray(n)?r=Object(op.f)(r.filter((function(t){return n.every((function(e){return e.name!==t.name}))})),xp(n)):"function"==typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var i=r.map((function(t){return t.name}));return-1!==i.indexOf("Debug")&&r.push.apply(r,Object(op.f)(r.splice(i.indexOf("Debug"),1))),r}(t).forEach((function(t){e[t.name]=t,function(t){-1===kp.indexOf(t.name)&&(t.setupOnce(lp.b,up.b),kp.push(t.name),cp.b.log("Integration installed: "+t.name))}(t)})),Object.defineProperty(e,"initialized",{value:!0}),e}(this._options))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return cp.b.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(t,e){var n,r,i=!1,s=!1,o=e.exception&&e.exception.values;if(o){s=!0;try{for(var a=Object(op.g)(o),l=a.next();!l.done;l=a.next()){var u=l.value.mechanism;if(u&&!1===u.handled){i=!0;break}}}catch(h){n={error:h}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}var c=t.status===yp.a.Ok;(c&&0===t.errors||c&&i)&&(t.update(Object(op.a)(Object(op.a)({},i&&{status:yp.a.Crashed}),{errors:t.errors||Number(s||i)})),this.captureSession(t))},t.prototype._sendSession=function(t){this._getBackend().sendSession(t)},t.prototype._isClientDoneProcessing=function(t){var e=this;return new mp.a((function(n){var r=0,i=setInterval((function(){0==e._numProcessing?(clearInterval(i),n(!0)):(r+=1,t&&r>=t&&(clearInterval(i),n(!1)))}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,n){var r=this,i=this.getOptions().normalizeDepth,s=void 0===i?3:i,o=Object(op.a)(Object(op.a)({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:Object(hp.h)()),timestamp:t.timestamp||Object(Sp.b)()});this._applyClientOptions(o),this._applyIntegrationsMetadata(o);var a=e;n&&n.captureContext&&(a=lp.a.clone(a).update(n.captureContext));var l=mp.a.resolve(o);return a&&(l=a.applyToEvent(o,n)),l.then((function(t){return"number"==typeof s&&s>0?r._normalizeEvent(t,s):t}))},t.prototype._normalizeEvent=function(t,e){if(!t)return null;var n=Object(op.a)(Object(op.a)(Object(op.a)(Object(op.a)(Object(op.a)({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return Object(op.a)(Object(op.a)({},t),t.data&&{data:Object(Op.d)(t.data,e)})}))}),t.user&&{user:Object(Op.d)(t.user,e)}),t.contexts&&{contexts:Object(Op.d)(t.contexts,e)}),t.extra&&{extra:Object(Op.d)(t.extra,e)});t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace);var r=this.getOptions()._experiments;return(void 0===r?{}:r).ensureNoCircularStructures?Object(Op.d)(n):n},t.prototype._applyClientOptions=function(t){var e=this.getOptions(),n=e.release,r=e.dist,i=e.maxValueLength,s=void 0===i?250:i;"environment"in t||(t.environment="environment"in e?e.environment:"production"),void 0===t.release&&void 0!==n&&(t.release=n),void 0===t.dist&&void 0!==r&&(t.dist=r),t.message&&(t.message=Object(dp.d)(t.message,s));var o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=Object(dp.d)(o.value,s));var a=t.request;a&&a.url&&(a.url=Object(dp.d)(a.url,s))},t.prototype._applyIntegrationsMetadata=function(t){var e=Object.keys(this._integrations);e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=Object(op.f)(t.sdk.integrations||[],e))},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._captureEvent=function(t,e,n){return this._processEvent(t,e,n).then((function(t){return t.event_id}),(function(t){cp.b.error(t)}))},t.prototype._processEvent=function(t,e,n){var r,i,s=this,o=this.getOptions(),a=o.beforeSend,l=o.sampleRate,u=this.getTransport();if(!this._isEnabled())return mp.a.reject(new wp("SDK not enabled, will not capture event."));var c="transaction"===t.type;return!c&&"number"==typeof l&&Math.random()>l?(null===(i=(r=u).recordLostEvent)||void 0===i||i.call(r,bp.a.SampleRate,"event"),mp.a.reject(new wp("Discarding event because it's not included in the random sample (sampling rate = "+l+")"))):this._prepareEvent(t,n,e).then((function(n){var r,i;if(null===n)throw null===(i=(r=u).recordLostEvent)||void 0===i||i.call(r,bp.a.EventProcessor,t.type||"event"),new wp("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||c||!a)return n;var o=a(n,e);return s._ensureBeforeSendRv(o)})).then((function(e){var r,i;if(null===e)throw null===(i=(r=u).recordLostEvent)||void 0===i||i.call(r,bp.a.BeforeSend,t.type||"event"),new wp("`beforeSend` returned `null`, will not send event.");var o=n&&n.getSession&&n.getSession();return!c&&o&&s._updateSessionFromEvent(o,e),s._sendEvent(e),e})).then(null,(function(t){if(t instanceof wp)throw t;throw s.captureException(t,{data:{__sentry__:!0},originalException:t}),new wp("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))},t.prototype._process=function(t){var e=this;this._numProcessing+=1,t.then((function(t){return e._numProcessing-=1,t}),(function(t){return e._numProcessing-=1,t}))},t.prototype._ensureBeforeSendRv=function(t){var e="`beforeSend` method has to return `null` or a valid event.";if(Object(Tp.m)(t))return t.then((function(t){if(!Object(Tp.h)(t)&&null!==t)throw new wp(e);return t}),(function(t){throw new wp("beforeSend rejected with "+t)}));if(!Object(Tp.h)(t)&&null!==t)throw new wp(e);return t},t}();!function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed"}(Ap||(Ap={})),function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(Ap||(Ap={}));var Rp,Ip=function(){function t(){}return t.prototype.sendEvent=function(t){return mp.a.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:Ap.Skipped})},t.prototype.close=function(t){return mp.a.resolve(!0)},t}(),Mp=function(){function t(t){this._options=t,this._options.dsn||cp.b.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(t,e){throw new wp("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,n){throw new wp("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,(function(t){cp.b.error("Error while sending event: "+t)}))},t.prototype.sendSession=function(t){this._transport.sendSession?this._transport.sendSession(t).then(null,(function(t){cp.b.error("Error while sending session: "+t)})):cp.b.warn("Dropping session because custom transport doesn't implement sendSession")},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new Ip},t}();!function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(Rp||(Rp={})),function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(Rp||(Rp={}));var Lp=n("4Ssk"),Fp=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Np=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,jp=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Bp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Up=/\((\S*)(?::(\d+))(?::(\d+))\)/,Vp=/Minified React error #\d+;/i;function Hp(t){var e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:Vp.test(t.message)&&(n=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,n=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,r=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=t.stacktrace.split("\n"),s=[],o=0;o eval")>-1&&(r=Bp.exec(i[3]))?(i[1]=i[1]||"eval",i[3]=r[1],i[4]=r[2],i[5]=""):0!==l||i[5]||void 0===t.columnNumber||(o[0].column=t.columnNumber+1),c=i[3],h=i[1]||"?",s={url:c=(n=Object(op.d)(Gp(h,c),2))[1],func:h=n[0],args:i[2]?i[2].split(","):[],line:i[4]?+i[4]:null,column:i[5]?+i[5]:null}}!s.func&&s.line&&(s.func="?"),o.push(s)}return o.length?{message:zp(t),name:t.name,stack:o}:null}(t))return qp(e,n)}catch(r){}return{message:zp(t),name:t&&t.name,stack:[],failed:!0}}var Gp=function(t,e){var n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:"?",n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]};function qp(t,e){try{return Object(op.a)(Object(op.a)({},t),{stack:t.stack.slice(e)})}catch(n){return t}}function zp(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Kp(t){var e=$p(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function Wp(t){return{exception:{values:[Kp(t)]}}}function $p(t){if(!t||!t.length)return[];var e=t,n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,50).map((function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}})).reverse()}function Yp(t,e,n){var r;if(void 0===n&&(n={}),Object(Tp.e)(t)&&t.error)return Wp(Hp(t=t.error));if(Object(Tp.a)(t)||Object(Tp.b)(t)){var i=t;if("stack"in t)r=Wp(Hp(t));else{var s=i.name||(Object(Tp.a)(i)?"DOMError":"DOMException"),o=i.message?s+": "+i.message:s;r=Xp(o,e,n),Object(hp.b)(r,o)}return"code"in i&&(r.tags=Object(op.a)(Object(op.a)({},r.tags),{"DOMException.code":""+i.code})),r}return Object(Tp.d)(t)?r=Wp(Hp(t)):Object(Tp.h)(t)||Object(Tp.f)(t)?(r=function(t,e,n){var r={exception:{values:[{type:Object(Tp.f)(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Object(Op.b)(t)}]},extra:{__serialized__:Object(Op.e)(t)}};if(e){var i=$p(Hp(e).stack);r.stacktrace={frames:i}}return r}(t,e,n.rejection),Object(hp.a)(r,{synthetic:!0}),r):(r=Xp(t,e,n),Object(hp.b)(r,""+t,void 0),Object(hp.a)(r,{synthetic:!0}),r)}function Xp(t,e,n){void 0===n&&(n={});var r={message:t};if(n.attachStacktrace&&e){var i=$p(Hp(e).stack);r.stacktrace={frames:i}}return r}function Zp(t){if(t.metadata&&t.metadata.sdk){var e=t.metadata.sdk;return{name:e.name,version:e.version}}}function Qp(t,e){return e?(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=Object(op.f)(t.sdk.integrations||[],e.integrations||[]),t.sdk.packages=Object(op.f)(t.sdk.packages||[],e.packages||[]),t):t}function Jp(t,e){var n=Zp(e),r="aggregates"in t?"sessions":"session";return{body:JSON.stringify(Object(op.a)(Object(op.a)({sent_at:(new Date).toISOString()},n&&{sdk:n}),e.forceEnvelope()&&{dsn:e.getDsn().toString()}))+"\n"+JSON.stringify({type:r})+"\n"+JSON.stringify(t),type:r,url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}function tg(t,e){var n=Zp(e),r=t.type||"event",i="transaction"===r||e.forceEnvelope(),s=t.debug_meta||{},o=s.transactionSampling,a=Object(op.e)(s,["transactionSampling"]),l=o||{},u=l.method,c=l.rate;0===Object.keys(a).length?delete t.debug_meta:t.debug_meta=a;var h={body:JSON.stringify(n?Qp(t,e.metadata.sdk):t),type:r,url:i?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(i){var d=JSON.stringify(Object(op.a)(Object(op.a)({event_id:t.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),e.forceEnvelope()&&{dsn:e.getDsn().toString()})),f=JSON.stringify({type:r,sample_rates:[{id:u,rate:c}]});h.body=d+"\n"+f+"\n"+h.body}return h}var eg,ng=function(){function t(t,e,n){void 0===e&&(e={}),this.dsn=t,this._dsnObject=new Cp(t),this.metadata=e,this._tunnel=n}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.forceEnvelope=function(){return!!this._tunnel},t.prototype.getBaseApiEndpoint=function(){var t=this.getDsn();return(t.protocol?t.protocol+":":"")+"//"+t.host+(t.port?":"+t.port:"")+(t.path?"/"+t.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this.forceEnvelope()?this._tunnel:this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},t.prototype.getStoreEndpointPath=function(){var t=this.getDsn();return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,e){var n=this.getDsn(),r=["Sentry sentry_version=7"];return r.push("sentry_client="+t+"/"+e),r.push("sentry_key="+n.publicKey),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this.getDsn(),n=this.getBaseApiEndpoint()+"embed/error-page/",r=[];for(var i in r.push("dsn="+e.toString()),t)if("dsn"!==i)if("user"===i){if(!t.user)continue;t.user.name&&r.push("name="+encodeURIComponent(t.user.name)),t.user.email&&r.push("email="+encodeURIComponent(t.user.email))}else r.push(encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return r.length?n+"?"+r.join("&"):n},t.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},t.prototype._getIngestEndpoint=function(t){return this._tunnel?this._tunnel:""+this.getBaseApiEndpoint()+this.getDsn().projectId+"/"+t+"/"},t.prototype._encodedAuth=function(){var t={sentry_key:this.getDsn().publicKey,sentry_version:"7"};return Object(Op.f)(t)},t}(),rg=function(){function t(t){this._limit=t,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()0&&n(!1)}),t);mp.a.all(e._buffer).then((function(){clearTimeout(r),n(!0)})).then(null,(function(){n(!0)}))}))},t}(),ig=Object(gp.a)();function sg(){var t,e;if(eg)return eg;if(Object(Lp.a)(ig.fetch))return eg=ig.fetch.bind(ig);var n=ig.document,r=ig.fetch;if("function"==typeof(null===(t=n)||void 0===t?void 0:t.createElement))try{var i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i),(null===(e=i.contentWindow)||void 0===e?void 0:e.fetch)&&(r=i.contentWindow.fetch),n.head.removeChild(i)}catch(s){cp.b.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",s)}return eg=r.bind(ig)}var og={event:"error",transaction:"transaction",session:"session",attachment:"attachment"},ag=Object(gp.a)(),lg=function(){function t(t){var e=this;this.options=t,this._buffer=new rg(30),this._rateLimits={},this._outcomes={},this._api=new ng(t.dsn,t._metadata,t.tunnel),this.url=this._api.getStoreEndpointWithUrlEncodedAuth(),this.options.sendClientReports&&ag.document&&ag.document.addEventListener("visibilitychange",(function(){"hidden"===ag.document.visibilityState&&e._flushOutcomes()}))}return t.prototype.sendEvent=function(t){throw new wp("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(t){return this._buffer.drain(t)},t.prototype.recordLostEvent=function(t,e){var n;if(this.options.sendClientReports){var r=og[e]+":"+t;cp.b.log("Adding outcome: "+r),this._outcomes[r]=(null!=(n=this._outcomes[r])?n:0)+1}},t.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var t=this._outcomes;if(this._outcomes={},Object.keys(t).length){cp.b.log("Flushing outcomes:\n"+JSON.stringify(t,null,2));var e=this._api.getEnvelopeEndpointWithUrlEncodedAuth(),n=JSON.stringify(Object(op.a)({},this.options.tunnel&&{dsn:this._api.getDsn().toString()}))+"\n"+JSON.stringify({type:"client_report"})+"\n"+JSON.stringify({timestamp:Object(Sp.b)(),discarded_events:Object.keys(t).map((function(e){var n=Object(op.d)(e.split(":"),2);return{reason:n[1],category:n[0],quantity:t[e]}}))});try{!function(t,e){if("[object Navigator]"===Object.prototype.toString.call(ig&&ig.navigator)&&"function"==typeof ig.navigator.sendBeacon)return ig.navigator.sendBeacon.bind(ig.navigator)(t,e);Object(Lp.b)()&&sg()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(t){console.error(t)}))}(e,n)}catch(r){cp.b.error(r)}}else cp.b.log("No outcomes to flush")}},t.prototype._handleResponse=function(t){var e=t.requestType,n=t.response,r=t.headers,i=t.resolve,s=t.reject,o=Ap.fromHttpCode(n.status);this._handleRateLimit(r)&&cp.b.warn("Too many "+e+" requests, backing off until: "+this._disabledUntil(e)),o!==Ap.Success?s(n):i({status:o})},t.prototype._disabledUntil=function(t){return this._rateLimits[og[t]]||this._rateLimits.all},t.prototype._isRateLimited=function(t){return this._disabledUntil(t)>new Date(Date.now())},t.prototype._handleRateLimit=function(t){var e,n,r,i,s=Date.now(),o=t["x-sentry-rate-limits"],a=t["retry-after"];if(o){try{for(var l=Object(op.g)(o.trim().split(",")),u=l.next();!u.done;u=l.next()){var c=u.value.split(":",2),h=parseInt(c[0],10),d=1e3*(isNaN(h)?60:h);try{for(var f=(r=void 0,Object(op.g)(c[1].split(";"))),p=f.next();!p.done;p=f.next())this._rateLimits[p.value||"all"]=new Date(s+d)}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}}catch(m){e={error:m}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}return!0}return!!a&&(this._rateLimits.all=new Date(s+Object(hp.e)(s,a)),!0)},t}(),ug=function(t){function e(e,n){void 0===n&&(n=sg());var r=t.call(this,e)||this;return r._fetch=n,r}return Object(op.c)(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(tg(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(Jp(t,this._api),t)},e.prototype._sendRequest=function(t,e){var n=this;if(this._isRateLimited(t.type))return this.recordLostEvent(bp.a.RateLimitBackoff,t.type),Promise.reject({event:e,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429});var r={body:t.body,method:"POST",referrerPolicy:Object(Lp.e)()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new mp.a((function(e,i){n._fetch(t.url,r).then((function(r){var s={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};n._handleResponse({requestType:t.type,response:r,headers:s,resolve:e,reject:i})})).catch(i)}))})).then(void 0,(function(e){throw n.recordLostEvent(e instanceof wp?bp.a.QueueOverflow:bp.a.NetworkError,t.type),e}))},e}(lg),cg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(op.c)(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(tg(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(Jp(t,this._api),t)},e.prototype._sendRequest=function(t,e){var n=this;return this._isRateLimited(t.type)?(this.recordLostEvent(bp.a.RateLimitBackoff,t.type),Promise.reject({event:e,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429})):this._buffer.add((function(){return new mp.a((function(e,r){var i=new XMLHttpRequest;for(var s in i.onreadystatechange=function(){if(4===i.readyState){var s={"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")};n._handleResponse({requestType:t.type,response:i,headers:s,resolve:e,reject:r})}},i.open("POST",t.url),n.options.headers)Object.prototype.hasOwnProperty.call(n.options.headers,s)&&i.setRequestHeader(s,n.options.headers[s]);i.send(t.body)}))})).then(void 0,(function(e){throw n.recordLostEvent(e instanceof wp?bp.a.QueueOverflow:bp.a.NetworkError,t.type),e}))},e}(lg),hg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(op.c)(e,t),e.prototype.eventFromException=function(t,e){return function(t,e,n){var r=Yp(e,n&&n.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return Object(hp.a)(r),r.level=Rp.Error,n&&n.event_id&&(r.event_id=n.event_id),mp.a.resolve(r)}(this._options,t,e)},e.prototype.eventFromMessage=function(t,e,n){return void 0===e&&(e=Rp.Info),function(t,e,n,r){void 0===n&&(n=Rp.Info);var i=Xp(e,r&&r.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),mp.a.resolve(i)}(this._options,t,e,n)},e.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var e=Object(op.a)(Object(op.a)({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(e):Object(Lp.b)()?new ug(e):new cg(e)},e}(Mp);function dg(t){for(var e=[],n=1;n0}function yg(){mg+=1,setTimeout((function(){mg-=1}))}function bg(t,e,n){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(s){return t}var r=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var i=r.map((function(t){return bg(t,e)}));return t.handleEvent?t.handleEvent.apply(this,i):t.apply(this,i)}catch(s){throw yg(),pg((function(t){t.addEventProcessor((function(t){var n=Object(op.a)({},t);return e.mechanism&&(Object(hp.b)(n,void 0,void 0),Object(hp.a)(n,e.mechanism)),n.extra=Object(op.a)(Object(op.a)({},n.extra),{arguments:r}),n})),fg(s)})),s}};try{for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch(o){}t.prototype=t.prototype||{},r.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return t.name}})}catch(o){}return r}var _g=n("vFt6"),wg=function(){function t(e){this.name=t.id,this._options=Object(op.a)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}return t.prototype.addSentryBreadcrumb=function(t){this._options.sentry&&Object(up.b)().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Object(hp.d)(t)},{event:t})},t.prototype.setupOnce=function(){var t=this;this._options.console&&Object(vp.a)({callback:function(){for(var e=[],n=0;n"}0!==e.length&&Object(up.b)().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name,global:t.global})},t.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var e=t.xhr.__sentry_xhr__||{},n=e.method,r=e.url,i=e.status_code,s=e.body;Object(up.b)().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:i},type:"http"},{xhr:t.xhr,input:s})}},t.prototype._fetchBreadcrumb=function(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?Object(up.b)().addBreadcrumb({category:"fetch",data:t.fetchData,level:Rp.Error,type:"http"},{data:t.error,input:t.args}):Object(up.b)().addBreadcrumb({category:"fetch",data:Object(op.a)(Object(op.a)({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))},t.prototype._historyBreadcrumb=function(t){var e=Object(gp.a)(),n=t.from,r=t.to,i=Object(hp.f)(e.location.href),s=Object(hp.f)(n),o=Object(hp.f)(r);s.path||(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Object(up.b)().addBreadcrumb({category:"navigation",data:{from:n,to:r}})},t.id="Breadcrumbs",t}(),Eg=function(t){function e(e){return void 0===e&&(e={}),e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:"6.16.1"}],version:"6.16.1"},t.call(this,hg,e)||this}return Object(op.c)(e,t),e.prototype.showReportDialog=function(t){void 0===t&&(t={}),Object(gp.a)().document&&(this._isEnabled()?function(t){if(void 0===t&&(t={}),gg.document)if(t.eventId)if(t.dsn){var e=gg.document.createElement("script");e.async=!0,e.src=new ng(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad);var n=gg.document.head||gg.document.body;n&&n.appendChild(e)}else cp.b.error("Missing dsn option in showReportDialog call");else cp.b.error("Missing eventId option in showReportDialog call")}(Object(op.a)(Object(op.a)({},t),{dsn:t.dsn||this.getDsn()})):cp.b.error("Trying to call showReportDialog with Sentry Client disabled"))},e.prototype._prepareEvent=function(e,n,r){return e.platform=e.platform||"javascript",t.prototype._prepareEvent.call(this,e,n,r)},e.prototype._sendEvent=function(e){var n=this.getIntegration(wg);n&&n.addSentryBreadcrumb(e),t.prototype._sendEvent.call(this,e)},e}(Pp),Cg=n("pRiV"),Tg=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Sg=function(){function t(e){this.name=t.id,this._options=Object(op.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}return t.prototype.setupOnce=function(){var t=Object(gp.a)();this._options.setTimeout&&Object(Op.c)(t,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&Object(Op.c)(t,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&Object(Op.c)(t,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&Object(Op.c)(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:Tg).forEach(this._wrapEventTarget.bind(this))},t.prototype._wrapTimeFunction=function(t){return function(){for(var e=[],n=0;n0?e:Object(_g.a)();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:i,filename:o,function:"?",in_app:!0,lineno:s}),t},t.id="GlobalHandlers",t}(),kg=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){Object(lp.b)((function(e,n){var r=Object(up.b)().getIntegration(t);if(r){var i=r._handler&&r._handler.bind(r);return"function"==typeof i?i(e,n):e}return e}))},t.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&Object(Tp.g)(e.originalException,Error)))return t;var n=this._walkErrorTree(e.originalException,this._key);return t.exception.values=Object(op.f)(n,t.exception.values),t},t.prototype._walkErrorTree=function(t,e,n){if(void 0===n&&(n=[]),!Object(Tp.g)(t[e],Error)||n.length+1>=this._limit)return n;var r=Kp(Hp(t[e]));return this._walkErrorTree(t[e],e,Object(op.f)([r],n))},t.id="LinkedErrors",t}(),xg=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(e,n){e((function(e){var r=n().getIntegration(t);if(r){try{if(r._shouldDropEvent(e,r._previousEvent))return cp.b.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(i){return r._previousEvent=e}return r._previousEvent=e}return e}))},t.prototype._shouldDropEvent=function(t,e){return!(!e||!this._isSameMessageEvent(t,e)&&!this._isSameExceptionEvent(t,e))},t.prototype._isSameMessageEvent=function(t,e){var n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!this._isSameFingerprint(t,e)||!this._isSameStacktrace(t,e))},t.prototype._getFramesFromEvent=function(t){var e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(n){return}else if(t.stacktrace)return t.stacktrace.frames},t.prototype._isSameStacktrace=function(t,e){var n=this._getFramesFromEvent(t),r=this._getFramesFromEvent(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if((r=r).length!==(n=n).length)return!1;for(var i=0;i{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({factory:Fg,token:t,providedIn:"platform"}),t})();function Fg(){return re(jg)}const Ng=new Wt("Location Initialized");let jg=(()=>{class t extends Lg{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=Ig().getLocation(),this._history=Ig().getHistory()}getBaseHrefFromDOM(){return Ig().getBaseHref(this._doc)}onPopState(t){Ig().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){Ig().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,n){Bg()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){Bg()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(re(Mg))},t.\u0275prov=vt({factory:Ug,token:t,providedIn:"platform"}),t})();function Bg(){return!!window.history.pushState}function Ug(){return new jg(re(Mg))} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Vg(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function Hg(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function Gg(t){return t&&"?"!==t[0]?"?"+t:t}let qg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({factory:zg,token:t,providedIn:"root"}),t})();function zg(t){const e=re(Mg).location;return new Wg(re(Lg),e&&e.origin||"")}const Kg=new Wt("appBaseHref");let Wg=(()=>{class t extends qg{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Vg(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+Gg(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?`${e}${n}`:e}pushState(t,e,n,r){const i=this.prepareExternalUrl(n+Gg(r));this._platformLocation.pushState(t,e,i)}replaceState(t,e,n,r){const i=this.prepareExternalUrl(n+Gg(r));this._platformLocation.replaceState(t,e,i)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(re(Lg),re(Kg,8))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),$g=(()=>{class t extends qg{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=Vg(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,n,r){let i=this.prepareExternalUrl(n+Gg(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(t,e,i)}replaceState(t,e,n,r){let i=this.prepareExternalUrl(n+Gg(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,i)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(re(Lg),re(Kg,8))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),Yg=(()=>{class t{constructor(t,e){this._subject=new yd,this._urlChangeListeners=[],this._platformStrategy=t;const n=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=Hg(Zg(n)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+Gg(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,Zg(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",n=null){this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Gg(e)),n)}replaceState(t,e="",n=null){this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Gg(e)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(n=>n(t,e))}subscribe(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}return t.\u0275fac=function(e){return new(e||t)(re(qg),re(Lg))},t.normalizeQueryParams=Gg,t.joinWithSlash=Vg,t.stripTrailingSlash=Hg,t.\u0275prov=vt({factory:Xg,token:t,providedIn:"root"}),t})();function Xg(){return new Yg(re(qg),re(Lg))}function Zg(t){return t.replace(/\/index.html$/,"")} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const Qg={ADP:[void 0,void 0,0],AFN:[void 0,void 0,0],ALL:[void 0,void 0,0],AMD:[void 0,void 0,2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,"\u0440.",2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:[void 0,"\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RUR:[void 0,"\u0440."],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["CFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var Jg=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}({}),tm=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),em=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),nm=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),rm=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),im=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function sm(t,e){return dm(Xc(t)[Jc.DateFormat],e)}function om(t,e){return dm(Xc(t)[Jc.TimeFormat],e)}function am(t,e){return dm(Xc(t)[Jc.DateTimeFormat],e)}function lm(t,e){const n=Xc(t),r=n[Jc.NumberSymbols][e];if(void 0===r){if(e===im.CurrencyDecimal)return n[Jc.NumberSymbols][im.Decimal];if(e===im.CurrencyGroup)return n[Jc.NumberSymbols][im.Group]}return r}function um(t,e){return Xc(t)[Jc.NumberFormats][e]}const cm=Zc;function hm(t){if(!t[Jc.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Jc.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function dm(t,e){for(let n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function fm(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const pm=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,gm={},mm=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var vm=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),ym=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),bm=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function _m(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,(function(t,n){return null!=e&&n in e?e[n]:t}))),t}function wm(t,e,n="-",r,i){let s="";(t<0||i&&t<=0)&&(i?t=1-t:(t=-t,s=n));let o=String(t);for(;o.length0||a>-n)&&(a+=n),t===ym.Hours)0===a&&-12===n&&(a=12);else if(t===ym.FractionalSeconds)return l=e,wm(a,3).substr(0,l);var l;const u=lm(o,im.MinusSign);return wm(a,e,u,r,i)}}function Cm(t,e,n=em.Format,r=!1){return function(i,s){return function(t,e,n,r,i,s){switch(n){case bm.Months:return function(t,e,n){const r=Xc(t),i=dm([r[Jc.MonthsFormat],r[Jc.MonthsStandalone]],e);return dm(i,n)}(e,i,r)[t.getMonth()];case bm.Days:return function(t,e,n){const r=Xc(t),i=dm([r[Jc.DaysFormat],r[Jc.DaysStandalone]],e);return dm(i,n)}(e,i,r)[t.getDay()];case bm.DayPeriods:const o=t.getHours(),a=t.getMinutes();if(s){const t=function(t){const e=Xc(t);return hm(e),(e[Jc.ExtraData][2]||[]).map(t=>"string"==typeof t?fm(t):[fm(t[0]),fm(t[1])])}(e),n=function(t,e,n){const r=Xc(t);hm(r);const i=dm([r[Jc.ExtraData][0],r[Jc.ExtraData][1]],e)||[];return dm(i,n)||[]}(e,i,r),s=t.findIndex(t=>{if(Array.isArray(t)){const[e,n]=t,r=o>=e.hours&&a>=e.minutes,i=o0?Math.floor(i/60):Math.ceil(i/60);switch(t){case vm.Short:return(i>=0?"+":"")+wm(o,2,s)+wm(Math.abs(i%60),2,s);case vm.ShortGMT:return"GMT"+(i>=0?"+":"")+wm(o,1,s);case vm.Long:return"GMT"+(i>=0?"+":"")+wm(o,2,s)+":"+wm(Math.abs(i%60),2,s);case vm.Extended:return 0===r?"Z":(i>=0?"+":"")+wm(o,2,s)+":"+wm(Math.abs(i%60),2,s);default:throw new Error(`Unknown zone width "${t}"`)}}}function Sm(t,e=!1){return function(n,r){let i;if(e){const t=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,e=n.getDate();i=1+Math.floor((e+t)/7)}else{const t=function(t){const e=new Date(t,0,1).getDay();return new Date(t,0,1+(e<=4?4:11)-e)}(n.getFullYear()),e=(s=n,new Date(s.getFullYear(),s.getMonth(),s.getDate()+(4-s.getDay()))).getTime()-t.getTime();i=1+Math.round(e/6048e5)}var s;return wm(i,t,lm(r,im.MinusSign))}}const Om={};function km(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function xm(t){return t instanceof Date&&!isNaN(t.valueOf())} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const Am=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function Dm(t,e,n,r,i,s,o=!1){let a="",l=!1;if(isFinite(t)){let u=function(t){let e,n,r,i,s,o=Math.abs(t)+"",a=0;for((n=o.indexOf("."))>-1&&(o=o.replace(".","")),(r=o.search(/e/i))>0?(n<0&&(n=r),n+=+o.slice(r+1),o=o.substring(0,r)):n<0&&(n=o.length),r=0;"0"===o.charAt(r);r++);if(r===(s=o.length))e=[0],n=1;else{for(s--;"0"===o.charAt(s);)s--;for(n-=r,e=[],i=0;r<=s;r++,i++)e[i]=Number(o.charAt(r))}return n>22&&(e=e.splice(0,21),a=n-1,n=1),{digits:e,exponent:a,integerLen:n}}(t);o&&(u=function(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(u));let c=e.minInt,h=e.minFrac,d=e.maxFrac;if(s){const t=s.match(Am);if(null===t)throw new Error(s+" is not a valid digit info");const e=t[1],n=t[3],r=t[5];null!=e&&(c=Rm(e)),null!=n&&(h=Rm(n)),null!=r?d=Rm(r):null!=n&&h>d&&(d=h)}!function(t,e,n){if(e>n)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${n}).`);let r=t.digits,i=r.length-t.integerLen;const s=Math.min(Math.max(e,i),n);let o=s+t.integerLen,a=r[o];if(o>0){r.splice(Math.max(t.integerLen,o));for(let t=o;t=5)if(o-1<0){for(let e=0;e>o;e--)r.unshift(0),t.integerLen++;r.unshift(1),t.integerLen++}else r[o-1]++;for(;i=u?r.pop():l=!1),e>=10?1:0}),0);c&&(r.unshift(c),t.integerLen++)}(u,h,d);let f=u.digits,p=u.integerLen;const g=u.exponent;let m=[];for(l=f.every(t=>!t);p0?m=f.splice(p,f.length):(m=f,f=[0]);const v=[];for(f.length>=e.lgSize&&v.unshift(f.splice(-e.lgSize,f.length).join(""));f.length>e.gSize;)v.unshift(f.splice(-e.gSize,f.length).join(""));f.length&&v.unshift(f.join("")),a=v.join(lm(n,r)),m.length&&(a+=lm(n,i)+m.join("")),g&&(a+=lm(n,im.Exponential)+"+"+g)}else a=lm(n,im.Infinity);return a=t<0&&!l?e.negPre+a+e.negSuf:e.posPre+a+e.posSuf,a}function Pm(t,e="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=t.split(";"),i=r[0],s=r[1],o=-1!==i.indexOf(".")?i.split("."):[i.substring(0,i.lastIndexOf("0")+1),i.substring(i.lastIndexOf("0")+1)],a=o[0],l=o[1]||"";n.posPre=a.substr(0,a.indexOf("#"));for(let c=0;c-1)return i;if(i=n.getPluralCategory(t,r),e.indexOf(i)>-1)return i;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}let Lm=(()=>{class t extends Im{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(cm(e||this.locale)(t)){case tm.Zero:return"zero";case tm.One:return"one";case tm.Two:return"two";case tm.Few:return"few";case tm.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(re(yf))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function Fm(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[r,i]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(r.trim()===e)return decodeURIComponent(i)}return null}let Nm=(()=>{class t{constructor(t,e,n,r){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(wa(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+kt(t.item));this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(Xa(Rc),Xa(Ic),Xa(fc),Xa(vc))},t.\u0275dir=Ie({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})(),jm=(()=>{class t{constructor(t){this._viewContainerRef=t,this._componentRef=null,this._moduleRef=null}ngOnChanges(t){if(this._viewContainerRef.clear(),this._componentRef=null,this.ngComponentOutlet){const e=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;if(t.ngComponentOutletNgModuleFactory)if(this._moduleRef&&this._moduleRef.destroy(),this.ngComponentOutletNgModuleFactory){const t=e.get(ue);this._moduleRef=this.ngComponentOutletNgModuleFactory.create(t.injector)}else this._moduleRef=null;const n=(this._moduleRef?this._moduleRef.componentFactoryResolver:e.get(dc)).resolveComponentFactory(this.ngComponentOutlet);this._componentRef=this._viewContainerRef.createComponent(n,this._viewContainerRef.length,e,this.ngComponentOutletContent)}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}return t.\u0275fac=function(e){return new(e||t)(Xa(Bc))},t.\u0275dir=Ie({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},features:[We]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Bm{constructor(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Um=(()=>{class t{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){Jr()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${n}' of type '${t=n,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,r)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new Bm(null,this._ngForOf,-1,-1),null===r?void 0:r),i=new Vm(t,n);e.push(i)}else if(null==r)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const i=this._viewContainer.get(n);this._viewContainer.move(i,r);const s=new Vm(t,i);e.push(s)}});for(let n=0;n{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(Xa(Bc),Xa(Nc),Xa(Rc))},t.\u0275dir=Ie({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class Vm{constructor(t,e){this.record=t,this.view=e}}let Hm=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new Gm,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){qm("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){qm("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(Xa(Bc),Xa(Nc))},t.\u0275dir=Ie({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class Gm{constructor(){this.$implicit=null,this.ngIf=null}}function qm(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${kt(e)}'.`)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class zm{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let Km=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e{class t{constructor(t,e,n){this.ngSwitch=n,n._addCase(),this._view=new zm(t,e)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(Xa(Bc),Xa(Nc),Xa(Km,1))},t.\u0275dir=Ie({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),t})(),$m=(()=>{class t{constructor(t,e,n){n._addDefault(new zm(t,e))}}return t.\u0275fac=function(e){return new(e||t)(Xa(Bc),Xa(Nc),Xa(Km,1))},t.\u0275dir=Ie({type:t,selectors:[["","ngSwitchDefault",""]]}),t})(),Ym=(()=>{class t{constructor(t){this._localization=t,this._caseViews={}}set ngPlural(t){this._switchValue=t,this._updateView()}addCase(t,e){this._caseViews[t]=e}_updateView(){this._clearViews();const t=Object.keys(this._caseViews),e=Mm(this._switchValue,t,this._localization);this._activateView(this._caseViews[e])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(t){t&&(this._activeView=t,this._activeView.create())}}return t.\u0275fac=function(e){return new(e||t)(Xa(Im))},t.\u0275dir=Ie({type:t,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"}}),t})(),Xm=(()=>{class t{constructor(t,e,n,r){this.value=t;const i=!isNaN(Number(t));r.addCase(i?"="+t:t,new zm(n,e))}}return t.\u0275fac=function(e){return new(e||t)(Za("ngPluralCase"),Xa(Nc),Xa(Bc),Xa(Ym,1))},t.\u0275dir=Ie({type:t,selectors:[["","ngPluralCase",""]]}),t})(),Zm=(()=>{class t{constructor(t,e,n){this._ngEl=t,this._differs=e,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[n,r]=t.split(".");null!=(e=null!=e&&r?`${e}${r}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,n,e):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(Xa(fc),Xa(Ic),Xa(vc))},t.\u0275dir=Ie({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),Qm=(()=>{class t{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const t=this._viewContainerRef;this._viewRef&&t.remove(t.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?t.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(t){const e=t.ngTemplateOutletContext;return!!t.ngTemplateOutlet||e&&this._hasContextShapeChanged(e)}_hasContextShapeChanged(t){const e=Object.keys(t.previousValue||{}),n=Object.keys(t.currentValue||{});if(e.length===n.length){for(let t of n)if(-1===e.indexOf(t))return!0;return!1}return!0}_updateExistingContext(t){for(let e of Object.keys(t))this._viewRef.context[e]=this.ngTemplateOutletContext[e]}}return t.\u0275fac=function(e){return new(e||t)(Xa(Bc))},t.\u0275dir=Ie({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[We]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function Jm(t,e){return Error(`InvalidPipeArgument: '${e}' for pipe '${kt(t)}'`)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class tv{createSubscription(t,e){return t.subscribe({next:e,error:t=>{throw t}})}dispose(t){t.unsubscribe()}onDestroy(t){t.unsubscribe()}}class ev{createSubscription(t,e){return t.then(e,t=>{throw t})}dispose(t){}onDestroy(t){}}const nv=new ev,rv=new tv;let iv=(()=>{class t{constructor(t){this._ref=t,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,e=>this._updateLatestValue(t,e))}_selectStrategy(e){if(ll(e))return nv;if(ul(e))return rv;throw Jm(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(Vd())},t.\u0275pipe=Me({name:"async",type:t,pure:!1}),t})(),sv=(()=>{class t{transform(e){if(!e)return e;if("string"!=typeof e)throw Jm(t,e);return e.toLowerCase()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Me({name:"lowercase",type:t,pure:!0}),t})();const ov=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g;let av=(()=>{class t{transform(e){if(!e)return e;if("string"!=typeof e)throw Jm(t,e);return e.replace(ov,t=>t[0].toUpperCase()+t.substr(1).toLowerCase())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Me({name:"titlecase",type:t,pure:!0}),t})(),lv=(()=>{class t{transform(e){if(!e)return e;if("string"!=typeof e)throw Jm(t,e);return e.toUpperCase()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Me({name:"uppercase",type:t,pure:!0}),t})(),uv=(()=>{class t{constructor(t){this.locale=t}transform(e,n="mediumDate",r,i){if(null==e||""===e||e!=e)return null;try{return function(t,e,n,r){let i=function(t){if(xm(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){t=t.trim();const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){const[e,n,r]=t.split("-").map(t=>+t);return new Date(e,n-1,r)}let n;if(n=t.match(pm))return function(t){const e=new Date(0);let n=0,r=0;const i=t[8]?e.setUTCFullYear:e.setFullYear,s=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),r=Number(t[9]+t[11])),i.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-n,a=Number(t[5]||0)-r,l=Number(t[6]||0),u=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(e,o,a,l,u),e}(n)}const e=new Date(t);if(!xm(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=function t(e,n){const r=function(t){return Xc(t)[Jc.LocaleId]}(e);if(gm[r]=gm[r]||{},gm[r][n])return gm[r][n];let i="";switch(n){case"shortDate":i=sm(e,rm.Short);break;case"mediumDate":i=sm(e,rm.Medium);break;case"longDate":i=sm(e,rm.Long);break;case"fullDate":i=sm(e,rm.Full);break;case"shortTime":i=om(e,rm.Short);break;case"mediumTime":i=om(e,rm.Medium);break;case"longTime":i=om(e,rm.Long);break;case"fullTime":i=om(e,rm.Full);break;case"short":const n=t(e,"shortTime"),r=t(e,"shortDate");i=_m(am(e,rm.Short),[n,r]);break;case"medium":const s=t(e,"mediumTime"),o=t(e,"mediumDate");i=_m(am(e,rm.Medium),[s,o]);break;case"long":const a=t(e,"longTime"),l=t(e,"longDate");i=_m(am(e,rm.Long),[a,l]);break;case"full":const u=t(e,"fullTime"),c=t(e,"fullDate");i=_m(am(e,rm.Full),[u,c])}return i&&(gm[r][n]=i),i}(n,e)||e;let s,o=[];for(;e;){if(s=mm.exec(e),!s){o.push(e);break}{o=o.concat(s.slice(1));const t=o.pop();if(!t)break;e=t}}let a=i.getTimezoneOffset();r&&(a=km(r,a),i=function(t,e,n){const r=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(km(e,r)-r))}(i,r));let l="";return o.forEach(t=>{const e=function(t){if(Om[t])return Om[t];let e;switch(t){case"G":case"GG":case"GGG":e=Cm(bm.Eras,nm.Abbreviated);break;case"GGGG":e=Cm(bm.Eras,nm.Wide);break;case"GGGGG":e=Cm(bm.Eras,nm.Narrow);break;case"y":e=Em(ym.FullYear,1,0,!1,!0);break;case"yy":e=Em(ym.FullYear,2,0,!0,!0);break;case"yyy":e=Em(ym.FullYear,3,0,!1,!0);break;case"yyyy":e=Em(ym.FullYear,4,0,!1,!0);break;case"M":case"L":e=Em(ym.Month,1,1);break;case"MM":case"LL":e=Em(ym.Month,2,1);break;case"MMM":e=Cm(bm.Months,nm.Abbreviated);break;case"MMMM":e=Cm(bm.Months,nm.Wide);break;case"MMMMM":e=Cm(bm.Months,nm.Narrow);break;case"LLL":e=Cm(bm.Months,nm.Abbreviated,em.Standalone);break;case"LLLL":e=Cm(bm.Months,nm.Wide,em.Standalone);break;case"LLLLL":e=Cm(bm.Months,nm.Narrow,em.Standalone);break;case"w":e=Sm(1);break;case"ww":e=Sm(2);break;case"W":e=Sm(1,!0);break;case"d":e=Em(ym.Date,1);break;case"dd":e=Em(ym.Date,2);break;case"E":case"EE":case"EEE":e=Cm(bm.Days,nm.Abbreviated);break;case"EEEE":e=Cm(bm.Days,nm.Wide);break;case"EEEEE":e=Cm(bm.Days,nm.Narrow);break;case"EEEEEE":e=Cm(bm.Days,nm.Short);break;case"a":case"aa":case"aaa":e=Cm(bm.DayPeriods,nm.Abbreviated);break;case"aaaa":e=Cm(bm.DayPeriods,nm.Wide);break;case"aaaaa":e=Cm(bm.DayPeriods,nm.Narrow);break;case"b":case"bb":case"bbb":e=Cm(bm.DayPeriods,nm.Abbreviated,em.Standalone,!0);break;case"bbbb":e=Cm(bm.DayPeriods,nm.Wide,em.Standalone,!0);break;case"bbbbb":e=Cm(bm.DayPeriods,nm.Narrow,em.Standalone,!0);break;case"B":case"BB":case"BBB":e=Cm(bm.DayPeriods,nm.Abbreviated,em.Format,!0);break;case"BBBB":e=Cm(bm.DayPeriods,nm.Wide,em.Format,!0);break;case"BBBBB":e=Cm(bm.DayPeriods,nm.Narrow,em.Format,!0);break;case"h":e=Em(ym.Hours,1,-12);break;case"hh":e=Em(ym.Hours,2,-12);break;case"H":e=Em(ym.Hours,1);break;case"HH":e=Em(ym.Hours,2);break;case"m":e=Em(ym.Minutes,1);break;case"mm":e=Em(ym.Minutes,2);break;case"s":e=Em(ym.Seconds,1);break;case"ss":e=Em(ym.Seconds,2);break;case"S":e=Em(ym.FractionalSeconds,1);break;case"SS":e=Em(ym.FractionalSeconds,2);break;case"SSS":e=Em(ym.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=Tm(vm.Short);break;case"ZZZZZ":e=Tm(vm.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Tm(vm.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=Tm(vm.Long);break;default:return null}return Om[t]=e,e}(t);l+=e?e(i,n,a):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}(e,n,i||this.locale,r)}catch(s){throw Jm(t,s.message)}}}return t.\u0275fac=function(e){return new(e||t)(Xa(yf))},t.\u0275pipe=Me({name:"date",type:t,pure:!0}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const cv=/#/g;let hv=(()=>{class t{constructor(t){this._localization=t}transform(e,n,r){if(null==e)return"";if("object"!=typeof n||null===n)throw Jm(t,n);return n[Mm(e,Object.keys(n),this._localization,r)].replace(cv,e.toString())}}return t.\u0275fac=function(e){return new(e||t)(Xa(Im))},t.\u0275pipe=Me({name:"i18nPlural",type:t,pure:!0}),t})(),dv=(()=>{class t{transform(e,n){if(null==e)return"";if("object"!=typeof n||"string"!=typeof e)throw Jm(t,n);return n.hasOwnProperty(e)?n[e]:n.hasOwnProperty("other")?n.other:""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Me({name:"i18nSelect",type:t,pure:!0}),t})(),fv=(()=>{class t{transform(t){return JSON.stringify(t,null,2)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Me({name:"json",type:t,pure:!1}),t})(),pv=(()=>{class t{constructor(t){this.differs=t,this.keyValues=[]}transform(t,e=gv){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());const n=this.differ.diff(t);return n&&(this.keyValues=[],n.forEachItem(t=>{this.keyValues.push({key:t.key,value:t.currentValue})}),this.keyValues.sort(e)),this.keyValues}}return t.\u0275fac=function(e){return new(e||t)(Xa(Ic))},t.\u0275pipe=Me({name:"keyvalue",type:t,pure:!1}),t})();function gv(t,e){const n=t.key,r=e.key;if(n===r)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(null===n)return 1;if(null===r)return-1;if("string"==typeof n&&"string"==typeof r)return n{class t{constructor(t){this._locale=t}transform(e,n,r){if(bv(e))return null;r=r||this._locale;try{return function(t,e,n){return Dm(t,Pm(um(e,Jg.Decimal),lm(e,im.MinusSign)),e,im.Group,im.Decimal,n)}(_v(e),r,n)}catch(i){throw Jm(t,i.message)}}}return t.\u0275fac=function(e){return new(e||t)(Xa(yf))},t.\u0275pipe=Me({name:"number",type:t,pure:!0}),t})(),vv=(()=>{class t{constructor(t){this._locale=t}transform(e,n,r){if(bv(e))return null;r=r||this._locale;try{return function(t,e,n){return Dm(t,Pm(um(e,Jg.Percent),lm(e,im.MinusSign)),e,im.Group,im.Decimal,n,!0).replace(new RegExp("%","g"),lm(e,im.PercentSign))}(_v(e),r,n)}catch(i){throw Jm(t,i.message)}}}return t.\u0275fac=function(e){return new(e||t)(Xa(yf))},t.\u0275pipe=Me({name:"percent",type:t,pure:!0}),t})(),yv=(()=>{class t{constructor(t,e="USD"){this._locale=t,this._defaultCurrencyCode=e}transform(e,n,r="symbol",i,s){if(bv(e))return null;s=s||this._locale,"boolean"==typeof r&&(console&&console.warn&&console.warn('Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".'),r=r?"symbol":"code");let o=n||this._defaultCurrencyCode;"code"!==r&&(o="symbol"===r||"symbol-narrow"===r?function(t,e,n="en"){const r=function(t){return Xc(t)[Jc.Currencies]}(n)[t]||Qg[t]||[],i=r[1];return"narrow"===e&&"string"==typeof i?i:r[0]||t}(o,"symbol"===r?"wide":"narrow",s):r);try{return function(t,e,n,r,i){const s=Pm(um(e,Jg.Currency),lm(e,im.MinusSign));return s.minFrac=function(t){let e;const n=Qg[t];return n&&(e=n[2]),"number"==typeof e?e:2}(r),s.maxFrac=s.minFrac,Dm(t,s,e,im.CurrencyGroup,im.CurrencyDecimal,i).replace("\xa4",n).replace("\xa4","").trim()}(_v(e),s,o,n,i)}catch(a){throw Jm(t,a.message)}}}return t.\u0275fac=function(e){return new(e||t)(Xa(yf),Xa(bf))},t.\u0275pipe=Me({name:"currency",type:t,pure:!0}),t})();function bv(t){return null==t||""===t||t!=t}function _v(t){if("string"==typeof t&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if("number"!=typeof t)throw new Error(t+" is not a number");return t}let wv=(()=>{class t{transform(e,n,r){if(null==e)return e;if(!this.supports(e))throw Jm(t,e);return e.slice(n,r)}supports(t){return"string"==typeof t||Array.isArray(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Me({name:"slice",type:t,pure:!1}),t})(),Ev=(()=>{class t{}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)},providers:[{provide:Im,useClass:Lm}]}),t})(),Cv=(()=>{class t{}return t.\u0275prov=vt({token:t,providedIn:"root",factory:()=>new Tv(re(Mg),window,re(Vr))}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class Tv{constructor(t,e,n){this.document=t,this.window=e,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportScrollRestoration()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(t){this.supportScrollRestoration()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(this.supportScrollRestoration()){t=this.window.CSS&&this.window.CSS.escape?this.window.CSS.escape(t):t.replace(/(\"|\'\ |:|\.|\[|\]|,|=)/g,"\\$1");try{const e=this.document.querySelector("#"+t);if(e)return void this.scrollToElement(e);const n=this.document.querySelector(`[name='${t}']`);if(n)return void this.scrollToElement(n)}catch(e){this.errorHandler.handleError(e)}}}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,i=this.offset();this.window.scrollTo(n-i[0],r-i[1])}supportScrollRestoration(){try{return!!this.window&&!!this.window.scrollTo}catch(t){return!1}}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function Sv(...t){let e=t[t.length-1];return k(e)?(t.pop(),U(t,e)):K(t)}class Ov extends S{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new E;return this._value}next(t){super.next(this._value=t)}}const kv=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})(),xv={};class Av{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new Dv(t,this.resultSelector))}}class Dv extends F{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(xv),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;nt.complete());function Rv(t){return t?function(t){return new _(e=>t.schedule(()=>e.complete()))}(t):Pv}function Iv(t){return new _(e=>{let n;try{n=t()}catch(r){return void e.error(r)}return(n?V(n):Rv()).subscribe(e)})}function Mv(){return z(1)}function Lv(t,e){return function(n){return n.lift(new Fv(t,e))}}class Fv{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new Nv(t,this.predicate,this.thisArg))}}class Nv extends m{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}const jv=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function Bv(t){return function(e){return 0===t?Rv():e.lift(new Uv(t))}}class Uv{constructor(t){if(this.total=t,this.total<0)throw new jv}call(t,e){return e.subscribe(new Vv(t,this.total))}}class Vv extends m{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,n=this.total,r=this.count++;e.length0){const n=this.count>=this.total?this.total:this.count,r=this.ring;for(let i=0;ie.lift(new Gv(t))}class Gv{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new qv(t,this.errorFactory))}}class qv extends m{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function zv(){return new kv}function Kv(t=null){return e=>e.lift(new Wv(t))}class Wv{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new $v(t,this.defaultValue))}}class $v extends m{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function Yv(t){return function(e){const n=new Xv(t),r=e.lift(n);return n.caught=r}}class Xv{constructor(t){this.selector=t}call(t,e){return e.subscribe(new Zv(t,this.selector,this.caught))}}class Zv extends F{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let n;try{n=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const r=new x(this,void 0,void 0);this.add(r);const i=L(this,n,void 0,void 0,r);i!==r&&this.add(i)}}}function Qv(t){return e=>0===t?Rv():e.lift(new Jv(t))}class Jv{constructor(t){if(this.total=t,this.total<0)throw new jv}call(t,e){return e.subscribe(new ty(t,this.total))}}class ty extends m{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}function ey(t,e){const n=arguments.length>=2;return r=>r.pipe(t?Lv((e,n)=>t(e,n,r)):b,Qv(1),n?Kv(e):Hv(()=>new kv))}function ny(){}function ry(t,e,n){return function(r){return r.lift(new iy(t,e,n))}}class iy{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new sy(t,this.nextOrObserver,this.error,this.complete))}}class sy extends m{constructor(t,e,n,r){super(t),this._tapNext=ny,this._tapError=ny,this._tapComplete=ny,this._tapError=n||ny,this._tapComplete=r||ny,s(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||ny,this._tapError=e.error||ny,this._tapComplete=e.complete||ny)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}class oy{constructor(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}call(t,e){return e.subscribe(new ay(t,this.predicate,this.thisArg,this.source))}}class ay extends m{constructor(t,e,n,r){super(t),this.predicate=e,this.thisArg=n,this.source=r,this.index=0,this.thisArg=n||this}notifyComplete(t){this.destination.next(t),this.destination.complete()}_next(t){let e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e||this.notifyComplete(!1)}_complete(){this.notifyComplete(!0)}}function ly(t,e){return"function"==typeof e?n=>n.pipe(ly((n,r)=>V(t(n,r)).pipe(N((t,i)=>e(n,t,r,i))))):e=>e.lift(new uy(t))}class uy{constructor(t){this.project=t}call(t,e){return e.subscribe(new cy(t,this.project))}}class cy extends F{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e,t,n)}_innerSub(t,e,n){const r=this.innerSubscription;r&&r.unsubscribe();const i=new x(this,e,n),s=this.destination;s.add(i),this.innerSubscription=L(this,t,void 0,void 0,i),this.innerSubscription!==i&&s.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=null}notifyComplete(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&super._complete()}notifyNext(t,e,n,r,i){this.destination.next(e)}}function hy(...t){return Mv()(Sv(...t))}class dy{constructor(t,e,n=!1){this.accumulator=t,this.seed=e,this.hasSeed=n}call(t,e){return e.subscribe(new fy(t,this.accumulator,this.seed,this.hasSeed))}}class fy extends m{constructor(t,e,n,r){super(t),this.accumulator=e,this._seed=n,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let n;try{n=this.accumulator(this.seed,t,e)}catch(r){this.destination.error(r)}this.seed=n,this.destination.next(n)}}function py(t,e){return H(t,e,1)}class gy{constructor(t){this.callback=t}call(t,e){return e.subscribe(new my(t,this.callback))}}class my extends m{constructor(t,e){super(t),this.add(new f(e))}} /** * @license Angular v10.0.8 * (c) 2010-2020 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class vy{constructor(t,e){this.id=t,this.url=e}}class yy extends vy{constructor(t,e,n="imperative",r=null){super(t,e),this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class by extends vy{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class _y extends vy{constructor(t,e,n){super(t,e),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class wy extends vy{constructor(t,e,n){super(t,e),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Ey extends vy{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Cy extends vy{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ty extends vy{constructor(t,e,n,r,i){super(t,e),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=i}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Sy extends vy{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Oy extends vy{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ky{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class xy{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Ay{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Dy{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Py{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Ry{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Iy{constructor(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class My{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Ly(t){return new My(t)}function Fy(t){const e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function Ny(t,e,n){const r=n.path.split("/");if(r.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||r.lengthe.indexOf(t)>-1):t===e}function Uy(t){return Array.prototype.concat.apply([],t)}function Vy(t){return t.length>0?t[t.length-1]:null}function Hy(t,e){for(const n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Gy(t){return ul(t)?t:ll(t)?V(Promise.resolve(t)):Sv(t)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function qy(t,e,n){return n?function(t,e){return jy(t,e)}(t.queryParams,e.queryParams)&&function t(e,n){if(!$y(e.segments,n.segments))return!1;if(e.numberOfChildren!==n.numberOfChildren)return!1;for(const r in n.children){if(!e.children[r])return!1;if(!t(e.children[r],n.children[r]))return!1}return!0}(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>By(t[n],e[n]))}(t.queryParams,e.queryParams)&&function t(e,n){return function e(n,r,i){if(n.segments.length>i.length)return!!$y(n.segments.slice(0,i.length),i)&&!r.hasChildren();if(n.segments.length===i.length){if(!$y(n.segments,i))return!1;for(const e in r.children){if(!n.children[e])return!1;if(!t(n.children[e],r.children[e]))return!1}return!0}{const t=i.slice(0,n.segments.length),s=i.slice(n.segments.length);return!!$y(n.segments,t)&&!!n.children.primary&&e(n.children.primary,r,s)}}(e,n,n.segments)}(t.root,e.root)}class zy{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Ly(this.queryParams)),this._queryParamMap}toString(){return Qy.serialize(this)}}class Ky{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Hy(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Jy(this)}}class Wy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Ly(this.parameters)),this._parameterMap}toString(){return sb(this)}}function $y(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}function Yy(t,e){let n=[];return Hy(t.children,(t,r)=>{"primary"===r&&(n=n.concat(e(t,r)))}),Hy(t.children,(t,r)=>{"primary"!==r&&(n=n.concat(e(t,r)))}),n}class Xy{}class Zy{parse(t){const e=new cb(t);return new zy(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){return`${"/"+function t(e,n){if(!e.hasChildren())return Jy(e);if(n){const n=e.children.primary?t(e.children.primary,!1):"",r=[];return Hy(e.children,(e,n)=>{"primary"!==n&&r.push(`${n}:${t(e,!1)}`)}),r.length>0?`${n}(${r.join("//")})`:n}{const n=Yy(e,(n,r)=>"primary"===r?[t(e.children.primary,!1)]:[`${r}:${t(n,!1)}`]);return`${Jy(e)}/(${n.join("//")})`}}(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${eb(e)}=${eb(t)}`).join("&"):`${eb(e)}=${eb(n)}`});return e.length?"?"+e.join("&"):""}(t.queryParams)}${"string"==typeof t.fragment?"#"+encodeURI(t.fragment):""}`}}const Qy=new Zy;function Jy(t){return t.segments.map(t=>sb(t)).join("/")}function tb(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function eb(t){return tb(t).replace(/%3B/gi,";")}function nb(t){return tb(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function rb(t){return decodeURIComponent(t)}function ib(t){return rb(t.replace(/\+/g,"%20"))}function sb(t){return`${nb(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${nb(t)}=${nb(e[t])}`).join("")}`;var e}const ob=/^[^\/()?;=#]+/;function ab(t){const e=t.match(ob);return e?e[0]:""}const lb=/^[^=?&#]+/,ub=/^[^?&#]+/;class cb{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ky([],{}):new Ky([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new Ky(t,e)),n}parseSegment(){const t=ab(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new Wy(rb(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=ab(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=ab(this.remaining);t&&(n=t,this.capture(n))}t[rb(e)]=rb(n)}parseQueryParam(t){const e=function(t){const e=t.match(lb);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(ub);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const r=ib(e),i=ib(n);if(t.hasOwnProperty(r)){let e=t[r];Array.isArray(e)||(e=[e],t[r]=e),e.push(i)}else t[r]=i}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=ab(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):t&&(i="primary");const s=this.parseChildren();e[i]=1===Object.keys(s).length?s.primary:new Ky([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class hb{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=db(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=db(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=fb(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return fb(t,this._root).map(t=>t.value)}}function db(t,e){if(t===e.value)return e;for(const n of e.children){const e=db(t,n);if(e)return e}return null}function fb(t,e){if(t===e.value)return[e];for(const n of e.children){const r=fb(t,n);if(r.length)return r.unshift(e),r}return[]}class pb{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function gb(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class mb extends hb{constructor(t,e){super(t),this.snapshot=e,Eb(this,t)}toString(){return this.snapshot.toString()}}function vb(t,e){const n=function(t,e){const n=new _b([],{},{},"",{},"primary",e,null,t.root,-1,{});return new wb("",new pb(n,[]))}(t,e),r=new Ov([new Wy("",{})]),i=new Ov({}),s=new Ov({}),o=new Ov({}),a=new Ov(""),l=new yb(r,i,o,a,s,"primary",e,n.root);return l.snapshot=n.root,new mb(new pb(l,[]),n)}class yb{constructor(t,e,n,r,i,s,o,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=s,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(N(t=>Ly(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(N(t=>Ly(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function bb(t,e="emptyOnly"){const n=t.pathFromRoot;let r=0;if("always"!==e)for(r=n.length-1;r>=1;){const t=n[r],e=n[r-1];if(t.routeConfig&&""===t.routeConfig.path)r--;else{if(e.component)break;r--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(r))}class _b{constructor(t,e,n,r,i,s,o,a,l,u,c){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=s,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=u,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Ly(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Ly(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class wb extends hb{constructor(t,e){super(e),this.url=t,Eb(this,e)}toString(){return Cb(this._root)}}function Eb(t,e){e.value._routerState=t,e.children.forEach(e=>Eb(t,e))}function Cb(t){const e=t.children.length>0?` { ${t.children.map(Cb).join(", ")} } `:"";return`${t.value}${e}`}function Tb(t){if(t.snapshot){const e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,jy(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),jy(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(let n=0;njy(t.parameters,r[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||Sb(t.parent,e.parent))} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Ob(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function kb(t,e,n,r,i){let s={};return r&&Hy(r,(t,e)=>{s[e]=Array.isArray(t)?t.map(t=>""+t):""+t}),new zy(n.root===t?e:function t(e,n,r){const i={};return Hy(e.children,(e,s)=>{i[s]=e===n?r:t(e,n,r)}),new Ky(e.segments,i)}(n.root,t,e),s,i)}class xb{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ob(n[0]))throw new Error("Root segment cannot have matrix parameters");const r=n.find(t=>"object"==typeof t&&null!=t&&t.outlets);if(r&&r!==Vy(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Ab{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function Db(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets.primary:""+t}function Pb(t,e,n){if(t||(t=new Ky([],{})),0===t.segments.length&&t.hasChildren())return Rb(t,e,n);const r=function(t,e,n){let r=0,i=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;i=n.length)return s;const e=t.segments[i],o=Db(n[r]),a=r0&&void 0===o)break;if(o&&a&&"object"==typeof a&&void 0===a.outlets){if(!Fb(o,a,e))return s;r+=2}else{if(!Fb(o,{},e))return s;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(t,e,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex{null!==n&&(i[r]=Pb(t.children[r],e,n))}),Hy(t.children,(t,e)=>{void 0===r[e]&&(i[e]=t)}),new Ky(t.segments,i)}}function Ib(t,e,n){const r=t.segments.slice(0,e);let i=0;for(;i{null!==t&&(e[n]=Ib(new Ky([],{}),0,t))}),e}function Lb(t){const e={};return Hy(t,(t,n)=>e[n]=""+t),e}function Fb(t,e,n){return t==n.path&&jy(e,n.parameters)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class Nb{constructor(t,e,n,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=r}activate(t){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),Tb(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const r=gb(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,r[e],n),delete r[e]}),Hy(r,(t,e)=>{this.deactivateRouteAndItsChildren(t,n)})}deactivateRoutes(t,e,n){const r=t.value,i=e?e.value:null;if(r===i)if(r.component){const i=n.getContext(r.outlet);i&&this.deactivateChildRoutes(t,e,i.children)}else this.deactivateChildRoutes(t,e,n);else i&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const n=e.getContext(t.value.outlet);if(n&&n.outlet){const e=n.outlet.detach(),r=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:r})}}deactivateRouteAndOutlet(t,e){const n=e.getContext(t.value.outlet);if(n){const r=gb(t),i=t.value.component?n.children:e;Hy(r,(t,e)=>this.deactivateRouteAndItsChildren(t,i)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(t,e,n){const r=gb(e);t.children.forEach(t=>{this.activateRoutes(t,r[t.value.outlet],n),this.forwardEvent(new Ry(t.value.snapshot))}),t.children.length&&this.forwardEvent(new Dy(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,i=e?e.value:null;if(Tb(r),r===i)if(r.component){const i=n.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,i.children)}else this.activateChildRoutes(t,e,n);else if(r.component){const e=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const t=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),jb(t.route)}else{const n=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(r.snapshot),i=n?n.module.componentFactoryResolver:null;e.attachRef=null,e.route=r,e.resolver=i,e.outlet&&e.outlet.activateWith(r,i),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,n)}}function jb(t){Tb(t.value),t.children.forEach(jb)}class Bb{constructor(t,e){this.routes=t,this.module=e}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Ub(t){return"function"==typeof t}function Vb(t){return t instanceof zy} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Hb{constructor(t){this.segmentGroup=t||null}}class Gb{constructor(t){this.urlTree=t}}function qb(t){return new _(e=>e.error(new Hb(t)))}function zb(t){return new _(e=>e.error(new Gb(t)))}function Kb(t){return new _(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Wb{constructor(t,e,n,r,i){this.configLoader=e,this.urlSerializer=n,this.urlTree=r,this.config=i,this.allowRedirects=!0,this.ngModule=t.get(ue)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(N(t=>this.createUrlTree(t,this.urlTree.queryParams,this.urlTree.fragment))).pipe(Yv(t=>{if(t instanceof Gb)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof Hb)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(N(e=>this.createUrlTree(e,t.queryParams,t.fragment))).pipe(Yv(t=>{if(t instanceof Hb)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const r=t.segments.length>0?new Ky([],{primary:t}):t;return new zy(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(N(t=>new Ky([],t))):this.expandSegment(t,n,e,n.segments,r,!0)}expandChildren(t,e,n){return function(t,e){if(0===Object.keys(t).length)return Sv({});const n=[],r=[],i={};return Hy(t,(t,s)=>{const o=e(s,t).pipe(N(t=>i[s]=t));"primary"===s?n.push(o):r.push(o)}),Sv.apply(null,n.concat(r)).pipe(Mv(),function(t,e){const n=arguments.length>=2;return r=>r.pipe(t?Lv((e,n)=>t(e,n,r)):b,Bv(1),n?Kv(e):Hv(()=>new kv))}(),N(()=>i))}(n.children,(n,r)=>this.expandSegmentGroup(t,e,r,n))}expandSegment(t,e,n,r,i,s){return Sv(...n).pipe(N(o=>this.expandSegmentAgainstRoute(t,e,n,o,r,i,s).pipe(Yv(t=>{if(t instanceof Hb)return Sv(null);throw t}))),Mv(),ey(t=>!!t),Yv((t,n)=>{if(t instanceof kv||"EmptyError"===t.name){if(this.noLeftoversInUrl(e,r,i))return Sv(new Ky([],{}));throw new Hb(e)}throw t}))}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}expandSegmentAgainstRoute(t,e,n,r,i,s,o){return Zb(r)!==s?qb(e):void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,i):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,i,s):qb(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,r,i,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,i,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,r){const i=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?zb(i):this.lineralizeSegments(n,i).pipe(H(n=>{const i=new Ky(n,{});return this.expandSegment(t,i,e,n,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,i,s){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:u}=$b(e,r,i);if(!o)return qb(e);const c=this.applyRedirectCommands(a,r.redirectTo,u);return r.redirectTo.startsWith("/")?zb(c):this.lineralizeSegments(r,c).pipe(H(r=>this.expandSegment(t,e,n,r.concat(i.slice(l)),s,!1)))}matchSegmentAgainstRoute(t,e,n,r){if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(N(t=>(n._loadedConfig=t,new Ky(r,{})))):Sv(new Ky(r,{}));const{matched:i,consumedSegments:s,lastChild:o}=$b(e,n,r);if(!i)return qb(e);const a=r.slice(o);return this.getChildConfig(t,n,r).pipe(H(t=>{const n=t.module,r=t.routes,{segmentGroup:i,slicedSegments:o}=function(t,e,n,r){return n.length>0&&function(t,e,n){return n.some(n=>Xb(t,e,n)&&"primary"!==Zb(n))}(t,n,r)?{segmentGroup:Yb(new Ky(e,function(t,e){const n={};n.primary=e;for(const r of t)""===r.path&&"primary"!==Zb(r)&&(n[Zb(r)]=new Ky([],{}));return n}(r,new Ky(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return n.some(n=>Xb(t,e,n))}(t,n,r)?{segmentGroup:Yb(new Ky(t.segments,function(t,e,n,r){const i={};for(const s of n)Xb(t,e,s)&&!r[Zb(s)]&&(i[Zb(s)]=new Ky([],{}));return Object.assign(Object.assign({},r),i)}(t,n,r,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,s,a,r);return 0===o.length&&i.hasChildren()?this.expandChildren(n,r,i).pipe(N(t=>new Ky(s,t))):0===r.length&&0===o.length?Sv(new Ky(s,{})):this.expandSegment(n,i,r,o,"primary",!0).pipe(N(t=>new Ky(s.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?Sv(new Bb(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Sv(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(H(n=>n?this.configLoader.load(t.injector,e).pipe(N(t=>(e._loadedConfig=t,t))):function(t){return new _(e=>e.error(Fy(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):Sv(new Bb([],t))}runCanLoadGuards(t,e,n){const r=e.canLoad;return r&&0!==r.length?V(r).pipe(N(r=>{const i=t.get(r);let s;if(function(t){return t&&Ub(t.canLoad)}(i))s=i.canLoad(e,n);else{if(!Ub(i))throw new Error("Invalid CanLoad guard");s=i(e,n)}return Gy(s)})).pipe(Mv(),ry(t=>{if(!Vb(t))return;const e=Fy(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),(i=t=>!0===t,t=>t.lift(new oy(i,void 0,t)))):Sv(!0);var i}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return Sv(n);if(r.numberOfChildren>1||!r.children.primary)return Kb(t.redirectTo);r=r.children.primary}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,r){const i=this.createSegmentGroup(t,e.root,n,r);return new zy(i,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return Hy(t,(t,r)=>{if("string"==typeof t&&t.startsWith(":")){const i=t.substring(1);n[r]=e[i]}else n[r]=t}),n}createSegmentGroup(t,e,n,r){const i=this.createSegments(t,e.segments,n,r);let s={};return Hy(e.children,(e,i)=>{s[i]=this.createSegmentGroup(t,e,n,r)}),new Ky(i,s)}createSegments(t,e,n,r){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,r):this.findOrReturn(e,n))}findPosParam(t,e,n){const r=n[e.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return r}findOrReturn(t,e){let n=0;for(const r of e){if(r.path===t.path)return e.splice(n),r;n++}return t}}function $b(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const r=(e.matcher||Ny)(n,t,e);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Yb(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new Ky(t.segments.concat(e.segments),e.children)}return t}function Xb(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function Zb(t){return t.outlet||"primary"} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Qb{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Jb{constructor(t,e){this.component=t,this.route=e}}function t_(t,e,n){const r=t._root;return function t(e,n,r,i,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=gb(n);return e.children.forEach(e=>{!function(e,n,r,i,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=e.value,a=n?n.value:null,l=r?r.getContext(e.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){const u=function(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!$y(t.url,e.url);case"pathParamsOrQueryParamsChange":return!$y(t.url,e.url)||!jy(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Sb(t,e)||!jy(t.queryParams,e.queryParams);case"paramsChange":default:return!Sb(t,e)}}(a,o,o.routeConfig.runGuardsAndResolvers);u?s.canActivateChecks.push(new Qb(i)):(o.data=a.data,o._resolvedData=a._resolvedData),t(e,n,o.component?l?l.children:null:r,i,s),u&&s.canDeactivateChecks.push(new Jb(l&&l.outlet&&l.outlet.component||null,a))}else a&&n_(n,l,s),s.canActivateChecks.push(new Qb(i)),t(e,null,o.component?l?l.children:null:r,i,s)}(e,o[e.value.outlet],r,i.concat([e.value]),s),delete o[e.value.outlet]}),Hy(o,(t,e)=>n_(t,r.getContext(e),s)),s}(r,e?e._root:null,n,[r.value])}function e_(t,e,n){const r=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(r?r.module.injector:n).get(t)}function n_(t,e,n){const r=gb(t),i=t.value;Hy(r,(t,r)=>{n_(t,i.component?e?e.children.getContext(r):null:e,n)}),n.canDeactivateChecks.push(new Jb(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const r_=Symbol("INITIAL_VALUE");function i_(){return ly(t=>function(...t){let e=null,n=null;return k(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&c(t[0])&&(t=t[0]),K(t,n).lift(new Av(e))}(...t.map(t=>t.pipe(Qv(1),function(...t){const e=t[t.length-1];return k(e)?(t.pop(),n=>hy(t,n,e)):e=>hy(t,e)}(r_)))).pipe(function(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new dy(t,e,n))}}((t,e)=>{let n=!1;return e.reduce((t,r,i)=>{if(t!==r_)return t;if(r===r_&&(n=!0),!n){if(!1===r)return r;if(i===e.length-1||Vb(r))return r}return t},t)},r_),Lv(t=>t!==r_),N(t=>Vb(t)?t:!0===t),Qv(1)))} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function s_(t,e){return null!==t&&e&&e(new Py(t)),Sv(!0)}function o_(t,e){return null!==t&&e&&e(new Ay(t)),Sv(!0)}function a_(t,e,n){const r=e.routeConfig?e.routeConfig.canActivate:null;return r&&0!==r.length?Sv(r.map(r=>Iv(()=>{const i=e_(r,e,n);let s;if(function(t){return t&&Ub(t.canActivate)}(i))s=Gy(i.canActivate(e,t));else{if(!Ub(i))throw new Error("Invalid CanActivate guard");s=Gy(i(e,t))}return s.pipe(ey())}))).pipe(i_()):Sv(!0)}function l_(t,e,n){const r=e[e.length-1],i=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>Iv(()=>Sv(e.guards.map(i=>{const s=e_(i,e.node,n);let o;if(function(t){return t&&Ub(t.canActivateChild)}(s))o=Gy(s.canActivateChild(r,t));else{if(!Ub(s))throw new Error("Invalid CanActivateChild guard");o=Gy(s(r,t))}return o.pipe(ey())})).pipe(i_())));return Sv(i).pipe(i_())} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class u_{}class c_{constructor(t,e,n,r,i,s){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=i,this.relativeLinkResolution=s}recognize(){try{const t=f_(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),n=new _b([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),r=new pb(n,e),i=new wb(this.url,r);return this.inheritParamsAndData(i._root),Sv(i)}catch(t){return new _(e=>e.error(t))}}inheritParamsAndData(t){const e=t.value,n=bb(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}processChildren(t,e){const n=Yy(e,(e,n)=>this.processSegmentGroup(t,e,n));return function(t){const e={};t.forEach(t=>{const n=e[t.value.outlet];if(n){const e=n.url.map(t=>t.toString()).join("/"),r=t.value.url.map(t=>t.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${e}' and '${r}'.`)}e[t.value.outlet]=t.value})}(n),n.sort((t,e)=>"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)),n}processSegment(t,e,n,r){for(const s of t)try{return this.processSegmentAgainstRoute(s,e,n,r)}catch(i){if(!(i instanceof u_))throw i}if(this.noLeftoversInUrl(e,n,r))return[];throw new u_}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}processSegmentAgainstRoute(t,e,n,r){if(t.redirectTo)throw new u_;if((t.outlet||"primary")!==r)throw new u_;let i,s=[],o=[];if("**"===t.path){const s=n.length>0?Vy(n).parameters:{};i=new _b(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,m_(t),r,t.component,t,h_(e),d_(e)+n.length,v_(t))}else{const a=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new u_;return{consumedSegments:[],lastChild:0,parameters:{}}}const r=(e.matcher||Ny)(n,t,e);if(!r)throw new u_;const i={};Hy(r.posParams,(t,e)=>{i[e]=t.path});const s=r.consumed.length>0?Object.assign(Object.assign({},i),r.consumed[r.consumed.length-1].parameters):i;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:s}}(e,t,n);s=a.consumedSegments,o=n.slice(a.lastChild),i=new _b(s,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,m_(t),r,t.component,t,h_(e),d_(e)+s.length,v_(t))}const a=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:l,slicedSegments:u}=f_(e,s,o,a,this.relativeLinkResolution);if(0===u.length&&l.hasChildren()){const t=this.processChildren(a,l);return[new pb(i,t)]}if(0===a.length&&0===u.length)return[new pb(i,[])];const c=this.processSegment(a,l,u,"primary");return[new pb(i,c)]}}function h_(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function d_(t){let e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,n+=e._segmentIndexShift?e._segmentIndexShift:0;return n-1}function f_(t,e,n,r,i){if(n.length>0&&function(t,e,n){return n.some(n=>p_(t,e,n)&&"primary"!==g_(n))}(t,n,r)){const i=new Ky(e,function(t,e,n,r){const i={};i.primary=r,r._sourceSegment=t,r._segmentIndexShift=e.length;for(const s of n)if(""===s.path&&"primary"!==g_(s)){const n=new Ky([],{});n._sourceSegment=t,n._segmentIndexShift=e.length,i[g_(s)]=n}return i}(t,e,r,new Ky(n,t.children)));return i._sourceSegment=t,i._segmentIndexShift=e.length,{segmentGroup:i,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some(n=>p_(t,e,n))}(t,n,r)){const s=new Ky(t.segments,function(t,e,n,r,i,s){const o={};for(const a of r)if(p_(t,n,a)&&!i[g_(a)]){const n=new Ky([],{});n._sourceSegment=t,n._segmentIndexShift="legacy"===s?t.segments.length:e.length,o[g_(a)]=n}return Object.assign(Object.assign({},i),o)}(t,e,n,r,t.children,i));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}const s=new Ky(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}function p_(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function g_(t){return t.outlet||"primary"}function m_(t){return t.data||{}}function v_(t){return t.resolve||{}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function y_(t){return function(e){return e.pipe(ly(e=>{const n=t(e);return n?V(n).pipe(N(()=>e)):V([e])}))}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class b_{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let __=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Se({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&rl(0,"router-outlet")},directives:function(){return[M_]},encapsulation:2}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function w_(t,e=""){for(let n=0;n{this.onLoadEndListener&&this.onLoadEndListener(e);const r=n.create(t);return new Bb(Uy(r.injector.get(S_)).map(T_),r)}))}loadModuleFactory(t){return"string"==typeof t?V(this.loader.load(t)):Gy(t()).pipe(H(t=>t instanceof ce?Sv(t):V(this.compiler.compileModuleAsync(t))))}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class k_{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new x_,this.attachRef=null}}class x_{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new k_,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class A_{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function D_(t){throw t}function P_(t,e,n){return e.parse("/")}function R_(t,e){return Sv(null)}let I_=(()=>{class t{constructor(t,e,n,r,i,s,o,a){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=r,this.config=a,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new S,this.errorHandler=D_,this.malformedUriErrorHandler=P_,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:R_,afterPreactivation:R_},this.urlHandlingStrategy=new A_,this.routeReuseStrategy=new b_,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=i.get(ue),this.console=i.get(vf);const l=i.get(Df);this.isNgZoneEnabled=l instanceof Df,this.resetConfig(a),this.currentUrlTree=new zy(new Ky([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new O_(s,o,t=>this.triggerEvent(new ky(t)),t=>this.triggerEvent(new xy(t))),this.routerState=vb(this.currentUrlTree,this.rootComponentType),this.transitions=new Ov({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(Lv(t=>0!==t.id),N(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),ly(t=>{let n=!1,r=!1;return Sv(t).pipe(ry(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),ly(t=>{const n=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Sv(t).pipe(ly(t=>{const n=this.transitions.getValue();return e.next(new yy(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?Pv:[t]}),ly(t=>Promise.resolve(t)),(r=this.ngModule.injector,i=this.configLoader,s=this.urlSerializer,o=this.config,function(t){return t.pipe(ly(t=>function(t,e,n,r,i){return new Wb(t,e,n,r,i).apply()}(r,i,s,t.extractedUrl,o).pipe(N(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e})))))}),ry(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,r,i){return function(s){return s.pipe(H(s=>function(t,e,n,r,i="emptyOnly",s="legacy"){return new c_(t,e,n,r,i,s).recognize()}(t,e,s.urlAfterRedirects,n(s.urlAfterRedirects),r,i).pipe(N(t=>Object.assign(Object.assign({},s),{targetSnapshot:t})))))}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),ry(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),ry(t=>{const n=new Ey(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));var r,i,s,o;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:r,source:i,restoredState:s,extras:o}=t,a=new yy(n,this.serializeUrl(r),i,s);e.next(a);const l=vb(r,this.rootComponentType).snapshot;return Sv(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:r,extras:Object.assign(Object.assign({},o),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),Pv}),y_(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:i,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:i,skipLocationChange:!!s,replaceUrl:!!o})}),ry(t=>{const e=new Cy(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),N(t=>Object.assign(Object.assign({},t),{guards:t_(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return function(n){return n.pipe(H(n=>{const{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:s,canDeactivateChecks:o}}=n;return 0===o.length&&0===s.length?Sv(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,r){return V(t).pipe(H(t=>function(t,e,n,r,i){const s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?Sv(s.map(s=>{const o=e_(s,e,i);let a;if(function(t){return t&&Ub(t.canDeactivate)}(o))a=Gy(o.canDeactivate(t,e,n,r));else{if(!Ub(o))throw new Error("Invalid CanDeactivate guard");a=Gy(o(t,e,n,r))}return a.pipe(ey())})).pipe(i_()):Sv(!0)}(t.component,t.route,n,e,r)),ey(t=>!0!==t,!0))}(o,r,i,t).pipe(H(n=>n&&"boolean"==typeof n?function(t,e,n,r){return V(e).pipe(py(e=>V([o_(e.route.parent,r),s_(e.route,r),l_(t,e.path,n),a_(t,e.route,n)]).pipe(Mv(),ey(t=>!0!==t,!0))),ey(t=>!0!==t,!0))}(r,s,t,e):Sv(n)),N(t=>Object.assign(Object.assign({},n),{guardsResult:t})))}))}}(this.ngModule.injector,t=>this.triggerEvent(t)),ry(t=>{if(Vb(t.guardsResult)){const e=Fy(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}}),ry(t=>{const e=new Ty(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),Lv(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const n=new _y(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(n),t.resolve(!1),!1}return!0}),y_(t=>{if(t.guards.canActivateChecks.length)return Sv(t).pipe(ry(t=>{const e=new Sy(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),ly(t=>{let n=!1;return Sv(t).pipe((r=this.paramsInheritanceStrategy,i=this.ngModule.injector,function(t){return t.pipe(H(t=>{const{targetSnapshot:e,guards:{canActivateChecks:n}}=t;if(!n.length)return Sv(t);let s=0;return V(n).pipe(py(t=>function(t,e,n,r){return function(t,e,n,r){const i=Object.keys(t);if(0===i.length)return Sv({});const s={};return V(i).pipe(H(i=>function(t,e,n,r){const i=e_(t,e,r);return Gy(i.resolve?i.resolve(e,n):i(e,n))}(t[i],e,n,r).pipe(ry(t=>{s[i]=t}))),Bv(1),H(()=>Object.keys(s).length===i.length?Sv(s):Pv))}(t._resolve,t,e,r).pipe(N(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),bb(t,n).resolve),null)))}(t.route,e,r,i)),ry(()=>s++),Bv(1),H(e=>s===n.length?Sv(t):Pv))}))}),ry({next:()=>n=!0,complete:()=>{if(!n){const n=new _y(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(n),t.resolve(!1)}}}));var r,i}),ry(t=>{const e=new Oy(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),y_(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:i,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:i,skipLocationChange:!!s,replaceUrl:!!o})}),N(t=>{const e=function(t,e,n){const r=function t(e,n,r){if(r&&e.shouldReuseRoute(n.value,r.value.snapshot)){const i=r.value;i._futureSnapshot=n.value;const s=function(e,n,r){return n.children.map(n=>{for(const i of r.children)if(e.shouldReuseRoute(i.value.snapshot,n.value))return t(e,n,i);return t(e,n)})}(e,n,r);return new pb(i,s)}{const r=e.retrieve(n.value);if(r){const t=r.route;return function t(e,n){if(e.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=e.value;for(let r=0;rt(e,n));return new pb(r,s)}}var i; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */}(t,e._root,n?n._root:void 0);return new mb(r,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),ry(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(s=this.rootContexts,o=this.routeReuseStrategy,a=t=>this.triggerEvent(t),N(t=>(new Nb(o,t.targetRouterState,t.currentRouterState,a).activate(s),t))),ry({next(){n=!0},complete(){n=!0}}),(i=()=>{if(!n&&!r){this.resetUrlToCurrentUrlTree();const n=new _y(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(n),t.resolve(!1)}this.currentNavigation=null},t=>t.lift(new gy(i))),Yv(n=>{if(r=!0,(i=n)&&i.ngNavigationCancelingError){const r=Vb(n.url);r||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const i=new _y(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(i),r?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);return this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const r=new wy(t.id,this.serializeUrl(t.extractedUrl),n);e.next(r);try{t.resolve(this.errorHandler(n))}catch(s){t.reject(s)}}var i;return Pv}));var i,s,o,a}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{let e=this.parseUrl(t.url);const n="popstate"===t.type?"popstate":"hashchange",r=t.state&&t.state.navigationId?t.state:null;setTimeout(()=>{this.scheduleNavigation(e,n,r,{replaceUrl:!0})},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){w_(t),this.config=t.map(T_),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)}createUrlTree(t,e={}){const{relativeTo:n,queryParams:r,fragment:i,preserveQueryParams:s,queryParamsHandling:o,preserveFragment:a}=e;Jr()&&s&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");const l=n||this.routerState.root,u=a?this.currentUrlTree.fragment:i;let c=null;if(o)switch(o){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=r||null}else c=s?this.currentUrlTree.queryParams:r||null;return null!==c&&(c=this.removeEmptyProps(c)),function(t,e,n,r,i){if(0===n.length)return kb(e.root,e.root,e,r,i);const s=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new xb(!0,0,t);let e=0,n=!1;const r=t.reduce((t,r,i)=>{if("object"==typeof r&&null!=r){if(r.outlets){const e={};return Hy(r.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(r.segmentPath)return[...t,r.segmentPath]}return"string"!=typeof r?[...t,r]:0===i?(r.split("/").forEach((r,i)=>{0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?e++:""!=r&&t.push(r))}),t):[...t,r]},[]);return new xb(n,e,r)}(n);if(s.toRoot())return kb(e.root,new Ky([],{}),e,r,i);const o=function(t,e,n){if(t.isAbsolute)return new Ab(e.root,!0,0);if(-1===n.snapshot._lastPathIndex){const t=n.snapshot._urlSegment;return new Ab(t,t===e.root,0)}const r=Ob(t.commands[0])?0:1;return function(t,e,n){let r=t,i=e,s=n;for(;s>i;){if(s-=i,r=r.parent,!r)throw new Error("Invalid number of '../'");i=r.segments.length}return new Ab(r,!1,i-s)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(s,e,t),a=o.processChildren?Rb(o.segmentGroup,o.index,s.commands):Pb(o.segmentGroup,o.index,s.commands);return kb(o.segmentGroup,a,e,r,i)}(l,this.currentUrlTree,t,c,u)}navigateByUrl(t,e={skipLocationChange:!1}){Jr()&&this.isNgZoneEnabled&&!Df.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");const n=Vb(t)?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e{const r=t[n];return null!=r&&(e[n]=r),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new by(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,n,r,i){const s=this.getTransition();if(s&&"imperative"!==e&&"imperative"===s.source&&s.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(s&&"hashchange"==e&&"popstate"===s.source&&s.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(s&&"popstate"==e&&"hashchange"===s.source&&s.rawUrl.toString()===t.toString())return Promise.resolve(!0);let o,a,l;i?(o=i.resolve,a=i.reject,l=i.promise):l=new Promise((t,e)=>{o=t,a=e});const u=++this.navigationId;return this.setTransition({id:u,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:r,resolve:o,reject:a,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,n,r){const i=this.urlSerializer.serialize(t);r=r||{},this.location.isCurrentPathEqualTo(i)||e?this.location.replaceState(i,"",Object.assign(Object.assign({},r),{navigationId:n})):this.location.go(i,"",Object.assign(Object.assign({},r),{navigationId:n}))}resetStateAndUrl(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(re(Fo),re(Xy),re(x_),re(Yg),re(ga),re(Zf),re(kf),re(void 0))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),M_=(()=>{class t{constructor(t,e,n,r,i){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=i,this.activated=null,this._activatedRoute=null,this.activateEvents=new yd,this.deactivateEvents=new yd,this.name=r||"primary",t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),r=this.parentContexts.getOrCreateContext(this.name).children,i=new L_(t,r,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,i),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(Xa(x_),Xa(Bc),Xa(dc),Za("name"),Xa(Mo))},t.\u0275dir=Ie({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class L_{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===yb?this.route:t===x_?this.childContexts:this.parent.get(t,e)}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class F_{}class N_{preload(t,e){return Sv(null)}}let j_=(()=>{class t{constructor(t,e,n,r,i){this.router=t,this.injector=r,this.preloadingStrategy=i,this.loader=new O_(e,n,e=>t.triggerEvent(new ky(e)),e=>t.triggerEvent(new xy(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(Lv(t=>t instanceof by),py(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(ue);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription.unsubscribe()}processRoutes(t,e){const n=[];for(const r of e)if(r.loadChildren&&!r.canLoad&&r._loadedConfig){const t=r._loadedConfig;n.push(this.processRoutes(t.module,t.routes))}else r.loadChildren&&!r.canLoad?n.push(this.preloadConfig(t,r)):r.children&&n.push(this.processRoutes(t,r.children));return V(n).pipe(z(),N(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>this.loader.load(t.injector,e).pipe(H(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(re(I_),re(Zf),re(kf),re(ga),re(F_))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),B_=(()=>{class t{constructor(t,e,n={}){this.router=t,this.viewportScroller=e,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof yy?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof by&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Iy&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new Iy(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(re(I_),re(Cv),re(void 0))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const U_=new Wt("ROUTER_CONFIGURATION"),V_=new Wt("ROUTER_FORROOT_GUARD"),H_=[Yg,{provide:Xy,useClass:Zy},{provide:I_,useFactory:function(t,e,n,r,i,s,o,a={},l,u){const c=new I_(null,t,e,n,r,i,s,Uy(o));if(l&&(c.urlHandlingStrategy=l),u&&(c.routeReuseStrategy=u),a.errorHandler&&(c.errorHandler=a.errorHandler),a.malformedUriErrorHandler&&(c.malformedUriErrorHandler=a.malformedUriErrorHandler),a.enableTracing){const t=Ig();c.events.subscribe(e=>{t.logGroup("Router Event: "+e.constructor.name),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return a.onSameUrlNavigation&&(c.onSameUrlNavigation=a.onSameUrlNavigation),a.paramsInheritanceStrategy&&(c.paramsInheritanceStrategy=a.paramsInheritanceStrategy),a.urlUpdateStrategy&&(c.urlUpdateStrategy=a.urlUpdateStrategy),a.relativeLinkResolution&&(c.relativeLinkResolution=a.relativeLinkResolution),c},deps:[Xy,x_,Yg,ga,Zf,kf,S_,U_,[class{},new ut],[class{},new ut]]},x_,{provide:yb,useFactory:function(t){return t.routerState.root},deps:[I_]},{provide:Zf,useClass:tp},j_,N_,class{preload(t,e){return e().pipe(Yv(()=>Sv(null)))}},{provide:U_,useValue:{enableTracing:!1}}];function G_(){return new qf("Router",I_)}let q_=(()=>{class t{constructor(t,e){}static forRoot(e,n){return{ngModule:t,providers:[H_,$_(e),{provide:V_,useFactory:W_,deps:[[I_,new ut,new ht]]},{provide:U_,useValue:n||{}},{provide:qg,useFactory:K_,deps:[Lg,[new lt(Kg),new ut],U_]},{provide:B_,useFactory:z_,deps:[I_,Cv,U_]},{provide:F_,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:N_},{provide:qf,multi:!0,useFactory:G_},[Y_,{provide:uf,multi:!0,useFactory:X_,deps:[Y_]},{provide:Q_,useFactory:Z_,deps:[Y_]},{provide:mf,multi:!0,useExisting:Q_}]]}}static forChild(e){return{ngModule:t,providers:[$_(e)]}}}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)(re(V_,8),re(I_,8))}}),t})();function z_(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new B_(t,e,n)}function K_(t,e,n={}){return n.useHash?new $g(t,e):new Wg(t,e)}function W_(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function $_(t){return[{provide:ma,multi:!0,useValue:t},{provide:S_,multi:!0,useValue:t}]}let Y_=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new S}appInitializer(){return this.injector.get(Ng,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),n=this.injector.get(I_),r=this.injector.get(U_);if(this.isLegacyDisabled(r)||this.isLegacyEnabled(r))t(!0);else if("disabled"===r.initialNavigation)n.setUpLocationChangeListener(),t(!0);else{if("enabled"!==r.initialNavigation)throw new Error(`Invalid initialNavigation options: '${r.initialNavigation}'`);n.hooks.afterPreactivation=()=>this.initNavigation?Sv(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),n.initialNavigation()}return e})}bootstrapListener(t){const e=this.injector.get(U_),n=this.injector.get(j_),r=this.injector.get(B_),i=this.injector.get(I_),s=this.injector.get(Yf);t===s.components[0]&&(this.isLegacyEnabled(e)?i.initialNavigation():this.isLegacyDisabled(e)&&i.setUpLocationChangeListener(),n.setUpPreloading(),r.init(),i.resetRootComponentType(s.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}isLegacyEnabled(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation}isLegacyDisabled(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation}}return t.\u0275fac=function(e){return new(e||t)(re(ga))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})();function X_(t){return t.appInitializer.bind(t)}function Z_(t){return t.bootstrapListener.bind(t)}const Q_=new Wt("Router Initializer"),J_=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function tw(t){return"function"==typeof t}const ew=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let nw=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:i,_subscriptions:s}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;tt.concat(e instanceof ew?e.errors:e),[])}let iw=!1;const sw={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else iw&&console.log("RxJS: Back to a better error behavior. Thank you. <3");iw=t},get useDeprecatedSynchronousErrorHandling(){return iw}};function ow(t){setTimeout(()=>{throw t},0)}const aw={closed:!0,next(t){},error(t){if(sw.useDeprecatedSynchronousErrorHandling)throw t;ow(t)},complete(){}},lw=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class uw extends nw{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=aw;break;case 1:if(!t){this.destination=aw;break}if("object"==typeof t){t instanceof uw?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new cw(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new cw(this,t,e,n)}}[lw](){return this}static create(t,e,n){const r=new uw(t,e,n);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class cw extends uw{constructor(t,e,n,r){let i;super(),this._parentSubscriber=t;let s=this;tw(e)?i=e:e&&(i=e.next,n=e.error,r=e.complete,e!==aw&&(s=Object.create(e),tw(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=i,this._error=n,this._complete=r}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;sw.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=sw;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):ow(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;ow(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);sw.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),sw.useDeprecatedSynchronousErrorHandling)throw n;ow(n)}}__tryOrSetError(t,e,n){if(!sw.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return sw.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(ow(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}function hw(t,e){return function(n){return n.lift(new dw(t,e))}}class dw{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new fw(t,this.predicate,this.thisArg))}}class fw extends uw{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}function pw(){}function gw(t,e,n){return function(r){return r.lift(new mw(t,e,n))}}class mw{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new vw(t,this.nextOrObserver,this.error,this.complete))}}class vw extends uw{constructor(t,e,n,r){super(t),this._tapNext=pw,this._tapError=pw,this._tapComplete=pw,this._tapError=n||pw,this._tapComplete=r||pw,tw(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||pw,this._tapError=e.error||pw,this._tapComplete=e.complete||pw)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}var yw,bw,_w,ww="undefined"!=typeof Zone&&!!Zone.current;function Ew(t){return ww?Zone.root.run(t):t()}var Cw=Object(gp.a)();function Tw(){var t=Object(up.b)();if(t){var e=t.getScope();if(e)return e.getTransaction()}}var Sw=function(){function t(t){var e=this;this._router=t,this.navStart$=this._router.events.pipe(hw((function(t){return t instanceof yy})),gw((function(t){if(yw){var n=t,r=Object(hp.g)(n.url),i=Tw();!i&&_w&&(i=bw({name:r,op:"navigation"})),i&&(e._routingSpan&&e._routingSpan.finish(),e._routingSpan=i.startChild({description:""+n.url,op:"ui.angular.routing",tags:Object(op.a)({"routing.instrumentation":"@sentry/angular",url:r},n.navigationTrigger&&{navigationTrigger:n.navigationTrigger})}))}else cp.b.error("Angular integration has tracing enabled, but Tracing integration is not configured")}))),this.navEnd$=this._router.events.pipe(hw((function(t){return t instanceof by})),gw((function(){e._routingSpan&&(Ew((function(){e._routingSpan.finish()})),e._routingSpan=null)}))),this._routingSpan=null,this._subscription=new nw,this._subscription.add(this.navStart$.subscribe()),this._subscription.add(this.navEnd$.subscribe())}return t.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},Object(op.b)([Jo({providedIn:"root"})],t)}(),Ow=function(){function t(){this.componentName="unknown"}return t.prototype.ngOnInit=function(){var t=Tw();t&&(this._tracingSpan=t.startChild({description:"<"+this.componentName+">",op:"ui.angular.init"}))},t.prototype.ngAfterViewInit=function(){this._tracingSpan&&this._tracingSpan.finish()},Object(op.b)([sf("trace")],t.prototype,"componentName",void 0),Object(op.b)([rf({selector:"[trace]"})],t)}();!function(){function t(){}t=Object(op.b)([af({declarations:[Ow],exports:[Ow]})],t)}();var kw=n("Cpvd"),xw=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._router=e.router||e.app,this._methods=(Array.isArray(e.methods)?e.methods:[]).concat("use")}return t.prototype.setupOnce=function(){var t,e;this._router?(t=this._router,void 0===(e=this._methods)&&(e=[]),e.forEach((function(e){return function(t,e){var n=t[e];return t[e]=function(){for(var t=[],r=0;r",r[s[1]]="string"==typeof u?u:u.name||""}else for(var c=0;c=0&&(i||n)&&(e.delta=e.value-(r||0),(e.delta||void 0===r)&&(r=e.value,t(e)))}},Gw=function(t,e){return{name:t,value:null!=e?e:-1,delta:0,entries:[],id:"v2-"+Date.now()+"-"+(Math.floor(8999999999999*Math.random())+1e12)}},qw=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(t){return t.getEntries().map(e)}));return n.observe({type:t,buffered:!0}),n}}catch(r){}},zw=function(t,e){var n=function(r){"pagehide"!==r.type&&"hidden"!==Object(gp.a)().document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},Kw=-1,Ww=function(){return Kw<0&&(Kw="hidden"===Object(gp.a)().document.visibilityState?0:1/0,zw((function(t){Kw=t.timeStamp}),!0)),{get firstHiddenTime(){return Kw}}},$w={},Yw=Object(gp.a)(),Xw=function(){function t(t){var e,n;void 0===t&&(t=!1),this._reportAllChanges=t,this._measurements={},this._performanceCursor=0,!Object(Pw.b)()&&(null===(e=Yw)||void 0===e?void 0:e.performance)&&(null===(n=Yw)||void 0===n?void 0:n.document)&&(Yw.performance.mark&&Yw.performance.mark("sentry-tracing-init"),this._trackCLS(),this._trackLCP(),this._trackFID())}return t.prototype.addPerformanceEntries=function(t){var e=this;if(Yw&&Yw.performance&&Yw.performance.getEntries&&Sp.a){cp.b.log("[Tracing] Adding & adjusting spans using Performance API");var n,r,i,s,o,a=Object(Bw.d)(Sp.a);if(Yw.document&&Yw.document.scripts)for(var l=0;l-1&&(r=g)}})),void 0!==r&&void 0!==i&&Qw(t,{description:"evaluation",endTimestamp:i,op:"script",startTimestamp:r}),this._performanceCursor=Math.max(performance.getEntries().length-1,0),this._trackNavigator(t),"pageload"===t.op){var u=Object(Bw.d)(Sp.a);"number"==typeof s&&(cp.b.log("[Measurements] Adding TTFB"),this._measurements.ttfb={value:1e3*(s-t.startTimestamp)},"number"==typeof o&&o<=s&&(this._measurements["ttfb.requestTime"]={value:1e3*(s-o)})),["fcp","fp","lcp"].forEach((function(n){if(e._measurements[n]&&!(u>=t.startTimestamp)){var r=e._measurements[n].value,i=u+Object(Bw.d)(r),s=Math.abs(1e3*(i-t.startTimestamp));cp.b.log("[Measurements] Normalized "+n+" from "+r+" to "+s+" ("+(s-r)+")"),e._measurements[n].value=s}})),this._measurements["mark.fid"]&&this._measurements.fid&&Qw(t,{description:"first input delay",endTimestamp:this._measurements["mark.fid"].value+Object(Bw.d)(this._measurements.fid.value),op:"web.vitals",startTimestamp:this._measurements["mark.fid"].value}),"fcp"in this._measurements||delete this._measurements.cls,t.setMeasurements(this._measurements),this._tagMetricInfo(t),t.setTag("sentry_reportAllChanges",this._reportAllChanges)}}},t.prototype._tagMetricInfo=function(t){this._lcpEntry&&(cp.b.log("[Measurements] Adding LCP Data"),this._lcpEntry.element&&t.setTag("lcp.element",Object(_g.b)(this._lcpEntry.element)),this._lcpEntry.id&&t.setTag("lcp.id",this._lcpEntry.id),this._lcpEntry.url&&t.setTag("lcp.url",this._lcpEntry.url.trim().slice(0,200)),t.setTag("lcp.size",this._lcpEntry.size)),this._clsEntry&&this._clsEntry.sources&&(cp.b.log("[Measurements] Adding CLS Data"),this._clsEntry.sources.forEach((function(e,n){return t.setTag("cls.source."+(n+1),Object(_g.b)(e.node))})))},t.prototype._trackCLS=function(){var t,e,n,r,i,s,o=this;e=Gw("CLS",0),n=0,r=[],(s=qw("layout-shift",i=function(i){i&&!i.hadRecentInput&&(n&&0!==r.length&&i.startTime-r[r.length-1].startTime<1e3&&i.startTime-r[0].startTime<5e3?(n+=i.value,r.push(i)):(n=i.value,r=[i]),n>e.value&&(e.value=n,e.entries=r,t&&t()))}))&&(t=Hw((function(t){var e=t.entries.pop();e&&(cp.b.log("[Measurements] Adding CLS"),o._measurements.cls={value:t.value},o._clsEntry=e)}),e,void 0),zw((function(){s.takeRecords().map(i),t(!0)})))},t.prototype._trackNavigator=function(t){var e=Yw.navigator;if(e){var n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),Jw(n.rtt)&&(this._measurements["connection.rtt"]={value:n.rtt}),Jw(n.downlink)&&(this._measurements["connection.downlink"]={value:n.downlink})),Jw(e.deviceMemory)&&t.setTag("deviceMemory",String(e.deviceMemory)),Jw(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}},t.prototype._trackLCP=function(){var t=this;!function(e,n){var r,i=Ww(),s=Gw("LCP"),o=function(t){var e=t.startTime;en&&(t.startTimestamp=n),t.startChild(Object(op.a)({startTimestamp:n},r))}function Jw(t){return"number"==typeof t&&isFinite(t)}var tE={traceFetch:!0,traceXHR:!0,tracingOrigins:["localhost",/^\//]},eE=Object(gp.a)(),nE=Object(op.a)({idleTimeout:Nw.a,markBackgroundTransactions:!0,maxTransactionDuration:600,routingInstrumentation:function(t,e,n){if(void 0===e&&(e=!0),void 0===n&&(n=!0),eE&&eE.location){var r,i=eE.location.href;e&&(r=t({name:eE.location.pathname,op:"pageload"})),n&&Object(vp.a)({callback:function(e){var n=e.to,s=e.from;void 0===s&&i&&-1!==i.indexOf(n)?i=void 0:s!==n&&(i=void 0,r&&(cp.b.log("[Tracing] Finishing current transaction with op: "+r.op),r.finish()),r=t({name:eE.location.pathname,op:"navigation"}))},type:"history"})}else cp.b.warn("Could not initialize routing instrumentation due to invalid location")},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0},tE),rE=function(){function t(e){this.name=t.id,this._emitOptionsWarning=!1,this._configuredIdleTimeout=void 0;var n=tE.tracingOrigins;e&&(this._configuredIdleTimeout=e.idleTimeout,e.tracingOrigins&&Array.isArray(e.tracingOrigins)&&0!==e.tracingOrigins.length?n=e.tracingOrigins:this._emitOptionsWarning=!0),this.options=Object(op.a)(Object(op.a)(Object(op.a)({},nE),e),{tracingOrigins:n});var r=this.options._metricOptions;this._metrics=new Xw(r&&r._reportAllChanges)}return t.prototype.setupOnce=function(t,e){var n=this;this._getCurrentHub=e,this._emitOptionsWarning&&(cp.b.warn("[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),cp.b.warn("[Tracing] We added a reasonable default for you: "+tE.tracingOrigins));var r=this.options,i=r.markBackgroundTransactions,s=r.traceFetch,o=r.traceXHR,a=r.tracingOrigins,l=r.shouldCreateSpanForRequest;(0,r.routingInstrumentation)((function(t){return n._createRouteTransaction(t)}),r.startTransactionOnPageLoad,r.startTransactionOnLocationChange),i&&(Vw&&Vw.document?Vw.document.addEventListener("visibilitychange",(function(){var t=Object(Bw.b)();Vw.document.hidden&&t&&(cp.b.log("[Tracing] Transaction: "+jw.a.Cancelled+" -> since tab moved to the background, op: "+t.op),t.status||t.setStatus(jw.a.Cancelled),t.setTag("visibilitychange","document.hidden"),t.setTag(Uw.a,Uw.b[2]),t.finish())})):cp.b.warn("[Tracing] Could not set up background tab detection due to lack of global document")),function(e){var n=Object(op.a)(Object(op.a)({},tE),e),r=n.traceXHR,i=n.tracingOrigins,s=n.shouldCreateSpanForRequest,o={},a=function(t){return o[t]||(o[t]=i.some((function(e){return Object(dp.a)(t,e)}))&&!Object(dp.a)(t,"sentry_key")),o[t]},l=a;"function"==typeof s&&(l=function(t){return a(t)&&s(t)});var u={};n.traceFetch&&Object(vp.a)({callback:function(t){!function(t,e,n){if(Object(Bw.c)()&&t.fetchData&&e(t.fetchData.url))if(t.endTimestamp&&t.fetchData.__span)(i=n[t.fetchData.__span])&&(t.response?i.setHttpStatus(t.response.status):t.error&&i.setStatus(jw.a.InternalError),i.finish(),delete n[t.fetchData.__span]);else{var r=Object(Bw.b)();if(r){var i=r.startChild({data:Object(op.a)(Object(op.a)({},t.fetchData),{type:"fetch"}),description:t.fetchData.method+" "+t.fetchData.url,op:"http.client"});t.fetchData.__span=i.spanId,n[i.spanId]=i;var s=t.args[0]=t.args[0],o=t.args[1]=t.args[1]||{},a=o.headers;Object(Tp.g)(s,Request)&&(a=s.headers),a?"function"==typeof a.append?a.append("sentry-trace",i.toTraceparent()):a=Array.isArray(a)?Object(op.f)(a,[["sentry-trace",i.toTraceparent()]]):Object(op.a)(Object(op.a)({},a),{"sentry-trace":i.toTraceparent()}):a={"sentry-trace":i.toTraceparent()},o.headers=a}}}(t,l,u)},type:"fetch"}),r&&Object(vp.a)({callback:function(e){!function(e,n,r){var i,s;if(Object(Bw.c)()&&!(null===(i=e.xhr)||void 0===i?void 0:i.__sentry_own_request__)&&(null===(s=e.xhr)||void 0===s?void 0:s.__sentry_xhr__)&&n(e.xhr.__sentry_xhr__.url)){var o=e.xhr.__sentry_xhr__;if(e.endTimestamp&&e.xhr.__sentry_xhr_span_id__)(l=r[e.xhr.__sentry_xhr_span_id__])&&(l.setHttpStatus(o.status_code),l.finish(),delete r[e.xhr.__sentry_xhr_span_id__]);else{var a=Object(Bw.b)();if(a){var l=a.startChild({data:Object(op.a)(Object(op.a)({},o.data),{type:"xhr",method:o.method,url:o.url}),description:o.method+" "+o.url,op:"http.client"});if(e.xhr.__sentry_xhr_span_id__=l.spanId,r[e.xhr.__sentry_xhr_span_id__]=l,e.xhr.setRequestHeader)try{e.xhr.setRequestHeader("sentry-trace",l.toTraceparent())}catch(t){}}}}}(e,l,u)},type:"xhr"})}({traceFetch:s,traceXHR:o,tracingOrigins:a,shouldCreateSpanForRequest:l})},t.prototype._createRouteTransaction=function(t){var e=this;if(this._getCurrentHub){var n=this.options,r=n.beforeNavigate,i=n.idleTimeout,s=n.maxTransactionDuration,o="pageload"===t.op?function(){var t,e=(t=Object(gp.a)().document.querySelector("meta[name=sentry-trace]"))?t.getAttribute("content"):null;if(e)return Object(Bw.a)(e)}():void 0,a=Object(op.a)(Object(op.a)(Object(op.a)({},t),o),{trimEnd:!0}),l="function"==typeof r?r(a):a,u=void 0===l?Object(op.a)(Object(op.a)({},a),{sampled:!1}):l;!1===u.sampled&&cp.b.log("[Tracing] Will not send "+u.op+" transaction because of beforeNavigate."),cp.b.log("[Tracing] Starting "+u.op+" transaction on scope");var c=this._getCurrentHub(),h=Object(gp.a)().location,d=Object(kw.b)(c,u,i,!0,{location:h});return d.registerBeforeFinishCallback((function(t,n){e._metrics.addPerformanceEntries(t),function(t,e,n){var r=n-e.startTimestamp;n&&(r>t||r<0)&&(e.setStatus(jw.a.DeadlineExceeded),e.setTag("maxTransactionDurationExceeded","true"))}(Object(Bw.e)(s),t,n)})),d.setTag("idleTimeout",this._configuredIdleTimeout),d}cp.b.warn("[Tracing] Did not create "+t.op+" transaction because _getCurrentHub is invalid.")},t.id="BrowserTracing",t}();Object(kw.a)();class iE extends /** * @license Angular v10.0.8 * (c) 2010-2020 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class extends class{}{constructor(){super()}supportsDOMEvents(){return!0}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */{static makeCurrent(){var t;t=new iE,Rg||(Rg=t)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=oE||(oE=document.querySelector("base"),oE)?oE.getAttribute("href"):null;return null==e?null:(n=e,sE||(sE=document.createElement("a")),sE.setAttribute("href",n),"/"===sE.pathname.charAt(0)?sE.pathname:"/"+sE.pathname);var n; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */}resetBaseElement(){oE=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return Fm(document.cookie,t)}}let sE,oE=null;const aE=new Wt("TRANSITION_ID"),lE=[{provide:uf,useFactory:function(t,e,n){return()=>{n.get(cf).donePromise.then(()=>{const n=Ig();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[aE,Mg,ga],multi:!0}]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class uE{static init(){var t;t=new uE,Hf=t}addToWindow(t){Nt.getAngularTestability=(e,n=!0)=>{const r=t.findTestabilityInTree(e,n);if(null==r)throw new Error("Could not find testability for element.");return r},Nt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Nt.getAllAngularRootElements=()=>t.getAllRootElements(),Nt.frameworkStabilizers||(Nt.frameworkStabilizers=[]),Nt.frameworkStabilizers.push(t=>{const e=Nt.getAllAngularTestabilities();let n=e.length,r=!1;const i=function(e){r=r||e,n--,0==n&&t(r)};e.forEach((function(t){t.whenStable(i)}))})}findTestabilityInTree(t,e,n){if(null==e)return null;const r=t.getTestability(e);return null!=r?r:n?Ig().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const cE=new Wt("EventManagerPlugins");let hE=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let r=0;r{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),pE=(()=>{class t extends fE{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>Ig().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(re(Mg))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const gE={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},mE=/%COMP%/g;function vE(t,e,n){for(let r=0;r{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let bE=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new _E(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case we.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new wE(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case we.Native:case we.ShadowDom:return new EE(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=vE(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(re(hE),re(pE),re(hf))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})();class _E{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(gE[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;const i=gE[r];i?t.setAttributeNS(i,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=gE[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&mc.DashCase?t.style.setProperty(e,n,r&mc.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&mc.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,yE(n)):this.eventManager.addEventListener(t,e,yE(n))}}class wE extends _E{constructor(t,e,n,r){super(t),this.component=n;const i=vE(r+"-"+n.id,n.styles,[]);e.addStyles(i),this.contentAttr="_ngcontent-%COMP%".replace(mE,r+"-"+n.id),this.hostAttr=function(t){return"_nghost-%COMP%".replace(mE,t)}(r+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class EE extends _E{constructor(t,e,n,r){super(t),this.sharedStylesHost=e,this.hostEl=n,this.component=r,this.shadowRoot=r.encapsulation===we.ShadowDom?n.attachShadow({mode:"open"}):n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const i=vE(r.id,r.styles,[]);for(let s=0;s{class t extends dE{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(re(Mg))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const TE=["alt","control","meta","shift"],SE={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},OE={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},kE={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let xE=(()=>{class t extends dE{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,r){const i=t.parseEventName(n),s=t.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ig().onAndCancel(e,i.domEventName,s))}static parseEventName(e){const n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const i=t._normalizeKey(n.pop());let s="";if(TE.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),s+=t+".")}),s+=i,0!=n.length||0===i.length)return null;const o={};return o.domEventName=r,o.fullKey=s,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&OE.hasOwnProperty(e)&&(e=OE[e]))}return SE[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),TE.forEach(r=>{r!=n&&(0,kE[r])(t)&&(e+=r+".")}),e+=n,e}static eventCallback(e,n,r){return i=>{t.getEventFullKey(i)===e&&r.runGuarded(()=>n(i))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(re(Mg))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),AE=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({factory:function(){return re(DE)},token:t,providedIn:"root"}),t})(),DE=(()=>{class t extends AE{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case Si.NONE:return e;case Si.HTML:return Yr(e,"HTML")?$r(e):Ci(this._doc,String(e));case Si.STYLE:return Yr(e,"Style")?$r(e):e;case Si.SCRIPT:if(Yr(e,"Script"))return $r(e);throw new Error("unsafe value used in a script context");case Si.URL:return Xr(e),Yr(e,"URL")?$r(e):si(String(e));case Si.RESOURCE_URL:if(Yr(e,"ResourceURL"))return $r(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see http://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return new Gr(t)}bypassSecurityTrustStyle(t){return new qr(t)}bypassSecurityTrustScript(t){return new zr(t)}bypassSecurityTrustUrl(t){return new Kr(t)}bypassSecurityTrustResourceUrl(t){return new Wr(t)}}return t.\u0275fac=function(e){return new(e||t)(re(Mg))},t.\u0275prov=vt({factory:function(){return t=re($t),new DE(t.get(Mg));var t},token:t,providedIn:"root"}),t})();const PE=zf(np,"browser",[{provide:gf,useValue:"browser"},{provide:pf,useValue: /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function(){iE.makeCurrent(),uE.init()},multi:!0},{provide:Mg,useFactory:function(){return function(t){Qe=t}(document),document},deps:[]}]),RE=[[],{provide:ea,useValue:"root"},{provide:Vr,useFactory:function(){return new Vr},deps:[]},{provide:cE,useClass:CE,multi:!0,deps:[Mg,Df,gf]},{provide:cE,useClass:xE,multi:!0,deps:[Mg]},[],{provide:bE,useClass:bE,deps:[hE,pE,hf]},{provide:gc,useExisting:bE},{provide:fE,useExisting:pE},{provide:pE,useClass:pE,deps:[Mg]},{provide:jf,useClass:jf,deps:[Df]},{provide:hE,useClass:hE,deps:[cE,Df]},[]];let IE=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:hf,useValue:e.appId},{provide:aE,useExisting:hf},lE]}}}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)(re(t,12))},providers:RE,imports:[Ev,ip]}),t})();function ME(t,e){return new _(n=>{const r=t.length;if(0===r)return void n.complete();const i=new Array(r);let s=0,o=0;for(let a=0;a{u||(u=!0,o++),i[a]=t},error:t=>n.error(t),complete:()=>{s++,s!==r&&u||(o===r&&n.next(e?e.reduce((t,e,n)=>(t[e]=i[n],t),{}):i),n.complete())}}))}})} /** * @license Angular v10.0.8 * (c) 2010-2020 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */"undefined"!=typeof window&&window;const LE=new Wt("NgValueAccessor"),FE={provide:LE,useExisting:Dt(()=>NE),multi:!0}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */let NE=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(Xa(vc),Xa(fc))},t.\u0275dir=Ie({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&cl("change",(function(t){return e.onChange(t.target.checked)}))("blur",(function(){return e.onTouched()}))},features:[uc([FE])]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const jE={provide:LE,useExisting:Dt(()=>UE),multi:!0},BE=new Wt("CompositionEventMode");let UE=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Ig()?Ig().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(Xa(vc),Xa(fc),Xa(BE,8))},t.\u0275dir=Ie({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&cl("input",(function(t){return e._handleInput(t.target.value)}))("blur",(function(){return e.onTouched()}))("compositionstart",(function(){return e._compositionStart()}))("compositionend",(function(t){return e._compositionEnd(t.target.value)}))},features:[uc([jE])]}),t})(),VE=(()=>{class t{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ie({type:t}),t})(),HE=(()=>{class t extends VE{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return GE(e||t)},t.\u0275dir=Ie({type:t,features:[$u]}),t})();const GE=Nr(HE); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function qE(){throw new Error("unimplemented")}class zE extends VE{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){return qE()}get asyncValidator(){return qE()}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class KE{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let WE=(()=>{class t extends KE{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(Xa(zE,2))},t.\u0275dir=Ie({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&ql("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[$u]}),t})(),$E=(()=>{class t extends KE{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(Xa(HE,2))},t.\u0275dir=Ie({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&ql("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[$u]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function YE(t){return null==t||0===t.length}function XE(t){return null!=t&&"number"==typeof t.length}const ZE=new Wt("NgValidators"),QE=new Wt("NgAsyncValidators"),JE=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class tC{static min(t){return e=>{if(YE(e.value)||YE(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n{if(YE(e.value)||YE(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return YE(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return YE(t.value)||JE.test(t.value)?null:{email:!0}}static minLength(t){return e=>YE(e.value)||!XE(e.value)?null:e.value.lengthXE(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}static pattern(t){if(!t)return tC.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(YE(t.value))return null;const r=t.value;return e.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(eC);return 0==e.length?null:function(t){return rC(function(t,e){return e.map(e=>e(t))}(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(eC);return 0==e.length?null:function(t){ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ return function(...t){if(1===t.length){const e=t[0];if(c(e))return ME(e,null);if(h(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return ME(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return ME(t=1===t.length&&c(t[0])?t[0]:t,null).pipe(N(t=>e(...t)))}return ME(t,null)}(function(t,e){return e.map(e=>e(t))}(t,e).map(nC)).pipe(N(rC))}}}function eC(t){return null!=t}function nC(t){const e=ll(t)?V(t):t;if(!ul(e))throw new Error("Expected validator to return Promise or Observable.");return e}function rC(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function iC(t){return t.validate?e=>t.validate(e):t}function sC(t){return t.validate?e=>t.validate(e):t} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const oC={provide:LE,useExisting:Dt(()=>aC),multi:!0};let aC=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(Xa(vc),Xa(fc))},t.\u0275dir=Ie({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&cl("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[uc([oC])]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const lC={provide:LE,useExisting:Dt(()=>cC),multi:!0};let uC=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),cC=(()=>{class t{constructor(t,e,n,r){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=r,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(zE),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}_throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')}}return t.\u0275fac=function(e){return new(e||t)(Xa(vc),Xa(fc),Xa(uC),Xa(ga))},t.\u0275dir=Ie({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&cl("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[uc([lC])]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const hC={provide:LE,useExisting:Dt(()=>dC),multi:!0};let dC=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(Xa(vc),Xa(fc))},t.\u0275dir=Ie({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&cl("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[uc([hC])]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const fC='\n
\n \n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',pC='\n
\n
\n \n
\n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',gC='\n
\n
\n \n
\n
'; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class mC{static controlParentException(){throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+fC)}static ngModelGroupException(){throw new Error(`formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n ${pC}\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n ${gC}`)}static missingFormException(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+fC)}static groupParentException(){throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+pC)}static arrayParentException(){throw new Error('formArrayName must be used with a parent formGroup directive. You\'ll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n \n
\n
\n
\n \n
\n
\n
\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });')}static disabledAttrWarning(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n\n Example:\n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")}static ngModelWarning(t){console.warn(`\n It looks like you're using ngModel on the same form field as ${t}.\n Support for using the ngModel input property and ngModelChange event with\n reactive form directives has been deprecated in Angular v6 and will be removed\n in a future version of Angular.\n\n For more information on this, see our API docs here:\n https://angular.io/api/forms/${"formControl"===t?"FormControlDirective":"FormControlName"}#use-with-ngmodel\n `)}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const vC={provide:LE,useExisting:Dt(()=>bC),multi:!0};function yC(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let bC=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=yC(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(Xa(vc),Xa(fc))},t.\u0275dir=Ie({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&cl("change",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[uc([vC])]}),t})(),_C=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(yC(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(Xa(fc),Xa(vc),Xa(bC,9))},t.\u0275dir=Ie({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const wC={provide:LE,useExisting:Dt(()=>CC),multi:!0};function EC(t,e){return null==t?""+e:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let CC=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const n=[];if(void 0!==e.selectedOptions){const t=e.selectedOptions;for(let e=0;e{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(EC(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(EC(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(Xa(fc),Xa(vc),Xa(CC,9))},t.\u0275dir=Ie({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function SC(t,e){return[...e.path,t]}function OC(t,e){t||DC(e,"Cannot find control with"),e.valueAccessor||DC(e,"No value accessor for form control with"),t.validator=tC.compose([t.validator,e.validator]),t.asyncValidator=tC.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&kC(t,e)})}(t,e),function(t,e){t.registerOnChange((t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&kC(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())}),e._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())})}function kC(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function xC(t,e){null==t&&DC(e,"Cannot find control with"),t.validator=tC.compose([t.validator,e.validator]),t.asyncValidator=tC.composeAsync([t.asyncValidator,e.asyncValidator])}function AC(t){return DC(t,"There is no FormControl instance attached to form control element with")}function DC(t,e){let n;throw n=t.path.length>1?`path: '${t.path.join(" -> ")}'`:t.path[0]?`name: '${t.path}'`:"unspecified name attribute",new Error(`${e} ${n}`)}function PC(t){return null!=t?tC.compose(t.map(iC)):null}function RC(t){return null!=t?tC.composeAsync(t.map(sC)):null}function IC(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}const MC=[NE,dC,aC,bC,CC,cC];function LC(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function FC(t,e){if(!e)return null;Array.isArray(e)||DC(t,"Value accessor was not provided as an array for form control with");let n=void 0,r=void 0,i=void 0;return e.forEach(e=>{var s;e.constructor===UE?n=e:(s=e,MC.some(t=>s.constructor===t)?(r&&DC(t,"More than one built-in value accessor matches form control with"),r=e):(i&&DC(t,"More than one custom value accessor matches form control with"),i=e))}),i||r||n||(DC(t,"No valid value accessor for form control with"),null)}function NC(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function jC(t,e,n,r){Jr()&&"never"!==r&&((null!==r&&"once"!==r||e._ngModelWarningSentOnce)&&("always"!==r||n._ngModelWarningSent)||(mC.ngModelWarning(t),e._ngModelWarningSentOnce=!0,n._ngModelWarningSent=!0))} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function BC(t){const e=VC(t)?t.validators:t;return Array.isArray(e)?PC(e):e||null}function UC(t,e){const n=VC(e)?e.asyncValidators:t;return Array.isArray(n)?RC(n):n||null}function VC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class HC{constructor(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=()=>{},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this.validator=BC(t)}setAsyncValidators(t){this.asyncValidator=UC(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING";const e=nC(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>this.setErrors(e,{emitEvent:t}))}}_cancelExistingSubscription(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let r=t;return e.forEach(t=>{r=r instanceof qC?r.controls.hasOwnProperty(t)?r.controls[t]:null:r instanceof zC&&r.at(t)||null}),r}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new yd,this.statusChanges=new yd}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){VC(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}}class GC extends HC{constructor(t=null,e,n){super(BC(e),UC(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class qC extends HC{constructor(t,e,n){super(BC(e),UC(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof GC?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const n=this.controls[e];if(this.contains(e)&&t(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,r)=>{n=e(n,t,r)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class zC extends HC{constructor(t,e,n){super(BC(e),UC(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof GC?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const KC={provide:HE,useExisting:Dt(()=>$C)},WC=(()=>Promise.resolve(null))();let $C=(()=>{class t extends HE{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new yd,this.form=new qC({},PC(t),RC(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){WC.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),OC(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){WC.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),NC(this._directives,t)})}addFormGroup(t){WC.then(()=>{const e=this._findContainer(t.path),n=new qC({});xC(n,t),e.registerControl(t.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){WC.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){WC.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,LC(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(Xa(ZE,10),Xa(QE,10))},t.\u0275dir=Ie({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&cl("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[uc([KC]),$u]}),t})(),YC=(()=>{class t extends HE{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return SC(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return PC(this._validators)}get asyncValidator(){return RC(this._asyncValidators)}_checkParentType(){}}return t.\u0275fac=function(e){return XC(e||t)},t.\u0275dir=Ie({type:t,features:[$u]}),t})();const XC=Nr(YC); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class ZC{static modelParentException(){throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup's partner directive "formControlName" instead. Example:\n\n ${fC}\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n \n
\n \n \n
\n `)}static formGroupNameException(){throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ${pC}\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ${gC}`)}static missingNameException(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: \n Example 2: ')}static modelGroupParentException(){throw new Error(`\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ${pC}\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ${gC}`)}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const QC={provide:HE,useExisting:Dt(()=>JC)};let JC=(()=>{class t extends YC{constructor(t,e,n){super(),this._parent=t,this._validators=e,this._asyncValidators=n}_checkParentType(){this._parent instanceof t||this._parent instanceof $C||ZC.modelGroupParentException()}}return t.\u0275fac=function(e){return new(e||t)(Xa(HE,5),Xa(ZE,10),Xa(QE,10))},t.\u0275dir=Ie({type:t,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[uc([QC]),$u]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const tT={provide:zE,useExisting:Dt(()=>nT)},eT=(()=>Promise.resolve(null))();let nT=(()=>{class t extends zE{constructor(t,e,n,r){super(),this.control=new GC,this._registered=!1,this.update=new yd,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=n||[],this.valueAccessor=FC(this,r)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),IC(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?SC(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return PC(this._rawValidators)}get asyncValidator(){return RC(this._rawAsyncValidators)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){OC(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){!(this._parent instanceof JC)&&this._parent instanceof YC?ZC.formGroupNameException():this._parent instanceof JC||this._parent instanceof $C||ZC.modelParentException()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||ZC.missingNameException()}_updateValue(t){eT.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,n=""===e||e&&"false"!==e;eT.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(Xa(HE,9),Xa(ZE,10),Xa(QE,10),Xa(LE,10))},t.\u0275dir=Ie({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[uc([tT]),$u,We]}),t})(),rT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ie({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const iT=new Wt("NgModelWithFormControlWarning"),sT={provide:zE,useExisting:Dt(()=>oT)};let oT=(()=>{class t extends zE{constructor(t,e,n,r){super(),this._ngModelWarningConfig=r,this.update=new yd,this._ngModelWarningSent=!1,this._rawValidators=t||[],this._rawAsyncValidators=e||[],this.valueAccessor=FC(this,n)}set isDisabled(t){mC.disabledAttrWarning()}ngOnChanges(e){this._isControlChanged(e)&&(OC(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),IC(e,this.viewModel)&&(jC("formControl",t,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)}get path(){return[]}get validator(){return PC(this._rawValidators)}get asyncValidator(){return RC(this._rawAsyncValidators)}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}}return t.\u0275fac=function(e){return new(e||t)(Xa(ZE,10),Xa(QE,10),Xa(LE,10),Xa(iT,8))},t.\u0275dir=Ie({type:t,selectors:[["","formControl",""]],inputs:{isDisabled:["disabled","isDisabled"],form:["formControl","form"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[uc([sT]),$u,We]}),t._ngModelWarningSentOnce=!1,t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const aT={provide:HE,useExisting:Dt(()=>lT)};let lT=(()=>{class t extends HE{constructor(t,e){super(),this._validators=t,this._asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new yd}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return OC(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){NC(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);xC(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);xC(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,LC(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){e.valueAccessor.registerOnChange(()=>AC(e)),e.valueAccessor.registerOnTouched(()=>AC(e)),e._rawValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}(t.control,t),e&&OC(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{}),this._oldForm=this.form}_updateValidators(){const t=PC(this._validators);this.form.validator=tC.compose([this.form.validator,t]);const e=RC(this._asyncValidators);this.form.asyncValidator=tC.composeAsync([this.form.asyncValidator,e])}_checkFormPresent(){this.form||mC.missingFormException()}}return t.\u0275fac=function(e){return new(e||t)(Xa(ZE,10),Xa(QE,10))},t.\u0275dir=Ie({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&cl("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[uc([aT]),$u,We]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const uT={provide:HE,useExisting:Dt(()=>cT)};let cT=(()=>{class t extends YC{constructor(t,e,n){super(),this._parent=t,this._validators=e,this._asyncValidators=n}_checkParentType(){fT(this._parent)&&mC.groupParentException()}}return t.\u0275fac=function(e){return new(e||t)(Xa(HE,13),Xa(ZE,10),Xa(QE,10))},t.\u0275dir=Ie({type:t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[uc([uT]),$u]}),t})();const hT={provide:HE,useExisting:Dt(()=>dT)};let dT=(()=>{class t extends HE{constructor(t,e,n){super(),this._parent=t,this._validators=e,this._asyncValidators=n}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return SC(null==this.name?this.name:this.name.toString(),this._parent)}get validator(){return PC(this._validators)}get asyncValidator(){return RC(this._asyncValidators)}_checkParentType(){fT(this._parent)&&mC.arrayParentException()}}return t.\u0275fac=function(e){return new(e||t)(Xa(HE,13),Xa(ZE,10),Xa(QE,10))},t.\u0275dir=Ie({type:t,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[uc([hT]),$u]}),t})();function fT(t){return!(t instanceof cT||t instanceof lT||t instanceof dT)} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const pT={provide:zE,useExisting:Dt(()=>gT)};let gT=(()=>{class t extends zE{constructor(t,e,n,r,i){super(),this._ngModelWarningConfig=i,this._added=!1,this.update=new yd,this._ngModelWarningSent=!1,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=n||[],this.valueAccessor=FC(this,r)}set isDisabled(t){mC.disabledAttrWarning()}ngOnChanges(e){this._added||this._setUpControl(),IC(e,this.viewModel)&&(jC("formControlName",t,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return SC(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return PC(this._rawValidators)}get asyncValidator(){return RC(this._rawAsyncValidators)}_checkParentType(){!(this._parent instanceof cT)&&this._parent instanceof YC?mC.ngModelGroupException():this._parent instanceof cT||this._parent instanceof lT||this._parent instanceof dT||mC.controlParentException()}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(Xa(HE,13),Xa(ZE,10),Xa(QE,10),Xa(LE,10),Xa(iT,8))},t.\u0275dir=Ie({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[uc([pT]),$u,We]}),t._ngModelWarningSentOnce=!1,t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */const mT={provide:ZE,useExisting:Dt(()=>yT),multi:!0},vT={provide:ZE,useExisting:Dt(()=>bT),multi:!0};let yT=(()=>{class t{constructor(){this._required=!1}get required(){return this._required}set required(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()}validate(t){return this.required?tC.required(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ie({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&Aa("required",e.required?"":null)},inputs:{required:"required"},features:[uc([mT])]}),t})(),bT=(()=>{class t extends yT{validate(t){return this.required?tC.requiredTrue(t):null}}return t.\u0275fac=function(e){return _T(e||t)},t.\u0275dir=Ie({type:t,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&Aa("required",e.required?"":null)},features:[uc([vT]),$u]}),t})();const _T=Nr(bT),wT={provide:ZE,useExisting:Dt(()=>ET),multi:!0};let ET=(()=>{class t{constructor(){this._enabled=!1}set email(t){this._enabled=""===t||!0===t||"true"===t,this._onChange&&this._onChange()}validate(t){return this._enabled?tC.email(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ie({type:t,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[uc([wT])]}),t})();const CT={provide:ZE,useExisting:Dt(()=>TT),multi:!0};let TT=(()=>{class t{constructor(){this._validator=tC.nullValidator}ngOnChanges(t){"minlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null==this.minlength?null:this._validator(t)}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=tC.minLength("number"==typeof this.minlength?this.minlength:parseInt(this.minlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ie({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&Aa("minlength",e.minlength?e.minlength:null)},inputs:{minlength:"minlength"},features:[uc([CT]),We]}),t})();const ST={provide:ZE,useExisting:Dt(()=>OT),multi:!0};let OT=(()=>{class t{constructor(){this._validator=tC.nullValidator}ngOnChanges(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null!=this.maxlength?this._validator(t):null}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=tC.maxLength("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ie({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&Aa("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[uc([ST]),We]}),t})();const kT={provide:ZE,useExisting:Dt(()=>xT),multi:!0};let xT=(()=>{class t{constructor(){this._validator=tC.nullValidator}ngOnChanges(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=tC.pattern(this.pattern)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ie({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&Aa("pattern",e.pattern?e.pattern:null)},inputs:{pattern:"pattern"},features:[uc([kT]),We]}),t})(),AT=(()=>{class t{}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)}}),t})(),DT=(()=>{class t{group(t,e=null){const n=this._reduceControls(t);let r=null,i=null,s=void 0;return null!=e&&( /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(r=null!=e.validators?e.validators:null,i=null!=e.asyncValidators?e.asyncValidators:null,s=null!=e.updateOn?e.updateOn:void 0):(r=null!=e.validator?e.validator:null,i=null!=e.asyncValidator?e.asyncValidator:null)),new qC(n,{asyncValidators:i,updateOn:s,validators:r})}control(t,e,n){return new GC(t,e,n)}array(t,e,n){const r=t.map(t=>this._createControl(t));return new zC(r,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof GC||t instanceof qC||t instanceof zC?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),PT=(()=>{class t{}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)},providers:[uC],imports:[AT]}),t})(),RT=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:iT,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)},providers:[DT,uC],imports:[AT]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license Angular v10.0.8 * (c) 2010-2020 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class IT{}class MT{} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class LT{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),r=n.toLowerCase(),i=t.slice(e+1).trim();this.maybeSetNormalizedName(n,r),this.headers.has(r)?this.headers.get(r).push(i):this.headers.set(r,[i])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const r=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(r,n),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof LT?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new LT;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof LT?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...n),this.headers.set(e,r);break;case"d":const i=t.value;if(i){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===i.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class FT{encodeKey(t){return NT(t)}encodeValue(t){return NT(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function NT(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class jT{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new FT,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.split("&").forEach(t=>{const r=t.indexOf("="),[i,s]=-1==r?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,r)),e.decodeValue(t.slice(r+1))],o=n.get(i)||[];o.push(s),n.set(i,o)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new jT({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(t.value);-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function BT(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function UT(t){return"undefined"!=typeof Blob&&t instanceof Blob}function VT(t){return"undefined"!=typeof FormData&&t instanceof FormData}class HT{constructor(t,e,n,r){let i;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==n?n:null,i=r):i=n,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.params&&(this.params=i.params)),this.headers||(this.headers=new LT),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":ne.set(n,t.setHeaders[n]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new HT(e,n,i,{params:l,headers:a,reportProgress:o,responseType:r,withCredentials:s})}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var GT=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class qT{constructor(t,e=200,n="OK"){this.headers=t.headers||new LT,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class zT extends qT{constructor(t={}){super(t),this.type=GT.ResponseHeader}clone(t={}){return new zT({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class KT extends qT{constructor(t={}){super(t),this.type=GT.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new KT({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class WT extends qT{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function $T(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let YT=(()=>{class t{constructor(t){this.handler=t}request(t,e,n={}){let r;if(t instanceof HT)r=t;else{let i=void 0;i=n.headers instanceof LT?n.headers:new LT(n.headers);let s=void 0;n.params&&(s=n.params instanceof jT?n.params:new jT({fromObject:n.params})),r=new HT(t,e,void 0!==n.body?n.body:null,{headers:i,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const i=Sv(r).pipe(py(t=>this.handler.handle(t)));if(t instanceof HT||"events"===n.observe)return i;const s=i.pipe(Lv(t=>t instanceof KT));switch(n.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return s.pipe(N(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return s.pipe(N(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return s.pipe(N(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return s.pipe(N(t=>t.body))}case"response":return s;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new jT).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,$T(n,e))}post(t,e,n={}){return this.request("POST",t,$T(n,e))}put(t,e,n={}){return this.request("PUT",t,$T(n,e))}}return t.\u0275fac=function(e){return new(e||t)(re(IT))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */class XT{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const ZT=new Wt("HTTP_INTERCEPTORS");let QT=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const JT=/^\)\]\}',?\n/;class tS{}let eS=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),nS=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new _(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const r=t.serializeBody();let i=null;const s=()=>{if(null!==i)return i;const e=1223===n.status?204:n.status,r=n.statusText||"OK",s=new LT(n.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(n)||t.url;return i=new zT({headers:s,status:e,statusText:r,url:o}),i},o=()=>{let{headers:r,status:i,statusText:o,url:a}=s(),l=null;204!==i&&(l=void 0===n.response?n.responseText:n.response),0===i&&(i=l?200:0);let u=i>=200&&i<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(JT,"");try{l=""!==l?JSON.parse(l):null}catch(c){l=t,u&&(u=!1,l={error:c,text:l})}}u?(e.next(new KT({body:l,headers:r,status:i,statusText:o,url:a||void 0})),e.complete()):e.error(new WT({error:l,headers:r,status:i,statusText:o,url:a||void 0}))},a=t=>{const{url:r}=s(),i=new WT({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error",url:r||void 0});e.error(i)};let l=!1;const u=r=>{l||(e.next(s()),l=!0);let i={type:GT.DownloadProgress,loaded:r.loaded};r.lengthComputable&&(i.total=r.total),"text"===t.responseType&&n.responseText&&(i.partialText=n.responseText),e.next(i)},c=t=>{let n={type:GT.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),t.reportProgress&&(n.addEventListener("progress",u),null!==r&&n.upload&&n.upload.addEventListener("progress",c)),n.send(r),e.next({type:GT.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",o),t.reportProgress&&(n.removeEventListener("progress",u),null!==r&&n.upload&&n.upload.removeEventListener("progress",c)),n.readyState!==n.DONE&&n.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(re(tS))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const rS=new Wt("XSRF_COOKIE_NAME"),iS=new Wt("XSRF_HEADER_NAME");class sS{}let oS=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Fm(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(re(Mg),re(gf),re(rS))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),aS=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const r=this.tokenService.getToken();return null===r||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,r)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(re(sS),re(iS))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),lS=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(ZT,[]);this.chain=t.reduceRight((t,e)=>new XT(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(re(MT),re(ga))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),uS=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:aS,useClass:QT}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:rS,useValue:e.cookieName}:[],e.headerName?{provide:iS,useValue:e.headerName}:[]]}}}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)},providers:[aS,{provide:ZT,useExisting:aS,multi:!0},{provide:sS,useClass:oS},{provide:rS,useValue:"XSRF-TOKEN"},{provide:iS,useValue:"X-XSRF-TOKEN"}]}),t})(),cS=(()=>{class t{}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)},providers:[YT,{provide:IT,useClass:lS},nS,{provide:MT,useExisting:nS},eS,{provide:tS,useExisting:eS}],imports:[[uS.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var hS=function(){function t(t){this._options=Object(op.a)({logErrors:!0},t)}return t.prototype.handleError=function(t){var e=this._extractError(t)||"Handled unknown error",n=Ew((function(){return fg(e)}));this._options.logErrors&&console.error(e),this._options.showDialog&&function(t){void 0===t&&(t={});var e=Object(up.b)(),n=e.getScope();n&&(t.user=Object(op.a)(Object(op.a)({},n.getUser()),t.user)),t.eventId||(t.eventId=e.lastEventId());var r=e.getClient();r&&r.showReportDialog(t)}(Object(op.a)(Object(op.a)({},this._options.dialogOptions),{eventId:n}))},t.prototype._extractError=function(t){if(this._options.extractor){var e=this._defaultExtractor.bind(this);return this._options.extractor(t,e)}return this._defaultExtractor(t)},t.prototype._defaultExtractor=function(t){var e=t;return e&&e.ngOriginalError&&(e=e.ngOriginalError),"string"==typeof e||e instanceof Error?e:e instanceof WT?e.error instanceof Error?e.error:e.error instanceof ErrorEvent&&e.error.message?e.error.message:"string"==typeof e.error?"Server returned code "+e.status+' with body "'+e.error+'"':e.message:null},Object(op.b)([Jo({providedIn:"root"})],t)}();class dS extends f{constructor(t,e){super()}schedule(t,e=0){return this}}class fS extends dS{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,r=void 0;try{this.work(t)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let pS=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class gS extends pS{constructor(t,e=pS.now){super(t,()=>gS.delegate&&gS.delegate!==this?gS.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return gS.delegate&&gS.delegate!==this?gS.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}const mS=new gS(fS);class vS{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new yS(t,this.dueTime,this.scheduler))}}class yS extends m{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(bS,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function bS(t){t.debouncedNext()}class _S{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new wS(t,this.compare,this.keySelector))}}class wS extends m{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:n}=this;e=n?n(t):t}catch(r){return this.destination.error(r)}let n=!1;if(this.hasKey)try{const{compare:t}=this;n=t(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))}}var ES=n("Amjd"),CS=n("lk/c");let TS=(()=>{class t{constructor(){}reset(){"spatialNavigationReset"in window&&window.spatialNavigationReset()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const SS=["channelsBlock"],OS=["groupsBlock"];function kS(t,e){if(1&t){const t=al();el(0,"b",18),cl("click",(function(e){wn(t);const n=gl().$implicit;return gl().group_remove_event(n),e.stopPropagation()})),ou(1,"\uf252"),nl()}}function xS(t,e){if(1&t){const t=al();el(0,"i",19),cl("click",(function(e){return wn(t),gl(2).empty_trash_event(e)})),ou(1,"\uf252"),nl()}}const AS=function(t,e,n,r,i,s,o,a){return{"bg-gray":t,move:e,moved:n,removed:r,over:i,deleted:s,added:o,ch_in_group:a}};function DS(t,e){if(1&t){const t=al();el(0,"span",15),cl("click",(function(){wn(t);const n=e.$implicit;return gl().group_select(n)}))("keyup.enter",(function(){wn(t);const n=e.$implicit;return gl().group_select(n)}))("dblclick",(function(){wn(t);const n=e.$implicit;return gl().group_rename(n)}))("dragstart",(function(n){wn(t);const r=e.$implicit;return gl().group_dragstart(r,n)}))("drop",(function(){wn(t);const n=e.$implicit;return gl().group_drop(n)}))("dragend",(function(){return wn(t),gl().group_dragend()}))("dragenter",(function(n){wn(t);const r=e.index;return gl().group_dragenter(r,n)}))("dragover",(function(e){return wn(t),gl().group_dragover(e)})),ou(1),$a(2,kS,2,0,"b",16),$a(3,xS,2,0,"i",17),nl()}if(2&t){const t=e.$implicit,n=e.index,r=gl(),i=Ya(1);Ja("tabindex",10)("ngClass",nd(6,AS,t.id==r.group_selected.id,t.move,t.moved,null===t.id,n===r.group_over,t.deleted,t.added,-1===r.group_selected.id&&i.chINgroupID===t.id)),Aa("draggable",null===t.id?"false":"true"),Qi(1),lu(" ",t.name," "),Qi(1),Ja("ngIf",null!=t.id),Qi(1),Ja("ngIf",null==t.id)}}function PS(t,e){if(1&t){const t=al();el(0,"input",20),cl("keyup.enter",(function(e){return wn(t),gl().channels_filter({search:e.target.value})}))("blur",(function(){wn(t);const e=gl();return e.epgChannels.emit(e.channelsFiltered)})),nl()}2&t&&Ja("formControl",gl().channelsSearh)}function RS(t,e){if(1&t){const t=al();el(0,"span",21),cl("click",(function(){return wn(t),gl().showChannelsSearchInput=!0})),ou(1,"\u041a\u0430\u043d\u0430\u043b\u044b"),nl()}}function IS(t,e){if(1&t){const t=al();el(0,"i",29),cl("contextmenu",(function(e){wn(t);const n=gl().$implicit,r=gl();return e.preventDefault(),r.epg_day(n)})),ou(1),nl()}if(2&t){const t=gl().$implicit;Qi(1),au(null==t.epg[0]?null:t.epg[0].programm)}}const MS=function(t){return{width:t}};function LS(t,e){if(1&t&&rl(0,"div",30),2&t){const t=gl().$implicit;Ja("ngStyle",Yh(1,MS,(null==t.epg[0]?null:t.epg[0].progress)+"%"))}}const FS=function(t,e,n,r){return{move:t,moved:e,deleted:n,added:r}};function NS(t,e){if(1&t){const t=al();el(0,"li",22),cl("dragstart",(function(n){wn(t);const r=e.$implicit;return gl().channel_dragstart(r,n)}))("dragenter",(function(n){wn(t);const r=e.$implicit;return gl().channel_dragenter(r,n)}))("dragover",(function(e){return wn(t),gl().group_dragover(e)}))("dragend",(function(e){return wn(t),gl().channel_dragend(e)}))("drop",(function(e){return wn(t),gl().channel_drop(e)}))("dblclick",(function(){wn(t);const n=e.$implicit;return gl().channel_rename(n)}))("click",(function(n){wn(t);const r=e.$implicit;return gl().click_grouping(n,r)}))("keyup.enter",(function(){wn(t);const n=e.$implicit;return gl().channel_play(n)}))("mouseover",(function(){wn(t);const n=e.$implicit,r=gl(),i=Ya(1);return-1==r.group_selected.id?i.chINgroupID=n.group_id:null}))("mouseleave",(function(){wn(t),gl();const e=Ya(1);return e.chINgroupID>-1?e.chINgroupID=-1:null}))("focus",(function(e){return wn(t),gl().channel_focus(e.target)}))("blur",(function(e){return wn(t),gl().channel_blur(e.target)})),el(1,"a",23),cl("click",(function(n){wn(t);const r=e.$implicit,i=gl();return n.stopPropagation(),i.channel_play(r)})),rl(2,"b",24),el(3,"img",25),cl("error",(function(e){return wn(t),e.target.src="/img/tvicons/error"})),nl(),nl(),el(4,"div"),el(5,"span"),ou(6),nl(),$a(7,IS,2,1,"i",26),nl(),$a(8,LS,1,3,"div",27),el(9,"b",28),cl("click",(function(n){wn(t);const r=e.$implicit,i=gl();return n.stopPropagation(),i.channel_remove(r)})),ou(10,"\uf252"),nl(),nl()}if(2&t){const t=e.$implicit;Ja("tabIndex",10)("ngClass",Qh(6,FS,t.move,t.moved,t.deleted,t.added)),Qi(3),wl("src",0===t.icon.search("http")?t.icon:t.icon?"/img/tvicons/"+t.icon:"/img/tvicons/icon",xi),Qi(3),au(t.name),Qi(1),Ja("ngIf",t.epg),Qi(1),Ja("ngIf",t.epg)}}const jS=function(t){return{active:t}};let BS=(()=>{class t{constructor(t){this._spatialNavigation=t,this._group_selected={id:1,name:"Test"},this.group_moved=null,this.group_over=null,this.channels_moved=[],this.channelsFiltered=[],this.channels=[],this.groups=[],this.changeChannel=new yd,this.removeChannel=new yd,this.playChannel=new yd,this.epgDayChannel=new yd,this.epgChannels=new yd,this.changeGroup=new yd,this.selectedGroup=new yd,this.groupRemoveEvent=new yd,this.emptyTrashEvent=new yd,this.channelsBlock=null,this.groupsBlock=null,this.dragTimer=0,this.dragChannelStarted=!1,this.dragScreenY=0,this.shiftKey=!1,this.ctrlKey=!1,this.showChannelsSearchInput=!1,this.channelsSearh=new GC("")}set group_selected(t){this._group_selected=t,this.group_select(t)}get group_selected(){return this._group_selected}ngAfterViewInit(){setTimeout(()=>{const t=document.querySelector("#IPTV_Editor .channels ul li");t&&t.focus()},1e3),Object(ES.polyfill)({holdToDrag:500,dragImageTranslateOverride:CS.scrollBehaviourDragImageTranslateOverride})}ngOnInit(){this.channelsSearh.valueChanges.pipe(N(t=>t.trim()),function(t,e=mS){return n=>n.lift(new vS(t,e))}(200),t=>t.lift(new _S(void 0,void 0))).subscribe(t=>{this.channels_filter({search:t})})}channels_filter(t){this.channels_moved_truncate(),"number"==typeof t.group_id||null===t.group_id?this.channelsFiltered=this.channels.filter(e=>e.group_id==t.group_id):"string"==typeof t.search&&t.search.trim().length>0&&(this.channelsFiltered=this.channels.filter(e=>e.name.toLowerCase().indexOf(t.search.toLowerCase().toString())>-1),this._group_selected={id:-1,name:"Empty"})}channel_add(t){if(-1===this._group_selected.id)return!1;const e={name:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b",group_id:this.group_selected.id,url:"http://",tvg_id:"",icon:"",deleted:!0,added:!0};let n=-1;this.channels.forEach((t,e)=>{t.group_id===this.group_selected.id&&(n=e)}),this.channels.splice(n>-1?n:this.channels.length-1,0,e),this.channelsFiltered.splice(this.channelsFiltered.length-1,0,e),setTimeout(()=>{e.deleted=!1},50);const r=t.currentTarget;r.classList.add("animation"),setTimeout(()=>{e.added=!1,r.classList.remove("animation")},500);const i=this.channelsBlock.nativeElement;try{i.querySelector("li:last-child").scrollIntoView({behavior:"smooth",block:"start"})}catch(s){i.scrollTop=i.scrollHeight-i.clientHeight}}channel_remove(t){null!==t.group_id?(t.deleted=!0,setTimeout(()=>{t.group_id=null,t.deleted=!1,this.channelsFiltered.splice(this.channelsFiltered.indexOf(t),1),this._spatialNavigation.reset()},500)):this.removeChannel.emit(t)}channel_trash_remove(t){t.deleted=!0,setTimeout(()=>{t.deleted=!1,this._spatialNavigation.reset(),this.channels.splice(this.channels.indexOf(t),1)},500)}channel_rename(t){this.changeChannel.emit(t)}channel_dragstart(t,e){e.dataTransfer.setData("text/plain",""),setTimeout(()=>{this.channels_moved.indexOf(t)<0&&(this.channels_moved.push(t),t.move=!0);const e=this.channels.indexOf(t);this.channels_moved.splice(0,0,...this.channels_moved.splice(this.channels_moved.indexOf(t),1)),this.channels_moved.forEach(t=>{this.channels.splice(this.channels.indexOf(t),1)}),this.channels.splice(e,0,...this.channels_moved)},1)}channel_dragenter(t,e){e&&e.preventDefault(),t.move||(0==this.dragChannelStarted&&e&&(this.dragChannelStarted=!0,this.dragTimer=Date.now(),this.dragScreenY=e.screenY),setTimeout(()=>{const e=this.channels.indexOf(t);this.channels.splice(this.channels.indexOf(this.channels_moved[0]),this.channels_moved.length),this.channels.splice(e+1,0,...this.channels_moved),this._spatialNavigation.reset()},2))}channel_dragend(t){if(this.channels_moved.length){if(this.dragChannelStarted){const e=t.screenY-this.dragScreenY;Date.now()-this.dragTimer<100&&Math.abs(e)>50&&this.channel_dragenter(e>0?this.channels[this.channels.length-1]:this.channels[0],null),this.dragChannelStarted=!1}this.channels_moved.forEach(t=>{t.move=!1,t.moved=!0}),setTimeout(()=>{this.channels_moved.forEach(t=>{t.moved=!1}),this.channels_moved=[],this._spatialNavigation.reset()},300)}this.group_over=null}channel_drop(t){if(this.dragChannelStarted){const e=t.screenY-this.dragScreenY;Date.now()-this.dragTimer<100&&Math.abs(e)>50&&this.channel_dragenter(e>0?this.channels[this.channels.length-1]:this.channels[0],null),this.dragChannelStarted=!1}}channels_moved_truncate(){this.channels_moved.forEach(t=>{t.move=!1}),this.channels_moved=[]}channel_play(t){return this.playChannel.emit(t),!1}channel_focus(t){const e=t.querySelector("div"),n=e.scrollWidth-e.clientWidth;if(n>10){const e=t.querySelector("span"),r=Math.floor(n/30*100)/100;e.style.transitionDuration=r+"s",e.style.textIndent=-1*n+"px",setTimeout(()=>{e.style.transitionDuration="0.3s",e.style.textIndent="0px",setTimeout(()=>{document.activeElement==t&&this.channel_focus(t)},1e3)},1e3*r+1e3)}}channel_blur(t){const e=t.querySelector("span");""!=e.style.textIndent&&(e.style.transitionDuration="0.3s",e.style.textIndent="0px")}group_rename(t){null!==t.id&&this.changeGroup.emit(t)}group_select(t){this._group_selected=t,this.selectedGroup.emit(t),this.channels_filter({group_id:t.id}),this.showChannelsSearchInput=!1}group_add(t){let e=0,n={id:e+1,name:"\u0413\u0440\u0443\u043f\u043f\u0430",deleted:!0,added:!0};this.groups.map(t=>{e=e{n.deleted=!1},50);const r=t.currentTarget;r.classList.add("animation"),setTimeout(()=>{n.added=!1,r.classList.remove("animation")},500);const i=this.groupsBlock.nativeElement;try{i.querySelector("span:last-child").scrollIntoView({behavior:"smooth",block:"start"})}catch(s){i.scrollTop=i.scrollHeight-i.clientHeight}this.group_selected=this.groups[this.groups.length-2]}group_remove_event(t){this.groupRemoveEvent.emit(t)}group_remove(t){t.deleted=!0,setTimeout(()=>{this.channels.map(e=>{e.group_id===t.id&&(e.group_id=null)}),this.groups.splice(this.groups.indexOf(t),1),this.group_selected=this.groups[0],this._spatialNavigation.reset()},500)}group_dragstart(t,e){e.dataTransfer.setData("text/plain",""),null!==t.id&&(this.group_moved=t,setTimeout(()=>{t.move=!0},10))}group_drop(t){if(this.channels_moved.length&&this.channels_moved[0].group_id!==t.id){let e=[];this.channels_moved.forEach(t=>{t.deleted=!0,e.push(t)}),setTimeout(()=>{e.forEach(e=>{e.deleted=!1,e.group_id=t.id,this.channelsFiltered.splice(this.channelsFiltered.indexOf(e),1)}),e=[]},500)}}group_dragend(){if(this.group_moved){const t=this.group_moved;t.move=!1,t.moved=!0,this.group_moved=null,setTimeout(()=>{t.moved=!1,this._spatialNavigation.reset()},500)}this.group_over=null}group_dragenter(t,e){if(e.preventDefault(),this.group_over=t,this.group_moved&&this.group_moved!=this.groups[t]&&this.groups.length!=t+1){const e=this.groups.indexOf(this.group_moved),n=this.group_moved;this.groups.splice(e,1),this.groups.splice(t+1,0,n)}}group_dragover(t){t.preventDefault(),t.dataTransfer.dropEffect="move"}click_grouping(t,e){if(t.shiftKey||this.shiftKey)if(this.channels_moved.length){let t=this.channels.indexOf(this.channels_moved[this.channels_moved.length-1]),n=this.channels.indexOf(e);if(t>n){const e=n;n=t,t=e}for(let e=t;e<=n;e++)this.channelsFiltered.indexOf(this.channels[e])>-1&&(this.add_channels_moved(this.channels[e]),this.channels[e].move=!0)}else this.add_channels_moved(e),e.move=!0;else if(t.ctrlKey||this.ctrlKey){const t=this.channels_moved.indexOf(e);t<0?(this.add_channels_moved(e),e.move=!0):(this.channels_moved.splice(t,1),e.move=!1)}}add_channels_moved(t){return-1===this.channels_moved.indexOf(t)&&(this.channels_moved.push(t),!0)}empty_trash_event(t){t.stopPropagation(),this.emptyTrashEvent.emit(null)}empty_trash(){const t=[];this.channels.forEach(e=>{null===e.group_id&&t.push(e)}),t.forEach(t=>{this.channels.splice(this.channels.indexOf(t),1)})}epg_day(t){this.epgDayChannel.emit(t)}}return t.\u0275fac=function(e){return new(e||t)(Xa(TS))},t.\u0275cmp=Se({type:t,selectors:[["iptv-editor"]],viewQuery:function(t,e){var n;1&t&&(Dd(SS,!0),Dd(OS,!0)),2&t&&(Ad(n=Fd())&&(e.channelsBlock=n.first),Ad(n=Fd())&&(e.groupsBlock=n.first))},inputs:{group_selected:["groupSelected","group_selected"],channels:"channels",groups:"groups"},outputs:{changeChannel:"changeChannel",removeChannel:"removeChannel",playChannel:"playChannel",epgDayChannel:"epgDayChannel",epgChannels:"epgChannels",changeGroup:"changeGroup",selectedGroup:"selectedGroup",groupRemoveEvent:"groupRemoveEvent",emptyTrashEvent:"emptyTrashEvent"},decls:27,vars:13,consts:[["id","IPTV_Editor"],["IPTVEditor",""],[1,"groups"],[1,"bg-blue","blueBGR",3,"dragover","dragenter"],["groupsBlock",""],["ngFor","",3,"ngForOf"],["tabindex","10","title","\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443",1,"add","bg-blue","blueBGR",3,"click","keydown.enter"],[1,"channels"],["title","\u0412\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043a\u0430\u043d\u0430\u043b\u043e\u0432, \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0438 \u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c.",1,"shift_key","ion",3,"ngClass","click"],["action","",1,"channels_search"],["type","search","name","channels_search_input","placeholder","\u0418\u043c\u044f \u043a\u0430\u043d\u0430\u043b\u0430","size","1","class","input-gray",3,"formControl","autofocus","keyup.enter","blur",4,"ngIf"],["class","channels_search_button","title","\u041f\u043e\u0438\u0441\u043a \u043a\u0430\u043d\u0430\u043b\u0430","tabindex","10",3,"click",4,"ngIf"],["title","\u041f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u043a\u0430\u043d\u0430\u043b, \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f",1,"ctrl_key","ion",3,"ngClass","click"],["channelsBlock",""],["tabindex","10","title","\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u043b",1,"add","bg-blue","blueBGR",3,"click","keydown.enter"],[1,"bg-orange","orangeBGR",3,"tabindex","ngClass","click","keyup.enter","dblclick","dragstart","drop","dragend","dragenter","dragover"],["class","remove","title","\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443",3,"click",4,"ngIf"],["class","Trash","title","\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u043a\u043e\u0440\u0437\u0438\u043d\u044b",3,"click",4,"ngIf"],["title","\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443",1,"remove",3,"click"],["title","\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u043a\u043e\u0440\u0437\u0438\u043d\u044b",1,"Trash",3,"click"],["type","search","name","channels_search_input","placeholder","\u0418\u043c\u044f \u043a\u0430\u043d\u0430\u043b\u0430","size","1",1,"input-gray",3,"formControl","autofocus","keyup.enter","blur"],["title","\u041f\u043e\u0438\u0441\u043a \u043a\u0430\u043d\u0430\u043b\u0430","tabindex","10",1,"channels_search_button",3,"click"],["draggable","true",3,"tabIndex","ngClass","dragstart","dragenter","dragover","dragend","drop","dblclick","click","keyup.enter","mouseover","mouseleave","focus","blur"],["target","_blank","href","#","title","Play","tabindex","-1",1,"play",3,"click"],[1,"ion"],["width","auto","height","30",3,"src","error"],["class","epg",3,"contextmenu",4,"ngIf"],["class","epg_progress",3,"ngStyle",4,"ngIf"],["title","\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443",1,"remove",3,"click"],[1,"epg",3,"contextmenu"],[1,"epg_progress",3,"ngStyle"]],template:function(t,e){1&t&&(el(0,"div",0,1),el(2,"div",2),el(3,"header",3),cl("dragover",(function(t){return e.group_dragover(t)}))("dragenter",(function(t){return e.group_dragenter(-1,t)})),ou(4,"\u0413\u0440\u0443\u043f\u043f\u044b"),nl(),el(5,"div",null,4),$a(7,DS,4,15,"ng-template",5),nl(),el(8,"p",6),cl("click",(function(t){return e.group_add(t)}))("keydown.enter",(function(t){return e.group_add(t)})),el(9,"b"),ou(10,"+"),nl(),nl(),nl(),el(11,"div",7),el(12,"header",3),cl("dragover",(function(t){return e.group_dragover(t)}))("dragenter",(function(){return e.channel_dragenter({url:"-1",name:"First",group_id:null,tvg_id:null,icon:null},null)})),el(13,"b",8),cl("click",(function(){return e.shiftKey=!e.shiftKey,e.ctrlKey=(!e.shiftKey||!e.ctrlKey)&&e.ctrlKey})),ou(14,"Shift"),nl(),el(15,"form",9),$a(16,PS,1,1,"input",10),$a(17,RS,2,0,"span",11),nl(),el(18,"b",12),cl("click",(function(){return e.ctrlKey=!e.ctrlKey,e.shiftKey=(!e.shiftKey||!e.ctrlKey)&&e.shiftKey})),ou(19,"Ctrl"),nl(),nl(),el(20,"ul",null,13),$a(22,NS,11,11,"ng-template",5),cd(23,"filterChannels"),nl(),el(24,"p",14),cl("click",(function(t){return e.channel_add(t)}))("keydown.enter",(function(t){return e.channel_add(t)})),el(25,"b"),ou(26,"+"),nl(),nl(),nl(),nl()),2&t&&(Qi(7),Ja("ngForOf",e.groups),Qi(6),Ja("ngClass",Yh(9,jS,e.shiftKey)),Qi(3),Ja("ngIf",e.showChannelsSearchInput),Qi(1),Ja("ngIf",!e.showChannelsSearchInput),Qi(1),Ja("ngClass",Yh(11,jS,e.ctrlKey)),Qi(4),Ja("ngForOf",dd(23,6,e.channels,e.channelsFiltered)))},styles:['#IPTV_Editor[_ngcontent-%COMP%]{text-align:center;white-space:nowrap}#IPTV_Editor[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:inline-block;vertical-align:top;max-width:350px}.groups[_ngcontent-%COMP%]{display:block;font-style:normal;max-height:100%}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{text-align:center;padding:5px 0;z-index:1}.groups[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{max-height:calc(100vh - 115px);max-width:40vw;overflow-x:hidden;overflow-y:auto}.groups[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;padding:3px 15px 3px 3px;margin:0;cursor:grab;border-bottom:none;text-align:left;height:29px;line-height:29px;transition:margin-bottom .5s,margin-top .5s,opacity .5s;overflow:hidden;z-index:2}.groups[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:focus, .groups[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{outline:none;background:linear-gradient(180deg,#ececec 0,#cbcbcb);color:#000;border-color:#707070}.groups[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:focus:after, .groups[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover:after{border-color:#d6d6d6}.groups[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:last-of-type{border-bottom:1px solid #df881f}.groups[_ngcontent-%COMP%] .removed[_ngcontent-%COMP%]{color:#ffc5c5}.channels[_ngcontent-%COMP%] .move[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{opacity:.3;margin-left:50px;border-color:transparent}.groups[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{margin-left:0;transform:translateX(-50px)}.groups[_ngcontent-%COMP%] .over[_ngcontent-%COMP%]{color:#fff5be;background:linear-gradient(180deg,#df881f 0,#ffd96e)}.groups[_ngcontent-%COMP%] .ch_in_group[_ngcontent-%COMP%]{transform:scale(.9);transition:all .4s ease;box-shadow:inset 0 0 5px 3px #ffd96e}.groups[_ngcontent-%COMP%] .Trash[_ngcontent-%COMP%]{font-family:Ionicons;font-style:normal;font-size:20px;vertical-align:bottom;float:right;margin-right:-10px;transition:transform .5s ease;transform-origin:3px 22px}.groups[_ngcontent-%COMP%] .Trash[_ngcontent-%COMP%]:hover{transform:rotate(-55deg)}.channels[_ngcontent-%COMP%] .add[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{font-size:29px;font-weight:700;line-height:29px;height:29px;padding:0 5px;margin:0 0 5px;display:block;cursor:pointer;text-align:center;overflow:hidden;z-index:2}.channels[_ngcontent-%COMP%] .add[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] .add[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{display:inline-block}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{border-left:none;min-width:100px;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;justify-content:center}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .channels_search_button[_ngcontent-%COMP%]{cursor:pointer}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .channels_search_button[_ngcontent-%COMP%]:after{display:inline-block;content:"\\f2f5";font-family:Ionicons;font-style:normal;font-size:15px;color:#0076b2;text-shadow:0 0 3px #afdff8;left:-6px;bottom:1px;position:relative}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .channels_search_button[_ngcontent-%COMP%]:hover:after{color:#34dbec;text-shadow:0 0 3px #003550}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .channels_search[_ngcontent-%COMP%]{width:100%}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .channels_search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;min-width:50px;padding:0 3px;vertical-align:bottom}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{float:right;margin:0 3px;border:1px solid #006192;padding:0 3px;line-height:16px;color:#0076b2;text-shadow:0 0 3px #afdff8;cursor:pointer}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .shift_key[_ngcontent-%COMP%]{float:left}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%] b.active[_ngcontent-%COMP%]{border-color:#34dbec;color:#34dbec;text-shadow:0 0 3px #003550}.channels[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .shift_key[_ngcontent-%COMP%]:before{content:"\\f10c"}.channels[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;max-height:calc(100vh - 115px);max-width:55vw;overflow-x:hidden;overflow-y:auto}.channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:0;min-height:30px;border:1px solid #d1d1d1;cursor:grab;background:#fff;position:relative;text-align:left;transition:margin-bottom .5s,margin-top .5s,opacity .5s;overflow:hidden;z-index:1;display:flex;line-height:17px}.channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:active, .groups[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:active{cursor:grabbing!important}.channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border:1px solid #d1d1d1}.channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(odd){background:linear-gradient(180deg,#fefefe 0,#e8e8e8)}.channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(2n+2){border-left-color:transparent;border-right-color:transparent;border-top:none;border-bottom:none}.channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:focus, .channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{outline:none}.channels[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:focus, .channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover, .groups[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{background:linear-gradient(180deg,#f6f8f9 0,#e5ebee 50%,#d7dee3 51%,#f5f7f9)}.channels[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{display:none;color:#454353;position:absolute;top:0;right:-1px;bottom:0;font:500 16px Ionicons,Arial;line-height:200%;width:15px;text-align:center;padding:0;cursor:pointer}.groups[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{background:transparent;border-bottom:1px solid transparent}.groups[_ngcontent-%COMP%] .bg-gray[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{background:linear-gradient(180deg,#ececec 0,#cbcbcb)}.channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:focus .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%]{display:inline-block;z-index:1}.channels[_ngcontent-%COMP%] li.added[_ngcontent-%COMP%]:focus .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%] .groups[_ngcontent-%COMP%] span.deleted[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li.added[_ngcontent-%COMP%]:hover .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li.added[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li.deleted[_ngcontent-%COMP%]:focus .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li.deleted[_ngcontent-%COMP%]:hover .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li.deleted[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li.move[_ngcontent-%COMP%]:focus .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li.move[_ngcontent-%COMP%]:hover .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .channels[_ngcontent-%COMP%] li.move[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] span.added[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] span.move[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%]{display:none}.channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{vertical-align:middle;min-height:35px;min-width:20px}.channels[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{overflow:hidden;padding-right:15px}.channels[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;transition:text-indent 1s linear}.channels[_ngcontent-%COMP%] .play[_ngcontent-%COMP%]{position:relative;display:inline-block;margin-right:5px;outline:none;text-align:center}.channels[_ngcontent-%COMP%] .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{display:none;position:absolute;left:0;top:0;bottom:0;right:0;cursor:pointer;margin:0;padding:0;font-size:18px;line-height:35px;color:#7021b9;text-align:center;box-shadow:inset 0 0 4px #134453;text-shadow:0 0 4px #fff;border-radius:0;background:rgba(154,170,175,.5)}@supports ((-webkit-backdrop-filter:blur()) or (backdrop-filter:blur())){.channels[_ngcontent-%COMP%] .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{background:none;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.channels[_ngcontent-%COMP%] .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%]:hover{color:#e201aa}.channels[_ngcontent-%COMP%] .play[_ngcontent-%COMP%] b[_ngcontent-%COMP%]:before{content:"\\f215"}.channels[_ngcontent-%COMP%] .deleted[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] .deleted[_ngcontent-%COMP%]{margin-bottom:-17px;margin-top:-18px;z-index:0;opacity:0}.channels[_ngcontent-%COMP%] .added[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] .added[_ngcontent-%COMP%]{z-index:0}.channels[_ngcontent-%COMP%] .moved[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] .moved[_ngcontent-%COMP%]{animation-name:bounceInRight;animation-duration:.3s;animation-iteration-count:1}.groups[_ngcontent-%COMP%] .moved[_ngcontent-%COMP%]{animation-name:bounceInLeft}.channels[_ngcontent-%COMP%] .add.animation[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .groups[_ngcontent-%COMP%] .add.animation[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{animation-name:addAnimationButton;animation-duration:.4s;animation-iteration-count:1}.channels[_ngcontent-%COMP%] .epg[_ngcontent-%COMP%]{font-size:11px;color:rgb(56 55 55);display:block;width:250px;position:absolute}.channels[_ngcontent-%COMP%] .epg_progress[_ngcontent-%COMP%]{width:0;height:1px;transition:width 1s;background:#05b205;position:absolute;bottom:0}@keyframes bounceInRight{0%,35%,55%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{transform:translateX(50px)}35%{transform:translateX(0)}55%{transform:translateX(20px)}75%{transform:translateX(0)}90%{transform:translateX(10px)}to{transform:translateX(0)}}@keyframes bounceInLeft{0%,35%,55%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{transform:translateX(-50px)}35%{transform:translateX(0)}55%{transform:translateX(-20px)}75%{transform:translateX(0)}90%{transform:translateX(-10px)}to{transform:translateX(0)}}@keyframes addAnimationButton{0%,50%,to{animation-timing-function:ease-out}0%{transform:rotate(0deg) scale(1)}50%{transform:rotate(90deg) scale(1.4)}to{transform:rotate(180deg) scale(1)}}.dnd-poly-drag-image[_ngcontent-%COMP%]{-webkit-mask-image:linear-gradient(transparent,rgba(0,0,0,.8) 50%,transparent)!important;mask-image:linear-gradient(transparent,rgba(0,0,0,.8) 50%,transparent)!important;position:fixed!important}']}),t})(),US=(()=>{class t{transform(t,e){return t.filter(t=>t.group_id==e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Me({name:"filterGroup",type:t,pure:!1}),t})(),VS=(()=>{class t{transform(t,e){return t.filter(t=>e.indexOf(t)>-1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Me({name:"filterChannels",type:t,pure:!1}),t})(),HS=(()=>{class t{constructor(t){this.host=t}ngAfterViewInit(){this.host.nativeElement.focus()}}return t.\u0275fac=function(e){return new(e||t)(Xa(fc))},t.\u0275dir=Ie({type:t,selectors:[["","autofocus",""]]}),t})(),GS=(()=>{class t{}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)},providers:[TS],imports:[[Ev,RT,PT]]}),t})();Oe(BS,[Nm,jm,Um,Hm,Qm,Zm,Km,Wm,$m,Ym,Xm,rT,_C,TC,UE,aC,dC,NE,bC,CC,cC,WE,$E,yT,TT,OT,xT,bT,ET,oT,lT,gT,cT,dT,nT,JC,$C,BS,HS],[iv,lv,sv,fv,wv,mv,vv,av,yv,uv,hv,dv,pv,US,VS]);let qS=(()=>{class t{constructor(t,e){this._viewContainer=t,this._componentFactoryResolver=e,QS.DCinstance=this}ngOnInit(){}insertComponent(t){let e=this._componentFactoryResolver.resolveComponentFactory(t),n=this._viewContainer.createComponent(e);return n.changeDetectorRef.detectChanges(),n}}return t.\u0275fac=function(e){return new(e||t)(Xa(Bc),Xa(dc))},t.\u0275cmp=Se({type:t,selectors:[["dynamic-component"]],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();const zS=["closeButton"];function KS(t,e){if(1&t){const t=al();el(0,"button",4,5),cl("click",(function(){return wn(t),gl().close()})),nl()}}const WS=["*",[["","dialog-footer",""]]],$S=function(t,e){return{show_animation:t,"full-height":e}},YS=["*","[dialog-footer]"];let XS=(()=>{class t{constructor(){this.title="\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",this.modal=!1,this.focusOnCloseButton=!1,this.fullHeight=!1,this.onClose=new yd,this.closeButton=null,this.margin=0,this.show_animation=!0}ngOnInit(){this.margin=3*t.counter,!this.fullHeight&&t.counter++}ngOnDestroy(){!this.fullHeight&&t.counter--,this.onClose.complete(),this.onClose.unsubscribe()}ngAfterViewInit(){this.focusOnCloseButton&&this.closeButton&&this.closeButton.nativeElement&&this.closeButton.nativeElement.focus(),setTimeout(()=>{this.show_animation=!1},100)}close(){this.onClose.emit(null)}bgClose(t){this.modal||t.target!=t.currentTarget||this.close()}}return t.counter=0,t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Se({type:t,selectors:[["dialog-window"]],viewQuery:function(t,e){var n;1&t&&Pd(zS,!0),2&t&&Ad(n=Fd())&&(e.closeButton=n.first)},inputs:{title:"title",modal:"modal",focusOnCloseButton:"focusOnCloseButton",fullHeight:["full-height","fullHeight"]},outputs:{onClose:"close"},ngContentSelectors:YS,decls:9,vars:10,consts:[[1,"dialog-bg","show_animation",3,"ngClass","mousedown"],[1,"dialog",3,"click"],[1,"bg-orange"],["tabindex","1","class","ion","title","\u0417\u0430\u043a\u0440\u044b\u0442\u044c!",3,"click",4,"ngIf"],["tabindex","1","title","\u0417\u0430\u043a\u0440\u044b\u0442\u044c!",1,"ion",3,"click"],["closeButton",""]],template:function(t,e){1&t&&(vl(WS),el(0,"div",0),cl("mousedown",(function(t){return e.bgClose(t)})),el(1,"div",1),cl("click",(function(t){return e.bgClose(t)})),el(2,"header",2),ou(3),$a(4,KS,2,0,"button",3),nl(),el(5,"section"),_l(6),nl(),el(7,"footer",2),_l(8,1),nl(),nl(),nl()),2&t&&(Ja("ngClass",Xh(7,$S,e.show_animation,e.fullHeight)),Qi(1),Gl("padding-top",e.margin+"%")("padding-left",e.margin+"%"),Qi(2),lu("",e.title," "),Qi(1),Ja("ngIf",!e.modal))},directives:[Nm,Hm],styles:['.dialog[_ngcontent-%COMP%]{display:inline-block;max-width:100%;max-height:100%;height:100%;text-align:initial;box-sizing:border-box;transition:all .4s;transform:translateY(0)}.show_animation[_ngcontent-%COMP%] .dialog[_ngcontent-%COMP%]{transform:translateY(-20px)}.dialog[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{background:#fff;color:#031d47;font-style:none;padding:5px;border-right:1px solid #df881f;border-left:1px solid #df881f;overflow:auto;max-height:calc(100% - 67px)}.dialog-bg[_ngcontent-%COMP%]{padding:5vh 5vw 0;position:fixed;text-align:center;top:0;left:0;right:0;bottom:0;background:linear-gradient(180deg,rgba(0,0,0,.86) 0,rgba(0,0,0,.28));transition:all .4s;opacity:1;z-index:10}.dialog-bg.full-height[_ngcontent-%COMP%], .dialog-bg.full-height[_ngcontent-%COMP%] .dialog[_ngcontent-%COMP%]{padding:0!important}.dialog-bg.show_animation[_ngcontent-%COMP%]{opacity:0}.dialog[_ngcontent-%COMP%] > header[_ngcontent-%COMP%]{padding:1px 18px 1px 4px;text-align:center;font-size:18px;font-style:none;line-height:20px;overflow:auto}.dialog[_ngcontent-%COMP%] > header[_ngcontent-%COMP%], .dialog[_ngcontent-%COMP%] > header[_ngcontent-%COMP%]:after{border-radius:0}.dialog[_ngcontent-%COMP%] > header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;background:none;border:0;padding:0;position:absolute;top:-1px;right:1px;outline:none}.dialog[_ngcontent-%COMP%] > header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:before{content:"\\f405";padding:0;color:#d37070;font-size:20px;font-weight:bolder}.dialog[_ngcontent-%COMP%] > header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus:before, .dialog[_ngcontent-%COMP%] > header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:before{content:"\\f406";font-weight:400;color:#ec0000}.dialog[_ngcontent-%COMP%] > footer[_ngcontent-%COMP%]{min-height:2px;padding:4px;text-align:center}.dialog[_ngcontent-%COMP%] > footer[_ngcontent-%COMP%], .dialog[_ngcontent-%COMP%] > footer[_ngcontent-%COMP%]:after{border-radius:0}.dialog[_ngcontent-%COMP%] .handler-buttons[_ngcontent-%COMP%]{text-align:right}@media only screen and (max-width:480px){.dialog-bg[_ngcontent-%COMP%]{padding:2vh 2vw 0}}']}),t})(),ZS=(()=>{class t{constructor(t){this._sanitazer=t,this.title="\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435!",this._content="",this.destroyEmitter=new yd}ngOnInit(){}ngOnDestroy(){this.destroyEmitter.complete()}get content(){return this._content.toString()}set content(t){this._content=this._sanitazer.bypassSecurityTrustHtml(t)}close(){this.destroyEmitter.emit(null)}}return t.\u0275fac=function(e){return new(e||t)(Xa(AE))},t.\u0275cmp=Se({type:t,selectors:[["dynamic-empty"]],decls:2,vars:2,consts:[[3,"title","close"],[3,"innerHtml"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),rl(1,"div",1),nl()),2&t&&(Ja("title",e.title),Qi(1),Ja("innerHtml",e._content,Oi))},directives:[XS],encapsulation:2}),t})(),QS=(()=>{class t{constructor(){this.components=[],this._focusElements=[]}static get DCinstance(){return t._DCinstance}static set DCinstance(e){e instanceof qS&&(t._DCinstance=e)}attach(e){this._focusElements.push(document.activeElement);let n=t._DCinstance.insertComponent(e);return this.components.push(n),n.instance.destroyEmitter.subscribe(()=>{if(this.components.splice(this.components.indexOf(n),1),n.destroy(),this._focusElements.length){const t=this._focusElements.pop();t&&"focus"in t&&setTimeout(()=>{t.focus()},200)}else document.body.focus()}),n.instance}attachHtml(t="\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435!"){const e=this.attach(ZS);return e.content=t,e}destroyAll(){this.components.map(t=>{t&&"destroy"in t&&t.destroy()}),this.components=[]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})();const JS=["buttonOk"];let tO=(()=>{class t{constructor(){this.title="\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435!",this.message="\u0412\u0430\u0436\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.",this.destroyEmitter=new yd}ngOnInit(){}ngOnDestroy(){this.destroyEmitter.complete()}ngAfterViewInit(){this.buttonOk.nativeElement.focus()}close(){this.destroyEmitter.emit(null)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Se({type:t,selectors:[["alert-dialog"]],viewQuery:function(t,e){var n;1&t&&Dd(JS,!0),2&t&&Ad(n=Fd())&&(e.buttonOk=n.first)},decls:6,vars:2,consts:[[3,"title","close"],[3,"innerText"],["dialog-footer","",1,"handler-buttons"],["tabindex","2",1,"blue-button",3,"click"],["buttonOk",""]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),rl(1,"span",1),el(2,"div",2),el(3,"button",3,4),cl("click",(function(){return e.close()})),ou(5,"OK"),nl(),nl(),nl()),2&t&&(Ja("title",e.title),Qi(1),Ja("innerText",e.message))},directives:[XS],encapsulation:2}),t})();const eO=["buttonOk"];let nO=(()=>{class t{constructor(){this.title="\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435!",this.message="\u0412\u0430\u0436\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.",this.onOkEmitter=new yd,this.destroyEmitter=new yd}ngOnInit(){}ngOnDestroy(){this.destroyEmitter.complete(),this.onOkEmitter.complete()}ngAfterViewInit(){this.buttonOk.nativeElement.focus()}close(){this.destroyEmitter.emit(null)}onOk(){this.onOkEmitter.emit(!0),this.close()}onCancel(){this.onOkEmitter.emit(!1),this.close()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Se({type:t,selectors:[["confirm-dialog"]],viewQuery:function(t,e){var n;1&t&&Dd(eO,!0),2&t&&Ad(n=Fd())&&(e.buttonOk=n.first)},decls:9,vars:2,consts:[["modal","true",3,"title","close"],[3,"innerText"],["dialog-footer","",1,"handler-buttons"],["tabindex","3",1,"blue-button",3,"click"],["buttonOk",""],["tabindex","2","autofocus","",1,"blue-button",3,"click"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.onCancel()})),rl(1,"span",1),el(2,"div",2),el(3,"button",3,4),cl("click",(function(){return e.onOk()})),ou(5,"OK"),nl(),ou(6,"\xa0 "),el(7,"button",5),cl("click",(function(){return e.onCancel()})),ou(8,"\u041e\u0442\u043c\u0435\u043d\u0430"),nl(),nl(),nl()),2&t&&(Ja("title",e.title),Qi(1),Ja("innerText",e.message))},directives:[XS],encapsulation:2}),t})();const rO=["inputElement"];let iO=(()=>{class t{constructor(){this.title="\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435!",this.message="\u0412\u0430\u0436\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.",this.input="",this.onOkEmitter=new yd,this.destroyEmitter=new yd}ngOnInit(){}ngOnDestroy(){this.destroyEmitter.complete(),this.onOkEmitter.complete()}ngAfterViewInit(){const t=this.inputElement.nativeElement;setTimeout(()=>{t.focus()},100)}close(){this.destroyEmitter.emit(null)}onOk(){this.onOkEmitter.emit(this.input)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Se({type:t,selectors:[["prompt-dialog"]],viewQuery:function(t,e){var n;1&t&&Dd(rO,!0),2&t&&Ad(n=Fd())&&(e.inputElement=n.first)},decls:12,vars:3,consts:[["modal","true",3,"title","close"],[3,"innerText"],["name","input","placeholder","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435","autofocus","","onfocus","this.select()",1,"input-gray",3,"ngModel","ngModelChange"],["inputElement",""],["dialog-footer","",1,"handler-buttons"],["tabindex","3",1,"blue-button",3,"click"],["tabindex","2",1,"blue-button",3,"click"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),rl(1,"p",1),el(2,"form"),el(3,"textarea",2,3),cl("ngModelChange",(function(t){return e.input=t})),ou(5," "),nl(),nl(),el(6,"div",4),el(7,"button",5),cl("click",(function(){return e.onOk()})),ou(8,"OK"),nl(),ou(9,"\xa0 "),el(10,"button",6),cl("click",(function(){return e.close()})),ou(11,"\u041e\u0442\u043c\u0435\u043d\u0430"),nl(),nl(),nl()),2&t&&(Ja("title",e.title),Qi(1),Ja("innerText",e.message),Qi(2),Ja("ngModel",e.input))},directives:[XS,rT,$E,$C,UE,WE,nT],encapsulation:2}),t})(),sO=(()=>{class t{constructor(t){this._dynComponent=t}alert(t="\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435"){this._dynComponent.attach(tO).message=t}confirm(t="\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435",e){let n=this._dynComponent.attach(nO);n.message=t,n.onOkEmitter.subscribe(t=>{e(t)})}prompt(t="\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435",e,n){let r=this._dynComponent.attach(iO);r.message=t,r.input=e,r.onOkEmitter.subscribe(t=>{n(t)&&r.close()})}}return t.\u0275fac=function(e){return new(e||t)(re(QS))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),oO=(()=>{class t{}return t.\u0275mod=De({type:t}),t.\u0275inj=yt({factory:function(e){return new(e||t)},providers:[QS,sO],imports:[[Ev,PT]]}),t})();function aO(t,e){return new _(e?n=>e.schedule(lO,0,{error:t,subscriber:n}):e=>e.error(t))}function lO({error:t,subscriber:e}){e.error(t)}let uO=(()=>{class t{constructor(t){this.http=t,this.URL="ajax.php",this.count=0,this.redirectFlag=!1}send(t,e=!0,n=""){e&&(this.ajaxLoader||(this.ajaxLoader=document.getElementById("ajaxActivity")),this.count<=0&&(this.ajaxLoader.className="show"),this.count++);const r=new URLSearchParams;for(let s in t)r.set(s,t[s].toString());const i=(new LT).set("Content-Type","application/x-www-form-urlencoded");return this.http.post(n||this.URL,r.toString(),{headers:i,responseType:"json"}).pipe(N(t=>{if(e&&(this.count--,this.count<=0&&(this.ajaxLoader.className="")),1==t.op)return t.data;if("string"==typeof t.message&&e)throw alert(t.message),"NO Message";if(e)throw alert("\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439!"),"NO Message"}),Yv(t=>("NO Message"==t||e&&(this.count--,this.count<=0&&(this.ajaxLoader.className=""),alert("\u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430")),aO(t))))}}return t.\u0275fac=function(e){return new(e||t)(re(YT))},t.\u0275prov=vt({token:t,factory:t.\u0275fac}),t})(),cO=(()=>{class t{constructor(){}save(t,e){const n=JSON.stringify(t);return!!("string"==typeof n&&n.length>0&&e)&&(localStorage.setItem(e,n),!0)}get(t){const e=localStorage.getItem(t);return"string"==typeof e&&e.length&&JSON.parse(e)||!1}remove(t){localStorage.removeItem(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),hO=(()=>{class t{constructor(){this.title="\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 ",this.name="",this.url="",this.tvg_id="",this.icon="dummy_tv.jpg",this._channel={name:"\u0418\u043c\u044f",url:"http://",group_id:1,tvg_id:null,icon:null},this.onSubmit=new yd,this.destroyEmitter=new yd}ngOnInit(){}ngOnDestroy(){this.destroyEmitter.complete()}set channel(t){this._channel=t,this.name=t.name,this.url=t.url,this.tvg_id=t.tvg_id,this.icon=t.icon}get channel(){return this._channel}submit(){this.channel.name=this.name,this.channel.url=this.url,this.channel.tvg_id=this.tvg_id,this.channel.icon=this.icon,this.onSubmit.emit(this.channel),this.close()}close(){this.destroyEmitter.emit(null)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Se({type:t,selectors:[["iptv-channel"]],decls:22,vars:6,consts:[["focusOnCloseButton","true",3,"title","close"],["ngNativeValidate","","id","channelChange",2,"text-align","right","font-style","italic","color","#41687e","background","linear-gradient(to bottom, rgb(254,254,254) 0%, rgb(254,254,254) 50%, rgb(232,232,232) 100%)","margin","-5px","padding","5px",3,"ngSubmit"],["alt","ICON",2,"min-width","50px","min-height","50px","max-width","300px","max-height","300px","display","block","margin","0px auto 5px auto",3,"src","error"],["type","text","name","name","required","",1,"input-gray",2,"padding","3px",3,"ngModel","ngModelChange"],["type","text","name","index","required","",1,"input-gray",2,"margin","5px 0","padding","3px",3,"ngModel","ngModelChange"],["type","text","name","tvg_id",1,"input-gray",2,"margin","5px 0","padding","3px",3,"ngModel","ngModelChange"],["type","text","name","icon",1,"input-gray",2,"margin","5px 0","padding","3px",3,"ngModel","ngModelChange"],["dialog-footer","",2,"text-align","center"],["type","submit","form","channelChange",1,"blue-button"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),el(1,"form",1),cl("ngSubmit",(function(){return e.submit()})),el(2,"img",2),cl("error",(function(t){return t.target.src="/img/tvicons/error"})),nl(),el(3,"label"),ou(4,"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435: "),el(5,"input",3),cl("ngModelChange",(function(t){return e.name=t})),nl(),nl(),rl(6,"br"),el(7,"label"),ou(8,"URL: "),el(9,"input",4),cl("ngModelChange",(function(t){return e.url=t})),nl(),nl(),rl(10,"br"),el(11,"label"),ou(12,"EPG-id: "),el(13,"input",5),cl("ngModelChange",(function(t){return e.tvg_id=t})),nl(),nl(),rl(14,"br"),el(15,"label"),ou(16,"Logo: "),el(17,"input",6),cl("ngModelChange",(function(t){return e.icon=t})),nl(),nl(),rl(18,"br"),nl(),el(19,"div",7),el(20,"button",8),ou(21,"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c"),nl(),nl(),nl()),2&t&&(Ja("title",e.title),Qi(2),Ja("src",0===e.icon.search("http")?e.icon:e.icon?"/img/tvicons/"+e.icon:"/img/tvicons/icon",xi),Qi(3),Ja("ngModel",e.name),Qi(4),Ja("ngModel",e.url),Qi(4),Ja("ngModel",e.tvg_id),Qi(4),Ja("ngModel",e.icon))},directives:[XS,$E,$C,UE,yT,WE,nT],encapsulation:2}),t})();const dO=["applyButton"];function fO(t,e){if(1&t){const t=al();el(0,"button",8),cl("click",(function(){return wn(t),gl().join()})),ou(1,"\u041e\u0431\u044a\u0435\u0434\u0435\u043d\u0438\u0442\u044c"),nl()}}let pO=(()=>{class t{constructor(t){this._dialog=t,this.channelsBundle=null,this.title="\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440",this.playlist="",this.dragEntered=!1,this.destroyEmitter=new yd(null),this.showJoinButton=!0}ngOnInit(){document.addEventListener("dragenter",this.dragenter),document.addEventListener("drop",this.drop_ondocument),document.addEventListener("dragover",this.dragover),document.addEventListener("dragleave",this.dragleave)}ngAfterViewInit(){this.applyButton.nativeElement.focus()}ngOnDestroy(){document.removeEventListener("dragenter",this.dragenter),document.removeEventListener("drop",this.drop_ondocument),document.removeEventListener("dragover",this.dragover),document.removeEventListener("dragleave",this.dragleave),this.destroyEmitter.complete()}init(){this.sort(),this.playlist="#EXTM3U",this.playlist+=this.channelsBundle.EXTM3U_prop?this.channelsBundle.EXTM3U_prop:" ",this.playlist+="\n",this.channelsBundle.channels.forEach(t=>{this.channelsBundle.groups.find(e=>{if(t.group_id==e.id&&null!==e.id)return this.playlist+="#EXTINF:-1 ",this.playlist+=this.channelsBundle.EXTGRP?"":` group-title="${e.name}" `,this.playlist+=t.tvg_id?` tvg-id="${t.tvg_id}" `:"",this.playlist+=t.icon&&0===t.icon.indexOf("http")?` tvg-logo="${t.icon}" `:"",this.playlist+=t.additionalAttributes?" "+t.additionalAttributes:"",this.playlist+=","+t.name,this.playlist+=this.channelsBundle.EXTGRP?"\n#EXTGRP:"+e.name:"",this.playlist+="\n"+t.url.trim()+"\n",!0})}),this.playlist+="#EXT-X-ENDLIST"}sort(){}close(){this._dialog.confirm("\u0417\u0430\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440?",t=>{t&&this.destroyEmitter.emit(null)})}parse_playlist_string(){let t=[],e=[],n=!0,r="";const i=this.playlist.match(/^\s*\#EXTINF:[\s\S]*?^\s*[^#\s][^\r\n]+$/gim);if(null!=i&&i.length>0){const s=[];i.forEach(e=>{let r=e.match(/,([^\r\n]+)$/im),i="",o="",a="",l=e.match(/#EXTGRP:([^\r\n]+)/i),u=e.match(/\n([^\r\n]+$)/i);r=null!=r?r[1]:"\u0411\u0435\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f",l=null!=l?l[1]:"\u041a\u0430\u043d\u0430\u043b\u044b",u=null!=u?u[1].trim():"";let c=RegExp(/\s([\S]+)=['"]([^'"\n]+)['"]/gi),h=[];for(;null!==(h=c.exec(e));)"tvg-id"==h[1]&&h[2]?i=h[2]:"tvg-logo"==h[1]&&h[2]?o=h[2]:"group-title"==h[1]&&h[2]?(l=h[2],n=!1):a+=h[0];let d=s.indexOf(l);-1==d&&(s.push(l),d=s.length-1),t.push({name:r,tvg_id:i,icon:o,url:u,group_id:d,additionalAttributes:a})}),s.forEach((t,n)=>{e.push({name:t,id:n})}),e.push({id:null,name:"\u041a\u043e\u0440\u0437\u0438\u043d\u0430"});const o=this.playlist.match(/#EXTM3U([^\r\n]+)/im);return r=null!=o?o[1]:"",{channels:t,groups:e,EXTGRP:n,EXTM3U_prop:r}}return this._dialog.alert("\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430!"),!1}save(){const t=this.parse_playlist_string();t&&(this.channelsBundle.channels=t.channels,this.channelsBundle.groups=t.groups,this.channelsBundle.EXTM3U_prop=t.EXTM3U_prop,this.channelsBundle.EXTGRP=t.EXTGRP,this.channelsBundle.groupSelected=this.channelsBundle.groups[0],this.sort(),this.destroyEmitter.emit(null))}join(){const t=this.parse_playlist_string();let e=0;this.channelsBundle.groups.forEach(t=>{e=Math.max(e,Math.floor(t.id))}),t&&(t.channels.forEach(n=>{if(!this.channelsBundle.channels.find(t=>{if(t.url.trim()===n.url.trim())return!0})){const r=t.groups[n.group_id].name,i=this.channelsBundle.groups.find(t=>{if(r.trim()===t.name.trim())return!0});i?n.group_id=i.id:(e++,this.channelsBundle.groups.splice(this.channelsBundle.groups.length-1,0,{name:r,id:e}),n.group_id=e),this.channelsBundle.channels.push(n)}}),this.channelsBundle.groupSelected=this.channelsBundle.groups[0],this.sort(),this.channelsBundle.groups.forEach(t=>{t.epg=!1}),this.destroyEmitter.emit(null))}drop(t){if(t.dataTransfer&&t.dataTransfer.files.length){t.preventDefault();const e=t.dataTransfer.files[0],n=new FileReader,r=document.getElementById("ajaxActivity");r.classList.add("show"),n.addEventListener("load",t=>{this.playlist=n.result.toString()}),n.addEventListener("error",()=>{this._dialog.alert("\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c.")}),n.addEventListener("loadend",t=>{r.classList.remove("show")}),n.readAsText(e)}}dragenter(t){t.preventDefault(),!this.dragEntered&&t.dataTransfer&&t.dataTransfer.types.indexOf("Files")>-1&&(this.dragEntered=!0,document.getElementById("TextEditorContainer").classList.add("drop-hover"))}drop_ondocument(t){this.dragEntered&&(t.preventDefault(),this.dragEntered=!1,document.getElementById("TextEditorContainer").classList.remove("drop-hover"))}dragleave(t){0==t.clientX&&0==t.clientY&&(this.dragEntered=!1,document.getElementById("TextEditorContainer").classList.remove("drop-hover"))}dragover(t){t.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(Xa(sO))},t.\u0275cmp=Se({type:t,selectors:[["text-editor"]],viewQuery:function(t,e){var n;1&t&&Dd(dO,!0),2&t&&Ad(n=Fd())&&(e.applyButton=n.first)},decls:14,vars:4,consts:[[3,"title","full-height","close"],["tabindex","1","id","TextEditorContainer"],["tabindex","-1",3,"ngModel","ngModelChange"],[1,"drop-background",3,"drop","dragover"],["dialog-footer","",1,"handler-buttons"],["tabindex","1","title","\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442",1,"blue-button",3,"click"],["applyButton",""],["tabindex","1","class","blue-button","title","\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u044b \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430",3,"click",4,"ngIf"],["tabindex","1","title","\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u044b \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430",1,"blue-button",3,"click"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),el(1,"div",1),el(2,"textarea",2),cl("ngModelChange",(function(t){return e.playlist=t})),nl(),el(3,"div",3),cl("drop",(function(t){return e.drop(t)}))("dragover",(function(t){return e.dragover(t)})),el(4,"span"),ou(5,"\uf102"),nl(),rl(6,"br"),ou(7," \u0411\u0440\u043e\u0441\u0430\u0439"),nl(),nl(),el(8,"div",4),el(9,"button",5,6),cl("click",(function(){return e.save()})),ou(11,"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c"),nl(),ou(12," \xa0 "),$a(13,fO,2,0,"button",7),nl(),nl()),2&t&&(Ja("title",e.title)("full-height",!0),Qi(2),Ja("ngModel",e.playlist),Qi(11),Ja("ngIf",e.showJoinButton))},directives:[XS,UE,WE,nT,Hm],styles:['#TextEditorContainer[_ngcontent-%COMP%] {\n position: relative;\n height: calc(100vh - 68px);\n width: calc(100vw - 20vw);\n display: table;\n }\n #TextEditorContainer.drop-hover[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] {\n display: none;\n }\n .drop-background[_ngcontent-%COMP%]{\n background: white;\n color: #296fac;\n font-size: calc(6vw + 6vh + 2vmin);\n text-align:center;\n line-height: 70%;\n vertical-align: middle;\n border: 3px dashed #ccc;\n display: none;\n height: 100%;\n width: 100%;\n }\n .drop-background[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n font-family: "Ionicons";\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n }\n .drop-hover[_ngcontent-%COMP%] .drop-background[_ngcontent-%COMP%] {\n display: table-cell;\n }\n textarea[_ngcontent-%COMP%] {\n white-space: pre;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n position: absolute; \n }\n\n @media (max-width: 700px) {\n #TextEditorContainer[_ngcontent-%COMP%] {\n width: calc(100vw - 20px);\n }\n }']}),t})();const gO=["inputElement"],mO=["urlList"];function vO(t,e){if(1&t){const t=al();el(0,"li",10),cl("mousedown",(function(){wn(t);const n=e.$implicit;return gl().url=n})),el(1,"span"),ou(2),nl(),el(3,"b",11),cl("mousedown",(function(n){wn(t);const r=e.$implicit,i=gl();return n.stopPropagation(),i.url_remove(r)})),ou(4,"\uf12a"),nl(),nl()}if(2&t){const t=e.$implicit;Qi(2),au(t)}}let yO=(()=>{class t{constructor(t,e){this._http=t,this._dialog=e,this.URL_LIST_STORAGE="loaded_url_list",this.title="\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430",this.url="",this.url_list=[],this.urlListHidden=!0,this.hideUrlList=!0,this.inputElement=null,this.urlList=null,this.disableUrl=!1,this.loadedPlaylist=new yd,this.destroyEmitter=new yd;let n=JSON.parse(localStorage.getItem(this.URL_LIST_STORAGE));n instanceof Array&&n.length&&(this.url_list=n)}ngOnInit(){}ngAfterViewInit(){var t;document.body.appendChild(null===(t=this.urlList)||void 0===t?void 0:t.nativeElement),window.addEventListener("resize",()=>{this.window_resize()})}ngOnDestroy(){var t,e;window.removeEventListener("resize",()=>{this.window_resize()}),null===(e=null===(t=this.urlList)||void 0===t?void 0:t.nativeElement)||void 0===e||e.remove(),this.destroyEmitter.complete(),this.loadedPlaylist.complete()}close(){this.destroyEmitter.emit(null)}url_focus(){var t,e;!this.hideUrlList&&(this.hideUrlList=!0),(null===(t=this.urlList)||void 0===t?void 0:t.nativeElement)&&(null===(e=this.url_list)||void 0===e?void 0:e.length)>0&&(this.url_list_set_position(),this.urlListHidden=!1)}url_blur(t){this.hideUrlList?this.urlListHidden=!0:this.hideUrlList=!0}window_resize(){setTimeout(()=>{var t;const e=null===(t=this.urlList)||void 0===t?void 0:t.nativeElement;e&&"none"!==e.style.display&&this.url_list_set_position()},500)}url_list_set_position(){var t;const e=null===(t=this.urlList)||void 0===t?void 0:t.nativeElement,n=this.inputElement.nativeElement.getBoundingClientRect();e.style.top=n.bottom+5+"px",e.style.left=n.left+"px";const r=Math.max(document.documentElement.clientWidth-n.left-13,150)+"px",i=Math.max(document.documentElement.clientHeight-n.top-n.height-10,100)+"px";e.getElementsByTagName("ul")[0].style.maxWidth=r,e.getElementsByTagName("ul")[0].style.maxHeight=i}url_remove(t){var e;this.hideUrlList=!1;const n=this.url_list.indexOf(t);n>-1&&(this.url_list.splice(n,1),localStorage.setItem(this.URL_LIST_STORAGE,JSON.stringify(this.url_list))),(null===(e=this.url_list)||void 0===e?void 0:e.length)<1&&(this.urlListHidden=!0)}load_url(){this.url=this.url.trim(),this.disableUrl=!0;let t=document.getElementById("ajaxActivity");t=t||{className:""},t.className="show",this._http.get(this.url,{responseType:"text"}).pipe(N(e=>(t.className="",e)),Yv(e=>(t.className="",this._dialog.alert("\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442, \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c!"),this.disableUrl=!1,aO(e)))).subscribe(t=>{-1===this.url_list.indexOf(this.url)&&(this.url_list.unshift(this.url),this.url_list=this.url_list.slice(0,50),localStorage.setItem(this.URL_LIST_STORAGE,JSON.stringify(this.url_list))),this.loadedPlaylist.emit(t),this.close()})}load_file(t){t.preventDefault();const e=t.target,n=document.getElementById("ajaxActivity");if(n.classList.add("show"),e.files&&e.files.length){const t=e.files[0],r=new FileReader;r.addEventListener("load",t=>{this.loadedPlaylist.emit(r.result.toString()),this.close()}),r.addEventListener("error",()=>{this._dialog.alert("\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c.")}),r.addEventListener("loadend",t=>{n.classList.remove("show")}),r.readAsText(t)}else this._dialog.alert("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b!"),n.classList.remove("show");e.value=""}}return t.\u0275fac=function(e){return new(e||t)(Xa(YT),Xa(sO))},t.\u0275cmp=Se({type:t,selectors:[["upload-form"]],viewQuery:function(t,e){var n;1&t&&(Dd(gO,!0),Dd(mO,!0)),2&t&&(Ad(n=Fd())&&(e.inputElement=n.first),Ad(n=Fd())&&(e.urlList=n.first))},decls:19,vars:6,consts:[["focusOnCloseButton","true",3,"title","modal","close"],["ngNativeValidate","",1,"load-url",3,"ngSubmit"],["tabindex","1","required","","autocomplete","off","type","url","name","url","placeholder","\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 http://","size","30",1,"input-gray",3,"ngModel","ngModelChange","focus","blur"],["inputElement",""],["tabindex","1","type","submit",1,"blue-button",3,"disabled"],["id","url_list",3,"hidden"],["urlList",""],[3,"mousedown",4,"ngFor","ngForOf"],[1,"load-file"],["tabindex","1","type","file","name","file","accept",".m3u, .m3u8",1,"input-gray",3,"input"],[3,"mousedown"],["title","\u0423\u0434\u0430\u043b\u0438\u0442\u044c",1,"remove","ionic",3,"mousedown"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),el(1,"form",1),cl("ngSubmit",(function(){return e.load_url()})),el(2,"fieldset"),el(3,"legend"),ou(4,"\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435\u0020\u0441\u0432\u043e\u0439\u0020\u0442\u043e\u043a\u0435\u043d\u0020\u0432\u0020\u043a\u043e\u043d\u0435\u0446\u0020\u0441\u0441\u044b\u043b\u043a\u0438\u003a"),nl(),el(5,"input",2,3),cl("ngModelChange",(function(t){return e.url=t}))("focus",(function(t){return t.target.select(),e.url_focus()}))("blur",(function(t){return e.url_blur(t)})),nl(),ou(7,"\xa0 "),el(8,"button",4),ou(9,"OK"),nl(),el(10,"div",5,6),el(12,"ul"),$a(13,vO,5,1,"li",7),nl(),nl(),nl(),nl(),el(14,"form",8),el(15,"fieldset"),el(16,"legend"),ou(17,"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b:"),nl(),el(18,"input",9),cl("input",(function(t){return e.load_file(t)})),nl(),nl(),nl(),nl()),2&t&&(Ja("title",e.title)("modal",!1),Qi(5),Ja("ngModel",e.url),Qi(3),Ja("disabled",e.disableUrl),Qi(2),Ja("hidden",e.urlListHidden),Qi(3),Ja("ngForOf",e.url_list))},directives:[XS,$E,$C,UE,yT,WE,nT,Um,rT],styles:['fieldset[_ngcontent-%COMP%]{padding:5px 5px 10px;border:1px dashed #40286b}legend[_ngcontent-%COMP%]{color:#175858;padding:2px 5px}input[_ngcontent-%COMP%]{max-width:80%}input[type=file][_ngcontent-%COMP%]{color:#050e3f;font-style:none;font-family:Times new Roman;cursor:pointer}#url_list[_ngcontent-%COMP%]{position:fixed;border-radius:4px;border:1px solid #fff;background:#f2f2f2;box-shadow:2px 2px 6px rgb(0 0 0/55%);z-index:10}#url_list[_ngcontent-%COMP%]:before{content:"";border:7px solid transparent;border-bottom-color:#fff;position:absolute;top:-14px;left:20px}#url_list[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;overflow-y:auto}#url_list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:relative;padding:0 20px 0 5px;cursor:pointer;color:#646464;font-size:14px;height:35px;border-radius:4px;border-bottom:1px solid #fafafa;background:linear-gradient(180deg,#e8e8e8 0,#f2f2f2);overflow:hidden}#url_list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-bottom:none}#url_list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{color:#5191b2;border-color:#5191b2}#url_list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;max-width:100%;height:35px;display:inline-block;line-height:35px}#url_list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:#7e7e7e;margin-left:3px;display:block;position:absolute;right:0;top:0;line-height:35px;font-size:14px;width:20px;background:linear-gradient(180deg,#e8e8e8 0,#f2f2f2);text-align:center}#url_list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] b[_ngcontent-%COMP%]:hover{color:rgb(205 27 27/62%)}@supports ((-webkit-backdrop-filter:blur()) or (backdrop-filter:blur())){#url_list[_ngcontent-%COMP%]{border:none;background:rgb(255 255 255/38%);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);padding:0 5px;scrollbar-color:rgba(89,89,89,.684) hsla(0,0%,51%,.556);scrollbar-width:thin}#url_list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{background:none;border-radius:0;border:none;border-bottom:1px solid rgb(128 128 128/60%);color:#444}#url_list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{color:#181818;border-color:rgb(0 0 0/24%)}#url_list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{background:none}#url_list[_ngcontent-%COMP%]:before{border-bottom-color:rgb(255 255 255/80%)}#url_list[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:hsla(0,0%,96.1%,.4);border-radius:7px}#url_list[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;background-color:none}#url_list[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:7px;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(.44,hsla(0,0%,42%,.1)),color-stop(.72,hsla(0,0%,42%,.6)),color-stop(.86,hsla(0,0%,42%,.9)))}}']}),t})();var bO=n("ulZh"),_O=n("T7iU");let wO=(()=>{class t{transform(t,e){const n=new Date(1e3*t.start).getDate();return n!==(e?new Date(1e3*e.start).getDate():n)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Me({name:"epgDayChanged",type:t,pure:!1}),t})();const EO=function(t){return{width:t}};function CO(t,e){if(1&t&&(el(0,"div",10),rl(1,"div",11),nl()),2&t){const t=gl().$implicit;Qi(1),Ja("ngStyle",Yh(1,EO,t.progress+"%"))}}function TO(t,e){if(1&t){const t=al();el(0,"input",12),cl("change",(function(e){wn(t);const n=gl().index;return gl().archive_play(n,e),e.target.style="--value: "+e.target.value+"%"}))("mousemove",(function(e){wn(t);const n=gl().index;return gl().archive_pointer(n,e)}))("mouseout",(function(){wn(t);const e=gl().$implicit;return e.pointTime=e.start}))("input",(function(e){return wn(t),e.target.style="--value: "+e.target.value+"%"}))("touchmove",(function(e){wn(t);const n=gl().index;return gl().archive_pointer(n,e)})),nl()}if(2&t){const t=gl().$implicit,e=gl();zl("--value: "+("current"==t.chronology||t==e.EPG_Bundle.played_programm?t.progress:0)+"%"),Ja("value","current"==t.chronology||t==e.EPG_Bundle.played_programm?t.progress:0)}}function SO(t,e){if(1&t&&(el(0,"li",2),ou(1),cd(2,"date"),nl()),2&t){const t=gl().index,e=gl();Qi(1),au(dd(2,1,1e3*(null==e.EPG_Bundle.epg[t+1]?null:e.EPG_Bundle.epg[t+1].start),"dd/MM"))}}const OO=function(t){return{played:t}};function kO(t,e){if(1&t){const t=al();il(0),el(1,"li",4),cl("mouseenter",(function(n){wn(t);const r=e.$implicit,i=gl();return"next"!=r.chronology?i.li_mouseenter(n):null}))("keydown.enter",(function(){wn(t);const n=e.index;return gl().archive_play(n)})),el(2,"b",5),ou(3),cd(4,"date"),nl(),el(5,"b",6),cl("click",(function(){wn(t);const n=e.index;return gl().archive_play(n)})),ou(6),cd(7,"date"),nl(),ou(8," - "),el(9,"i"),ou(10),nl(),$a(11,CO,2,3,"div",7),$a(12,TO,1,3,"input",8),nl(),$a(13,SO,3,4,"li",9),cd(14,"epgDayChanged"),sl()}if(2&t){const t=e.$implicit,n=e.index,r=gl();Qi(1),Wl(t.chronology),Ja("ngClass",Yh(19,OO,t==r.EPG_Bundle.played_programm))("tabIndex","next"!=t.chronology?1:-1),Qi(2),au(dd(4,10,1e3*t.start,"HH:mm")),Qi(3),au(dd(7,13,t.pointTime?1e3*t.pointTime:1e3*t.start,"HH:mm")),Qi(4),au(t.programm),Qi(1),Ja("ngIf","current"==t.chronology),Qi(1),Ja("ngIf","next"!=t.chronology),Qi(1),Ja("ngIf",dd(14,16,t,r.EPG_Bundle.epg[n+1]))}}let xO=(()=>{class t{constructor(t,e){this._player=t,this._ajax=e,this.title="\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447",this.destroyEmitter=new yd,this.EPG_Bundle={epg:[],played_programm:null},this.channel=null,this.$load_prev=new yd}ngOnInit(){}ngOnDestroy(){this.destroyEmitter.complete(),this.$load_prev.complete()}load_prev_epg(){this.$load_prev.emit(null)}close(){this.destroyEmitter.emit(null)}archive_play(t,e){const n=Math.floor(this.EPG_Bundle.epg[t].start),r=this.EPG_Bundle.epg[t+1]?Math.floor(this.EPG_Bundle.epg[t+1].start):Date.now()/1e3+3600,i=e?e.target:null;let s=0;i&&(s=r-n,s=Math.floor(parseInt(i.value)/100*s));const o=n+s;if(i&&o>=(new Date).getTime()/1e3)return i.value=this.EPG_Bundle.epg[t].progress.toString(),!1;{const e=Math.floor((new Date).getTime()/1e3),n=this.channel.url.indexOf("?")>0?this.channel.url+`&utc=${o}&lutc=${e}`:this.channel.url+`?utc=${o}&lutc=${e}`,s=this.EPG_Bundle.epg[t];s.stop=r,s.progress=i?parseFloat(i.value):0,this.EPG_Bundle.played_programm=this.EPG_Bundle.epg[t],this._player.channel=this.channel,this._player.play(n),this._player.epgCurrent=s,this.close()}}archive_pointer(t,e){const n=e.target.getBoundingClientRect(),r=this.EPG_Bundle.epg[t],i=Math.floor(r.start),s=this.EPG_Bundle.epg[t+1]?Math.floor(this.EPG_Bundle.epg[t+1].start):Date.now()/1e3+3600,o=((e.touches?e.touches[0].clientX:e.clientX)-n.left)/n.width;if(o<0||o>1)return!1;r.pointTime=Math.floor(o*(s-i)+i)}li_mouseenter(t){if(t.target.className.indexOf("played")<0){const e=t.target.getElementsByClassName("archive_range")[0];e.disabled=!0,setTimeout(()=>{e.disabled=!1},100)}}}return t.\u0275fac=function(e){return new(e||t)(Xa(MO),Xa(uO))},t.\u0275cmp=Se({type:t,selectors:[["epg-window"]],decls:7,vars:7,consts:[["focusOnCloseButton","true",3,"title","modal","close"],["tabindex","1","title","\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c EPG",1,"ion","load_prev_epg",3,"click","keyup.enter"],[1,"date"],[4,"ngFor","ngForOf"],[3,"ngClass","tabIndex","mouseenter","keydown.enter"],[1,"time"],["title","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438",1,"pointTime",3,"click"],["class","progress",4,"ngIf"],["type","range","min","0","max","100","step","0.01","class","archive_range","title","\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u0438\u0437 \u0410\u0440\u0445\u0438\u0432\u0430","tabindex","-1",3,"value","style","change","mousemove","mouseout","input","touchmove",4,"ngIf"],["class","date",4,"ngIf"],[1,"progress"],[3,"ngStyle"],["type","range","min","0","max","100","step","0.01","title","\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u0438\u0437 \u0410\u0440\u0445\u0438\u0432\u0430","tabindex","-1",1,"archive_range",3,"value","change","mousemove","mouseout","input","touchmove"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),el(1,"div",1),cl("click",(function(){return e.load_prev_epg()}))("keyup.enter",(function(){return e.load_prev_epg()})),nl(),el(2,"ul"),el(3,"li",2),ou(4),cd(5,"date"),nl(),$a(6,kO,15,21,"ng-container",3),nl(),nl()),2&t&&(Ja("title",e.title)("modal",!1),Qi(4),au(dd(5,4,1e3*(null==e.EPG_Bundle.epg[0]?null:e.EPG_Bundle.epg[0].start),"dd/MM")),Qi(2),Ja("ngForOf",e.EPG_Bundle.epg))},directives:[XS,Um,Nm,Hm,Zm],pipes:[uv,wO],styles:['li[_ngcontent-%COMP%]{list-style-type:none;position:relative;padding:3px 3px 3px 0}li[_ngcontent-%COMP%]:nth-child(2n){background:rgb(238 238 238)}li.date[_ngcontent-%COMP%]{font-weight:700;text-align:center;font-size:20px;text-shadow:1px 1px 3px #a9a9a9}li.prev[_ngcontent-%COMP%]{color:grey}li.played[_ngcontent-%COMP%], li.prev[_ngcontent-%COMP%]:hover{color:#000}li.current[_ngcontent-%COMP%]{color:#770303;font-weight:700}li[_ngcontent-%COMP%] .pointTime[_ngcontent-%COMP%], li[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding:0 2px;font-style:normal}li.current[_ngcontent-%COMP%] .pointTime[_ngcontent-%COMP%], li.current[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{background:red;color:#fff}li.prev[_ngcontent-%COMP%] .pointTime[_ngcontent-%COMP%]{color:#b90808}li.current[_ngcontent-%COMP%]:focus .time[_ngcontent-%COMP%], li.current[_ngcontent-%COMP%]:hover .time[_ngcontent-%COMP%], li.played[_ngcontent-%COMP%] .time[_ngcontent-%COMP%], li[_ngcontent-%COMP%] .pointTime[_ngcontent-%COMP%], li.prev[_ngcontent-%COMP%]:focus .time[_ngcontent-%COMP%], li.prev[_ngcontent-%COMP%]:hover .time[_ngcontent-%COMP%]{display:none}li.current[_ngcontent-%COMP%]:focus .pointTime[_ngcontent-%COMP%], li.current[_ngcontent-%COMP%]:hover .pointTime[_ngcontent-%COMP%], li.played[_ngcontent-%COMP%] .pointTime[_ngcontent-%COMP%], li.prev[_ngcontent-%COMP%]:focus .pointTime[_ngcontent-%COMP%], li.prev[_ngcontent-%COMP%]:hover .pointTime[_ngcontent-%COMP%]{display:inline;cursor:pointer}li[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{position:relative;width:auto;height:3px;background:#d8dcde;margin:4px 0}li[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background:#00973a;transition:width .7s;width:auto;height:100%}li.played[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%], li[_ngcontent-%COMP%]:focus .progress[_ngcontent-%COMP%], li[_ngcontent-%COMP%]:hover .progress[_ngcontent-%COMP%]{display:none}input[type=range][_ngcontent-%COMP%]{width:100%;display:none;cursor:pointer;margin:10px 0;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}input[type=range][_ngcontent-%COMP%]::-webkit-slider-runnable-track{-webkit-appearance:none;appearance:none;background:0 0;height:5px;border-radius:5px;border:none;-webkit-user-select:none;user-select:none;background-image:linear-gradient(90deg,#00b3ff var(--value,0),#b5c9d1 var(--value,0))}input[type=range][_ngcontent-%COMP%]::-moz-range-track{-moz-appearance:none;appearance:none;background:0 0;height:5px;border-radius:5px;border:none;-moz-user-select:none;user-select:none;background-image:linear-gradient(90deg,#00b3ff var(--value,0),#b5c9d1 var(--value,0))}input[type=range][_ngcontent-%COMP%]::-ms-track{appearance:none;background:0 0;height:5px;border-radius:5px;border:none;user-select:none;background-image:linear-gradient(90deg,#00b3ff var(--value,0),#b5c9d1 var(--value,0))}input[type=range][_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:15px;height:15px;margin-top:-5px;background:#305ad2;border-radius:100%;border:none;cursor:-webkit-grab;position:relative;-webkit-transition:all .3s ease;transition:all .3s ease}input[type=range][_ngcontent-%COMP%]:active::-webkit-slider-thumb{box-shadow:0 1px 1px rgba(35,40,47,.15),0 0 0 1px rgba(35,40,47,.2),0 0 0 3px hsla(0,0%,100%,.5)}input[type=range][_ngcontent-%COMP%]::-moz-range-thumb{-moz-appearance:none;appearance:none;width:15px;height:15px;margin-top:-5px;background:#305ad2;border-radius:100%;border:none;cursor:-moz-grab;position:relative;-moz-transition:all .3s ease;transition:all .3s ease}input[type=range][_ngcontent-%COMP%]:active::-moz-range-thumb{box-shadow:0 1px 1px rgba(35,40,47,.15),0 0 0 1px rgba(35,40,47,.2),0 0 0 3px hsla(0,0%,100%,.5)}input[type=range][_ngcontent-%COMP%]::-ms-thumb{appearance:none;width:15px;height:15px;margin-top:-5px;background:#305ad2;border-radius:100%;border:none;position:relative;-ms-transition:all .3s ease;transition:all .3s ease}input[type=range][_ngcontent-%COMP%]:active::-ms-thumb{box-shadow:0 1px 1px rgba(35,40,47,.15),0 0 0 1px rgba(35,40,47,.2),0 0 0 3px hsla(0,0%,100%,.5)}li.played[_ngcontent-%COMP%] input[type=range][_ngcontent-%COMP%], li[_ngcontent-%COMP%]:focus input[type=range][_ngcontent-%COMP%], li[_ngcontent-%COMP%]:hover input[type=range][_ngcontent-%COMP%]{display:block}.load_prev_epg[_ngcontent-%COMP%]{text-align:center;color:#00003f;font-size:30px;width:30px;margin:auto}.load_prev_epg[_ngcontent-%COMP%]:before{content:"\\f407";cursor:pointer}.load_prev_epg[_ngcontent-%COMP%]:focus:before, .load_prev_epg[_ngcontent-%COMP%]:hover:before{content:"\\f408"}']}),t})(),AO=(()=>{class t{constructor(t,e){this._DCservice=t,this._ajax=e,this.EPG_Bundle={epg:[],played_programm:null},this._channel=null}show(t){if(t!=this._channel){this._channel=t,this.EPG_Bundle.epg=[],this.EPG_Bundle.played_programm=null;const e={op:"get_epg_day",timezone:((new Date).getTimezoneOffset()/60*-1).toString()};this._channel.tvg_id?e.channel_id=this._channel.tvg_id:e.channel_name=this._channel.name,this._ajax.send(e).subscribe(t=>{this.EPG_Bundle.epg=t.epg?this.update_epg(t.epg):this.get_empty_epg()},()=>{this.EPG_Bundle.epg=this.get_empty_epg()},()=>{this.init_component()})}else this.init_component()}init_component(){this.acualize_epg_list();const t=this._DCservice.attach(xO);t.EPG_Bundle=this.EPG_Bundle,t.channel=this._channel,t.title=this._channel?this._channel.name:"\u041a\u0430\u043d\u0430\u043b",t.$load_prev.subscribe(()=>{this.load_prev_epg()}),setTimeout(()=>{let t=document.querySelector("epg-window li.played");t||(t=document.querySelector("epg-window li.current")),t&&t.scrollIntoView({block:"start",behavior:"smooth"})},100)}load_prev_epg(){const t={op:"get_epg_day",beforeTime:this.EPG_Bundle.epg[0].start,timezone:((new Date).getTimezoneOffset()/60*-1).toString()};this._channel.tvg_id?t.channel_id=this._channel.tvg_id:t.channel_name=this._channel.name,this._ajax.send(t).subscribe(t=>{t.epg?(t.epg.forEach(t=>{t.chronology="prev"}),this.EPG_Bundle.epg=this.update_epg(t.epg.concat(this.EPG_Bundle.epg))):this.EPG_Bundle.epg=this.get_empty_epg(this.EPG_Bundle.epg[0].start).concat(this.EPG_Bundle.epg)})}update_epg(t){return t.forEach((e,n)=>{e.start=Math.floor(e.start),e.stop=t[n+1]?Math.floor(t[n+1].start):Math.floor(Date.now()/1e3)+3600}),t}get_next_epg(t,e){let n=null;const r=t.start;return this._channel==e&&this.EPG_Bundle.epg.findIndex((t,e)=>{if(t.start>r)return n=t,!0}),n||e.epg.findIndex(e=>{if(e.start>t.start)return n=Object.assign({},e),!0}),n||(n={start:t.stop,stop:3600+Math.floor(t.stop),programm:"\u041d\u0435\u0442 \u0442\u0435\u043b\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b",progress:0}),n}set_played_programm(t){this.EPG_Bundle.played_programm=t}acualize_epg_list(){const t=Date.now()/1e3;this.EPG_Bundle.epg.findIndex((e,n)=>{!this.EPG_Bundle.epg[n+1]&&e.stop=t?(e.chronology="current",this.EPG_Bundle.played_programm&&this.EPG_Bundle.played_programm==e||(e.progress=(t-e.start)/(e.stop-e.start)*100)):e.chronology="next"})}get_empty_epg(t){const e=new Date,n=e.getTime(),r=[];let i=29;t&&(e.setTime(1e3*t),e.setHours(e.getHours()-1,0,0,0),i=e.getHours()+4),e.setHours(-4,0,0,0);let s=Math.floor(e.getTime()/1e3);for(let o=1;o<=i;o++){let t=s+3600,e="next";s<=n&&t=n&&(e="current"),r.push({start:s,stop:t,programm:"\u041d\u0435\u0442 \u0442\u0435\u043b\u0435\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438",chronology:e}),s=t}return r}get_empty_epg_current(){const t=new Date;t.setMinutes(0,0,0);const e=Math.floor(t.getTime()/1e3);t.setMinutes(60);const n=Math.floor(t.getTime()/1e3);return{start:e,stop:n,programm:"\u041d\u0435\u0442 \u0442\u0435\u043b\u0435\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438",progress:Math.floor((Date.now()/1e3-e)/(n-e)*100),chronology:"current"}}}return t.\u0275fac=function(e){return new(e||t)(re(QS),re(uO))},t.\u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const DO=["video"],PO=["videoContainer"];function RO(t,e){if(1&t){const t=al();el(0,"span",7),cl("click",(function(){return wn(t),gl().epg_day()}))("keyup.enter",(function(){return wn(t),gl().epg_day()})),el(1,"b"),ou(2),cd(3,"date"),cd(4,"date"),nl(),ou(5,"\xa0 "),el(6,"i"),ou(7),nl(),nl()}if(2&t){const t=gl();Qi(2),uu("",dd(3,3,1e3*t.epgCurrent.start,"HH:mm")," - ",dd(4,6,1e3*t.epgCurrent.stop,"HH:mm"),""),Qi(5),au(t.epgCurrent.programm)}}let IO=(()=>{class t{constructor(t,e){this._dialog=t,this._EPGService=e,this.title="\u0412\u0438\u0434\u0435\u043e \u041f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044c!",this.destroyEmitter=new yd,this._hls=null,this._plyr=null,this.duration=3600,this.prevTimer=0,this.seek=null,this.autoplay=!0,this.videoElement=null,this.videoContainer=null,this.channel=null,this.epgCurrent=null,this.epgCurrent={start:Math.floor(((new Date).getTime()-18e5)/1e3),stop:Math.floor(((new Date).getTime()+18e5)/1e3),programm:"\u041d\u0435\u0442 \u0442\u0435\u043b\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b",progress:50}}ngOnInit(){this._plyr=new _O(this.videoElement.nativeElement,{controls:["play-large","play","progress","mute","volume","pip","airplay","fullscreen"],loadSprite:!1,iconUrl:"assets/plyr.svg",blankVideo:"#"})}ngAfterViewInit(){}ngOnDestroy(){var t,e;this.epgCurrent&&"current"!=this.epgCurrent.chronology&&(this.epgCurrent.progress=0),this._EPGService.set_played_programm(null),null===(t=this._hls)||void 0===t||t.destroy(),null===(e=this._plyr)||void 0===e||e.destroy(),this.destroyEmitter.complete()}plyr_epg_init(){if(this.channel){this.title=this.channel.name,this._plyr.config.duration=this.duration,this._plyr.elements.container.tabIndex="-1";let t=this._plyr.elements.inputs.seek;this.seek=t.cloneNode(!0),t.parentNode.replaceChild(this.seek,t);let e=0;this.videoElement.nativeElement.addEventListener("timeupdate",t=>{if(!t.target.paused&&this.duration&&(e=this.epgCurrent.progress+(t.target.currentTime-this.prevTimer)/this.duration*100,this.seek.value=e.toString(),this.seek.style=`--value:${e}%`,e>=100)){const e=this._EPGService.get_next_epg(this.epgCurrent,this.channel);e&&(this.epgCurrent.progress=0,this.epgCurrent=e,this.epgCurrent.progress=0,this.prevTimer=t.target.currentTime,this.plyr_update_interval())}}),this.seek.addEventListener("input",t=>{this.seek.style=`--value:${this.seek.value}%`}),this.seek.addEventListener("change",t=>{const e=Math.floor(this.epgCurrent.start),n=Math.floor(this.epgCurrent.stop),r=e+Math.floor(parseFloat(this.seek.value)/100*(n-e)),i=Math.floor((new Date).getTime()/1e3),s=this.channel.url.indexOf("?")>0?this.channel.url+`&utc=${r}&lutc=${i}`:this.channel.url+`?utc=${r}&lutc=${i}`;r{this.videoElement.nativeElement.pause()}),this.seek.addEventListener("touchstart",()=>{this.videoElement.nativeElement.pause()});const n=document.getElementsByClassName("plyr__progress__container")[0],r=document.createElement("div"),i=document.createElement("div");r.className=i.className="plyrTimeProgramm",r.id="plyrStartTimeProgramm",i.id="plyrStopTimeProgramm",n.after(i),n.before(r)}}plyr_update_interval(){this.epgCurrent&&this.epgCurrent.stop?(this.duration=this.epgCurrent.stop-this.epgCurrent.start,this._plyr.config.duration=this.duration,document.getElementById("plyrStartTimeProgramm").innerText=this.format_bi_numbers(new Date(1e3*this.epgCurrent.start).getHours())+":"+this.format_bi_numbers(new Date(1e3*this.epgCurrent.start).getMinutes()),document.getElementById("plyrStopTimeProgramm").innerText=this.format_bi_numbers(new Date(1e3*this.epgCurrent.stop).getHours())+":"+this.format_bi_numbers(new Date(1e3*this.epgCurrent.stop).getMinutes())):this._plyr.config.duration=3600}hls_init(){const t=this.videoElement.nativeElement;this._hls&&this._hls.destroy(),this._hls=new bO,this._hls.on(bO.Events.MEDIA_ATTACHED,()=>{this._hls.on(bO.Events.ERROR,(t,e)=>{var n;if(e.fatal){switch(e.type){case bO.ErrorTypes.NETWORK_ERROR:console.log("\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430"),403==(null===(n=e.networkDetails)||void 0===n?void 0:n.status)?this._dialog.alert("\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u043b\u044c\u0437\u044f. \u041f\u0430\u043a\u0435\u0442 IPTV \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d!"):this._dialog.alert("\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u043b\u044c\u0437\u044f. \u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u0441\u0435\u0442\u0435\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430!");break;case bO.ErrorTypes.MEDIA_ERROR:console.log("\u041c\u0435\u0434\u0438\u0430 \u043e\u0448\u0438\u0431\u043a\u0430"),this._dialog.alert("\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438!"),this._hls.recoverMediaError();break;default:this._dialog.alert("\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438!")}this.close()}}),t.addEventListener("play",e=>{"]"!==this.title.charAt(this.title.length-1)&&(this.title+=` [${t.videoWidth}:${t.videoHeight}]`)})}),this.prevTimer=0}format_bi_numbers(t){return t<10?"0"+t:t.toString()}close(){this.destroyEmitter.emit(null)}play(t){var e;const n=this.videoElement.nativeElement;t=t||(null===(e=this.channel)||void 0===e?void 0:e.url),this.channel?bO.isSupported()?(this.hls_init(),this._hls.loadSource(t),this._hls.attachMedia(n)):(this._dialog.alert("\u0412 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f HLS"),this.close()):(n.src=t,this.epgCurrent=null)}fullScreen(){document.fullscreenElement?document.exitFullscreen():this.videoContainer&&"requestFullscreen"in this.videoContainer.nativeElement&&this.videoContainer.nativeElement.requestFullscreen()}epg_day(){this.epgCurrent.progress=parseFloat(this.seek.value),this._EPGService.set_played_programm(this.epgCurrent),this._EPGService.show(this.channel)}}return t.\u0275fac=function(e){return new(e||t)(Xa(sO),Xa(AO))},t.\u0275cmp=Se({type:t,selectors:[["iptv-video"]],viewQuery:function(t,e){var n;1&t&&(Dd(DO,!0),Dd(PO,!0)),2&t&&(Ad(n=Fd())&&(e.videoElement=n.first),Ad(n=Fd())&&(e.videoContainer=n.first))},decls:8,vars:3,consts:[["focusOnCloseButton","true",3,"title","modal","close"],["tabindex","1","id","video-container",3,"keyup.enter"],["videoContainer",""],["id","video","controls","","autoplay",""],["video",""],["dialog-footer",""],["tabindex","1","title","\u041d\u0430\u0436\u043c\u0438\u0442\u0435, \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u0434\u0435\u043d\u044c!",3,"click","keyup.enter",4,"ngIf"],["tabindex","1","title","\u041d\u0430\u0436\u043c\u0438\u0442\u0435, \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u0434\u0435\u043d\u044c!",3,"click","keyup.enter"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),el(1,"div",1,2),cl("keyup.enter",(function(){return e.fullScreen()})),rl(3,"video",3,4),nl(),el(5,"div",5),el(6,"div"),$a(7,RO,8,9,"span",6),nl(),nl(),nl()),2&t&&(Ja("title",e.title)("modal",!1),Qi(7),Ja("ngIf",e.epgCurrent))},directives:[XS,Hm],pipes:[uv],styles:['#video-container[_ngcontent-%COMP%]{margin:-5px;overflow:hidden;position:relative}#video-container[_ngcontent-%COMP%]:focus:after{content:"";display:block;border:4px outset #ffe295;position:absolute;left:0;top:0;right:0;bottom:0}#video-container[_ngcontent-%COMP%]:-webkit-full-screen:after{display:none}#video-container[_ngcontent-%COMP%]:fullscreen:after{display:none}video[_ngcontent-%COMP%]{max-height:70vh;max-width:100%;width:auto;height:auto;margin:auto}#video-container[_ngcontent-%COMP%]:-webkit-full-screen video[_ngcontent-%COMP%]{max-height:100%;height:100%}#video-container[_ngcontent-%COMP%]:fullscreen video[_ngcontent-%COMP%]{max-height:100%;height:100%}[dialog-footer][_ngcontent-%COMP%]{height:20px}[dialog-footer][_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{position:absolute;white-space:nowrap;overflow:hidden;left:5px;right:5px}[dialog-footer][_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;line-height:12px;display:inline-block}[dialog-footer][_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:#412705}[dialog-footer][_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#070724}']}),t})(),MO=(()=>{class t{constructor(t){this._DCService=t,this._player=null,this.channel=null}get player(){var t;return this._player||(this._player=this._DCService.attach(IO),this.channel&&(this._player.channel=this.channel,this._player.plyr_epg_init(),(null===(t=this.channel)||void 0===t?void 0:t.epg)&&(this.epgCurrent=Object.assign({},this.channel.epg[0]))),this._player.destroyEmitter.subscribe(()=>{},()=>{},()=>{this._player=null,this.channel=null})),this._player}set player(t){this._player=t}set epgCurrent(t){this._player&&(this.player.epgCurrent=t,this.player.plyr_update_interval())}get epgCurrent(){return this.player.epgCurrent}set title(t){this._player&&(this.player.title=t)}get title(){return this._player?this._player.title:""}play(t){this.player.play(t)}}return t.\u0275fac=function(e){return new(e||t)(re(QS))},t.\u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),LO=(()=>{class t{constructor(t){this._player=t,this.title="\u041f\u043e\u043c\u043e\u0449\u044c!",this.destroyEmitter=new yd}ngOnInit(){}close(){this.destroyEmitter.emit(null)}video_instruction(){this._player.play("../videoplayer/iptv_editor_help.mp4"),this._player.title="\u0412\u0438\u0434\u0435\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f!"}}return t.\u0275fac=function(e){return new(e||t)(Xa(MO))},t.\u0275cmp=Se({type:t,selectors:[["help-window"]],decls:48,vars:4,consts:[[3,"title","modal","focusOnCloseButton","full-height","close"],["id","HelpWindow"],[1,"ion","input-gray"],[1,"blue-button","ion","video-instruction",3,"click"],["href","https://skaz.tv","target","_blank"],[2,"color","rgb(0, 78, 0)"],[1,"bg-blue","channels_search"],["href","https://t.me/helpiptv","target","_blank"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),el(1,"div",1),el(2,"h3",2),ou(3,"\u0421\u043f\u0440\u0430\u0432\u043a\u0430!"),nl(),el(4,"button",3),cl("click",(function(){return e.video_instruction()})),el(5,"span"),ou(6,"\uf4cd"),nl(),ou(7," \u0412\u0438\u0434\u0435\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f"),nl(),ou(8," \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u043b\u0435\u043a\u0430\u043d\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435 "),el(9,"a",4),ou(10,"Skaz.TV"),nl(),ou(11,"."),el(12,"span",5),ou(13,""),nl(),ou(14," "),rl(15,"br"),ou(16," \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u0442\u043e \u0432 \u043c\u0435\u043d\u044e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 "),el(17,"b"),ou(18,"'\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d'"),nl(),ou(19,", \u0442\u043e\u0433\u0434\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435."),rl(20,"br"),ou(21," \u0412 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0441\u0432\u043e\u0439 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442. \u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b\u044b \u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u0447. \u0417\u0430\u0442\u0435\u043c \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442, \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 m3u8, \u0441\u0435\u0431\u0435 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f."),rl(22,"br"),ou(23," \u041a\u0430\u043d\u0430\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u0432 \u0433\u0440\u0443\u043f\u043f\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u0443\u0440\u0441\u043e\u0440 \u043c\u044b\u0448\u0438 \u0438\u043b\u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044f \u043d\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043f\u0430\u043b\u0435\u0446, \u043d\u0430\u0434 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u043a\u0430\u043d\u0430\u043b\u043e\u043c. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f, \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0436\u0430\u0442\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0448\u0443 "),el(24,"b"),ou(25,"CTRL"),nl(),ou(26,". E\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043a\u0430\u043d\u0430\u043b\u043e\u0432, \u0442\u043e\u0433\u0434\u0430 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 "),el(27,"b"),ou(28,"SHIFT"),nl(),ou(29,". \u041f\u0440\u0438 \u0434\u0432\u043e\u0439\u043d\u043e\u043c \u043a\u043b\u0438\u043a\u0435, \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u0438\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u0443."),rl(30,"br"),ou(31," \u0420\u0435\u0437\u043a\u0438\u043c \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c, \u043a\u0430\u043d\u0430\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0435\u0446 \u0438\u043b\u0438 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430."),rl(32,"br"),ou(33," \u041f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u043a\u0430\u043d\u0430\u043b\u0435, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u043a\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0447 \u043d\u0430 \u0434\u0435\u043d\u044c - "),el(34,"b"),ou(35,"EPG"),nl(),ou(36,". \u041b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432 \u043f\u043b\u0435\u0435\u0440\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430."),rl(37,"br"),ou(38," \u041a\u043b\u0438\u043a \u043f\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0443 "),el(39,"span",6),ou(40,"\u041a\u0430\u043d\u0430\u043b\u044b"),nl(),ou(41," \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u043d\u0430\u043b\u0430. \u041f\u043e\u0438\u0441\u043a \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043f\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u043d\u0430\u043b\u0430."),rl(42,"br"),ou(43," \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0435 \u0432\u0441\u0435 \u043a\u0430\u043d\u0430\u043b\u044b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f. \u0417\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 IPTV \u043f\u043e\u0442\u043e\u043a\u0430, \u043e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0432 Chrome, \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 Firefox."),rl(44,"br"),ou(45," \u0412\u0430\u0448\u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043f\u0438\u0448\u0438\u0442\u0435 "),el(46,"a",7),ou(47,"@helpiptv"),nl(),nl(),nl()),2&t&&Ja("title",e.title)("modal",!1)("focusOnCloseButton",!0)("full-height",!1)},directives:[XS],styles:['#HelpWindow[_ngcontent-%COMP%]{text-align:justify;max-width:700px}h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{text-align:center;color:#000}h3[_ngcontent-%COMP%]:before{content:"\\f27c";margin-right:5px;color:#8d0909}.channels_search[_ngcontent-%COMP%]:before{display:inline-block;content:"\\f2f5";font-family:Ionicons;font-style:normal;font-size:15px;color:#0076b2;text-shadow:0 0 3px #afdff8;position:absolute;right:4px;left:auto;z-index:1}.channels_search[_ngcontent-%COMP%]{padding:0 10px;display:inline-block;position:relative}.video-instruction[_ngcontent-%COMP%]{float:right;margin:8px 3px 1px 10px;font-size:14px}.video-instruction[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#d0f0fc;font-size:20px;vertical-align:bottom;font-family:Ionicons;text-shadow:0 0 6px #004568}']}),t})(),FO=(()=>{class t{constructor(){this.title="\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435!",this.destroyEmitter=new yd}ngOnInit(){}close(){this.destroyEmitter.emit(null)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Se({type:t,selectors:[["demo-mesasge"]],decls:20,vars:4,consts:[[3,"title","modal","focusOnCloseButton","full-height","close"],[1,"demo-message"],[1,"ion","pay"],["href","https://skaz.tv","target","_blank"],[1,"ion","download"],[1,"ion","help"]],template:function(t,e){1&t&&(el(0,"dialog-window",0),cl("close",(function(){return e.close()})),el(1,"div",1),el(2,"h3"),ou(3,"\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c."),nl(),ou(4," \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u0443\u043f\u0438\u0442\u044c "),rl(5,"b",2),ou(6," \u043f\u0430\u043a\u0435\u0442 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 "),el(7,"b"),ou(8,"IPTV"),nl(),ou(9,", \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435, \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 "),el(10,"a",3),ou(11,"Skaz.TV"),nl(),rl(12,"br"),ou(13," \u0417\u0430\u0442\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c "),rl(14,"b",4),ou(15," \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442. \u041b\u0438\u0431\u043e \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c."),rl(16,"br"),ou(17," \u041f\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0421\u043f\u0440\u0430\u0432\u043a\u0443 "),rl(18,"b",5),ou(19," \u043a \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443, \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. "),nl(),nl()),2&t&&Ja("title",e.title)("modal",!1)("focusOnCloseButton",!0)("full-height",!1)},directives:[XS],styles:['h3[_ngcontent-%COMP%]{text-align:center;color:#214252}.ion[_ngcontent-%COMP%]:before{font-size:22px;vertical-align:bottom}.download[_ngcontent-%COMP%]:before{content:"\\f3b6"}.help[_ngcontent-%COMP%]:before{content:"\\f142"}']}),t})(),NO=(()=>{class t{constructor(t,e,n,r,i,s){this._ajax=t,this._store=e,this._dialog=n,this._DCService=r,this._player=i,this._EPGservice=s,this.channelsBundle={channels:[],groups:[],groupSelected:{id:1,name:"Dummy"},EXTGRP:!0,EXTM3U_prop:""},this.storeNameItem="channelsBundle",this._$ajax_epg_current=null,this._time_download_epg=0,window.addEventListener("beforeunload",(function(t){return t.returnValue="o/","o/"})),this._time_download_epg=Date.now()}ngOnInit(){const t=this._store.get(this.storeNameItem);t&&"channels"in t&&"groups"in t?(this.channelsBundle=t,this.channelsBundle.groupSelected=this.channelsBundle.groups[0],this.epg_groups_get()):this.load_playlist(),setInterval(()=>{this.epg_current_update()},6e4)}load_playlist(){return this._ajax.send({op:atob("Z2V0X2NoYW5uZWxz")},!0,atob("Li4veHh4eHh4eHh4eC9qc29uX3NhbXBsZS94eHg")).subscribe(t=>{this.channelsBundle.channels=t.channels,this.channelsBundle.groups=t.groups,this.channelsBundle.groupSelected=t.groups[0],this.epg_groups_get()})}download_file(t){const e=new pO(this._dialog);e.channelsBundle=this.channelsBundle,e.sort=this.sort,e.init(),t.currentTarget.href="data:text/m3u;charset=utf-8,"+encodeURIComponent(e.playlist)}upload(){this._DCService.attach(yO).loadedPlaylist.subscribe(t=>{const e=this.open_text_editor();e.playlist=t,e.showJoinButton=!0})}help(){this._DCService.attach(LO)}sort(){const t=[];this.channelsBundle.groups.forEach(e=>{this.channelsBundle.channels.map(n=>{n.group_id==e.id&&t.push(n)})}),this.channelsBundle.channels=t}change_channel(t){const e=this._DCService.attach(hO);e.channel=t,e.onSubmit.subscribe(()=>{t.epg=null,this._$ajax_epg_current&&!this._$ajax_epg_current.closed&&this._$ajax_epg_current.unsubscribe();const e={name:t.name,epg_id:t.tvg_id,client_id:this.channelsBundle.channels.indexOf(t)};this.epg_get_current(new Array(e))})}remove_channel(t){this._dialog.confirm(`\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0431\u0435\u0437\u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u043e \u043a\u0430\u043d\u0430\u043b '${t.name}' ?`,e=>{!0===e&&this._iptvEditor.channel_trash_remove(t)})}empty_trash_event(){this._dialog.confirm("\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0440\u0437\u0438\u043d\u0443?",t=>{!0===t&&this._iptvEditor.empty_trash()})}play_channel(t){-1==t.url.search("iptv.ya.ru")?(this._player.channel=t,this._player.play()):this._DCService.attach(FO)}change_group(t){this._dialog.prompt("\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b",t.name,e=>(t.name=e,!0))}selected_group(t){this.channelsBundle.groupSelected=t,t.epg||this.epg_groups_get()}remove_group(t){this._dialog.confirm(`\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443 "${t.name}"?`,e=>{!0===e&&this._iptvEditor.group_remove(t)})}open_text_editor(){const t=this._DCService.attach(pO);return t.channelsBundle=this.channelsBundle,t.sort=this.sort,t.init(),t.showJoinButton=!1,t.destroyEmitter.subscribe(null,null,()=>{this.epg_groups_get()}),t}store_playlist(){this._dialog.confirm("C\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0432 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435?",t=>{if(t){this.sort();const t=JSON.parse(JSON.stringify(this.channelsBundle));t.channels.forEach(t=>{t.epg=null}),t.groups.forEach(t=>{t.epg=!1}),this._store.save(t,this.storeNameItem)?this._dialog.alert("\u041f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u0432 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435!"):this._dialog.alert("\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435!")}})}restore_playlist(){this._dialog.confirm("\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e?",t=>{t&&(this._store.remove(this.storeNameItem),this.load_playlist().add(()=>{this._dialog.alert("\u041f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e!")}))})}epg_groups_get(){if(this.channelsBundle.channels.length){let t=new Array;this.channelsBundle.channels.forEach((e,n)=>{e.group_id==this.channelsBundle.groupSelected.id&&t.push({client_id:n,epg_id:e.tvg_id,name:e.name})}),this.epg_get_current(t.slice(0,500)),this.channelsBundle.groupSelected.epg=!0}}epg_channels_get(t){if(t.length){let e=new Array;this.channelsBundle.channels.forEach((n,r)=>{t.indexOf(n)>=0&&!n.epg&&e.push({client_id:r,epg_id:n.tvg_id,name:n.name})}),this.epg_get_current(e.slice(0,500))}}epg_get_current(t){if(t.length){const e=this._ajax.send({op:"get_epg_current",epg_data:JSON.stringify(t)},!1).subscribe(t=>{t.epg&&t.epg.length&&t.epg.forEach(t=>{const e=this.channelsBundle.channels[parseInt(t.client_id)];if(e&&(!e.tvg_id&&t.epg_id&&(e.tvg_id=t.epg_id),!e.icon&&t.icon&&(e.icon=t.icon),t.epg_json)){const n=JSON.parse(t.epg_json);n&&n.length&&(n.forEach((t,e)=>{t.start=Math.floor(t.start),t.stop=n[e+1]?n[e+1].start:t.stop,t.stop=Math.floor(t.stop),t.progress=0,0===e&&(t.progress=(Date.now()/1e3-t.start)/(t.stop-t.start)*100,t.progress=t.progress<0?0:t.progress,t.progress=t.progress>100?100:t.progress)}),n[0].chronology="current",e.epg=n)}})},()=>{},()=>{const e=this._EPGservice.get_empty_epg_current();return t.forEach(t=>{const n=this.channelsBundle.channels[parseInt(t.client_id.toString())];n&&!n.epg&&(n.epg=[Object.assign({},e)])}),t});return 1==t.length&&(this._$ajax_epg_current=e),e}return Sv(!1).subscribe()}epg_current_update(){const t=Math.floor(Date.now()/1e3);1e3*t-this._time_download_epg>72e5?(this._time_download_epg=1e3*t,this.channelsBundle.groups.forEach(t=>{t.epg=null}),console.log("\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c EPG \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0442\u0435\u043b\u0435\u043a\u0430\u043d\u0430\u043b\u043e\u0432",new Date),this.epg_groups_get()):this.channelsBundle.channels.forEach(e=>{let n=null;if(e.epg instanceof Array){e.epg.findIndex((r,i)=>r.stop>=t&&(n=r,i>0&&(e.epg=e.epg.slice(i,e.epg.length-1)),!0)),n||(n=this._EPGservice.get_empty_epg_current(),e.epg=[n]);let r=(t-n.start)/(n.stop-n.start)*100;r=r<0?0:r,r=r>100?100:r,n.progress=r,n.chronology="current"}})}epg_day_channel(t){this._EPGservice.show(t)}}return t.\u0275fac=function(e){return new(e||t)(Xa(uO),Xa(cO),Xa(sO),Xa(QS),Xa(MO),Xa(AO))},t.\u0275cmp=Se({type:t,selectors:[["app-root"]],viewQuery:function(t,e){var n;1&t&&Pd(BS,!0),2&t&&Ad(n=Fd())&&(e._iptvEditor=n.first)},decls:22,vars:3,consts:[[2,"text-align","center"],[1,"button-container"],["tabindex","10","data-tooltip","\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440.",1,"tooltip",3,"keyup.enter"],["tabindex","-1",1,"blue-button",3,"click"],["tabindex","10","data-tooltip","\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0432 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.",1,"tooltip",3,"keyup.enter"],["tabindex","10","data-tooltip","\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.",1,"tooltip",3,"keyup.enter"],["tabindex","10","data-tooltip","\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442, \u0441\u0435\u0431\u0435 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e.",1,"tooltip",3,"keyup.enter"],["tabindex","-1","href","#","download","IPTV_Skaz.tv.m3u",1,"blue-button",3,"click"],["tabindex","10","data-tooltip","\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430, \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440.",1,"tooltip",3,"keyup.enter"],["tabindex","10","data-tooltip","\u0421\u043f\u0440\u0430\u0432\u043a\u0430!",1,"tooltip",3,"keyup.enter","click"],["tabindex","-1",1,"blue-button"],[3,"channels","groups","groupSelected","changeChannel","removeChannel","playChannel","changeGroup","epgDayChannel","selectedGroup","emptyTrashEvent","groupRemoveEvent","epgChannels"]],template:function(t,e){1&t&&(el(0,"div",0),el(1,"div",1),el(2,"span",2),cl("keyup.enter",(function(){return e.open_text_editor()})),el(3,"button",3),cl("click",(function(){return e.open_text_editor()})),ou(4,"\uf12e"),nl(),nl(),el(5,"span",4),cl("keyup.enter",(function(){return e.store_playlist()})),el(6,"button",3),cl("click",(function(){return e.store_playlist()})),ou(7,"\uf102"),nl(),nl(),el(8,"span",5),cl("keyup.enter",(function(){return e.restore_playlist()})),el(9,"button",3),cl("click",(function(){return e.restore_playlist()})),ou(10,"\uf3a8"),nl(),nl(),el(11,"span",6),cl("keyup.enter",(function(t){return t.target.getElementsByTagName("a")[0].click()})),el(12,"a",7),cl("click",(function(t){return e.download_file(t)})),ou(13,"\uf2dd"),nl(),nl(),el(14,"span",8),cl("keyup.enter",(function(){return e.upload()})),el(15,"button",3),cl("click",(function(){return e.upload()})),ou(16,"\uf3b6"),nl(),nl(),el(17,"span",9),cl("keyup.enter",(function(){return e.help()}))("click",(function(){return e.help()})),el(18,"button",10),ou(19,"\uf142"),nl(),nl(),nl(),nl(),el(20,"iptv-editor",11),cl("changeChannel",(function(t){return e.change_channel(t)}))("removeChannel",(function(t){return e.remove_channel(t)}))("playChannel",(function(t){return e.play_channel(t)}))("changeGroup",(function(t){return e.change_group(t)}))("epgDayChannel",(function(t){return e.epg_day_channel(t)}))("selectedGroup",(function(t){return e.selected_group(t)}))("emptyTrashEvent",(function(){return e.empty_trash_event()}))("groupRemoveEvent",(function(t){return e.remove_group(t)}))("epgChannels",(function(t){return e.epg_channels_get(t)})),nl(),rl(21,"dynamic-component")),2&t&&(Qi(20),Ja("channels",null==e.channelsBundle?null:e.channelsBundle.channels)("groups",null==e.channelsBundle?null:e.channelsBundle.groups)("groupSelected",null==e.channelsBundle?null:e.channelsBundle.groupSelected))},directives:[BS,qS],styles:[""]}),t})();var jO=["4osrQtx","382581RdxYel","300277VMmXbi","style","15121ufdcpS","29kTFzGN","1261SHnHlX","266587NGGYuk","U2thei5UVg==","1115656jgQfMA","3cQtgVu","635gDaPTe","createElement","1dbYvSc","511730GQXlNr","querySelector","innerText","1wUxAPp"],BO=function(t,e){return jO[t-=285]};(function(t,e){for(var n=BO;;)try{if(741899===parseInt(n(298))*-parseInt(n(289))+parseInt(n(285))*-parseInt(n(290))+-parseInt(n(299))*parseInt(n(292))+parseInt(n(288))+-parseInt(n(302))*parseInt(n(301))+-parseInt(n(296))*-parseInt(n(286))+-parseInt(n(297))*-parseInt(n(293)))break;t.push(t.shift())}catch(r){t.push(t.shift())}})(jO),setTimeout((function(){var t=BO,e=document[t(294)](atob("aXB0di1lZGl0b3IgLmNoYW5uZWxzIC5hZGQ"));if(e){var n=document[t(291)]("b");n[t(295)]=atob(t(287)),n[t(300)]=atob("cG9zaXRpb246IGFic29sdXRlOw0KICAgICAgICBkaXNwbGF5OiBibG9jazsNCiAgICAgICAgcmlnaHQ6IDNweDsNCiAgICAgICAgYm90dG9tOiAwOw0KICAgICAgICBjb2xvcjogIzA2YThlNjsNCiAgICAgICAgZm9udC1zaXplOiAxMHB4Ow0KICAgICAgICBsaW5lLWhlaWdodDogMTRweDsNCiAgICAgICAgZm9udC1mYW1pbHk6IFZlcmRhbmEsIHNlcmlmOw0KICAgICAgICB0ZXh0LXNoYWRvdzogcmdiKDQgMjQgMTA2KSAwcHggMHB4IDJweDsNCiAgICAgICAgZm9udC1zdHlsZTogaXRhbGljOw"),e.appendChild(n)}}),5e3);let UO=(()=>{class t{}var e;return t.\u0275mod=De({type:t,bootstrap:[NO]}),t.\u0275inj=yt({factory:function(e){return new(e||t)},providers:[uO,cO,MO,AO,{provide:Vr,useValue:(e={showDialog:!1},new hS(e))},{provide:Sw,deps:[I_]},{provide:uf,useFactory:()=>()=>{},deps:[Sw],multi:!0}],imports:[[IE,PT,GS,cS,oO,q_.forRoot([{path:"",component:NO}])]]}),t})();var VO;(VO={dsn:"https://4a5ffebec50149baa46df305df454e34@o536315.ingest.sentry.io/5654785",release:"",integrations:[new i.BrowserTracing({tracingOrigins:["localhost","https://yourserver.io/api"],routingInstrumentation:function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=!0),yw=!0,bw=t,_w=n,e&&t({name:Cw.location.pathname,op:"pageload"})}})],tracesSampleRate:1})._metadata=VO._metadata||{},VO._metadata.sdk={name:"sentry.javascript.angular",packages:[{name:"npm:@sentry/angular",version:"6.16.1"}],version:"6.16.1"},function(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=Pg),void 0===t.release){var e=Object(gp.a)();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0),function(t,e){var n;!0===e.debug&&cp.b.enable();var r=Object(up.b)();null===(n=r.getScope())||void 0===n||n.update(e.initialScope);var i=new t(e);r.bindClient(i)}(Eg,t),t.autoSessionTracking&&function(){if(void 0!==Object(gp.a)().document){var t=Object(up.b)();"function"==typeof t.startSession&&"function"==typeof t.captureSession&&(t.startSession({ignoreDuration:!0}),t.captureSession(),Object(vp.a)({callback:function(e){var n=e.from;void 0!==n&&n!==e.to&&(t.startSession({ignoreDuration:!0}),t.captureSession())},type:"history"}))}else cp.b.warn("Session tracking in non-browser environment with @sentry/browser is not supported.")}()}(VO),function(){if(Qr)throw new Error("Cannot enable prod mode after platform setup.");Zr=!1}(),PE().bootstrapModule(UO).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}},[[0,0]]]); //# sourceMappingURL=main.4f2c191fd9fd89832ab0.js.map