/* Minification failed. Returning unminified contents.
(219,501-508): run-time error JS1019: Can't have 'break' outside of loop: break a
 */
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
;
/*! jQuery UI - v1.13.2 - 2022-07-14
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(V){"use strict";V.ui=V.ui||{};V.ui.version="1.13.2";var n,i=0,a=Array.prototype.hasOwnProperty,r=Array.prototype.slice;V.cleanData=(n=V.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=V._data(i,"events"))&&e.remove&&V(i).triggerHandler("remove");n(t)}),V.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],l=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=V.Widget),Array.isArray(e)&&(e=V.extend.apply(null,[{}].concat(e))),V.expr.pseudos[l.toLowerCase()]=function(t){return!!V.data(t,l)},V[r]=V[r]||{},s=V[r][t],n=V[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},V.extend(n,s,{version:e.version,_proto:V.extend({},e),_childConstructors:[]}),(o=new i).options=V.widget.extend({},o.options),V.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}a[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=V.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(V.each(s._childConstructors,function(t,e){var i=e.prototype;V.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),V.widget.bridge(t,n),n},V.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],a.call(s[n],e)&&void 0!==i&&(V.isPlainObject(i)?t[e]=V.isPlainObject(t[e])?V.widget.extend({},t[e],i):V.widget.extend({},i):t[e]=i);return t},V.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;V.fn[o]=function(i){var t="string"==typeof i,s=r.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V.data(this,a);t?(t.option(i||{}),t._init&&t._init()):V.data(this,a,new e(i,this))})),n}},V.Widget=function(){},V.Widget._childConstructors=[],V.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=V(e||this.defaultElement||this)[0],this.element=V(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=V(),this.hoverable=V(),this.focusable=V(),this.classesElementLookup={},e!==this&&(V.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=V(e.style?e.ownerDocument:e.document||e),this.window=V(this.document[0].defaultView||this.document[0].parentWindow)),this.options=V.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:V.noop,_create:V.noop,_init:V.noop,destroy:function(){var i=this;this._destroy(),V.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:V.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return V.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=V.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=V(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||V(),i=n.add?(function(){var i=[];n.element.each(function(t,e){V.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(V(i),{remove:"_untrackClassesElement"})}(),V(V.uniqueSort(i.get().concat(n.element.get())))):V(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=V.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;V.each(s.classesElementLookup,function(t,e){-1!==V.inArray(i.target,e)&&(s.classesElementLookup[t]=V(e.not(i.target).get()))}),this._off(V(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,i={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=V(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),V.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!V(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||V.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),t=s[1]+r.eventNamespace,s=s[2];s?a.on(t,s,i):o.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=V(this.bindings.not(t).get()),this.focusable=V(this.focusable.not(t).get()),this.hoverable=V(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(V(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(V(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=V.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},V.each({show:"fadeIn",hide:"fadeOut"},function(o,a){V.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!V.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&V.effects&&V.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){V(this)[o](),i&&i.call(e[0]),t()})}});var s,x,k,o,l,h,c,u,C;V.widget;function D(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function I(t,e){return parseInt(V.css(t,e),10)||0}function T(t){return null!=t&&t===t.window}x=Math.max,k=Math.abs,o=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,C=V.fn.position,V.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,e=V("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),i=e.children()[0];return V("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?V.position.scrollbarWidth():0,height:e?V.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=V(t||window),i=T(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?V(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},V.fn.position=function(u){if(!u||!u.of)return C.apply(this,arguments);var d,p,f,g,m,t,_="string"==typeof(u=V.extend({},u)).of?V(document).find(u.of):V(u.of),v=V.position.getWithinInfo(u.within),b=V.position.getScrollInfo(v),y=(u.collision||"flip").split(" "),w={},e=9===(t=(e=_)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:T(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()};return _[0].preventDefault&&(u.at="left top"),p=e.width,f=e.height,m=V.extend({},g=e.offset),V.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],u[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=D(w.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,a=V(this),r=a.outerWidth(),l=a.outerHeight(),e=I(this,"marginLeft"),s=I(this,"marginTop"),n=r+e+I(this,"marginRight")+b.width,o=l+s+I(this,"marginBottom")+b.height,h=V.extend({},m),c=D(w.my,a.outerWidth(),a.outerHeight());"right"===u.my[0]?h.left-=r:"center"===u.my[0]&&(h.left-=r/2),"bottom"===u.my[1]?h.top-=l:"center"===u.my[1]&&(h.top-=l/2),h.left+=c[0],h.top+=c[1],i={marginLeft:e,marginTop:s},V.each(["left","top"],function(t,e){V.ui.position[y[t]]&&V.ui.position[y[t]][e](h,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:v,elem:a})}),u.using&&(t=function(t){var e=g.left-h.left,i=e+p-r,s=g.top-h.top,n=s+f-l,o={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:a,left:h.left,top:h.top,width:r,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&k(e+i)<p&&(o.horizontal="center"),f<l&&k(s+n)<f&&(o.vertical="middle"),x(k(e),k(i))>x(k(s),k(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(V.extend(h,{using:t}))})},V.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,a=s-o,r=o+e.collisionWidth-n-s;e.collisionWidth>n?0<a&&r<=0?(i=t.left+a+e.collisionWidth-n-s,t.left+=a-i):t.left=!(0<r&&a<=0)&&r<a?s+n-e.collisionWidth:s:0<a?t.left+=a:0<r?t.left-=r:t.left=x(t.left-o,t.left)},top:function(t,e){var i=e.within,s=i.isWindow?i.scrollTop:i.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,a=s-o,r=o+e.collisionHeight-n-s;e.collisionHeight>n?0<a&&r<=0?(i=t.top+a+e.collisionHeight-n-s,t.top+=a-i):t.top=!(0<r&&a<=0)&&r<a?s+n-e.collisionHeight:s:0<a?t.top+=a:0<r?t.top-=r:t.top=x(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,o=i.isWindow?i.scrollLeft:i.offset.left,a=t.left-e.collisionPosition.marginLeft,r=a-o,l=a+e.collisionWidth-n-o,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,i="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,a=-2*e.offset[0];r<0?((s=t.left+h+i+a+e.collisionWidth-n-s)<0||s<k(r))&&(t.left+=h+i+a):0<l&&(0<(o=t.left-e.collisionPosition.marginLeft+h+i+a-o)||k(o)<l)&&(t.left+=h+i+a)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,o=i.isWindow?i.scrollTop:i.offset.top,a=t.top-e.collisionPosition.marginTop,r=a-o,l=a+e.collisionHeight-n-o,h="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,i="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,a=-2*e.offset[1];r<0?((s=t.top+h+i+a+e.collisionHeight-n-s)<0||s<k(r))&&(t.top+=h+i+a):0<l&&(0<(o=t.top-e.collisionPosition.marginTop+h+i+a-o)||k(o)<l)&&(t.top+=h+i+a)}},flipfit:{left:function(){V.ui.position.flip.left.apply(this,arguments),V.ui.position.fit.left.apply(this,arguments)},top:function(){V.ui.position.flip.top.apply(this,arguments),V.ui.position.fit.top.apply(this,arguments)}}};V.ui.position,V.extend(V.expr.pseudos,{data:V.expr.createPseudo?V.expr.createPseudo(function(e){return function(t){return!!V.data(t,e)}}):function(t,e,i){return!!V.data(t,i[3])}}),V.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t,d=V,p={},e=p.toString,f=/^([\-+])=\s*(\d+\.?\d*)/,g=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),t[4]?(parseInt(t[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),t[4]?(parseInt(t[4]+t[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],m=d.Color=function(t,e,i,s){return new d.Color.fn.parse(t,e,i,s)},_={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},v={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},b=m.support={},y=d("<p>")[0],w=d.each;function P(t){return null==t?t+"":"object"==typeof t?p[e.call(t)]||"object":typeof t}function M(t,e,i){var s=v[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:Math.min(s.max,Math.max(0,t)))}function S(s){var n=m(),o=n._rgba=[];return s=s.toLowerCase(),w(g,function(t,e){var i=e.re.exec(s),i=i&&e.parse(i),e=e.space||"rgba";if(i)return i=n[e](i),n[_[e].cache]=i[_[e].cache],o=n._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&d.extend(o,B.transparent),n):B[s]}function H(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}y.style.cssText="background-color:rgba(1,1,1,.5)",b.rgba=-1<y.style.backgroundColor.indexOf("rgba"),w(_,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),d.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){p["[object "+e+"]"]=e.toLowerCase()}),(m.fn=d.extend(m.prototype,{parse:function(n,t,e,i){if(void 0===n)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=d(n).css(t),t=void 0);var o=this,s=P(n),a=this._rgba=[];return void 0!==t&&(n=[n,t,e,i],s="array"),"string"===s?this.parse(S(n)||B._default):"array"===s?(w(_.rgba.props,function(t,e){a[e.idx]=M(n[e.idx],e)}),this):"object"===s?(w(_,n instanceof m?function(t,e){n[e.cache]&&(o[e.cache]=n[e.cache].slice())}:function(t,i){var s=i.cache;w(i.props,function(t,e){if(!o[s]&&i.to){if("alpha"===t||null==n[t])return;o[s]=i.to(o._rgba)}o[s][e.idx]=M(n[t],e,!0)}),o[s]&&d.inArray(null,o[s].slice(0,3))<0&&(null==o[s][3]&&(o[s][3]=1),i.from&&(o._rgba=i.from(o[s])))}),this):void 0},is:function(t){var n=m(t),o=!0,a=this;return w(_,function(t,e){var i,s=n[e.cache];return s&&(i=a[e.cache]||e.to&&e.to(a._rgba)||[],w(e.props,function(t,e){if(null!=s[e.idx])return o=s[e.idx]===i[e.idx]})),o}),o},_space:function(){var i=[],s=this;return w(_,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,a){var e=(h=m(t))._space(),i=_[e],t=0===this.alpha()?m("transparent"):this,r=t[i.cache]||i.to(t._rgba),l=r.slice(),h=h[i.cache];return w(i.props,function(t,e){var i=e.idx,s=r[i],n=h[i],o=v[e.type]||{};null!==n&&(null===s?l[i]=n:(o.mod&&(n-s>o.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=M((n-s)*a+s,e)))}),this[e](l)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=m(t)._rgba;return m(d.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=d.map(this._rgba,function(t,e){return null!=t?t:2<e?1:0});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=d.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),t=e&&e<3?Math.round(100*t)+"%":t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+d.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}})).parse.prototype=m.fn,_.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,n=t[3],o=Math.max(e,i,s),a=Math.min(e,i,s),r=o-a,l=o+a,t=.5*l,i=a===o?0:e===o?60*(i-s)/r+360:i===o?60*(s-e)/r+120:60*(e-i)/r+240,l=0==r?0:t<=.5?r/l:r/(2-l);return[Math.round(i)%360,l,t,null==n?1:n]},_.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],t=t[3],i=s<=.5?s*(1+i):s+i-s*i,s=2*s-i;return[Math.round(255*H(s,i,e+1/3)),Math.round(255*H(s,i,e)),Math.round(255*H(s,i,e-1/3)),t]},w(_,function(l,t){var e=t.props,o=t.cache,a=t.to,r=t.from;m.fn[l]=function(t){if(a&&!this[o]&&(this[o]=a(this._rgba)),void 0===t)return this[o].slice();var i=P(t),s="array"===i||"object"===i?t:arguments,n=this[o].slice();return w(e,function(t,e){t=s["object"===i?t:e.idx];null==t&&(t=n[e.idx]),n[e.idx]=M(t,e)}),r?((t=m(r(n)))[o]=n,t):m(n)},w(e,function(a,r){m.fn[a]||(m.fn[a]=function(t){var e,i=P(t),s="alpha"===a?this._hsla?"hsla":"rgba":l,n=this[s](),o=n[r.idx];return"undefined"===i?o:("function"===i&&(i=P(t=t.call(this,o))),null==t&&r.empty?this:("string"===i&&(e=f.exec(t))&&(t=o+parseFloat(e[2])*("+"===e[1]?1:-1)),n[r.idx]=t,this[s](n)))})})}),(m.hook=function(t){t=t.split(" ");w(t,function(t,o){d.cssHooks[o]={set:function(t,e){var i,s,n="";if("transparent"!==e&&("string"!==P(e)||(i=S(e)))){if(e=m(i||e),!b.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===o?t.parentNode:t;(""===n||"transparent"===n)&&s&&s.style;)try{n=d.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(n&&"transparent"!==n?n:"_default")}e=e.toRgbaString()}try{t.style[o]=e}catch(t){}}},d.fx.step[o]=function(t){t.colorInit||(t.start=m(t.elem,o),t.end=m(t.end),t.colorInit=!0),d.cssHooks[o].set(t.elem,t.start.transition(t.end,t.pos))}})})("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),d.cssHooks.borderColor={expand:function(i){var s={};return w(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}};var z,A,O,N,E,W,F,L,R,Y,B=d.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},j="ui-effects-",q="ui-effects-style",K="ui-effects-animated";function U(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,n={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(n[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=s[e]);else for(e in s)"string"==typeof s[e]&&(n[e]=s[e]);return n}function X(t,e,i,s){return t={effect:t=V.isPlainObject(t)?(e=t).effect:t},"function"==typeof(e=null==e?{}:e)&&(s=e,i=null,e={}),"number"!=typeof e&&!V.fx.speeds[e]||(s=i,i=e,e={}),"function"==typeof i&&(s=i,i=null),e&&V.extend(t,e),i=i||e.duration,t.duration=V.fx.off?0:"number"==typeof i?i:i in V.fx.speeds?V.fx.speeds[i]:V.fx.speeds._default,t.complete=s||e.complete,t}function $(t){return!t||"number"==typeof t||V.fx.speeds[t]||("string"==typeof t&&!V.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function G(t,e){var i=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?i:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}V.effects={effect:{}},N=["add","remove","toggle"],E={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},V.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){V.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(d.style(t.elem,e,t.end),t.setAttr=!0)}}),V.fn.addBack||(V.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),V.effects.animateClass=function(n,t,e,i){var o=V.speed(t,e,i);return this.queue(function(){var i=V(this),t=i.attr("class")||"",e=(e=o.children?i.find("*").addBack():i).map(function(){return{el:V(this),start:U(this)}}),s=function(){V.each(N,function(t,e){n[e]&&i[e+"Class"](n[e])})};s(),e=e.map(function(){return this.end=U(this.el[0]),this.diff=function(t,e){var i,s,n={};for(i in e)s=e[i],t[i]!==s&&(E[i]||!V.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s));return n}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=V.Deferred(),i=V.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),V.when.apply(V,e.get()).done(function(){s(),V.each(arguments,function(){var e=this.el;V.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},V.fn.extend({addClass:(O=V.fn.addClass,function(t,e,i,s){return e?V.effects.animateClass.call(this,{add:t},e,i,s):O.apply(this,arguments)}),removeClass:(A=V.fn.removeClass,function(t,e,i,s){return 1<arguments.length?V.effects.animateClass.call(this,{remove:t},e,i,s):A.apply(this,arguments)}),toggleClass:(z=V.fn.toggleClass,function(t,e,i,s,n){return"boolean"==typeof e||void 0===e?i?V.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,n):z.apply(this,arguments):V.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,n){return V.effects.animateClass.call(this,{add:e,remove:t},i,s,n)}}),V.expr&&V.expr.pseudos&&V.expr.pseudos.animated&&(V.expr.pseudos.animated=(W=V.expr.pseudos.animated,function(t){return!!V(t).data(K)||W(t)})),!1!==V.uiBackCompat&&V.extend(V.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(j+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;s<n;s++)null!==e[s]&&(i=t.data(j+e[s]),t.css(e[s],i))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=V("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!V.contains(i[0],n)||V(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(V.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),V.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!V.contains(t[0],e)||V(e).trigger("focus")),t}}),V.extend(V.effects,{version:"1.13.2",define:function(t,e,i){return i||(i=e,e="effect"),V.effects.effect[t]=i,V.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,e="vertical"!==i?(e||100)/100:1;return{height:t.height()*e,width:t.width()*s,outerHeight:t.outerHeight()*e,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(q,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(q)||"",t.removeData(q)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=V("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(j+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=j+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){V.effects.restoreStyle(t),V.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},V.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(o[e]=i[0]*n+i[1])}),o}}),V.fn.extend({effect:function(){function t(t){var e=V(this),i=V.effects.mode(e,r)||o;e.data(K,!0),l.push(i),o&&("show"===i||i===o&&"hide"===i)&&e.show(),o&&"none"===i||V.effects.saveStyle(e),"function"==typeof t&&t()}var s=X.apply(this,arguments),n=V.effects.effect[s.effect],o=n.mode,e=s.queue,i=e||"fx",a=s.complete,r=s.mode,l=[];return V.fx.off||!n?r?this[r](s.duration,a):this.each(function(){a&&a.call(this)}):!1===e?this.each(t).each(h):this.queue(i,t).queue(i,h);function h(t){var e=V(this);function i(){"function"==typeof a&&a.call(e[0]),"function"==typeof t&&t()}s.mode=l.shift(),!1===V.uiBackCompat||o?"none"===s.mode?(e[r](),i()):n.call(e[0],s,function(){e.removeData(K),V.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===r:"show"===r)?(e[r](),i()):n.call(e[0],s,i)}},show:(R=V.fn.show,function(t){if($(t))return R.apply(this,arguments);t=X.apply(this,arguments);return t.mode="show",this.effect.call(this,t)}),hide:(L=V.fn.hide,function(t){if($(t))return L.apply(this,arguments);t=X.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)}),toggle:(F=V.fn.toggle,function(t){if($(t)||"boolean"==typeof t)return F.apply(this,arguments);t=X.apply(this,arguments);return t.mode="toggle",this.effect.call(this,t)}),cssUnit:function(t){var i=this.css(t),s=[];return V.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):G(this.css("clip"),this)},transfer:function(t,e){var i=V(this),s=V(t.to),n="fixed"===s.css("position"),o=V("body"),a=n?o.scrollTop():0,r=n?o.scrollLeft():0,o=s.offset(),o={top:o.top-a,left:o.left-r,height:s.innerHeight(),width:s.innerWidth()},s=i.offset(),l=V("<div class='ui-effects-transfer'></div>");l.appendTo("body").addClass(t.className).css({top:s.top-a,left:s.left-r,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(o,t.duration,t.easing,function(){l.remove(),"function"==typeof e&&e()})}}),V.fx.step.clip=function(t){t.clipInit||(t.start=V(t.elem).cssClip(),"string"==typeof t.end&&(t.end=G(t.end,t.elem)),t.clipInit=!0),V(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},Y={},V.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){Y[t]=function(t){return Math.pow(t,e+2)}}),V.extend(Y,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),V.each(Y,function(t,e){V.easing["easeIn"+t]=e,V.easing["easeOut"+t]=function(t){return 1-e(1-t)},V.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});y=V.effects,V.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=V(this),n=t.direction||"up",o=s.cssClip(),a={clip:V.extend({},o)},r=V.effects.createPlaceholder(s);a.clip[i[n][0]]=a.clip[i[n][1]],"show"===t.mode&&(s.cssClip(a.clip),r&&r.css(V.effects.clipToBox(a)),a.clip=o),r&&r.animate(V.effects.clipToBox(a),t.duration,t.easing),s.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("bounce",function(t,e){var i,s,n=V(this),o=t.mode,a="hide"===o,r="show"===o,l=t.direction||"up",h=t.distance,c=t.times||5,o=2*c+(r||a?1:0),u=t.duration/o,d=t.easing,p="up"===l||"down"===l?"top":"left",f="up"===l||"left"===l,g=0,t=n.queue().length;for(V.effects.createPlaceholder(n),l=n.css(p),h=h||n["top"==p?"outerHeight":"outerWidth"]()/3,r&&((s={opacity:1})[p]=l,n.css("opacity",0).css(p,f?2*-h:2*h).animate(s,u,d)),a&&(h/=Math.pow(2,c-1)),(s={})[p]=l;g<c;g++)(i={})[p]=(f?"-=":"+=")+h,n.animate(i,u,d).animate(s,u,d),h=a?2*h:h/2;a&&((i={opacity:0})[p]=(f?"-=":"+=")+h,n.animate(i,u,d)),n.queue(e),V.effects.unshift(n,t,1+o)}),V.effects.define("clip","hide",function(t,e){var i={},s=V(this),n=t.direction||"vertical",o="both"===n,a=o||"horizontal"===n,o=o||"vertical"===n,n=s.cssClip();i.clip={top:o?(n.bottom-n.top)/2:n.top,right:a?(n.right-n.left)/2:n.right,bottom:o?(n.bottom-n.top)/2:n.bottom,left:a?(n.right-n.left)/2:n.left},V.effects.createPlaceholder(s),"show"===t.mode&&(s.cssClip(i.clip),i.clip=n),s.animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("drop","hide",function(t,e){var i=V(this),s="show"===t.mode,n=t.direction||"left",o="up"===n||"down"===n?"top":"left",a="up"===n||"left"===n?"-=":"+=",r="+="==a?"-=":"+=",l={opacity:0};V.effects.createPlaceholder(i),n=t.distance||i["top"==o?"outerHeight":"outerWidth"](!0)/2,l[o]=a+n,s&&(i.css(l),l[o]=r+n,l.opacity=1),i.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("explode","hide",function(t,e){var i,s,n,o,a,r,l=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=l,c=V(this),u="show"===t.mode,d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/h),f=Math.ceil(c.outerHeight()/l),g=[];function m(){g.push(this),g.length===l*h&&(c.css({visibility:"visible"}),V(g).remove(),e())}for(i=0;i<l;i++)for(o=d.top+i*f,r=i-(l-1)/2,s=0;s<h;s++)n=d.left+s*p,a=s-(h-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),V.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;V(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("fold","hide",function(e,t){var i=V(this),s=e.mode,n="show"===s,o="hide"===s,a=e.size||15,r=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],h=e.duration/2,c=V.effects.createPlaceholder(i),u=i.cssClip(),d={clip:V.extend({},u)},p={clip:V.extend({},u)},f=[u[l[0]],u[l[1]]],s=i.queue().length;r&&(a=parseInt(r[1],10)/100*f[o?0:1]),d.clip[l[0]]=a,p.clip[l[0]]=a,p.clip[l[1]]=0,n&&(i.cssClip(p.clip),c&&c.css(V.effects.clipToBox(p)),p.clip=u),i.queue(function(t){c&&c.animate(V.effects.clipToBox(d),h,e.easing).animate(V.effects.clipToBox(p),h,e.easing),t()}).animate(d,h,e.easing).animate(p,h,e.easing).queue(t),V.effects.unshift(i,s,4)}),V.effects.define("highlight","show",function(t,e){var i=V(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),V.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("size",function(s,e){var n,i=V(this),t=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=s.mode,l="effect"!==r,h=s.scale||"both",c=s.origin||["middle","center"],u=i.css("position"),d=i.position(),p=V.effects.scaledDimensions(i),f=s.from||p,g=s.to||V.effects.scaledDimensions(i,0);V.effects.createPlaceholder(i),"show"===r&&(r=f,f=g,g=r),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(n.from.y!==n.to.y&&(f=V.effects.setTransition(i,o,n.from.y,f),g=V.effects.setTransition(i,o,n.to.y,g)),n.from.x!==n.to.x&&(f=V.effects.setTransition(i,a,n.from.x,f),g=V.effects.setTransition(i,a,n.to.x,g))),"content"!==h&&"both"!==h||n.from.y!==n.to.y&&(f=V.effects.setTransition(i,t,n.from.y,f),g=V.effects.setTransition(i,t,n.to.y,g)),c&&(c=V.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*c.y+d.top,f.left=(p.outerWidth-f.outerWidth)*c.x+d.left,g.top=(p.outerHeight-g.outerHeight)*c.y+d.top,g.left=(p.outerWidth-g.outerWidth)*c.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(t),a=a.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=V(this),e=V.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},e={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=V.effects.setTransition(t,o,n.from.y,i),e=V.effects.setTransition(t,o,n.to.y,e)),n.from.x!==n.to.x&&(i=V.effects.setTransition(t,a,n.from.x,i),e=V.effects.setTransition(t,a,n.to.x,e)),l&&V.effects.saveStyle(t),t.css(i),t.animate(e,s.duration,s.easing,function(){l&&V.effects.restoreStyle(t)})})),i.animate(g,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=i.offset();0===g.opacity&&i.css("opacity",f.opacity),l||(i.css("position","static"===u?"relative":u).offset(t),V.effects.saveStyle(i)),e()}})}),V.effects.define("scale",function(t,e){var i=V(this),s=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),s=V.extend(!0,{from:V.effects.scaledDimensions(i),to:V.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(s.from.opacity=1,s.to.opacity=0),V.effects.effect.size.call(this,s,e)}),V.effects.define("puff","hide",function(t,e){t=V.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});V.effects.effect.scale.call(this,t,e)}),V.effects.define("pulsate","show",function(t,e){var i=V(this),s=t.mode,n="show"===s,o=2*(t.times||5)+(n||"hide"===s?1:0),a=t.duration/o,r=0,l=1,s=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),r=1);l<o;l++)i.animate({opacity:r},a,t.easing),r=1-r;i.animate({opacity:r},a,t.easing),i.queue(e),V.effects.unshift(i,s,1+o)}),V.effects.define("shake",function(t,e){var i=1,s=V(this),n=t.direction||"left",o=t.distance||20,a=t.times||3,r=2*a+1,l=Math.round(t.duration/r),h="up"===n||"down"===n?"top":"left",c="up"===n||"left"===n,u={},d={},p={},n=s.queue().length;for(V.effects.createPlaceholder(s),u[h]=(c?"-=":"+=")+o,d[h]=(c?"+=":"-=")+2*o,p[h]=(c?"-=":"+=")+2*o,s.animate(u,l,t.easing);i<a;i++)s.animate(d,l,t.easing).animate(p,l,t.easing);s.animate(d,l,t.easing).animate(u,l/2,t.easing).queue(e),V.effects.unshift(s,n,1+r)}),V.effects.define("slide","show",function(t,e){var i,s,n=V(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,r=t.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r,c=t.distance||n["top"==l?"outerHeight":"outerWidth"](!0),u={};V.effects.createPlaceholder(n),i=n.cssClip(),s=n.position()[l],u[l]=(h?-1:1)*c+s,u.clip=n.cssClip(),u.clip[o[r][1]]=u.clip[o[r][0]],"show"===a&&(n.cssClip(u.clip),n.css(l,u[l]),u.clip=i,u[l]=s),n.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),y=!1!==V.uiBackCompat?V.effects.define("transfer",function(t,e){V(this).transfer(t,e)}):y;V.ui.focusable=function(t,e){var i,s,n,o,a=t.nodeName.toLowerCase();return"area"===a?(s=(i=t.parentNode).name,!(!t.href||!s||"map"!==i.nodeName.toLowerCase())&&(0<(s=V("img[usemap='#"+s+"']")).length&&s.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(a)?(n=!t.disabled)&&(o=V(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===a&&t.href||e,n&&V(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(V(t)))},V.extend(V.expr.pseudos,{focusable:function(t){return V.ui.focusable(t,null!=V.attr(t,"tabindex"))}});var Q,J;V.ui.focusable,V.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):V(this[0].form)},V.ui.formResetMixin={_formResetHandler:function(){var e=V(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");V.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(V.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}};V.expr.pseudos||(V.expr.pseudos=V.expr[":"]),V.uniqueSort||(V.uniqueSort=V.unique),V.escapeSelector||(Q=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,J=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},V.escapeSelector=function(t){return(t+"").replace(Q,J)}),V.fn.even&&V.fn.odd||V.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}});var Z;V.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},V.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+V.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},V.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=V(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:V(this[0].ownerDocument||document)},V.extend(V.expr.pseudos,{tabbable:function(t){var e=V.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&V.ui.focusable(t,i)}}),V.fn.extend({uniqueId:(Z=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++Z)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&V(this).removeAttr("id")})}}),V.widget("ui.accordion",{version:"1.13.2",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(t){return t.find("> li > :first-child").add(t.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=V(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():V()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=V("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=V.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(V(t.target).attr("tabIndex",-1),V(n).attr("tabIndex",0),V(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===V.ui.keyCode.UP&&t.ctrlKey&&V(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=V()):!1===t.active?this._activate(0):this.active.length&&!V.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=V()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=V(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=V(this).outerHeight(!0)}),this.headers.next().each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=V(this).is(":visible");t||V(this).show(),i=Math.max(i,V(this).css("height","").height()),t||V(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):V()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():s.next(),r=i.next(),a={oldHeader:i,oldPanel:r,newHeader:o?V():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,a)||(e.active=!o&&this.headers.index(s),this.active=n?V():s,this._toggle(a),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(i=i.children(".ui-accordion-header-icon"),this._removeClass(i,null,e.icons.activeHeader)._addClass(i,null,e.icons.header)),n||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,e.icons.header)._addClass(n,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(V(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){var s,n,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!i.length||t.index()<i.index()),c=this.options.animate||{},u=h&&c.down||c,h=function(){a._toggleComplete(e)};return n=(n="string"==typeof u?u:n)||u.easing||c.easing,o=(o="number"==typeof u?u:o)||u.duration||c.duration,i.length?t.length?(s=t.show().outerHeight(),i.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:n,complete:h,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===l&&(r+=e.now):"content"!==a.options.heightStyle&&(e.now=Math.round(s-i.outerHeight()-r),r=0)}})):i.animate(this.hideProps,o,n,h):t.animate(this.showProps,o,n,h)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),V.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=!(i=i||e.body).nodeName?e.body:i},V.widget("ui.menu",{version:"1.13.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=V(t.target),i=V(V.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){V.contains(this.element[0],V.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=V(t.target).closest(".ui-menu-item"),i=V(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=V(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case V.ui.keyCode.PAGE_UP:this.previousPage(t);break;case V.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case V.ui.keyCode.HOME:this._move("first","first",t);break;case V.ui.keyCode.END:this._move("last","last",t);break;case V.ui.keyCode.UP:this.previous(t);break;case V.ui.keyCode.DOWN:this.next(t);break;case V.ui.keyCode.LEFT:this.collapse(t);break;case V.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case V.ui.keyCode.ENTER:case V.ui.keyCode.SPACE:this._activate(t);break;case V.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=V(this),e=t.prev(),i=V("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=V(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!V.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(V.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(V.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s<e+t&&this.activeMenu.scrollTop(i+e-s+t))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=V.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:V(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},i?0:this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!V(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this._menuItems(this.active.children(".ui-menu")).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;(s=this.active?"first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(e=V(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=V(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||V(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var t=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return e.test(String.prototype.trim.call(V(this).children(".ui-menu-item-wrapper").text()))})}});V.widget("ui.autocomplete",{version:"1.13.2",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=V("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){V(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==V.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=V("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||V.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(V.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=V.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:V.map(t,function(t){return"string"==typeof t?{label:t,value:t}:V.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(V.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;V.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return V("<li>").append(V("<div>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),V.extend(V.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(V.ui.autocomplete.escapeRegex(e),"i");return V.grep(t,function(t){return i.test(t.label||t.value||t)})}}),V.widget("ui.autocomplete",V.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(e))},100))}});V.ui.autocomplete;var tt=/ui-corner-([a-z]){2,6}/g;V.widget("ui.controlgroup",{version:"1.13.2",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var o=this,a=[];V.each(this.options.items,function(s,t){var e,n={};if(t)return"controlgroupLabel"===s?((e=o.element.find(t)).each(function(){var t=V(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),o._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(a=a.concat(e.get()))):void(V.fn[s]&&(n=o["_"+s+"Options"]?o["_"+s+"Options"]("middle"):{classes:{}},o.element.find(t).each(function(){var t=V(this),e=t[s]("instance"),i=V.widget.extend({},n);"button"===s&&t.parent(".ui-spinner").length||((e=e||t[s]()[s]("instance"))&&(i.classes=o._resolveClassesValues(i.classes,e)),t[s](i),i=t[s]("widget"),V.data(i[0],"ui-controlgroup-data",e||t[s]("instance")),a.push(i[0]))})))}),this.childWidgets=V(V.uniqueSort(a)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=V(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return V.each(i,function(t){var e=s.options.classes[t]||"",e=String.prototype.trim.call(e.replace(tt,""));n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,(n=this.options.onlyVisible?n.filter(":visible"):n).length&&(V.each(["first","last"],function(t,e){var i,s=n[e]().data("ui-controlgroup-data");s&&o["_"+s.widgetName+"Options"]?((i=o["_"+s.widgetName+"Options"](1===n.length?"only":e)).classes=o._resolveClassesValues(i.classes,s),s.element[s.widgetName](i)):o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}});V.widget("ui.checkboxradio",[V.ui.formResetMixin,{version:"1.13.2",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e=this._super()||{};return this._readType(),t=this.element.labels(),this.label=V(t[t.length-1]),this.label.length||V.error("No label found for checkboxradio widget"),this.originalLabel="",(t=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=t.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(e.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(e.disabled=t),e},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||V.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+V.escapeSelector(t)+"']";return t?(this.form.length?V(this.form[0].elements).filter(e):V(e).filter(function(){return 0===V(this)._form().length})).not(this.element):V([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=V(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=V("<span>"),this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),(t=this.iconSpace?t.not(this.iconSpace[0]):t).remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);var et;V.ui.checkboxradio;V.widget("ui.button",{version:"1.13.2",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===V.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var i="iconPosition"!==t,s=i?this.options.iconPosition:e,t="top"===s||"bottom"===s;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=V("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,e),this._attachIcon(s),t?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(s))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=(void 0===t.showLabel?this.options:t).showLabel,i=(void 0===t.icon?this.options:t).icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),(this.element[0].disabled=e)&&this.element.trigger("blur"))},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==V.uiBackCompat&&(V.widget("ui.button",V.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),V.fn.button=(et=V.fn.button,function(i){var t="string"==typeof i,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t=V(this).attr("type"),e=V.data(this,"ui-"+("checkbox"!==t&&"radio"!==t?"button":"checkboxradio"));return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for button widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on button prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V(this).attr("type"),e="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",t=V.data(this,"ui-"+e);t?(t.option(i||{}),t._init&&t._init()):"button"!=e?V(this).checkboxradio(V.extend({icon:!1},i)):et.call(V(this),i)})),n}),V.fn.buttonset=function(){return V.ui.controlgroup||V.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var it;V.ui.button;function st(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=nt(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function nt(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,ot)}function ot(){V.datepicker._isDisabledDatepicker((it.inline?it.dpDiv.parent():it.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function at(t,e){for(var i in V.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}V.extend(V.ui,{datepicker:{version:"1.13.2"}}),V.extend(st.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return at(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s=t.nodeName.toLowerCase(),n="div"===s||"span"===s;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(V(t),n)).settings=V.extend({},e||{}),"input"===s?this._connectDatepicker(t,i):n&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?nt(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=V(t);e.append=V([]),e.trigger=V([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),V.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s=this._get(e,"appendText"),n=this._get(e,"isRTL");e.append&&e.append.remove(),s&&(e.append=V("<span>").addClass(this._appendClass).text(s),t[n?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(s=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),this._get(e,"buttonImageOnly")?e.trigger=V("<img>").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):(e.trigger=V("<button type='button'>").addClass(this._triggerClass),i?e.trigger.html(V("<img>").attr({src:i,alt:s,title:s})):e.trigger.text(s)),t[n?"before":"after"](e.trigger),e.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===t[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==t[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,i,s,n,o,a;this._get(t,"autoSize")&&!t.inline&&(o=new Date(2009,11,20),(a=this._get(t,"dateFormat")).match(/[DM]/)&&(e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length))},_inlineDatepicker:function(t,e){var i=V(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),V.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,s,n){var o,a=this._dialogInst;return a||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(a=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",a)),at(a.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(a,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+e,s/2-150+n]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",a),this},_destroyDatepicker:function(t){var e,i=V(t),s=V.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),V.removeData(t,"datepicker"),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),it===s&&(it=null,this._curInst=null))},_enableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return V.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?V.extend({},V.datepicker._defaults):o?"all"===e?V.extend({},o.settings):this._get(o,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),o&&(this._curInst===o&&this._hideDatepicker(),n=this._getDateDatepicker(t,!0),e=this._getMinMaxDate(o,"min"),i=this._getMinMaxDate(o,"max"),at(o.settings,s),null!==e&&void 0!==s.dateFormat&&void 0===s.minDate&&(o.settings.minDate=this._formatDate(o,e)),null!==i&&void 0!==s.dateFormat&&void 0===s.maxDate&&(o.settings.maxDate=this._formatDate(o,i)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(V(t),o),this._autoSize(o),this._setDate(o,n),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,i,s=V.datepicker._getInst(t.target),n=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,V.datepicker._datepickerShowing)switch(t.keyCode){case 9:V.datepicker._hideDatepicker(),n=!1;break;case 13:return(i=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",s.dpDiv))[0]&&V.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,i[0]),(e=V.datepicker._get(s,"onSelect"))?(i=V.datepicker._formatDate(s),e.apply(s.input?s.input[0]:null,[i,s])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&V.datepicker._clearDate(t.target),n=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&V.datepicker._gotoToday(t.target),n=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?1:-1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,-7,"D"),n=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?-1:1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,7,"D"),n=t.ctrlKey||t.metaKey;break;default:n=!1}else 36===t.keyCode&&t.ctrlKey?V.datepicker._showDatepicker(this):n=!1;n&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i=V.datepicker._getInst(t.target);if(V.datepicker._get(i,"constrainInput"))return e=V.datepicker._possibleChars(V.datepicker._get(i,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!e||-1<e.indexOf(i)},_doKeyUp:function(t){t=V.datepicker._getInst(t.target);if(t.input.val()!==t.lastVal)try{V.datepicker.parseDate(V.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,V.datepicker._getFormatConfig(t))&&(V.datepicker._setDateFromField(t),V.datepicker._updateAlternate(t),V.datepicker._updateDatepicker(t))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=V("input",t.parentNode)[0]),V.datepicker._isDisabledDatepicker(t)||V.datepicker._lastInput===t||(n=V.datepicker._getInst(t),V.datepicker._curInst&&V.datepicker._curInst!==n&&(V.datepicker._curInst.dpDiv.stop(!0,!0),n&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0])),!1!==(i=(s=V.datepicker._get(n,"beforeShow"))?s.apply(t,[t,n]):{})&&(at(n.settings,i),n.lastVal=null,V.datepicker._lastInput=t,V.datepicker._setDateFromField(n),V.datepicker._inDialog&&(t.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(t),V.datepicker._pos[1]+=t.offsetHeight),e=!1,V(t).parents().each(function(){return!(e|="fixed"===V(this).css("position"))}),s={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(n),s=V.datepicker._checkOffset(n,s,e),n.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":e?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),n.inline||(i=V.datepicker._get(n,"showAnim"),s=V.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(V(t))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[i]?n.dpDiv.show(i,V.datepicker._get(n,"showOptions"),s):n.dpDiv[i||"show"](i?s:null),V.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),V.datepicker._curInst=n)))},_updateDatepicker:function(t){this.maxRows=4,(it=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),s=i[1],n=t.dpDiv.find("."+this._dayOverClass+" a"),o=V.datepicker._get(t,"onUpdateDatepicker");0<n.length&&ot.apply(n.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml),e=t.yearshtml=null},0)),o&&o.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:V(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:V(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?V(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?V(document).scrollTop():0,e.left-=Math.min(e.left,e.left+s>r&&s<r?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,e.top+n>l&&n<l?Math.abs(n+a):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||V.expr.pseudos.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=V(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s=this._curInst;!s||t&&s!==V.data(t,"datepicker")||this._datepickerShowing&&(e=this._get(s,"showAnim"),i=this._get(s,"duration"),t=function(){V.datepicker._tidyDialog(s)},V.effects&&(V.effects.effect[e]||V.effects[e])?s.dpDiv.hide(e,V.datepicker._get(s,"showOptions"),i,t):s.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,t),e||t(),this._datepickerShowing=!1,(t=this._get(s,"onClose"))&&t.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI&&(V.unblockUI(),V("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){var e;V.datepicker._curInst&&(e=V(t.target),t=V.datepicker._getInst(e[0]),(e[0].id===V.datepicker._mainDivId||0!==e.parents("#"+V.datepicker._mainDivId).length||e.hasClass(V.datepicker.markerClassName)||e.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)&&(!e.hasClass(V.datepicker.markerClassName)||V.datepicker._curInst===t)||V.datepicker._hideDatepicker())},_adjustDate:function(t,e,i){var s=V(t),t=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(t,e,i),this._updateDatepicker(t))},_gotoToday:function(t){var e=V(t),i=this._getInst(e[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(t=new Date,i.selectedDay=t.getDate(),i.drawMonth=i.selectedMonth=t.getMonth(),i.drawYear=i.selectedYear=t.getFullYear()),this._notifyChange(i),this._adjustDate(e)},_selectMonthYear:function(t,e,i){var s=V(t),t=this._getInst(s[0]);t["selected"+("M"===i?"Month":"Year")]=t["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(t),this._adjustDate(s)},_selectDay:function(t,e,i,s){var n=V(t);V(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(n[0])||((n=this._getInst(n[0])).selectedDay=n.currentDay=parseInt(V("a",s).attr("data-date")),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){t=V(t);this._selectDate(t,"")},_selectDate:function(t,e){var i=V(t),t=this._getInst(i[0]);e=null!=e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(i=this._get(t,"onSelect"))?i.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,s=this._get(t,"altField");s&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),t=this.formatDate(e,i,this._getFormatConfig(t)),V(document).find(s).val(t))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e=new Date(t.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(e,n,t){if(null==e||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;for(var i,s,o,a=0,r=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,r="string"!=typeof r?r:(new Date).getFullYear()%100+parseInt(r,10),l=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,h=(t?t.dayNames:null)||this._defaults.dayNames,c=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,u=(t?t.monthNames:null)||this._defaults.monthNames,d=-1,p=-1,f=-1,g=-1,m=!1,_=function(t){t=w+1<e.length&&e.charAt(w+1)===t;return t&&w++,t},v=function(t){var e=_(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,e=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}"),e=n.substring(a).match(e);if(!e)throw"Missing number at position "+a;return a+=e[0].length,parseInt(e[0],10)},b=function(t,e,i){var s=-1,e=V.map(_(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(V.each(e,function(t,e){var i=e[1];if(n.substr(a,i.length).toLowerCase()===i.toLowerCase())return s=e[0],a+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+a},y=function(){if(n.charAt(a)!==e.charAt(w))throw"Unexpected literal at position "+a;a++},w=0;w<e.length;w++)if(m)"'"!==e.charAt(w)||_("'")?y():m=!1;else switch(e.charAt(w)){case"d":f=v("d");break;case"D":b("D",l,h);break;case"o":g=v("o");break;case"m":p=v("m");break;case"M":p=b("M",c,u);break;case"y":d=v("y");break;case"@":d=(o=new Date(v("@"))).getFullYear(),p=o.getMonth()+1,f=o.getDate();break;case"!":d=(o=new Date((v("!")-this._ticksTo1970)/1e4)).getFullYear(),p=o.getMonth()+1,f=o.getDate();break;case"'":_("'")?y():m=!0;break;default:y()}if(a<n.length&&(s=n.substr(a),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===d?d=(new Date).getFullYear():d<100&&(d+=(new Date).getFullYear()-(new Date).getFullYear()%100+(d<=r?0:-100)),-1<g)for(p=1,f=g;;){if(f<=(i=this._getDaysInMonth(d,p-1)))break;p++,f-=i}if((o=this._daylightSavingAdjust(new Date(d,p-1,f))).getFullYear()!==d||o.getMonth()+1!==p||o.getDate()!==f)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";function s(t,e,i){var s=""+e;if(c(t))for(;s.length<i;)s="0"+s;return s}function n(t,e,i,s){return(c(t)?s:i)[e]}var o,a=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,c=function(t){t=o+1<e.length&&e.charAt(o+1)===t;return t&&o++,t},u="",d=!1;if(t)for(o=0;o<e.length;o++)if(d)"'"!==e.charAt(o)||c("'")?u+=e.charAt(o):d=!1;else switch(e.charAt(o)){case"d":u+=s("d",t.getDate(),2);break;case"D":u+=n("D",t.getDay(),a,r);break;case"o":u+=s("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=s("m",t.getMonth()+1,2);break;case"M":u+=n("M",t.getMonth(),l,h);break;case"y":u+=c("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":c("'")?u+="'":d=!0;break;default:u+=e.charAt(o)}return u},_possibleChars:function(e){for(var t="",i=!1,s=function(t){t=n+1<e.length&&e.charAt(n+1)===t;return t&&n++,t},n=0;n<e.length;n++)if(i)"'"!==e.charAt(n)||s("'")?t+=e.charAt(n):i=!1;else switch(e.charAt(n)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":s("'")?t+="'":i=!0;break;default:t+=e.charAt(n)}return t},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(r,t,e){var i,s,t=null==t||""===t?e:"string"==typeof t?function(t){try{return V.datepicker.parseDate(V.datepicker._get(r,"dateFormat"),t,V.datepicker._getFormatConfig(r))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?V.datepicker._getDate(r):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":n+=parseInt(a[1],10);break;case"w":case"W":n+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s))}a=o.exec(t)}return new Date(i,s,n)}(t):"number"==typeof t?isNaN(t)?e:(i=t,(s=new Date).setDate(s.getDate()+i),s):new Date(t.getTime());return(t=t&&"Invalid Date"===t.toString()?e:t)&&(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)),this._daylightSavingAdjust(t)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=e.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=e.getMonth(),t.drawYear=t.selectedYear=t.currentYear=e.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){V.datepicker._adjustDate(i,-e,"M")},next:function(){V.datepicker._adjustDate(i,+e,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(i)},selectDay:function(){return V.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(i,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,x,k,C,D,I,T,P,M,S,H,z,A=new Date,O=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth(),A.getDate())),N=this._get(t,"isRTL"),E=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),F=this._get(t,"navigationAsDateFormat"),L=this._getNumberOfMonths(t),R=this._get(t,"showCurrentAtPos"),A=this._get(t,"stepMonths"),Y=1!==L[0]||1!==L[1],B=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),j=this._getMinMaxDate(t,"min"),q=this._getMinMaxDate(t,"max"),K=t.drawMonth-R,U=t.drawYear;if(K<0&&(K+=12,U--),q)for(e=this._daylightSavingAdjust(new Date(q.getFullYear(),q.getMonth()-L[0]*L[1]+1,q.getDate())),e=j&&e<j?j:e;this._daylightSavingAdjust(new Date(U,K,1))>e;)--K<0&&(K=11,U--);for(t.drawMonth=K,t.drawYear=U,R=this._get(t,"prevText"),R=F?this.formatDate(R,this._daylightSavingAdjust(new Date(U,K-A,1)),this._getFormatConfig(t)):R,i=this._canAdjustMonth(t,-1,U,K)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"e":"w")).text(R))[0].outerHTML:W?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"e":"w")).text(R))[0].outerHTML,R=this._get(t,"nextText"),R=F?this.formatDate(R,this._daylightSavingAdjust(new Date(U,K+A,1)),this._getFormatConfig(t)):R,s=this._canAdjustMonth(t,1,U,K)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"w":"e")).text(R))[0].outerHTML:W?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:R}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(N?"w":"e")).text(R))[0].outerHTML,A=this._get(t,"currentText"),W=this._get(t,"gotoCurrent")&&t.currentDay?B:O,A=F?this.formatDate(A,W,this._getFormatConfig(t)):A,R="",t.inline||(R=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),F="",E&&(F=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(N?R:"").append(this._isInRange(t,W)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(A):"").append(N?"":R)[0].outerHTML),n=parseInt(this._get(t,"firstDay"),10),n=isNaN(n)?0:n,o=this._get(t,"showWeek"),a=this._get(t,"dayNames"),r=this._get(t,"dayNamesMin"),l=this._get(t,"monthNames"),h=this._get(t,"monthNamesShort"),c=this._get(t,"beforeShowDay"),u=this._get(t,"showOtherMonths"),d=this._get(t,"selectOtherMonths"),p=this._getDefaultDate(t),f="",m=0;m<L[0];m++){for(_="",this.maxRows=4,v=0;v<L[1];v++){if(b=this._daylightSavingAdjust(new Date(U,K,t.selectedDay)),y=" ui-corner-all",w="",Y){if(w+="<div class='ui-datepicker-group",1<L[1])switch(v){case 0:w+=" ui-datepicker-group-first",y=" ui-corner-"+(N?"right":"left");break;case L[1]-1:w+=" ui-datepicker-group-last",y=" ui-corner-"+(N?"left":"right");break;default:w+=" ui-datepicker-group-middle",y=""}w+="'>"}for(w+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+y+"'>"+(/all|left/.test(y)&&0===m?N?s:i:"")+(/all|right/.test(y)&&0===m?N?i:s:"")+this._generateMonthYearHeader(t,K,U,j,q,0<m||0<v,l,h)+"</div><table class='ui-datepicker-calendar'><thead><tr>",x=o?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",g=0;g<7;g++)x+="<th scope='col'"+(5<=(g+n+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+a[k=(g+n)%7]+"'>"+r[k]+"</span></th>";for(w+=x+"</tr></thead><tbody>",D=this._getDaysInMonth(U,K),U===t.selectedYear&&K===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,D)),C=(this._getFirstDayOfMonth(U,K)-n+7)%7,D=Math.ceil((C+D)/7),I=Y&&this.maxRows>D?this.maxRows:D,this.maxRows=I,T=this._daylightSavingAdjust(new Date(U,K,1-C)),P=0;P<I;P++){for(w+="<tr>",M=o?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(T)+"</td>":"",g=0;g<7;g++)S=c?c.apply(t.input?t.input[0]:null,[T]):[!0,""],z=(H=T.getMonth()!==K)&&!d||!S[0]||j&&T<j||q&&q<T,M+="<td class='"+(5<=(g+n+6)%7?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(T.getTime()===b.getTime()&&K===t.selectedMonth&&t._keyEvent||p.getTime()===T.getTime()&&p.getTime()===b.getTime()?" "+this._dayOverClass:"")+(z?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!u?"":" "+S[1]+(T.getTime()===B.getTime()?" "+this._currentClass:"")+(T.getTime()===O.getTime()?" ui-datepicker-today":""))+"'"+(H&&!u||!S[2]?"":" title='"+S[2].replace(/'/g,"&#39;")+"'")+(z?"":" data-handler='selectDay' data-event='click' data-month='"+T.getMonth()+"' data-year='"+T.getFullYear()+"'")+">"+(H&&!u?"&#xa0;":z?"<span class='ui-state-default'>"+T.getDate()+"</span>":"<a class='ui-state-default"+(T.getTime()===O.getTime()?" ui-state-highlight":"")+(T.getTime()===B.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#' aria-current='"+(T.getTime()===B.getTime()?"true":"false")+"' data-date='"+T.getDate()+"'>"+T.getDate()+"</a>")+"</td>",T.setDate(T.getDate()+1),T=this._daylightSavingAdjust(T);w+=M+"</tr>"}11<++K&&(K=0,U++),_+=w+="</tbody></table>"+(Y?"</div>"+(0<L[0]&&v===L[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}f+=_}return f+=F,t._keyEvent=!1,f},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f=this._get(t,"changeMonth"),g=this._get(t,"changeYear"),m=this._get(t,"showMonthAfterYear"),_=this._get(t,"selectMonthLabel"),v=this._get(t,"selectYearLabel"),b="<div class='ui-datepicker-title'>",y="";if(o||!f)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' aria-label='"+_+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(m||(b+=y+(!o&&f&&g?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!g)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(a=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),d=(_=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(a[0]),p=Math.max(d,_(a[1]||"")),d=s?Math.max(d,s.getFullYear()):d,p=n?Math.min(p,n.getFullYear()):p,t.yearshtml+="<select class='ui-datepicker-year' aria-label='"+v+"' data-handler='selectYear' data-event='change'>";d<=p;d++)t.yearshtml+="<option value='"+d+"'"+(d===i?" selected='selected'":"")+">"+d+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),m&&(b+=(!o&&f&&g?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),e=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,e)));t.selectedDay=e.getDate(),t.drawMonth=t.selectedMonth=e.getMonth(),t.drawYear=t.selectedYear=e.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),e=i&&e<i?i:e;return t&&t<e?t:e},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),n=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(t,n)},_isInRange:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=null,o=null,a=this._get(t,"yearRange");return a&&(t=a.split(":"),a=(new Date).getFullYear(),n=parseInt(t[0],10),o=parseInt(t[1],10),t[0].match(/[+\-].*/)&&(n+=a),t[1].match(/[+\-].*/)&&(o+=a)),(!i||e.getTime()>=i.getTime())&&(!s||e.getTime()<=s.getTime())&&(!n||e.getFullYear()>=n)&&(!o||e.getFullYear()<=o)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);e=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),e,this._getFormatConfig(t))}}),V.fn.datepicker=function(t){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this].concat(e)):V.datepicker._attachDatepicker(this,t)})},V.datepicker=new st,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.13.2";V.datepicker,V.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var rt=!1;V(document).on("mouseup",function(){rt=!1});V.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===V.data(t.target,e.widgetName+".preventClickEvent"))return V.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!rt){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&V(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===V.data(t.target,this.widgetName+".preventClickEvent")&&V.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),rt=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(V.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&V.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,rt=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),V.ui.plugin={add:function(t,e,i){var s,n=V.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},V.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&V(t).trigger("blur")};V.widget("ui.draggable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<V(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=V(this);return V("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=V.ui.safeActiveElement(this.document[0]);V(t.target).closest(e).length||V.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),V.ui.ddmanager&&(V.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===V(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),V.ui.ddmanager&&!e.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),V.ui.ddmanager&&V.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new V.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return V.ui.ddmanager&&!this.options.dropBehaviour&&(i=V.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?V(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),V.ui.ddmanager&&V.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),V.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new V.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!V(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i="function"==typeof e.helper,t=i?V(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,n=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=V(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,V(n).width()-this.helperProportions.width-this.margins.left,(V(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[V(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,V(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,V(window).scrollLeft()+V(window).width()-this.helperProportions.width-this.margins.left,V(window).scrollTop()+(V(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,t=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:t?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:t?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s=this.options,n=this._isRootNode(this.scrollParent[0]),o=t.pageX,a=t.pageY;return n&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(i=this.relativeContainer.offset(),[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(a=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(a=i[3]+this.offset.click.top)),s.grid&&(t=s.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,a=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-s.grid[1]:t+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis&&(a=this.originalPageY)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),V.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),V.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),V.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=V.extend({},t,{item:i.element});i.sortables=[],V(i.options.connectToSortable).each(function(){var t=V(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=V.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,V.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){V.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,V.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&V.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,V.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,V.each(n.sortables,function(){this.refreshPositions()}))})}}),V.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=V("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&V("body").css("cursor",i._cursor)}}),V.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&V(e.helper).css("opacity",i._opacity)}}),V.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY<s.scrollSensitivity?o.scrollTop=n=o.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(o.scrollTop=n=o.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+o.offsetWidth-t.pageX<s.scrollSensitivity?o.scrollLeft=n=o.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(o.scrollLeft=n=o.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-V(a).scrollTop()<s.scrollSensitivity?n=V(a).scrollTop(V(a).scrollTop()-s.scrollSpeed):V(window).height()-(t.pageY-V(a).scrollTop())<s.scrollSensitivity&&(n=V(a).scrollTop(V(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-V(a).scrollLeft()<s.scrollSensitivity?n=V(a).scrollLeft(V(a).scrollLeft()-s.scrollSpeed):V(window).width()-(t.pageX-V(a).scrollLeft())<s.scrollSensitivity&&(n=V(a).scrollLeft(V(a).scrollLeft()+s.scrollSpeed)))),!1!==n&&V.ui.ddmanager&&!s.dropBehaviour&&V.ui.ddmanager.prepareOffsets(i,t)}}),V.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],V(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=V(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,n,o,a,r,l,h,c,u,d=i.options,p=d.snapTolerance,f=e.offset.left,g=f+i.helperProportions.width,m=e.offset.top,_=m+i.helperProportions.height,v=i.snapElements.length-1;0<=v;v--)l=(r=i.snapElements[v].left-i.margins.left)+i.snapElements[v].width,c=(h=i.snapElements[v].top-i.margins.top)+i.snapElements[v].height,g<r-p||l+p<f||_<h-p||c+p<m||!V.contains(i.snapElements[v].item.ownerDocument,i.snapElements[v].item)?(i.snapElements[v].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=!1):("inner"!==d.snapMode&&(s=Math.abs(h-_)<=p,n=Math.abs(c-m)<=p,o=Math.abs(r-g)<=p,a=Math.abs(l-f)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r-i.helperProportions.width}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left)),u=s||n||o||a,"outer"!==d.snapMode&&(s=Math.abs(h-m)<=p,n=Math.abs(c-_)<=p,o=Math.abs(r-f)<=p,a=Math.abs(l-g)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left)),!i.snapElements[v].snapping&&(s||n||o||a||u)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=s||n||o||a||u)}}),V.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,i=i.options,i=V.makeArray(V(i.stack)).sort(function(t,e){return(parseInt(V(t).css("zIndex"),10)||0)-(parseInt(V(e).css("zIndex"),10)||0)});i.length&&(s=parseInt(V(i[0]).css("zIndex"),10)||0,V(i).each(function(t){V(this).css("zIndex",s+t)}),this.css("zIndex",s+i.length))}}),V.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("zIndex")&&(i._zIndex=e.css("zIndex")),e.css("zIndex",i.zIndex)},stop:function(t,e,i){i=i.options;i._zIndex&&V(e.helper).css("zIndex",i._zIndex)}});V.ui.draggable;V.widget("ui.resizable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===V(t).css("overflow"))return!1;var i=e&&"left"===e?"scrollLeft":"scrollTop",e=!1;if(0<t[i])return!0;try{t[i]=1,e=0<t[i],t[i]=0}catch(t){}return e},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),V.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(V("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&V(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){V(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,a=this;if(this.handles=o.handles||(V(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=V(),this._addedHandles=V(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),n=V("<div>"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=V(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=V(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=V(this.handles[e])[0])!==t.target&&!V.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=V(s.containment).scrollLeft()||0,i+=V(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=V(".ui-resizable-"+this.axis).css("cursor"),V("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),V.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(V.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),V("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),s<n.maxWidth&&(n.maxWidth=s),t<n.maxHeight&&(n.maxHeight=t)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&i&&(t.top=l-e.minHeight),n&&i&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||V("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){V.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),V.ui.plugin.add("resizable","animate",{stop:function(e){var i=V(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,n={width:i.size.width-a,height:i.size.height-o},a=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(V.extend(n,o&&a?{top:o,left:a}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&V(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),V.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=V(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,a=o instanceof V?o.get(0):/parent/.test(o)?e.parent().get(0):o;a&&(n.containerElement=V(a),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:V(document),left:0,top:0,width:V(document).width(),height:V(document).height()||document.body.parentNode.scrollHeight}):(i=V(a),s=[],V(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(a,"left")?a.scrollWidth:o,e=n._hasScroll(a)?a.scrollHeight:e,n.parentData={element:a,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=V(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,a={top:0,left:0},r=e.containerElement,t=!0;r[0]!==document&&/static/.test(r.css("position"))&&(a=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-a.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-a.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-a.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=V(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=V(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o})}}),V.ui.plugin.add("resizable","alsoResize",{start:function(){var t=V(this).resizable("instance").options;V(t.alsoResize).each(function(){var t=V(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=V(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,a={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};V(s.alsoResize).each(function(){var t=V(this),s=V(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];V.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){V(this).removeData("ui-resizable-alsoresize")}}),V.ui.plugin.add("resizable","ghost",{start:function(){var t=V(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==V.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=V(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=V(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),V.ui.plugin.add("resizable","grid",{resize:function(){var t,e=V(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,c=Math.round((s.width-n.width)/l)*l,u=Math.round((s.height-n.height)/h)*h,d=n.width+c,p=n.height+u,f=i.maxWidth&&i.maxWidth<d,g=i.maxHeight&&i.maxHeight<p,m=i.minWidth&&i.minWidth>d,s=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=l),s&&(p+=h),f&&(d-=l),g&&(p-=h),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):((p-h<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<p-h?(e.size.height=p,e.position.top=o.top-u):(p=h-t.height,e.size.height=p,e.position.top=o.top+n.height-p),0<d-l?(e.size.width=d,e.position.left=o.left-c):(d=l-t.width,e.size.width=d,e.position.left=o.left+n.width-d))}});V.ui.resizable;V.widget("ui.dialog",{version:"1.13.2",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=V(this).css(t).offset().top;e<0&&V(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&V.fn.draggable&&this._makeDraggable(),this.options.resizable&&V.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?V(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:V.noop,enable:V.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||V.ui.safeBlur(V.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+V(this).css("z-index")}).get(),s=Math.max.apply(null,s);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=V(V.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;(t=!(t=!(t=!(t=!(t=t||this.element.find("[autofocus]")).length?this.element.find(":tabbable"):t).length?this.uiDialogButtonPane.find(":tabbable"):t).length?this.uiDialogTitlebarClose.filter(":tabbable"):t).length?this.uiDialog:t).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=V.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||V.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=V("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===V.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);var e,i,s;t.keyCode!==V.ui.keyCode.TAB||t.isDefaultPrevented()||(e=this.uiDialog.find(":tabbable"),i=e.first(),s=e.last(),t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault()))},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=V("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){V(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=V("<button type='button'></button>").button({label:V("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=V("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=V("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=V("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var s=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),V.isEmptyObject(t)||Array.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(V.each(t,function(t,e){var i;e=V.extend({type:"button"},e="function"==typeof e?{click:e,text:t}:e),i=e.click,t={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,V("<button></button>",e).button(t).appendTo(s.uiButtonSet).on("click",function(){i.apply(s.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var n=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){n._addClass(V(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",t,a(e))},drag:function(t,e){n._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-n.document.scrollLeft(),s=e.offset.top-n.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=s?"+":"")+s,of:n.window},n._removeClass(V(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var n=this,o=this.options,t=o.resizable,e=this.uiDialog.css("position"),t="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:t,start:function(t,e){n._addClass(V(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",t,a(e))},resize:function(t,e){n._trigger("resize",t,a(e))},stop:function(t,e){var i=n.uiDialog.offset(),s=i.left-n.document.scrollLeft(),i=i.top-n.document.scrollTop();o.height=n.uiDialog.height(),o.width=n.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=s?"+":"")+s+" top"+(0<=i?"+":"")+i,of:n.window},n._removeClass(V(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",t,a(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=V(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=V.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||this.document.data("ui-dialog-instances",t=[]),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};V.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:V("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((i=s.is(":data(ui-resizable)"))&&!e&&s.resizable("destroy"),i&&"string"==typeof e&&s.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=V(this);return V("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!V(t.target).closest(".ui-dialog").length||!!V(t.target).closest(".ui-datepicker").length},_createOverlay:function(){var i,s;this.options.modal&&(i=V.fn.jquery.substring(0,4),s=!0,this._delay(function(){s=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(t){var e;s||((e=this._trackingInstances()[0])._allowInteraction(t)||(t.preventDefault(),e._focusTabbable(),"3.4."!==i&&"3.5."!==i||e._delay(e._restoreTabbableFocus)))}.bind(this)),this.overlay=V("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var t;this.options.modal&&this.overlay&&((t=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!1!==V.uiBackCompat&&V.widget("ui.dialog",V.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});V.ui.dialog;function lt(t,e,i){return e<=t&&t<e+i}V.widget("ui.droppable",{version:"1.13.2",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t=t||{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){V.ui.ddmanager.droppables[t]=V.ui.ddmanager.droppables[t]||[],V.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=V.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept="function"==typeof e?e:function(t){return t.is(e)}:"scope"===t&&(i=V.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=V.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=V.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||V.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=V(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&V.ui.intersect(i,V.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),V.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var n=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,a=n+t.helperProportions.width,r=o+t.helperProportions.height,l=e.offset.left,h=e.offset.top,c=l+e.proportions().width,u=h+e.proportions().height;switch(i){case"fit":return l<=n&&a<=c&&h<=o&&r<=u;case"intersect":return l<n+t.helperProportions.width/2&&a-t.helperProportions.width/2<c&&h<o+t.helperProportions.height/2&&r-t.helperProportions.height/2<u;case"pointer":return lt(s.pageY,h,e.proportions().height)&&lt(s.pageX,l,e.proportions().width);case"touch":return(h<=o&&o<=u||h<=r&&r<=u||o<h&&u<r)&&(l<=n&&n<=c||l<=a&&a<=c||n<l&&c<a);default:return!1}},!(V.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,n=V.ui.ddmanager.droppables[t.options.scope]||[],o=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<n.length;i++)if(!(n[i].options.disabled||t&&!n[i].accept.call(n[i].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===n[i].element[0]){n[i].proportions().height=0;continue t}n[i].visible="none"!==n[i].element.css("display"),n[i].visible&&("mousedown"===o&&n[i]._activate.call(n[i],e),n[i].offset=n[i].element.offset(),n[i].proportions({width:n[i].element[0].offsetWidth,height:n[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return V.each((V.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&V.ui.intersect(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,o){n.options.refreshPositions&&V.ui.ddmanager.prepareOffsets(n,o),V.each(V.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s;this.options.disabled||this.greedyChild||!this.visible||(s=!(i=V.ui.intersect(n,this,this.options.tolerance,o))&&this.isover?"isout":i&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return V(this).droppable("instance").options.scope===e})).length&&((t=V(i[0]).droppable("instance")).greedyChild="isover"===s)),t&&"isover"===s&&(t.isover=!1,t.isout=!0,t._out.call(t,o)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,o),t&&"isout"===s&&(t.isout=!1,t.isover=!0,t._over.call(t,o)))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)}})!==V.uiBackCompat&&V.widget("ui.droppable",V.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});V.ui.droppable,V.widget("ui.progressbar",{version:"1.13.2",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=V("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=V("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),V.widget("ui.selectable",V.ui.mouse,{version:"1.13.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var i=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){i.elementPos=V(i.element[0]).offset(),i.selectees=V(i.options.filter,i.element[0]),i._addClass(i.selectees,"ui-selectee"),i.selectees.each(function(){var t=V(this),e=t.offset(),e={left:e.left-i.elementPos.left,top:e.top-i.elementPos.top};V.data(this,"selectable-item",{element:this,$element:t,left:e.left,top:e.top,right:e.left+t.outerWidth(),bottom:e.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=V("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=V(this.element[0]).offset(),this.options.disabled||(this.selectees=V(t.filter,this.element[0]),this._trigger("start",i),V(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=V.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),V(i.target).parents().addBack().each(function(){var t,e=V.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,n=this,o=this.options,a=this.opos[0],r=this.opos[1],l=s.pageX,h=s.pageY;return l<a&&(t=l,l=a,a=t),h<r&&(t=h,h=r,r=t),this.helper.css({left:a,top:r,width:l-a,height:h-r}),this.selectees.each(function(){var t=V.data(this,"selectable-item"),e=!1,i={};t&&t.element!==n.element[0]&&(i.left=t.left+n.elementPos.left,i.right=t.right+n.elementPos.left,i.top=t.top+n.elementPos.top,i.bottom=t.bottom+n.elementPos.top,"touch"===o.tolerance?e=!(i.left>l||i.right<a||i.top>h||i.bottom<r):"fit"===o.tolerance&&(e=i.left>a&&i.right<l&&i.top>r&&i.bottom<h),e?(t.selected&&(n._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(n._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(n._addClass(t.$element,"ui-selecting"),t.selecting=!0,n._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,n._addClass(t.$element,"ui-selected"),t.selected=!0):(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),n._trigger("unselecting",s,{unselecting:t.element}))),t.selected&&(s.metaKey||s.ctrlKey||t.startselected||(n._removeClass(t.$element,"ui-selected"),t.selected=!1,n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,n._trigger("unselecting",s,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,V(".ui-unselecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),V(".ui-selecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),V.widget("ui.selectmenu",[V.ui.formResetMixin,{version:"1.13.2",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=V()},_drawButton:function(){var t,e=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.trigger("focus"),t.preventDefault()}}),this.element.hide(),this.button=V("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=V("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=V("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=V("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),i._setSelection(),i._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){e=e.item.data("ui-selectmenu-item");null!=i.focusIndex&&e.index!==i.focusIndex&&(i._trigger("focus",t,{item:e}),i.isOpen||i._select(e,t)),i.focusIndex=e.index,i.button.attr("aria-activedescendant",i.menuItems.eq(e.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(V.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=V("<span>");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(s,t){var n=this,o="";V.each(t,function(t,e){var i;e.optgroup!==o&&(i=V("<li>",{text:e.optgroup}),n._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(s),o=e.optgroup),n._renderItemData(s,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var i=V("<li>"),s=V("<div>",{title:e.element.attr("title")});return e.disabled&&this._addClass(i,null,"ui-state-disabled"),this._setText(s,e.label),i.append(s).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.trigger("focus"))},_documentClick:{mousedown:function(t){this.isOpen&&(V(t.target).closest(".ui-selectmenu-menu, #"+V.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case V.ui.keyCode.TAB:case V.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case V.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case V.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case V.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case V.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case V.ui.keyCode.LEFT:this._move("prev",t);break;case V.ui.keyCode.RIGHT:this._move("next",t);break;case V.ui.keyCode.HOME:case V.ui.keyCode.PAGE_UP:this._move("first",t);break;case V.ui.keyCode.END:case V.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){t=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(t,e){var i;"icons"===t&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var i=this,s=[];t.each(function(t,e){e.hidden||s.push(i._parseOption(V(e),t))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),V.widget("ui.slider",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e=this.options,i=this.element.find(".ui-slider-handle"),s=[],n=e.values&&e.values.length||1;for(i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),t=i.length;t<n;t++)s.push("<span tabindex='0'></span>");this.handles=i.add(V(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){V(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=V("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,o,e,a,r=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),a={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(a),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-r.values(t));(e<s||s===e&&(t===r._lastChangedValue||r.values(t)===l.min))&&(s=e,n=V(this),o=t)}),!1!==this._start(t,o)&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(n,null,"ui-state-active"),n.trigger("focus"),e=n.offset(),a=!V(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:t.pageX-e.left-n.width()/2,top:t.pageY-e.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,i),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},e=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,e),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,t="horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=t/e;return(t=1<t?1:t)<0&&(t=0),"vertical"===this.orientation&&(t=1-t),e=this._valueMax()-this._valueMin(),e=this._valueMin()+t*e,this._trimAlignValue(e)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,e){var i,s,n;if(1<arguments.length)return this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!Array.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,s=t,n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i;if(arguments.length)return t=this.options.values[t],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(e=this.options.values.slice(),i=0;i<e.length;i+=1)e[i]=this._trimAlignValue(e[i]);return e}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=0<this.options.step?this.options.step:1,i=(t-this._valueMin())%e,t=t-i;return 2*Math.abs(i)>=e&&(t+=0<i?e:-e),parseFloat(t.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var e=t.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,l=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,h["horizontal"===r.orientation?"left":"bottom"]=i+"%",V(this).stop(1,1)[l?"animate":"css"](h,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,s,n=V(t.target).data("ui-slider-handle-index");switch(t.keyCode){case V.ui.keyCode.HOME:case V.ui.keyCode.END:case V.ui.keyCode.PAGE_UP:case V.ui.keyCode.PAGE_DOWN:case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(V(t.target),null,"ui-state-active"),!1===this._start(t,n)))return}switch(s=this.options.step,e=i=this._hasMultipleValues()?this.values(n):this.value(),t.keyCode){case V.ui.keyCode.HOME:i=this._valueMin();break;case V.ui.keyCode.END:i=this._valueMax();break;case V.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},keyup:function(t){var e=V(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(V(t.target),null,"ui-state-active"))}}}),V.widget("ui.sortable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),V.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),V(t.target).parents().each(function(){if(V.data(this,n.widgetName+"-item")===n)return i=V(this),!1}),!!(i=V.data(t.target,n.widgetName+"-item")===n?V(t.target):i)&&(!(this.options.handle&&!e&&(V(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.appendTo=V("parent"!==o.appendTo?o.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},V.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),V.extend(this.offset,{parent:this._getParentOffset()}),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",o.cursor),this.storedStylesheet=V("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return V.ui.ddmanager&&(V.ui.ddmanager.current=this),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(t){var e,i,s,n,o=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),o.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||V.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&V.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,n,o;if(t)return V.ui.ddmanager&&!this.options.dropBehaviour&&V.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),o={},(n=this.options.axis)&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,V(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new V.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),V.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?V(this.domPosition.prev).after(this.currentItem):V(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},V(t).each(function(){var t=(V(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(V(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||r<s+h&&s+h<l,c="y"===this.options.axis||o<e+c&&e+c<a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h&&c:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this.dragDirection.vertical,t=this.dragDirection.horizontal,this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this.dragDirection.vertical,t=this.dragDirection.horizontal;return this.floating&&t?"right"===t&&i||"left"===t&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],a=[],r=this._connectWith();if(r&&t)for(e=r.length-1;0<=e;e--)for(i=(s=V(r[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&a.push(["function"==typeof n.options.items?n.options.items.call(n.element):V(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);function l(){o.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):V(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(l);return V(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=V.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,a,r,l,h=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):V(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=V(u[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push(["function"==typeof n.options.items?n.options.items.call(n.element[0],t,{item:this.currentItem}):V(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],l=(a=c[e][i=0]).length;i<l;i++)(r=V(a[i])).data(this.widgetName+"-item",o),h.push({item:r,instance:o,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){for(var e,i,s=this.items.length-1;0<=s;s--)e=this.items[s],this.currentContainer&&e.instance!==this.currentContainer&&e.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?V(this.options.toleranceElement,e.item):e.item,t||(e.width=i.outerWidth(),e.height=i.outerHeight()),i=i.offset(),e.left=i.left,e.top=i.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,n=i.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var t=V("<"+n+">",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),V("<tr>",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=V(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){V("<td>&#160;</td>",i.document[0]).attr("colspan",V(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)V.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&V.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)V.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[h]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[h]-a)<i&&(i=Math.abs(t[h]-a),s=this.items[e],this.direction=r?"up":"down"));(s||this.options.dropOnEmpty)&&(this.currentContainer!==this.containers[u]?(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[u].element,!0),this._trigger("change",t,this._uiHash()),this.containers[u]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1):this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1))}},_createHelper:function(t){var e=this.options,t="function"==typeof e.helper?V(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||this.appendTo[0].appendChild(t[0]),t[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&V.ui.ie?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=V(i.containment)[0],e=V(i.containment).offset(),i="hidden"!==V(t).css("overflow"),this.containment=[e.left+(parseInt(V(t).css("borderLeftWidth"),10)||0)+(parseInt(V(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(V(t).css("borderTopWidth"),10)||0)+(parseInt(V(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(V(t).css("borderLeftWidth"),10)||0)-(parseInt(V(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(V(t).css("borderTopWidth"),10)||0)-(parseInt(V(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,t=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():t?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():t?0:s.scrollLeft())*i}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===V.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||V([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});function ht(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}V.widget("ui.spinner",{version:"1.13.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var s=this._super(),n=this.element;return V.each(["min","max","step"],function(t,e){var i=n.attr(e);null!=i&&i.length&&(s[e]=i)}),s},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){var i=V.ui.safeActiveElement(this.document[0]);if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;function i(){this.element[0]===V.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=e,this._delay(function(){this.previous=e}))}e=this.element[0]===V.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(t)&&this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(V(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,i=V.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?"function"==typeof e?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var e=t.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_adjustValue:function(t){var e=this.options,i=null!==e.min?e.min:0,s=t-i;return t=i+Math.round(s/e.step)*e.step,t=parseFloat(t.toFixed(this._precision())),null!==e.max&&t>e.max?e.max:null!==e.min&&t<e.min?e.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i;if("culture"===t||"numberFormat"===t)return i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,e.up),i=this.buttons.last().find(".ui-icon"),this._removeClass(i,null,this.options.icons.down),this._addClass(i,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:ht(function(t){this._super(t)}),_parse:function(t){return""===(t="string"==typeof t&&""!==t?window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t:t)||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:ht(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:ht(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:ht(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:ht(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());ht(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==V.uiBackCompat&&V.widget("ui.spinner",V.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var ct;V.ui.spinner;V.widget("ui.tabs",{version:"1.13.2",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(ct=/#.*$/,function(t){var e=t.href.replace(ct,""),i=location.href.replace(ct,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=V.uniqueSort(t.disabled.concat(V.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=V(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(t,e){if(V(e).attr("aria-controls")===s)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):V()}},_tabKeydown:function(t){var e=V(V.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:i++;break;case V.ui.keyCode.UP:case V.ui.keyCode.LEFT:s=!1,i--;break;case V.ui.keyCode.END:i=this.anchors.length-1;break;case V.ui.keyCode.HOME:i=0;break;case V.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case V.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===V.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===V.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===V.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==V.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=V.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!V.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=V()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=V()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){V(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){V(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return V("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=V(),this.anchors.each(function(t,e){var i,s,n,o=V(e).uniqueId().attr("id"),a=V(e).closest("li"),r=a.attr("aria-controls");l._isLocal(e)?(n=(i=e.hash).substring(1),s=l.element.find(l._sanitizeSelector(i))):(n=a.attr("aria-controls")||V({}).uniqueId()[0].id,(s=l.element.find(i="#"+n)).length||(s=l._createPanel(n)).insertAfter(l.panels[t-1]||l.tablist),s.attr("aria-live","polite")),s.length&&(l.panels=l.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":n,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return V("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=V(e),!0===t||-1!==V.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=V(this).outerHeight(!0)}),this.panels.each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,V(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):V(),i={oldTab:i,oldPanel:r,newTab:o?V():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?V():s,this.xhr&&this.xhr.abort(),r.length||a.length||V.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===V(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=!t.length?this.active:t).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return!1===t?V():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+V.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){V.data(this,"ui-tabs-destroy")?V(this).remove():V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=V(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?V.map(t,function(t){return t!==i?t:null}):V.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==V.inArray(t,e))return;e=Array.isArray(e)?V.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=V.ajax(this._ajaxSettings(t,s,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){a.html(t),o._trigger("load",s,r),n(i,e)},1)}).fail(function(t,e){setTimeout(function(){n(t,e)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return n._trigger("beforeLoad",i,V.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=V(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==V.uiBackCompat&&V.widget("ui.tabs",V.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});V.ui.tabs;V.widget("ui.tooltip",{version:"1.13.2",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=V(this).attr("title");return V("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),e=V.inArray(e,i);-1!==e&&i.splice(e,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=V("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=V([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&V.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=V(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=V(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=V([])},open:function(t){var i=this,e=V(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=V(this);e.data("ui-tooltip-open")&&((t=V.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t=this.options.content,s=this,n=i?i.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(i,e,t);(t=t.call(e[0],function(t){s._delay(function(){e.data("ui-tooltip-open")&&(i&&(i.type=n),this._open(i,e,t))})}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a=V.extend({},this.options.position);function r(t){a.of=t,n.is(":hidden")||n.position(a)}i&&((s=this._find(e))?s.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),s=this._tooltip(e),n=s.tooltip,this._addDescribedBy(e,n.attr("id")),n.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(i=V("<div>").html(n.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),i.removeAttr("id").find("[id]").removeAttr("id"),i.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):n.position(V.extend({of:e},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){n.is(":visible")&&(r(a.of),clearInterval(o))},13)),this._trigger("open",t,{tooltip:n})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){t.keyCode===V.ui.keyCode.ESCAPE&&((t=V.Event(t)).currentTarget=e[0],this.close(t,!0))}};e[0]!==this.element[0]&&(i.remove=function(){var t=this._find(e);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,s=V(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(V(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&V.each(this.parents,function(t,e){V(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding||(n.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=V("<div>").attr("role","tooltip"),i=V("<div>").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=!t.length?this.document[0].body:t},_destroy:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur"),e=e.element;i.target=i.currentTarget=e[0],s.close(i,!0),V("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title")||e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==V.uiBackCompat&&V.widget("ui.tooltip",V.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});V.ui.tooltip});;
/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
 * https://jqueryvalidation.org/
 * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[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])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});;
/* NUGET: BEGIN LICENSE TEXT
 *
 * Microsoft grants you the right to use these script files for the sole
 * purpose of either: (i) interacting through your browser with the Microsoft
 * website or online service, subject to the applicable licensing or use
 * terms; or (ii) using the files as included with a Microsoft product subject
 * to that product's license terms. Microsoft reserves all other rights to the
 * files not expressly granted by Microsoft, whether by implication, estoppel
 * or otherwise. Insofar as a script file is dual licensed under GPL,
 * Microsoft neither took the code under GPL nor distributes it thereunder but
 * under the terms set out in this paragraph. All notices and licenses
 * below are for informational purposes only.
 *
 * NUGET: END LICENSE TEXT */
/*
** Unobtrusive validation support library for jQuery and jQuery Validate
** Copyright (C) Microsoft Corporation. All rights reserved.
*/
(function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("<li />").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this);b.data("validator").resetForm();b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(b){var c=a(b),f=c.data(e),i=a.proxy(n,b),g=d.unobtrusive.options||{},h=function(e,d){var c=g[e];c&&a.isFunction(c)&&c.apply(b,d)};if(!f){f={options:{errorClass:g.errorClass||"input-validation-error",errorElement:g.errorElement||"span",errorPlacement:function(){m.apply(b,arguments);h("errorPlacement",arguments)},invalidHandler:function(){l.apply(b,arguments);h("invalidHandler",arguments)},messages:{},rules:{},success:function(){k.apply(b,arguments);h("success",arguments)}},attachValidation:function(){c.off("reset."+e,i).on("reset."+e,i).validate(this.options)},validate:function(){c.validate();return c.valid()}};c.data(e,f)}return f}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(c){var b=a(c),e=b.parents().addBack().filter("form").add(b.find("form")).has("[data-val=true]");b.find("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});e.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){return a(b.form).find(":input").filter("[name='"+f(c)+"']").val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery);;
"use strict";jQuery.base64=(function($){var _PADCHAR="=",_ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_VERSION="1.0";function _getbyte64(s,i){var idx=_ALPHA.indexOf(s.charAt(i));if(idx===-1){throw"Cannot decode base64"}return idx}function _decode(s){var pads=0,i,b10,imax=s.length,x=[];s=String(s);if(imax===0){return s}if(imax%4!==0){throw"Cannot decode base64"}if(s.charAt(imax-1)===_PADCHAR){pads=1;if(s.charAt(imax-2)===_PADCHAR){pads=2}imax-=4}for(i=0;i<imax;i+=4){b10=(_getbyte64(s,i)<<18)|(_getbyte64(s,i+1)<<12)|(_getbyte64(s,i+2)<<6)|_getbyte64(s,i+3);x.push(String.fromCharCode(b10>>16,(b10>>8)&255,b10&255))}switch(pads){case 1:b10=(_getbyte64(s,i)<<18)|(_getbyte64(s,i+1)<<12)|(_getbyte64(s,i+2)<<6);x.push(String.fromCharCode(b10>>16,(b10>>8)&255));break;case 2:b10=(_getbyte64(s,i)<<18)|(_getbyte64(s,i+1)<<12);x.push(String.fromCharCode(b10>>16));break}return x.join("")}function _getbyte(s,i){var x=s.charCodeAt(i);if(x>255){throw"INVALID_CHARACTER_ERR: DOM Exception 5"}return x}function _encode(s){if(arguments.length!==1){throw"SyntaxError: exactly one argument required"}s=String(s);var i,b10,x=[],imax=s.length-s.length%3;if(s.length===0){return s}for(i=0;i<imax;i+=3){b10=(_getbyte(s,i)<<16)|(_getbyte(s,i+1)<<8)|_getbyte(s,i+2);x.push(_ALPHA.charAt(b10>>18));x.push(_ALPHA.charAt((b10>>12)&63));x.push(_ALPHA.charAt((b10>>6)&63));x.push(_ALPHA.charAt(b10&63))}switch(s.length-imax){case 1:b10=_getbyte(s,i)<<16;x.push(_ALPHA.charAt(b10>>18)+_ALPHA.charAt((b10>>12)&63)+_PADCHAR+_PADCHAR);break;case 2:b10=(_getbyte(s,i)<<16)|(_getbyte(s,i+1)<<8);x.push(_ALPHA.charAt(b10>>18)+_ALPHA.charAt((b10>>12)&63)+_ALPHA.charAt((b10>>6)&63)+_PADCHAR);break}return x.join("")}return{decode:_decode,encode:_encode,VERSION:_VERSION}}(jQuery));;
/*
 AngularJS v1.8.2
 (c) 2010-2020 Google LLC. http://angularjs.org
 License: MIT
*/
(function(z){'use strict';function ve(a){if(D(a))w(a.objectMaxDepth)&&(Xb.objectMaxDepth=Yb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Xb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Xb}function Yb(a){return X(a)&&0<a}function F(a,b){b=b||Error;return function(){var d=arguments[0],c;c="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.8.2/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var e=encodeURIComponent,
f;f=arguments[d];f="function"==typeof f?f.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof f?"undefined":"string"!=typeof f?JSON.stringify(f):f;c+=e(f)}return new b(c)}}function za(a){if(null==a||$a(a))return!1;if(H(a)||C(a)||x&&a instanceof x)return!0;var b="length"in Object(a)&&a.length;return X(b)&&(0<=b&&b-1 in a||"function"===typeof a.item)}function r(a,b,d){var c,e;if(a)if(B(a))for(c in a)"prototype"!==c&&"length"!==c&&"name"!==c&&a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else if(H(a)||
za(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==r)a.forEach(b,d,a);else if(Pc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ta.call(a,c)&&b.call(d,a[c],c,a);return a}function Qc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function Zb(a){return function(b,d){a(d,b)}}function we(){return++qb}
function $b(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||B(g))for(var k=Object.keys(g),h=0,l=k.length;h<l;h++){var m=k[h],p=g[m];d&&D(p)?ha(p)?a[m]=new Date(p.valueOf()):ab(p)?a[m]=new RegExp(p):p.nodeName?a[m]=p.cloneNode(!0):ac(p)?a[m]=p.clone():"__proto__"!==m&&(D(a[m])||(a[m]=H(p)?[]:{}),$b(a[m],[p],!0)):a[m]=p}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return $b(a,Ha.call(arguments,1),!1)}function xe(a){return $b(a,Ha.call(arguments,1),!0)}function fa(a){return parseInt(a,
10)}function bc(a,b){return S(Object.create(a),b)}function E(){}function Ta(a){return a}function ia(a){return function(){return a}}function cc(a){return B(a.toString)&&a.toString!==la}function A(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function Pc(a){return null!==a&&"object"===typeof a&&!Rc(a)}function C(a){return"string"===typeof a}function X(a){return"number"===typeof a}function ha(a){return"[object Date]"===la.call(a)}
function H(a){return Array.isArray(a)||a instanceof Array}function dc(a){switch(la.call(a)){case "[object Error]":return!0;case "[object Exception]":return!0;case "[object DOMException]":return!0;default:return a instanceof Error}}function B(a){return"function"===typeof a}function ab(a){return"[object RegExp]"===la.call(a)}function $a(a){return a&&a.window===a}function bb(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function ye(a){return a&&X(a.length)&&ze.test(la.call(a))}
function ac(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function Ae(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ua(a){return K(a.nodeName||a[0]&&a[0].nodeName)}function cb(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function Ia(a,b,d){function c(a,b,c){c--;if(0>c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f<g;f++)b.push(e(a[f],c))}else if(Pc(a))for(f in a)b[f]=e(a[f],c);else if(a&&"function"===typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&
(b[f]=e(a[f],c));else for(f in a)ta.call(a,f)&&(b[f]=e(a[f],c));d?b.$$hashKey=d:delete b.$$hashKey;return b}function e(a,b){if(!D(a))return a;var d=g.indexOf(a);if(-1!==d)return k[d];if($a(a)||bb(a))throw oa("cpws");var d=!1,e=f(a);void 0===e&&(e=H(a)?[]:Object.create(Rc(a)),d=!0);g.push(a);k.push(e);return d?c(a,e,b):e}function f(a){switch(la.call(a)){case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Float32Array]":case "[object Float64Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return new a.constructor(e(a.buffer),
a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(B(a.cloneNode))return a.cloneNode(!0)}
var g=[],k=[];d=Yb(d)?d:NaN;if(b){if(ye(b)||"[object ArrayBuffer]"===la.call(b))throw oa("cpta");if(a===b)throw oa("cpi");H(b)?b.length=0:r(b,function(a,c){"$$hashKey"!==c&&delete b[c]});g.push(a);k.push(b);return c(a,b,d)}return e(a,d)}function ec(a,b){return a===b||a!==a&&b!==b}function va(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d===typeof b&&"object"===d)if(H(a)){if(!H(b))return!1;if((d=a.length)===b.length){for(c=0;c<d;c++)if(!va(a[c],
b[c]))return!1;return!0}}else{if(ha(a))return ha(b)?ec(a.getTime(),b.getTime()):!1;if(ab(a))return ab(b)?a.toString()===b.toString():!1;if(bb(a)||bb(b)||$a(a)||$a(b)||H(b)||ha(b)||ab(b))return!1;d=T();for(c in a)if("$"!==c.charAt(0)&&!B(a[c])){if(!va(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!B(b[c]))return!1;return!0}return!1}function db(a,b,d){return a.concat(Ha.call(b,d))}function Va(a,b){var d=2<arguments.length?Ha.call(arguments,2):[];return!B(b)||b instanceof
RegExp?b:d.length?function(){return arguments.length?b.apply(a,db(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Sc(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:$a(b)?d="$WINDOW":b&&z.document===b?d="$DOCUMENT":bb(b)&&(d="$SCOPE");return d}function eb(a,b){if(!A(a))return X(b)||(b=b?2:null),JSON.stringify(a,Sc,b)}function Tc(a){return C(a)?JSON.parse(a):a}function fc(a,b){a=a.replace(Be,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+
a)/6E4;return Y(d)?b:d}function Uc(a,b){a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function gc(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=fc(b,c);return Uc(a,d*(b-c))}function Aa(a){a=x(a).clone().empty();var b=x("<div></div>").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Vc(a){try{return decodeURIComponent(a)}catch(b){}}function hc(a){var b={};r((a||"").split("&"),
function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Vc(e),w(e)&&(f=w(f)?Vc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Ce(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function ic(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,
b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function De(a,b){var d,c,e=Qa.length;for(c=0;c<e;++c)if(d=Qa[c]+b,C(d=a.getAttribute(d)))return d;return null}function Ee(a,b){var d,c,e={};r(Qa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});r(Qa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))});
d&&(Fe?(e.strictDi=null!==De(d,"strict-di"),b(d,c?[c]:[],e)):z.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Wc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===z.document?"document":Aa(a);throw oa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",
function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;z&&e.test(z.name)&&(d.debugInfoEnabled=!0,z.name=z.name.replace(e,""));if(z&&!f.test(z.name))return c();z.name=z.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&&
ca.resumeDeferredBootstrap()}function Ge(){z.name="NG_ENABLE_DEBUG_INFO!"+z.name;z.location.reload()}function He(a){a=ca.element(a).injector();if(!a)throw oa("test");return a.get("$$testability")}function Xc(a,b){b=b||"_";return a.replace(Ie,function(a,c){return(c?b:"")+a.toLowerCase()})}function Je(){var a;if(!Yc){var b=rb();(sb=A(b)?z.jQuery:b?z[b]:void 0)&&sb.fn.on?(x=sb,S(sb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})):
x=U;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Yc=!0}}function Ke(){U.legacyXHTMLReplacement=!0}function gb(a,b,d){if(!a)throw oa("areq",b||"?",d||"required");return a}function tb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw oa("badname",
b);}function Le(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&B(a)?Va(e,a):a}function ub(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=x(Ha.call(a,0,e))),c.push(b);return c||a}function T(){return Object.create(null)}function jc(a){if(null==a)return"";switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=!cc(a)||H(a)||ha(a)?eb(a):a.toString()}return a}function Me(a){function b(a,
b,c){return a[b]||(a[b]=c())}var d=F("$injector"),c=F("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||F;return b(a,"module",function(){var a={};return function(f,g,k){var h={};if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,c,d,f){f||(f=e);return function(){f[d||"push"]([b,c,arguments]);return t}}function b(a,c,d){d||(d=e);return function(b,e){e&&B(e)&&(e.$$moduleName=f);d.push([a,c,arguments]);return t}}if(!g)throw d("nomod",
f);var e=[],n=[],s=[],G=a("$injector","invoke","push",n),t={_invokeQueue:e,_configBlocks:n,_runBlocks:s,info:function(a){if(w(a)){if(!D(a))throw c("aobj","value");h=a;return this}return h},requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator",n),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider",
"register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:G,run:function(a){s.push(a);return this}};k&&G(k);return t})}})}function ja(a,b){if(H(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function Ne(a,b){var d=[];Yb(b)&&(a=ca.copy(a,null,b));return JSON.stringify(a,function(a,b){b=Sc(a,b);if(D(b)){if(0<=d.indexOf(b))return"...";d.push(b)}return b})}
function Oe(a){S(a,{errorHandlingConfig:ve,bootstrap:Wc,copy:Ia,extend:S,merge:xe,equals:va,element:x,forEach:r,injector:fb,noop:E,bind:Va,toJson:eb,fromJson:Tc,identity:Ta,isUndefined:A,isDefined:w,isString:C,isFunction:B,isObject:D,isNumber:X,isElement:ac,isArray:H,version:Pe,isDate:ha,callbacks:{$$counter:0},getTestability:He,reloadWithDebugInfo:Ge,UNSAFE_restoreLegacyJqLiteXHTMLReplacement:Ke,$$minErr:F,$$csp:Ba,$$encodeUriSegment:ic,$$encodeUriQuery:ba,$$lowercase:K,$$stringify:jc,$$uppercase:vb});
lc=Me(z);lc("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Qe});a.provider("$compile",Zc).directive({a:Re,input:$c,textarea:$c,form:Se,script:Te,select:Ue,option:Ve,ngBind:We,ngBindHtml:Xe,ngBindTemplate:Ye,ngClass:Ze,ngClassEven:$e,ngClassOdd:af,ngCloak:bf,ngController:cf,ngForm:df,ngHide:ef,ngIf:ff,ngInclude:gf,ngInit:hf,ngNonBindable:jf,ngPluralize:kf,ngRef:lf,ngRepeat:mf,ngShow:nf,ngStyle:of,ngSwitch:pf,ngSwitchWhen:qf,ngSwitchDefault:rf,ngOptions:sf,ngTransclude:tf,ngModel:uf,
ngList:vf,ngChange:wf,pattern:ad,ngPattern:ad,required:bd,ngRequired:bd,minlength:cd,ngMinlength:cd,maxlength:dd,ngMaxlength:dd,ngValue:xf,ngModelOptions:yf}).directive({ngInclude:zf,input:Af}).directive(wb).directive(ed);a.provider({$anchorScroll:Bf,$animate:Cf,$animateCss:Df,$$animateJs:Ef,$$animateQueue:Ff,$$AnimateRunner:Gf,$$animateAsyncRun:Hf,$browser:If,$cacheFactory:Jf,$controller:Kf,$document:Lf,$$isDocumentHidden:Mf,$exceptionHandler:Nf,$filter:fd,$$forceReflow:Of,$interpolate:Pf,$interval:Qf,
$$intervalFactory:Rf,$http:Sf,$httpParamSerializer:Tf,$httpParamSerializerJQLike:Uf,$httpBackend:Vf,$xhrFactory:Wf,$jsonpCallbacks:Xf,$location:Yf,$log:Zf,$parse:$f,$rootScope:ag,$q:bg,$$q:cg,$sce:dg,$sceDelegate:eg,$sniffer:fg,$$taskTrackerFactory:gg,$templateCache:hg,$templateRequest:ig,$$testability:jg,$timeout:kg,$window:lg,$$rAF:mg,$$jqLite:ng,$$Map:og,$$cookieReader:pg})}]).info({angularVersion:"1.8.2"})}function xb(a,b){return b.toUpperCase()}function yb(a){return a.replace(qg,xb)}function mc(a){a=
a.nodeType;return 1===a||!a||9===a}function gd(a,b){var d,c,e,f=b.createDocumentFragment(),g=[],k;if(nc.test(a)){d=f.appendChild(b.createElement("div"));c=(rg.exec(a)||["",""])[1].toLowerCase();e=U.legacyXHTMLReplacement?a.replace(sg,"<$1></$2>"):a;if(10>wa)for(c=hb[c]||hb._default,d.innerHTML=c[1]+e+c[2],k=c[0];k--;)d=d.firstChild;else{c=qa[c]||[];for(k=c.length;-1<--k;)d.appendChild(z.document.createElement(c[k])),d=d.firstChild;d.innerHTML=e}g=db(g,d.childNodes);d=f.firstChild;d.textContent=""}else g.push(b.createTextNode(a));
f.textContent="";f.innerHTML="";r(g,function(a){f.appendChild(a)});return f}function U(a){if(a instanceof U)return a;var b;C(a)&&(a=V(a),b=!0);if(!(this instanceof U)){if(b&&"<"!==a.charAt(0))throw oc("nosel");return new U(a)}if(b){b=z.document;var d;a=(d=tg.exec(a))?[b.createElement(d[1])]:(d=gd(a,b))?d.childNodes:[];pc(this,a)}else B(a)?hd(a):pc(this,a)}function qc(a){return a.cloneNode(!0)}function zb(a,b){!b&&mc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function id(a){for(var b in a)return!1;
return!0}function jd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!id(d)||c&&!id(c)||(delete Ka[b],a.ng339=void 0)}function kd(a,b,d,c){if(w(c))throw oc("offargs");var e=(c=Ab(a))&&c.events,f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f),delete e[b])};r(b.split(" "),function(a){g(a);Bb[a]&&g(Bb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f),delete e[b];jd(a)}}function rc(a,b){var d=a.ng339;if(d=
d&&Ka[d])b?delete d.data[b]:d.data={},jd(a)}function Ab(a,b){var d=a.ng339,d=d&&Ka[d];b&&!d&&(a.ng339=d=++ug,d=Ka[d]={events:{},data:{},handle:void 0});return d}function sc(a,b,d){if(mc(a)){var c,e=w(d),f=!e&&b&&!D(b),g=!b;a=(a=Ab(a,!f))&&a.data;if(e)a[yb(b)]=d;else{if(g)return a;if(f)return a&&a[yb(b)];for(c in b)a[yb(c)]=b[c]}}}function Cb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Db(a,b){if(b&&a.setAttribute){var d=
(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);c=c.replace(" "+a+" "," ")});c!==d&&a.setAttribute("class",V(c))}}function Eb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});c!==d&&a.setAttribute("class",V(c))}}function pc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=
0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function ld(a,b){return Fb(a,"$"+(b||"ngController")+"Controller")}function Fb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=H(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(w(d=x.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function md(a){for(zb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Gb(a,b){b||zb(a);var d=a.parentNode;d&&d.removeChild(a)}function vg(a,b){b=b||z;if("complete"===b.document.readyState)b.setTimeout(a);
else x(b).on("load",a)}function hd(a){function b(){z.document.removeEventListener("DOMContentLoaded",b);z.removeEventListener("load",b);a()}"complete"===z.document.readyState?z.setTimeout(a):(z.document.addEventListener("DOMContentLoaded",b),z.addEventListener("load",b))}function nd(a,b){var d=Hb[b.toLowerCase()];return d&&od[ua(a)]&&d}function wg(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(A(c.immediatePropagationStopped)){var k=
c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();k&&k.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var h=f.specialHandlerWrapper||xg;1<g&&(f=ja(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||h(a,c,f[l])}};d.elem=a;return d}function xg(a,b,d){d.call(a,b)}function yg(a,b,d){var c=b.relatedTarget;c&&(c===a||zg.call(a,c))||d.call(a,b)}function ng(){this.$get=
function(){return S(U,{hasClass:function(a,b){a.attr&&(a=a[0]);return Cb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Eb(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)}})}}function La(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||we)():d+":"+a}function pd(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function qd(a){a=Function.prototype.toString.call(a).replace(Ag,
"");return a.match(Bg)||a.match(Cg)}function Dg(a){return(a=qd(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(a,b){function d(a){return function(b,c){if(D(b))r(b,Zb(a));else return a(b,c)}}function c(a,b){Ja(a,"service");if(B(b)||H(b))b=n.instantiate(b);if(!b.$get)throw Ca("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=t.invoke(b,this);if(A(c))throw Ca("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){gb(A(a)||
H(a),"modulesToLoad","not an array");var b=[],c;r(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=n.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.set(a,!0);try{C(a)?(c=lc(a),t.modules[a]=c,b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):B(a)?b.push(n.invoke(a)):H(a)?b.push(n.invoke(a)):tb(a,"module")}catch(e){throw H(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ca("modulerr",
a,e.stack||e.message||e);}}});return b}function k(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===h)throw Ca("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=h,a[b]=c(b,e),a[b]}catch(f){throw a[b]===h&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=fb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ca("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&&
(d=c,c=null);c=e(a,c,d);H(a)&&(a=a[a.length-1]);d=a;if(wa||"function"!==typeof d)d=!1;else{var f=d.$$ngIsClass;Ga(f)||(f=d.$$ngIsClass=/^class\b/.test(Function.prototype.toString.call(d)));d=f}return d?(c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=H(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return p.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}
b=!0===b;var h={},l=[],m=new Ib,p={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,ia(b),!1)}),constant:d(function(a,b){Ja(a,"constant");p[a]=b;s[a]=b}),decorator:function(a,b){var c=n.get(a+"Provider"),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},n=p.$injector=k(p,function(a,b){ca.isString(b)&&l.push(b);throw Ca("unpr",l.join(" <- "));}),s={},
G=k(s,function(a,b){var c=n.get(a+"Provider",b);return t.invoke(c.$get,c,void 0,a)}),t=G;p.$injectorProvider={$get:ia(G)};t.modules=n.modules=T();var N=g(a),t=G.get("$injector");t.strictDi=b;r(N,function(a){a&&t.invoke(a)});t.loadNewModules=function(a){r(g(a),function(a){a&&t.invoke(a)})};return t}function Bf(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===
ua(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;B(c)?c=c():ac(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):X(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=C(a)?a:X(a)?a.toString():d.hash();var b;a?(b=k.getElementById(a))?f(b):(b=e(k.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var k=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===
b&&""===a||vg(function(){c.$evalAsync(g)})});return g}]}function ib(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;H(a)&&(a=a.join(" "));H(b)&&(b=b.join(" "));return a+" "+b}function Eg(a){C(a)&&(a=a.split(" "));var b=T();r(a,function(a){a.length&&(b[a]=!0)});return b}function ra(a){return D(a)?a:{}}function Fg(a,b,d,c,e){function f(){pa=null;k()}function g(){t=y();t=A(t)?null:t;va(t,P)&&(t=P);N=P=t}function k(){var a=N;g();if(v!==h.url()||a!==t)v=h.url(),N=t,r(J,function(a){a(h.url(),t)})}
var h=this,l=a.location,m=a.history,p=a.setTimeout,n=a.clearTimeout,s={},G=e(d);h.isMock=!1;h.$$completeOutstandingRequest=G.completeTask;h.$$incOutstandingRequestCount=G.incTaskCount;h.notifyWhenNoOutstandingRequests=G.notifyWhenNoPendingTasks;var t,N,v=l.href,kc=b.find("base"),pa=null,y=c.history?function(){try{return m.state}catch(a){}}:E;g();h.url=function(b,d,e){A(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=N===e;b=ga(b).href;if(v===b&&(!c.history||f))return h;
var k=v&&Da(v)===Da(b);v=b;N=e;!c.history||k&&f?(k||(pa=b),d?l.replace(b):k?(d=l,e=b,f=e.indexOf("#"),e=-1===f?"":e.substr(f),d.hash=e):l.href=b,l.href!==b&&(pa=b)):(m[d?"replaceState":"pushState"](e,"",b),g());pa&&(pa=b);return h}return(pa||l.href).replace(/#$/,"")};h.state=function(){return t};var J=[],I=!1,P=null;h.onUrlChange=function(b){if(!I){if(c.history)x(a).on("popstate",f);x(a).on("hashchange",f);I=!0}J.push(b);return b};h.$$applicationDestroyed=function(){x(a).off("hashchange popstate",
f)};h.$$checkUrlChange=k;h.baseHref=function(){var a=kc.attr("href");return a?a.replace(/^(https?:)?\/\/[^/]*/,""):""};h.defer=function(a,b,c){var d;b=b||0;c=c||G.DEFAULT_TASK_TYPE;G.incTaskCount(c);d=p(function(){delete s[d];G.completeTask(a,c)},b);s[d]=c;return d};h.defer.cancel=function(a){if(s.hasOwnProperty(a)){var b=s[a];delete s[a];n(a);G.completeTask(E,b);return!0}return!1}}function If(){this.$get=["$window","$log","$sniffer","$document","$$taskTrackerFactory",function(a,b,d,c,e){return new Fg(a,
c,b,d,e)}]}function Jf(){this.$get=function(){function a(a,c){function e(a){a!==p&&(n?n===a&&(n=a.n):n=a,f(a.n,a.p),f(a,p),p=a,p.n=null)}function f(a,b){a!==b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw F("$cacheFactory")("iid",a);var g=0,k=S({},c,{id:a}),h=T(),l=c&&c.capacity||Number.MAX_VALUE,m=T(),p=null,n=null;return b[a]={put:function(a,b){if(!A(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in h||g++;h[a]=b;g>l&&this.remove(n.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=
m[a];if(!b)return;e(b)}return h[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b===p&&(p=b.p);b===n&&(n=b.n);f(b.n,b.p);delete m[a]}a in h&&(delete h[a],g--)},removeAll:function(){h=T();g=0;m=T();p=n=null},destroy:function(){m=k=h=null;delete b[a]},info:function(){return S({},k,{size:g})}}}var b={};a.info=function(){var a={};r(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function hg(){this.$get=["$cacheFactory",function(a){return a("templates")}]}
function Zc(a,b){function d(a,b,c){var d=/^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/,e=T();r(a,function(a,f){a=a.trim();if(a in p)e[f]=p[a];else{var g=a.match(d);if(!g)throw $("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(p[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==K(b))throw $("baddir",a);if(a!==a.trim())throw $("baddir",a);}function e(a){var b=a.require||a.controller&&
a.name;!H(b)&&D(b)&&r(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive:\s*([\w-]+)\s+(.*)$/,k=/(([\w-]+)(?::([^;]+))?;?)/,h=Ae("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,p=T();this.directive=function pa(b,d){gb(b,"name");Ja(b,"directive");C(b)?(c(b),gb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];r(f[b],function(f,
g){try{var h=a.invoke(f);B(h)?h={compile:ia(h)}:!h.compile&&h.link&&(h.compile=ia(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);var k=h,l=h.restrict;if(l&&(!C(l)||!/[EACM]/.test(l)))throw $("badrestrict",l,b);k.restrict=l||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),f[b].push(d)):r(b,Zb(pa));return this};this.component=function y(a,b){function c(a){function e(b){return B(b)||H(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}:
b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Gg(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",require:b.require};r(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}if(!C(a))return r(a,Zb(Va(this,y))),this;var d=b.controller||function(){};r(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,B(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a,
c)};this.aHrefSanitizationTrustedUrlList=function(a){return w(a)?(b.aHrefSanitizationTrustedUrlList(a),this):b.aHrefSanitizationTrustedUrlList()};Object.defineProperty(this,"aHrefSanitizationWhitelist",{get:function(){return this.aHrefSanitizationTrustedUrlList},set:function(a){this.aHrefSanitizationTrustedUrlList=a}});this.imgSrcSanitizationTrustedUrlList=function(a){return w(a)?(b.imgSrcSanitizationTrustedUrlList(a),this):b.imgSrcSanitizationTrustedUrlList()};Object.defineProperty(this,"imgSrcSanitizationWhitelist",
{get:function(){return this.imgSrcSanitizationTrustedUrlList},set:function(a){this.imgSrcSanitizationTrustedUrlList=a}});var n=!0;this.debugInfoEnabled=function(a){return w(a)?(n=a,this):n};var s=!1;this.strictComponentBindingsEnabled=function(a){return w(a)?(s=a,this):s};var G=10;this.onChangesTtl=function(a){return arguments.length?(G=a,this):G};var t=!0;this.commentDirectivesEnabled=function(a){return arguments.length?(t=a,this):t};var N=!0;this.cssClassDirectivesEnabled=function(a){return arguments.length?
(N=a,this):N};var v=T();this.addPropertySecurityContext=function(a,b,c){var d=a.toLowerCase()+"|"+b.toLowerCase();if(d in v&&v[d]!==c)throw $("ctxoverride",a,b,v[d],c);v[d]=c;return this};(function(){function a(b,c){r(c,function(a){v[a.toLowerCase()]=b})}a(W.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]);a(W.CSS,["*|style"]);a(W.URL,"area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" "));a(W.MEDIA_URL,"audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" "));
a(W.RESOURCE_URL,"*|formAction applet|code applet|codebase base|href embed|src frame|src form|action head|profile html|manifest iframe|src link|href media|src object|codebase object|data script|src".split(" "))})();this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate",function(a,b,c,e,p,M,L,u,R){function q(){try{if(!--Ja)throw Ua=void 0,$("infchng",G);L.$apply(function(){for(var a=0,b=Ua.length;a<b;++a)try{Ua[a]()}catch(d){c(d)}Ua=
void 0})}finally{Ja++}}function ma(a,b){if(!a)return a;if(!C(a))throw $("srcset",b,a.toString());for(var c="",d=V(a),e=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,e=/\s/.test(d)?e:/(,)/,d=d.split(e),e=Math.floor(d.length/2),f=0;f<e;f++)var g=2*f,c=c+u.getTrustedMediaUrl(V(d[g])),c=c+(" "+V(d[g+1]));d=V(d[2*f]).split(/\s/);c+=u.getTrustedMediaUrl(V(d[0]));2===d.length&&(c+=" "+V(d[1]));return c}function w(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr=
{};this.$$element=a}function O(a,b,c){Fa.innerHTML="<span "+b+">";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}}function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;
h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("<div></div>").append(a).html())):c?Wa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;m<h.length;m+=3)f=h[m],t[f]=c[f];else t=c;m=0;for(p=h.length;m<
p;)k=t[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),da.$$addScopeInfo(x(k),l)):l=a,I=c.transcludeOnThisElement?ka(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ka(a,b):null,c(f,l,k,d,I)):f&&f(a,k.childNodes,void 0,e)}for(var h=[],k=H(a)||a instanceof x,l,m,p,I,n,t=0;t<a.length;t++){l=new w;11===wa&&jb(a,t,k);m=tc(a[t],[],l,0===t?d:void 0,e);(f=m.length?aa(m,a[t],l,b,c,null,[],[],f):null)&&f.scope&&da.$$addScopeClass(l.$$element);l=f&&f.terminal||!(p=a[t].childNodes)||!p.length?null:Xa(p,
f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(t,f,l),I=!0,n=n||f;f=null}return I?g:null}function jb(a,b,c){var d=a[b],e=d.parentNode,f;if(d.nodeType===Pa)for(;;){f=e?d.nextSibling:a[b+1];if(!f||f.nodeType!==Pa)break;d.nodeValue+=f.nodeValue;f.parentNode&&f.parentNode.removeChild(f);c&&f===a[b+1]&&a.splice(b+1,1)}}function ka(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g,
futureParentElement:h})}var e=d.$$slots=T(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?ka(a,b.$$slots[f],c):null;return d}function tc(a,b,d,e,f){var g=d.$attr,h;switch(a.nodeType){case 1:h=ua(a);Y(b,xa(h),"E",e,f);for(var l,m,n,t,J,s=a.attributes,v=0,G=s&&s.length;v<G;v++){var P=!1,N=!1,r=!1,y=!1,u=!1,M;l=s[v];m=l.name;t=l.value;n=xa(m.toLowerCase());(J=n.match(Ra))?(r="Attr"===J[1],y="Prop"===J[1],u="On"===J[1],m=m.replace(rd,"").toLowerCase().substr(4+J[1].length).replace(/_(.)/g,function(a,b){return b.toUpperCase()})):
(M=n.match(Sa))&&ca(M[1])&&(P=m,N=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));if(y||u)d[n]=t,g[n]=l.name,y?Ea(a,b,n,m):b.push(sd(p,L,c,n,m,!1));else{n=xa(m.toLowerCase());g[n]=m;if(r||!d.hasOwnProperty(n))d[n]=t,nd(a,n)&&(d[n]=!0);Ia(a,b,t,n,r);Y(b,n,"A",e,f,P,N)}}"input"===h&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off");if(!Qa)break;g=a.className;D(g)&&(g=g.animVal);if(C(g)&&""!==g)for(;a=k.exec(g);)n=xa(a[2]),Y(b,n,"C",e,f)&&(d[n]=V(a[3])),g=g.substr(a.index+
a[0].length);break;case Pa:na(b,a.nodeValue);break;case 8:if(!Oa)break;F(a,b,d,e,f)}b.sort(ia);return b}function F(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=xa(f[1]);Y(b,h,"M",d,e)&&(c[h]=V(f[2]))}}catch(k){}}function U(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw $("uterdir",b,c);1===a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function W(a,b,c){return function(d,e,f,g,h){e=U(e[0],
b,c);return a(d,e,f,g,h)}}function Z(a,b,c,d,e,f){var g;return a?da(b,c,d,e,f):function(){g||(g=da(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function aa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=W(a,c,d));a.require=u.require;a.directiveName=Q;if(s===u||u.$$isolateScope)a=Ba(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=W(b,c,d));b.require=u.require;b.directiveName=Q;if(s===u||u.$$isolateScope)b=Ba(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;bb(a)||
(d=c,c=b,b=a,a=void 0);N&&(e=P);c||(c=N?Q.parent():Q);if(d){var f=l.$$slots[d];if(f)return f(a,b,e,c,R);if(A(f))throw $("noslot",d,Aa(Q));}else return l(a,b,e,c,R)}var n,u,L,y,G,P,M,Q;b===f?(g=d,Q=d.$$element):(Q=x(f),g=new w(Q,d));G=e;s?y=e.$new(!0):t&&(G=e.$parent);l&&(M=m,M.$$boundTransclude=l,M.isSlotFilled=function(a){return!!l.$$slots[a]});J&&(P=ea(Q,g,M,J,y,e,s));s&&(da.$$addScopeInfo(Q,y,!0,!(v&&(v===s||v===s.$$originalDirective))),da.$$addScopeClass(Q,!0),y.$$isolateBindings=s.$$isolateBindings,
u=Da(e,g,y,y.$$isolateBindings,s),u.removeWatches&&y.$on("$destroy",u.removeWatches));for(n in P){u=J[n];L=P[n];var Hg=u.$$bindings.bindToController;L.instance=L();Q.data("$"+u.name+"Controller",L.instance);L.bindingInfo=Da(G,g,L.instance,Hg,u)}r(J,function(a,b){var c=a.require;a.bindToController&&!H(c)&&D(c)&&S(P[b].instance,X(b,c,Q,P))});r(P,function(a){var b=a.instance;if(B(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(B(b.$onInit))try{b.$onInit()}catch(e){c(e)}B(b.$doCheck)&&
(G.$watch(function(){b.$doCheck()}),b.$doCheck());B(b.$onDestroy)&&G.$on("$destroy",function(){b.$onDestroy()})});n=0;for(u=h.length;n<u;n++)L=h[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);var R=e;s&&(s.template||null===s.templateUrl)&&(R=y);a&&a(R,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)L=k[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);r(P,function(a){a=a.instance;B(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE,
t=l.newScopeDirective,J=l.controllerDirectives,s=l.newIsolateScopeDirective,v=l.templateDirective,L=l.nonTlbTranscludeDirective,G=!1,P=!1,N=l.hasElementTranscludeDirective,y=d.$$element=x(b),u,Q,M,R=e,q,ma=!1,Jb=!1,O,sa=0,C=a.length;sa<C;sa++){u=a[sa];var E=u.$$start,jb=u.$$end;E&&(y=U(b,E,jb));M=void 0;if(n>u.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&
!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Jb=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],oa(f,Ha.call(M,0),b),R=Z(Jb,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=z.document.createDocumentFragment();var Xa=
T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[xa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||z.document.createDocumentFragment(),ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Jb,R,e));M=x(M.childNodes)}else M=x(qc(b)).contents();y.empty();R=Z(Jb,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P=
!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=nc.test(O)?td(ja(u.templateNamespace,V(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",Q,"");oa(f,y,b);C={$attr:{}};O=tc(b,[],C);var Ig=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Ig);ga(d,C);C=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!==
u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),C=a.length;else if(u.compile)try{q=u.compile(y,d,R);var Y=u.$$originalDirective||u;B(q)?m(null,Va(Y,q),E,jb):q&&m(Va(Y,q.pre),Va(Y,q.post),E,jb)}catch(ca){c(ca,Aa(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function X(a,b,c,d){var e;if(C(b)){var f=b.match(l);b=b.substring(f[0].length);
var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=X(a,b[g],c,d);else D(b)&&(e={},r(b,function(b,f){e[f]=X(a,b,c,d)}));return e||null}function ea(a,b,c,d,e,f,g){var h=T(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"===
p&&(p=b[l.name]);m=M(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function fa(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=bc(a[d],{$$isolateScope:b,$$newScope:c})}function Y(b,c,e,g,h,k,l){if(c===h)return null;var m=null;if(f.hasOwnProperty(c)){h=a.get(c+"Directive");for(var p=0,n=h.length;p<n;p++)if(c=h[p],(A(g)||g>c.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=bc(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null};
D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController,t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function ga(a,b){var c=
b.$attr,d=a.$attr;r(a,function(d,e){"$"!==e.charAt(0)&&(b[e]&&b[e]!==d&&(d=d.length?d+(("style"===e?";":" ")+b[e]):b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,e){a.hasOwnProperty(e)||"$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ha(a,b,d,f,g,h,k,l){var m=[],p,n,t=b[0],u=a.shift(),J=bc(u,{templateUrl:null,transclude:null,replace:null,$$originalDirective:u}),s=B(u.templateUrl)?u.templateUrl(b,d):u.templateUrl,L=u.templateNamespace;b.empty();e(s).then(function(c){var e,
I;c=Na(c);if(u.replace){c=nc.test(c)?td(ja(L,V(c))):[];e=c[0];if(1!==c.length||1!==e.nodeType)throw $("tplrt",u.name,s);c={$attr:{}};oa(f,b,e);var v=tc(e,[],c);D(u.scope)&&fa(v,!0);a=v.concat(a);ga(d,c)}else e=t,b.html(c);a.unshift(J);p=aa(a,e,d,g,b,u,h,k,l);r(f,function(a,c){a===e&&(f[c]=b[0])});for(n=Xa(b[0].childNodes,g);m.length;){c=m.shift();I=m.shift();var y=m.shift(),P=m.shift(),v=b[0];if(!c.$$destroyed){if(I!==t){var G=I.className;l.hasElementTranscludeDirective&&u.replace||(v=qc(e));oa(y,
x(I),v);sa(x(v),G)}I=p.transcludeOnThisElement?ka(c,p.transclude,P):P;p(n,c,v,f,I)}}m=null}).catch(function(a){dc(a)&&c(a)});return function(a,b,c,d,e){a=e;b.$$destroyed||(m?m.push(b,c,d,a):(p.transcludeOnThisElement&&(a=ka(b,p.transclude,e)),p(n,b,c,d,a)))}}function ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function ba(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw $("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),
a,Aa(d));}function na(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&da.$$addBindingClass(a);return function(a,c){var e=c.parent();b||da.$$addBindingClass(e);da.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ja(a,b){a=K(a||"html");switch(a){case "svg":case "math":var c=z.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function qa(a,b){if("srcdoc"===
b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL:"a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function ya(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function za(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c,
d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=ya(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=za;b.push({priority:100,compile:function(a,b){var e=p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=qa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",Aa(a));if(m.test(e))throw $("nodomevents");c.push({priority:100,
compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function oa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]===d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&
(a.context=c);break}f&&f.replaceChild(c,d);a=z.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);x.hasData(d)&&(x.data(c,x.data(d)),x(d).off("$destroy"));x.cleanData(a.querySelectorAll("*"));for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function Ba(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function Ca(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,Aa(d))}}function ra(a,b){if(s)throw $("missingattr",a,b);}function Da(a,c,d,e,f){function g(b,c,e){B(d.$onChanges)&&
!ec(c,e)&&(Ua||(a.$$postDigest(q),Ua=[]),m||(m={},Ua.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Kb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;r(e,function(e,h){var m=e.attrName,n=e.optional,I,t,u,s;switch(e.mode){case "@":n||ta.call(c,m)||(ra(m,f.name),d[h]=c[m]=void 0);n=c.$observe(m,function(a){if(C(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;I=c[m];C(I)?d[h]=b(I)(a):Ga(I)&&(d[h]=I);l[h]=new Kb(uc,d[h]);k.push(n);break;case "=":if(!ta.call(c,m)){if(n)break;ra(m,
f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);s=t.literal?va:ec;u=t.assign||function(){I=d[h]=t(a);throw $("nonassign",c[m],m,f.name);};I=d[h]=t(a);n=function(b){s(b,d[h])||(s(b,I)?u(a,b=d[h]):d[h]=b);return I=b};n.$stateful=!0;n=e.collection?a.$watchCollection(c[m],n):a.$watch(p(c[m],n),null,t.literal);k.push(n);break;case "<":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);var v=t.literal,L=d[h]=t(a);l[h]=new Kb(uc,d[h]);n=a[e.collection?"$watchCollection":"$watch"](t,
function(a,b){if(b===a){if(b===L||v&&va(b,L))return;b=L}g(h,a,b);d[h]=a});k.push(n);break;case "&":n||ta.call(c,m)||ra(m,f.name);t=c.hasOwnProperty(m)?p(c[m]):E;if(t===E&&n)break;d[h]=function(b){return t(a,b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var Ma=/^\w/,Fa=z.document.createElement("div"),Oa=t,Qa=N,Ja=G,Ua;w.prototype={$normalize:xa,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&&
0<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=ud(a,b);c&&c.length&&R.addClass(this.$$element,c);(c=ud(b,a))&&c.length&&R.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=nd(this.$$element[0],a),g=vd[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Xc(a,"-"));"img"===ua(this.$$element)&&"srcset"===a&&(this[a]=b=ma(b,"$set('srcset', value)"));!1!==d&&(null===b||A(b)?this.$$element.removeAttr(e):
Ma.test(e)?f&&!1===b?this.$$element.removeAttr(e):this.$$element.attr(e,b):O(this.$$element[0],e,b));(a=this.$$observers)&&r(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||A(c[a])||b(c[a])});return function(){cb(e,b)}}};var Ka=b.startSymbol(),La=b.endSymbol(),Na="{{"===Ka&&"}}"===La?Ta:function(a){return a.replace(/\{\{/g,Ka).replace(/}}/g,La)},Ra=
/^ng(Attr|Prop|On)([A-Z].*)$/,Sa=/^(.+)Start$/;da.$$addBindingInfo=n?function(a,b){var c=a.data("$binding")||[];H(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:E;da.$$addBindingClass=n?function(a){sa(a,"ng-binding")}:E;da.$$addScopeInfo=n?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:E;da.$$addScopeClass=n?function(a,b){sa(a,b?"ng-isolate-scope":"ng-scope")}:E;da.$$createComment=function(a,b){var c="";n&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return z.document.createComment(c)};
return da}]}function Kb(a,b){this.previousValue=a;this.currentValue=b}function xa(a){return a.replace(rd,"").replace(Jg,function(a,d,c){return c?d.toUpperCase():d})}function ud(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],k=0;k<e.length;k++)if(g===e[k])continue a;d+=(0<d.length?" ":"")+g}return d}function td(a){a=x(a);var b=a.length;if(1>=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Kg.call(a,b,1)}return a}
function Gg(a,b){if(b&&C(b))return b;if(C(a)){var d=wd.exec(a);if(d)return d[3]}}function Kf(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,"controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&C(g)&&(l=g);if(C(c)){g=c.match(wd);if(!g)throw xd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Le(e.$scope,
h,!0);if(!c)throw xd("ctrlreg",h);tb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h);a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Lf(){this.$get=["$window",function(a){return x(a.document)}]}function Mf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden;
a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function Nf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function vc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Tf(){this.$get=function(){return function(a){if(!a)return"";var b=[];Qc(a,function(a,c){null===a||A(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(vc(a)))}):b.push(ba(c)+"="+ba(vc(a))))});return b.join("&")}}}function Uf(){this.$get=
function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Qc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):(B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(vc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function wc(a,b){if(C(a)){var d=a.replace(Lg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(yd),e;(e=c)||(e=(e=d.match(Mg))&&Ng[e[0]].test(d));if(e)try{a=Tc(d)}catch(f){if(!c)return a;throw Lb("baddata",a,f);}}}return a}
function zd(a){var b=T(),d;C(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(V(a.substr(0,d)));a=V(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&r(a,function(a,d){var f=K(d),g=V(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function Ad(a){var b;return function(d){b||(b=zd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function Bd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Sf(){var a=this.defaults={transformResponse:[wc],transformRequest:[function(a){return D(a)&&
"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ja(xc),put:ja(xc),patch:ja(xc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfTrustedOrigins=[];Object.defineProperty(this,"xsrfWhitelistedOrigins",
{get:function(){return this.xsrfTrustedOrigins},set:function(a){this.xsrfTrustedOrigins=a}});this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];a=a.then(f,g)}b.length=0;return a}function d(a,b){var c,e={};r(a,function(a,d){B(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a});return e}function f(a){var b=S({},a);b.data=Bd(a.data,a.headers,a.status,g.transformResponse);
a=a.status;return 200<=a&&300>a?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!C(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam},b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method=
vb(g.method);g.paramSerializer=C(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});b=c(b,h);b=b.then(function(b){var c=b.headers,d=Bd(b.data,Ad(c),void 0,b.transformRequest);A(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});A(b.withCredentials)&&!A(a.withCredentials)&&
(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a,c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,zd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300>
b?L.resolve:L.reject)({data:a,status:b,headers:Ad(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method),O=c.url;x?O=p.getTrustedResourceUrl(O):C(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache||
!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));A(q)&&((q=kc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0<b.length&&(a+=(-1===a.indexOf("?")?
"?":"&")+b);return a}function t(a,b){var c=a.split("?");if(2<c.length)throw Lb("badjsonp",a);c=hc(c[1]);r(c,function(c,d){if("JSON_CALLBACK"===c)throw Lb("badjsonp",a);if(d===b)throw Lb("badjsonp",b,a);});return a+=(-1===a.indexOf("?")?"?":"&")+b+"=JSON_CALLBACK"}var N=k("$http");a.paramSerializer=C(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var v=[];r(d,function(a){v.unshift(C(a)?m.get(a):m.invoke(a))});var kc=Og(c);n.pendingRequests=[];(function(a){r(arguments,function(a){n[a]=
function(b,c){return n(S({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){n[a]=function(b,c,d){return n(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=a;return n}]}function Wf(){this.$get=function(){return function(){return new z.XMLHttpRequest}}}function Vf(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return Pg(a,c,a.defer,b,d[0])}]}function Pg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK",
b);var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m);f.removeEventListener("error",m);e.body.removeChild(f);f=null;var g=-1,s="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),s=a.type,g="error"===a.type?404:200);d&&d(g,s)};f.addEventListener("load",m);f.addEventListener("error",m);e.body.appendChild(f);return m}return function(e,k,h,l,m,p,n,s,G,t){function N(a){J="timeout"===a;pa&&pa();y&&y.abort()}function v(a,
b,c,e,f,g){w(P)&&d.cancel(P);pa=y=null;a(b,c,e,f,g)}k=k||a.url();if("jsonp"===K(e))var q=c.createCallback(k),pa=f(k,q,function(a,b){var d=200===a&&c.getResponse(q);v(l,a,d,"",b,"complete");c.removeCallback(q)});else{var y=b(e,k),J=!1;y.open(e,k,!0);r(m,function(a,b){w(a)&&y.setRequestHeader(b,a)});y.onload=function(){var a=y.statusText||"",b="response"in y?y.response:y.responseText,c=1223===y.status?204:y.status;0===c&&(c=b?200:"file"===ga(k).protocol?404:0);v(l,c,b,y.getAllResponseHeaders(),a,"complete")};
y.onerror=function(){v(l,-1,null,null,"","error")};y.ontimeout=function(){v(l,-1,null,null,"","timeout")};y.onabort=function(){v(l,-1,null,null,"",J?"timeout":"abort")};r(G,function(a,b){y.addEventListener(b,a)});r(t,function(a,b){y.upload.addEventListener(b,a)});n&&(y.withCredentials=!0);if(s)try{y.responseType=s}catch(I){if("json"!==s)throw I;}y.send(A(h)?null:h)}if(0<p)var P=d(function(){N("timeout")},p);else p&&B(p.then)&&p.then(function(){N(w(p.$$timeoutId)?"timeout":"abort")})}}function Pf(){var a=
"{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(p,a).replace(n,b)}function k(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function h(f,h,n,p){function v(a){try{return a=n&&!r?e.getTrusted(n,a):e.valueOf(a),p&&!w(a)?a:jc(a)}catch(b){c(Ma.interr(f,b))}}var r=n===e.URL||n===e.MEDIA_URL;if(!f.length||
-1===f.indexOf(a)){if(h)return;h=g(f);r&&(h=e.getTrusted(n,h));h=ia(h);h.exp=f;h.expressions=[];h.$$watchDelegate=k;return h}p=!!p;for(var q,y,J=0,I=[],P,Q=f.length,M=[],L=[],u;J<Q;)if(-1!==(q=f.indexOf(a,J))&&-1!==(y=f.indexOf(b,q+l)))J!==q&&M.push(g(f.substring(J,q))),J=f.substring(q+l,y),I.push(J),J=y+m,L.push(M.length),M.push("");else{J!==Q&&M.push(g(f.substring(J)));break}u=1===M.length&&1===L.length;var R=r&&u?void 0:v;P=I.map(function(a){return d(a,R)});if(!h||I.length){var x=function(a){for(var b=
0,c=I.length;b<c;b++){if(p&&A(a[b]))return;M[L[b]]=a[b]}if(r)return e.getTrusted(n,u?M[0]:M.join(""));n&&1<M.length&&Ma.throwNoconcat(f);return M.join("")};return S(function(a){var b=0,d=I.length,e=Array(d);try{for(;b<d;b++)e[b]=P[b](a);return x(e)}catch(g){c(Ma.interr(f,g))}},{exp:f,expressions:I,$$watchDelegate:function(a,b){var c;return a.$watchGroup(P,function(d,e){var f=x(d);b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,p=new RegExp(a.replace(/./g,f),"g"),n=new RegExp(b.replace(/./g,
f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function Qf(){this.$get=["$$intervalFactory","$window",function(a,b){var d={},c=function(a){b.clearInterval(a);delete d[a]},e=a(function(a,c,e){a=b.setInterval(a,c);d[a]=e;return a},c);e.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$intervalId"))throw Qg("badprom");if(!d.hasOwnProperty(a.$$intervalId))return!1;a=a.$$intervalId;var b=d[a],e=b.promise;e.$$state&&(e.$$state.pur=!0);b.reject("canceled");
c(a);return!0};return e}]}function Rf(){this.$get=["$browser","$q","$$q","$rootScope",function(a,b,d,c){return function(e,f){return function(g,k,h,l){function m(){p?g.apply(null,n):g(s)}var p=4<arguments.length,n=p?Ha.call(arguments,4):[],s=0,G=w(l)&&!l,t=(G?d:b).defer(),r=t.promise;h=w(h)?h:0;r.$$intervalId=e(function(){G?a.defer(m):c.$evalAsync(m);t.notify(s++);0<h&&s>=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Cd(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host=
d.hostname;b.$$port=fa(d.port)||Rg[d.protocol]||null}function Dd(a,b,d){if(Sg.test(a))throw kb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=hc(a.search);b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function yc(a,b){return a.slice(0,
b.length)===b}function ya(a,b){if(yc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function zc(a,b,d){this.$$html5=!0;d=d||"";Cd(a,this);this.$$parse=function(a){var d=ya(b,a);if(!C(d))throw kb("ipthprfx",a,b);Dd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=ya(a,c))?(g=f,g=d&&w(f=ya(d,f))?
b+(ya("/",f)||f):a+g):w(f=ya(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function Ac(a,b,d){Cd(a,this);this.$$parse=function(c){var e=ya(a,c)||ya(b,c),f;A(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",A(e)&&(a=c,this.replace())):(f=ya(d,e),A(f)&&(f=e));Dd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;yc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b,
d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Ed(a,b,d){this.$$html5=!0;Ac.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=ya(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Mb(a){return function(){return this[a]}}function Fd(a,b){return function(d){if(A(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Yf(){var a="!",
b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||C(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a,
b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw kb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?zc:Ed}else s=Da(n),p=Ac;var r=s.substr(0,Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i;
f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!C(e)||!A(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")||a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!==
n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){yc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation=!1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!==
m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Zf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){dc(a)&&(a.stack&&f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&
(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=wa||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Tg(a){return a+""}function Ug(a,b){return"undefined"!==typeof a?a:
b}function Gd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Vg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Hd:b}function Z(a,b,d){var c,e,f=a.isPure=Vg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch=
[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test,b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&&
a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left,
b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant=
!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Id(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Jd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Kd(a){if(1===a.body.length&&Jd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}function Ld(a){this.$filter=a}function Md(a){this.$filter=a}function Nb(a,b,d){this.ast=
new q(a,d);this.astCompiler=d.csp?new Md(b):new Ld(b)}function Bc(a){return B(a.valueOf)?a.valueOf():Wg.call(a)}function $f(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Ob(G),d=(new Nb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E,
c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Bc(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Bc(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n<p;n++)l[n]=g,m[n]=null;return a.$watch(function(a){for(var b=!1,c=0,e=f.length;c<e;c++){var k=f[c](a);if(b||(b=!g(k,l[c],f[c].isPure)))m[c]=k,l[c]=k&&Bc(k)}b&&
(h=d(a,void 0,void 0,m));return h},b,c,e)}function h(a,b,c,d,e){function f(){h(m)&&k()}function g(a,b,c,d){m=u&&d?d[0]:n(a,b,c,d);h(m)&&a.$$postDigest(f);return s(m)}var h=d.literal?l:w,k,m,n=d.$$intercepted||d,s=d.$$interceptor||Ta,u=d.inputs&&!n.inputs;g.literal=d.literal;g.constant=d.constant;g.inputs=d.inputs;p(g);return k=a.$watch(g,b,c,e)}function l(a){var b=!0;r(a,function(a){w(a)||(b=!1)});return b}function m(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function p(a){a.constant?
a.$$watchDelegate=m:a.oneTime?a.$$watchDelegate=h:a.inputs&&(a.$$watchDelegate=k);return a}function n(a,b){function c(d){return b(a(d))}c.$stateful=a.$stateful||b.$stateful;c.$$pure=a.$$pure&&b.$$pure;return c}function s(a,b){if(!b)return a;a.$$interceptor&&(b=n(a.$$interceptor,b),a=a.$$intercepted);var c=!1,d=function(d,e,f,g){d=c&&g?g[0]:a(d,e,f,g);return b(d)};d.$$intercepted=a;d.$$interceptor=b;d.literal=a.literal;d.oneTime=a.oneTime;d.constant=a.constant;b.$stateful||(c=!a.inputs,d.inputs=a.inputs?
a.inputs:[a],b.$$pure||(d.inputs=d.inputs.map(function(a){return a.isPure===Hd?function(b){return a(b)}:a})));return p(d)}var G={csp:Ba().noUnsafeEval,literals:Ia(b),isIdentifierStart:B(d)&&d,isIdentifierContinue:B(c)&&c};f.$$getAst=function(a){var b=new Ob(G);return(new Nb(b,e,G)).getAst(a).ast};return f}]}function bg(){var a=!0;this.$get=["$rootScope","$exceptionHandler",function(b,d){return Nd(function(a){b.$evalAsync(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):
a}}function cg(){var a=!0;this.$get=["$browser","$exceptionHandler",function(b,d){return Nd(function(a){b.defer(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Nd(a,b,d){function c(){return new e}function e(){var a=this.promise=new f;this.resolve=function(b){h(a,b)};this.reject=function(b){m(a,b)};this.notify=function(b){n(a,b)}}function f(){this.$$state={status:0}}function g(){for(;!w&&x.length;){var a=x.shift();if(!a.pur){a.pur=!0;var c=a.value,c="Possibly unhandled rejection: "+
("function"===typeof c?c.toString().replace(/ \{[\s\S]*$/,""):A(c)?"undefined":"string"!==typeof c?Ne(c,void 0):c);dc(a.value)?b(a.value,c):b(c)}}}function k(c){!d||c.pending||2!==c.status||c.pur||(0===w&&0===x.length&&a(g),x.push(c));!c.processScheduled&&c.pending&&(c.processScheduled=!0,++w,a(function(){var e,f,k;k=c.pending;c.processScheduled=!1;c.pending=void 0;try{for(var l=0,n=k.length;l<n;++l){c.pur=!0;f=k[l][0];e=k[l][c.status];try{B(e)?h(f,e(c.value)):1===c.status?h(f,c.value):m(f,c.value)}catch(p){m(f,
p),p&&!0===p.$$passToExceptionHandler&&b(p)}}}finally{--w,d&&0===w&&a(g)}}))}function h(a,b){a.$$state.status||(b===a?p(a,v("qcycle",b)):l(a,b))}function l(a,b){function c(b){g||(g=!0,l(a,b))}function d(b){g||(g=!0,p(a,b))}function e(b){n(a,b)}var f,g=!1;try{if(D(b)||B(b))f=b.then;B(f)?(a.$$state.status=-1,f.call(b,c,d,e)):(a.$$state.value=b,a.$$state.status=1,k(a.$$state))}catch(h){d(h)}}function m(a,b){a.$$state.status||p(a,b)}function p(a,b){a.$$state.value=b;a.$$state.status=2;k(a.$$state)}function n(c,
d){var e=c.$$state.pending;0>=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;f<g;f++){c=e[f][0];a=e[f][3];try{n(c,B(a)?a(d):d)}catch(h){b(h)}}})}function s(a){var b=new f;m(b,a);return b}function G(a,b,c){var d=null;try{B(c)&&(d=c())}catch(e){return s(e)}return d&&B(d.then)?d.then(function(){return b(a)},s):b(a)}function t(a,b,c,d){var e=new f;h(e,a);return e.then(b,c,d)}function q(a){if(!B(a))throw v("norslvr",a);var b=new f;a(function(a){h(b,a)},function(a){m(b,a)});return b}
var v=F("$q",TypeError),w=0,x=[];S(f.prototype,{then:function(a,b,c){if(A(a)&&A(b)&&A(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&k(this.$$state);return d},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return G(b,y,a)},function(b){return G(b,s,a)},b)}});var y=t;q.prototype=f.prototype;q.defer=c;q.reject=s;q.when=t;q.resolve=y;q.all=function(a){var b=new f,c=
0,d=H(a)?[]:{};r(a,function(a,e){c++;t(a).then(function(a){d[e]=a;--c||h(b,d)},function(a){m(b,a)})});0===c&&h(b,d);return b};q.race=function(a){var b=c();r(a,function(a){t(a).then(b.resolve,b.reject)});return b.promise};return q}function mg(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:
function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function ag(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++qb;this.$$ChildScope=null;this.$$suspended=!1}b.prototype=a;return b}var b=10,d=F("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser",
function(f,g,k){function h(a){a.currentScope.$$destroyed=!0}function l(a){9===wa&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++qb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$suspended=this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=
0;this.$$isolateBindings=null}function p(a){if(v.$$phase)throw d("inprog",v.$$phase);v.$$phase=a}function n(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function G(){}function t(){for(;y.length;)try{y.shift()()}catch(a){f(a)}e=null}function q(){null===e&&(e=k.defer(function(){v.$apply(t)},null,"$applyAsync"))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m,
d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!==this)&&d.$on("$destroy",h);return d},$watch:function(a,b,d,e){var f=g(a);b=B(b)?b:E;if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l={fn:b,last:G,get:f,exp:e||a,eq:!!d};c=null;k||(k=h.$$watchers=[],k.$$digestWatchIndex=-1);k.unshift(l);
k.$$digestWatchIndex++;n(this,1);return function(){var a=cb(k,l);0<=a&&(n(h,-1),a<k.$$digestWatchIndex&&k.$$digestWatchIndex--);c=null}},$watchGroup:function(a,b){function c(){h=!1;try{k?(k=!1,b(e,e,g)):b(e,d,g)}finally{for(var f=0;f<a.length;f++)d[f]=e[f]}}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});r(a,function(a,
b){var d=g.$watch(a,function(a){e[b]=a;h||(h=!0,g.$evalAsync(c))});f.push(d)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!A(e)){if(D(e))if(za(e))for(f!==n&&(f=n,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},t=0,l++);a=0;for(b in e)ta.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t>a)for(b in l++,
f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],p={},s=!0,t=0;return this.$watch(m,function(){s?(s=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(za(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ta.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,g,h,l,m,n,s,r=b,q,y=w.length?v:this,N=[],A,z;p("$digest");k.$$checkUrlChange();this===v&&null!==e&&(k.defer.cancel(e),
t());c=null;do{s=!1;q=y;for(n=0;n<w.length;n++){try{z=w[n],l=z.fn,l(z.scope,z.locals)}catch(C){f(C)}c=null}w.length=0;a:do{if(n=!q.$$suspended&&q.$$watchers)for(n.$$digestWatchIndex=n.length;n.$$digestWatchIndex--;)try{if(a=n[n.$$digestWatchIndex])if(m=a.get,(g=m(q))!==(h=a.last)&&!(a.eq?va(g,h):Y(g)&&Y(h)))s=!0,c=a,a.last=a.eq?Ia(g,null):g,l=a.fn,l(g,h===G?g:h,q),5>r&&(A=4-r,N[A]||(N[A]=[]),N[A].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s=
!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;J<x.length;)try{x[J++]()}catch(D){f(D)}x.length=J=0;k.$$checkUrlChange()},$suspend:function(){this.$$suspended=!0},$isSuspended:function(){return this.$$suspended},$resume:function(){this.$$suspended=!1},$destroy:function(){if(!this.$$destroyed){var a=
this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&k.$$applicationDestroyed();n(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead===this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail===this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=
this.$evalAsync=this.$applyAsync=E;this.$on=this.$watch=this.$watchGroup=function(){return E};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){v.$$phase||w.length||k.defer(function(){w.length&&v.$digest()},null,"$evalAsync");w.push({scope:this,fn:g(a),locals:b})},$$postDigest:function(a){x.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{v.$$phase=null}}catch(b){f(b)}finally{try{v.$digest()}catch(c){throw f(c),
c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&y.push(b);a=g(a);q()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(delete c[d],s(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=
!0},defaultPrevented:!1},k=db([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)break;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=db([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||
[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var v=new m,w=v.$$asyncQueue=[],x=v.$$postDigestQueue=[],y=v.$$applyAsyncQueue=[],J=0;return v}]}function Qe(){var a=/^\s*(https?|s?ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationTrustedUrlList=function(b){return w(b)?
(a=b,this):a};this.imgSrcSanitizationTrustedUrlList=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f=ga(d&&d.trim()).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function Xg(a){if("self"===a)return a;if(C(a)){if(-1<a.indexOf("***"))throw Ea("iwcard",a);a=Od(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(ab(a))return new RegExp("^"+a.source+"$");throw Ea("imatcher");}function Pd(a){var b=[];w(a)&&r(a,function(a){b.push(Xg(a))});
return b}function eg(){this.SCE_CONTEXTS=W;var a=["self"],b=[];this.trustedResourceUrlList=function(b){arguments.length&&(a=Pd(b));return a};Object.defineProperty(this,"resourceUrlWhitelist",{get:function(){return this.trustedResourceUrlList},set:function(a){this.trustedResourceUrlList=a}});this.bannedResourceUrlList=function(a){arguments.length&&(b=Pd(a));return b};Object.defineProperty(this,"resourceUrlBlacklist",{get:function(){return this.bannedResourceUrlList},set:function(a){this.bannedResourceUrlList=
a}});this.$get=["$injector","$$sanitizeUri",function(d,c){function e(a,b){var c;"self"===a?(c=Cc(b,Qd))||(z.document.baseURI?c=z.document.baseURI:(Na||(Na=z.document.createElement("a"),Na.href=".",Na=Na.cloneNode(!1)),c=Na.href),c=Cc(b,c)):c=!!a.exec(b.href);return c}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};
return b}var g=function(a){throw Ea("unsafe");};d.has("$sanitize")&&(g=d.get("$sanitize"));var k=f(),h={};h[W.HTML]=f(k);h[W.CSS]=f(k);h[W.MEDIA_URL]=f(k);h[W.URL]=f(h[W.MEDIA_URL]);h[W.JS]=f(k);h[W.RESOURCE_URL]=f(h[W.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ea("icontext",a,b);if(null===b||A(b)||""===b)return b;if("string"!==typeof b)throw Ea("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||A(f)||""===f)return f;var k=h.hasOwnProperty(d)?
h[d]:null;if(k&&f instanceof k)return f.$$unwrapTrustedValue();B(f.$$unwrapTrustedValue)&&(f=f.$$unwrapTrustedValue());if(d===W.MEDIA_URL||d===W.URL)return c(f.toString(),d===W.MEDIA_URL);if(d===W.RESOURCE_URL){var k=ga(f.toString()),n,s,r=!1;n=0;for(s=a.length;n<s;n++)if(e(a[n],k)){r=!0;break}if(r)for(n=0,s=b.length;n<s;n++)if(e(b[n],k)){r=!1;break}if(r)return f;throw Ea("insecurl",f.toString());}if(d===W.HTML)return g(f);throw Ea("unsafe");},valueOf:function(a){return a instanceof k?a.$$unwrapTrustedValue():
a}}}]}function dg(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>wa)throw Ea("iequirks");var c=ja(W);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(W,
function(a,b){var d=K(b);c[("parse_as_"+d).replace(Dc,xb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Dc,xb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Dc,xb)]=function(b){return g(a,b)}});return c}]}function fg(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))||
[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||4>e||f),hasEvent:function(a){if("input"===a&&wa)return!1;if(A(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),transitions:h,animations:l,android:e}}]}function gg(){this.$get=ia(function(a){return new Yg(a)})}function Yg(a){function b(){var a=e.pop();return a&&
a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e,h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}):
a()}}function ig(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!C(k)||A(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==wc}):l===wc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)},
function(a){h||(a=Zg("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function jg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Od(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-",
"data-ng-","ng\\:"],k=0;k<g.length;++k){var h=a.querySelectorAll("["+g[k]+"model"+(d?"=":"*=")+'"'+b+'"]');if(h.length)return h}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function kg(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,h,l){B(f)||(l=h,h=f,f=E);var m=Ha.call(arguments,3),p=w(l)&&!l,n=(p?c:d).defer(),s=n.promise,r;
r=b.defer(function(){try{n.resolve(f.apply(null,m))}catch(b){n.reject(b),e(b)}finally{delete g[s.$$timeoutId]}p||a.$apply()},h,"$timeout");s.$$timeoutId=r;g[r]=n;return s}var g={};f.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$timeoutId"))throw $g("badprom");if(!g.hasOwnProperty(a.$$timeoutId))return!1;a=a.$$timeoutId;var c=g[a],d=c.promise;d.$$state&&(d.$$state.pur=!0);c.reject("canceled");delete g[a];return b.defer.cancel(a)};return f}]}function ga(a){if(!C(a))return a;wa&&(aa.setAttribute("href",
a),a=aa.href);aa.setAttribute("href",a);a=aa.hostname;!ah&&-1<a.indexOf(":")&&(a="["+a+"]");return{href:aa.href,protocol:aa.protocol?aa.protocol.replace(/:$/,""):"",host:aa.host,search:aa.search?aa.search.replace(/^\?/,""):"",hash:aa.hash?aa.hash.replace(/^#/,""):"",hostname:a,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function Og(a){var b=[Qd].concat(a.map(ga));return function(a){a=ga(a);return b.some(Cc.bind(null,a))}}function Cc(a,b){a=ga(a);b=ga(b);return a.protocol===
b.protocol&&a.host===b.host}function lg(){this.$get=ia(z)}function Rd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,k,h,l;try{a=d.cookie||""}catch(m){a=""}if(a!==e)for(e=a,a=e.split("; "),c={},k=0;k<a.length;k++)g=a[k],h=g.indexOf("="),0<h&&(l=b(g.substring(0,h)),A(c[l])&&(c[l]=b(g.substring(h+1))));return c}}function pg(){this.$get=Rd}function fd(a){function b(d,c){if(D(d)){var e={};r(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+
"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Sd);b("date",Td);b("filter",bh);b("json",ch);b("limitTo",dh);b("lowercase",eh);b("number",Ud);b("orderBy",Vd);b("uppercase",fh)}function bh(){return function(a,b,d,c){if(!za(a)){if(null==a)return a;throw F("filter")("notarray",a);}c=c||"$";var e;switch(Ec(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=gh(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a,
b)}}function gh(a,b,d,c){var e=D(a)&&d in a;!0===b?b=va:B(b)||(b=function(a,b){if(A(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!cc(a))return!1;a=K(""+a);b=K(""+b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?Fa(f,a[d],b,d,!1):Fa(f,a,b,d,c)}}function Fa(a,b,d,c,e,f){var g=Ec(a),k=Ec(b);if("string"===k&&"!"===b.charAt(0))return!Fa(a,b.substring(1),d,c,e);if(H(a))return a.some(function(a){return Fa(a,b,d,c,e)});switch(g){case "object":var h;if(e){for(h in a)if(h.charAt&&
"$"!==h.charAt(0)&&Fa(a[h],b,d,c,!0))return!0;return f?!1:Fa(a,b,d,c,!1)}if("object"===k){for(h in b)if(f=b[h],!B(f)&&!A(f)&&(g=h===c,!Fa(g?a:a[h],f,d,c,g,g)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function Ec(a){return null===a?"null":typeof a}function Sd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){A(c)&&(c=b.CURRENCY_SYM);A(e)&&(e=b.PATTERNS[1].maxFrac);var f=c?/\u00A4/g:/\s*\u00A4\s*/g;return null==a?a:Wd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(f,
c)}}function Ud(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Wd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function hh(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Xd))&&(a=a.replace(Xd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Fc;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Fc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Yd&&(d=d.splice(0,Yd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function ih(a,
b,d,c){var e=a.d,f=e.length-a.i;b=A(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Wd(a,b,d,c,e){if(!C(a)&&!X(a)||isNaN(a))return"";
var f=!isFinite(a),g=!1,k=Math.abs(a)+"",h="";if(f)h="\u221e";else{g=hh(k);ih(g,e,b.minFrac,b.maxFrac);h=g.d;k=g.i;e=g.e;f=[];for(g=h.reduce(function(a,b){return a&&!b},!0);0>k;)h.unshift(0),k++;0<k?f=h.splice(k,h.length):(f=h,h=[0]);k=[];for(h.length>=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+
h+b.posSuf}function Pb(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=Fc+a;d&&(a=a.substr(a.length-b));return e+a}function ea(a,b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12===d&&(f=12);return Pb(f,b,c,e)}}function lb(a,b,d){return function(c,e){var f=c["get"+a](),g=vb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Zd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function $d(a){return function(b){var d=
Zd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Pb(b,a)}}function Gc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Td(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+
(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;C(c)&&(c=jh.test(c)?fa(c):b(c));X(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=kh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=fc(f,m),c=gc(c,f,!0));r(k,function(b){h=lh[b];g+=h?h(c,a.DATETIME_FORMATS,
m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function ch(){return function(a,b){A(b)&&(b=2);return eb(a,b)}}function dh(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(Y(b))return a;X(a)&&(a=a.toString());if(!za(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Hc(a,d,d+b):0===d?Hc(a,b,a.length):Hc(a,Math.max(0,d+b),d)}}function Hc(a,b,d){return C(a)?a.slice(b,d):Ha.call(a,b,d)}function Vd(a){function b(b){return b.map(function(b){var c=
1,d=Ta;if(B(b))d=b;else if(C(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c=
h<l?-1:1)}else c="undefined"===d?1:"undefined"===h?-1:"null"===d?1:"null"===h?-1:d<h?-1:1;return c}return function(a,f,g,k){if(null==a)return a;if(!za(a))throw F("orderBy")("notarray",a);H(f)||(f=[f]);0===f.length&&(f=["+"]);var h=b(f),l=g?-1:1,m=B(k)?k:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:h.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="null";else if("object"===c)a:{if(B(e.valueOf)&&(e=e.valueOf(),d(e)))break a;
cc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var d=0,e=h.length;d<e;d++){var f=m(a.predicateValues[d],b.predicateValues[d]);if(f)return f*h[d].descending*l}return(m(a.tieBreaker,b.tieBreaker)||c(a.tieBreaker,b.tieBreaker))*l});return a=a.map(function(a){return a.value})}}function Ra(a){B(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ia(a)}function Qb(a,b,d,c,e){this.$$controls=[];this.$error={};this.$$success={};this.$pending=void 0;this.$name=e(b.name||
b.ngForm||"")(d);this.$dirty=!1;this.$valid=this.$pristine=!0;this.$submitted=this.$invalid=!1;this.$$parentForm=mb;this.$$element=a;this.$$animate=c;ae(this)}function ae(a){a.$$classCache={};a.$$classCache[be]=!(a.$$classCache[nb]=a.$$element.hasClass(nb))}function ce(a){function b(a,b,c){c&&!a.$$classCache[b]?(a.$$animate.addClass(a.$$element,b),a.$$classCache[b]=!0):!c&&a.$$classCache[b]&&(a.$$animate.removeClass(a.$$element,b),a.$$classCache[b]=!1)}function d(a,c,d){c=c?"-"+Xc(c,"-"):"";b(a,nb+
c,!0===d);b(a,be+c,!1===d)}var c=a.set,e=a.unset;a.clazz.prototype.$setValidity=function(a,g,k){A(g)?(this.$pending||(this.$pending={}),c(this.$pending,a,k)):(this.$pending&&e(this.$pending,a,k),de(this.$pending)&&(this.$pending=void 0));Ga(g)?g?(e(this.$error,a,k),c(this.$$success,a,k)):(c(this.$error,a,k),e(this.$$success,a,k)):(e(this.$error,a,k),e(this.$$success,a,k));this.$pending?(b(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,d(this,"",null)):(b(this,"ng-pending",!1),this.$valid=
de(this.$error),this.$invalid=!this.$valid,d(this,"",this.$valid));g=this.$pending&&this.$pending[a]?void 0:this.$error[a]?!1:this.$$success[a]?!0:null;d(this,a,g);this.$$parentForm.$setValidity(a,g,this)}}function de(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Ic(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function Sa(a,b,d,c,e,f){var g=K(b[0].type);if(!e.android){var k=!1;b.on("compositionstart",function(){k=!0});b.on("compositionupdate",
function(a){if(A(a.data)||""===a.data)k=!1});b.on("compositionend",function(){k=!1;l()})}var h,l=function(a){h&&(f.defer.cancel(h),h=null);if(!k){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=V(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){h||(h=f.defer(function(){h=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||
m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ee[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Rb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(C(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-
1)&&(d=d.substring(1,d.length-1));if(mh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),e=new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0),100>f.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function ob(a,b,d,c){return function(e,f,g,k,h,l,m,
p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Uc(b,fc(v)));var e=d(a,b);!isNaN(e)&&c&&(e=gc(e,c));return e}Jc(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw pb("datefmt",a);if(n(a)){q=a;var b=
k.$options.getOption("timezone");b&&(v=b,q=gc(q,b,!0));var d=c;t&&C(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),z=s(x);k.$validators.min=function(a){return!n(a)||A(z)||d(a)>=z};g.$observe("min",function(a){a!==x&&(z=s(a),x=a,k.$validate())})}if(w(g.max)||
g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||A(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Jc(a,b,d,c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function fe(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(nh.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!X(b))throw pb("numfmt",
b);b=b.toString()}return b})}function na(a){w(a)&&!X(a)&&(a=parseFloat(a));return Y(a)?void 0:a}function Kc(a){var b=a.toString(),d=b.indexOf(".");return-1===d?-1<a&&1>a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ge(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Kc(a):0,k=e?Kc(b):0,h=f?Kc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function he(a,b,d,c,e){if(w(c)){a=
a(c);if(!a.constant)throw pb("constexpr",d,c);return a(b)}return e}function Lc(a,b){function d(a,b){if(!a||!a.length)return[];if(!b||!b.length)return a;var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e===b[m])continue a;c.push(e)}return c}function c(a){if(!a)return a;var b=a;H(a)?b=a.map(c).join(" "):D(a)?b=Object.keys(a).filter(function(b){return a[b]}).join(" "):C(a)||(b=a+"");return b}a="ngClass"+a;var e;return["$parse",function(f){return{restrict:"AC",link:function(g,
k,h){function l(a,b){var c=[];r(a,function(a){if(0<b||p[a])p[a]=(p[a]||0)+b,p[a]===+(0<b)&&c.push(a)});return c.join(" ")}function m(a){if(a===b){var c=s,c=l(c&&c.split(" "),1);h.$addClass(c)}else c=s,c=l(c&&c.split(" "),-1),h.$removeClass(c);n=a}var p=k.data("$classCounts"),n=!0,s;p||(p=T(),k.data("$classCounts",p));"ngClass"!==a&&(e||(e=f("$index",function(a){return a&1})),g.$watch(e,m));g.$watch(f(h[a],c),function(a){if(n===b){var c=s&&s.split(" "),e=a&&a.split(" "),f=d(c,e),c=d(e,c),f=l(f,-1),
c=l(c,1);h.$addClass(c);h.$removeClass(f)}s=a})}}}]}function sd(a,b,d,c,e,f){return{restrict:"A",compile:function(g,k){var h=a(k[c]);return function(a,c){c.on(e,function(c){var e=function(){h(a,{$event:c})};if(b.$$phase)if(f)a.$evalAsync(e);else try{e()}catch(g){d(g)}else a.$apply(e)})}}}}function Sb(a,b,d,c,e,f,g,k,h){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=
[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=void 0;this.$name=h(d.name||"",!1)(a);this.$$parentForm=mb;this.$options=Tb;this.$$updateEvents="";this.$$updateEventHandler=this.$$updateEventHandler.bind(this);this.$$parsedNgModel=e(d.ngModel);this.$$parsedNgModelAssign=this.$$parsedNgModel.assign;this.$$ngModelGet=this.$$parsedNgModel;this.$$ngModelSet=this.$$parsedNgModelAssign;this.$$pendingDebounce=
null;this.$$parserValid=void 0;this.$$parserName="parse";this.$$currentValidationRunId=0;this.$$scope=a;this.$$rootScope=a.$root;this.$$attr=d;this.$$element=c;this.$$animate=f;this.$$timeout=g;this.$$parse=e;this.$$q=k;this.$$exceptionHandler=b;ae(this);oh(this)}function oh(a){a.$$scope.$watch(function(b){b=a.$$ngModelGet(b);b===a.$modelValue||a.$modelValue!==a.$modelValue&&b!==b||a.$$setModelValue(b);return b})}function Mc(a){this.$$options=a}function ie(a,b){r(b,function(b,c){w(a[c])||(a[c]=b)})}
function Oa(a,b){a.prop("selected",b);a.attr("selected",b)}function je(a,b,d){if(a){C(a)&&(a=new RegExp("^"+a+"$"));if(!a.test)throw F("ngPattern")("noregexp",b,a,Aa(d));return a}}function Ub(a){a=fa(a);return Y(a)?-1:a}var Xb={objectMaxDepth:5,urlErrorParamsEnabled:!0},ke=/^\/(.+)\/([a-z]*)$/,ta=Object.prototype.hasOwnProperty,K=function(a){return C(a)?a.toLowerCase():a},vb=function(a){return C(a)?a.toUpperCase():a},wa,x,sb,Ha=[].slice,Kg=[].splice,ph=[].push,la=Object.prototype.toString,Rc=Object.getPrototypeOf,
oa=F("ng"),ca=z.angular||(z.angular={}),lc,qb=0;wa=z.document.documentMode;var Y=Number.isNaN||function(a){return a!==a};E.$inject=[];Ta.$inject=[];var ze=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,V=function(a){return C(a)?a.trim():a},Od=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!w(Ba.rules)){var a=z.document.querySelector("[ng-csp]")||z.document.querySelector("[data-ng-csp]");if(a){var b=
a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},rb=function(){if(w(rb.name_))return rb.name_;var a,b,d=Qa.length,c,e;for(b=0;b<d;++b)if(c=Qa[b],a=z.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return rb.name_=e},Be=/:/g,Qa=["ng-",
"data-ng-","ng:","x-ng-"],Fe=function(a){var b=a.currentScript;if(!b)return!0;if(!(b instanceof z.HTMLScriptElement||b instanceof z.SVGScriptElement))return!1;b=b.attributes;return[b.getNamedItem("src"),b.getNamedItem("href"),b.getNamedItem("xlink:href")].every(function(b){if(!b)return!0;if(!b.value)return!1;var c=a.createElement("a");c.href=b.value;if(a.location.origin===c.origin)return!0;switch(c.protocol){case "http:":case "https:":case "ftp:":case "blob:":case "file:":case "data:":return!0;default:return!1}})}(z.document),
Ie=/[A-Z]/g,Yc=!1,Pa=3,Pe={full:"1.8.2",major:1,minor:8,dot:2,codeName:"meteoric-mining"};U.expando="ng339";var Ka=U.cache={},ug=1;U._data=function(a){return this.cache[a[this.expando]]||{}};var qg=/-([a-z])/g,qh=/^-ms-/,Bb={mouseleave:"mouseout",mouseenter:"mouseover"},oc=F("jqLite"),tg=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,nc=/<|&#?\w+;/,rg=/<([\w:-]+)/,sg=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qa={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr",
"tbody","table"]};qa.tbody=qa.tfoot=qa.colgroup=qa.caption=qa.thead;qa.th=qa.td;var hb={option:[1,'<select multiple="multiple">',"</select>"],_default:[0,"",""]},Nc;for(Nc in qa){var le=qa[Nc],me=le.slice().reverse();hb[Nc]=[me.length,"<"+me.join("><")+">","</"+le.join("></")+">"]}hb.optgroup=hb.option;var zg=z.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=U.prototype={ready:hd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+
"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:ph,sort:[].sort,splice:[].splice},Hb={};r("multiple selected checked disabled readOnly required open".split(" "),function(a){Hb[K(a)]=a});var od={};r("input select option textarea button form details".split(" "),function(a){od[a]=!0});var vd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:sc,removeData:rc,hasData:function(a){for(var b in Ka[a.ng339])return!0;
return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)rc(a[b]),kd(a[b])}},function(a,b){U[b]=a});r({data:sc,inheritedData:Fb,scope:function(a){return x.data(a,"$scope")||Fb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return x.data(a,"$isolateScope")||x.data(a,"$isolateScopeNoTemplate")},controller:ld,injector:function(a){return Fb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Cb,css:function(a,b,d){b=yb(b.replace(qh,"ms-"));if(w(d))a.style[b]=
d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Pa&&2!==c&&8!==c&&a.getAttribute){var c=K(b),e=Hb[c];if(w(d))null===d||!1===d&&e?a.removeAttribute(b):a.setAttribute(b,e?c:d);else return a=a.getAttribute(b),e&&null!==a&&(a=c),null===a?void 0:a}},prop:function(a,b,d){if(w(d))a[b]=d;else return a[b]},text:function(){function a(a,d){if(A(d)){var c=a.nodeType;return 1===c||c===Pa?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(A(b)){if(a.multiple&&"select"===
ua(a)){var d=[];r(a.options,function(a){a.selected&&d.push(a.value||a.text)});return d}return a.value}a.value=b},html:function(a,b){if(A(b))return a.innerHTML;zb(a,!0);a.innerHTML=b},empty:md},function(a,b){U.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==md&&A(2===a.length&&a!==Cb&&a!==ld?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===sc)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=A(e)?Math.min(g,1):g;for(f=0;f<g;f++){var k=a(this[f],b,c);e=e?e+k:k}return e}for(e=0;e<g;e++)a(this[e],
b,c);return this}});r({removeData:rc,on:function(a,b,d,c){if(w(c))throw oc("onargs");if(mc(a)){c=Ab(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=wg(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,k=function(b,c,g){var k=e[b];k||(k=e[b]=[],k.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,f));k.push(d)};g--;)b=c[g],Bb[b]?(k(Bb[b],yg),k(b,void 0,!0)):k(b)}},off:kd,one:function(a,b,d){a=x(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,
b){var d,c=a.parentNode;zb(a);r(new U(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];r(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===d){b=new U(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;r(new U(b),function(b){a.insertBefore(b,d)})}},
wrap:function(a,b){var d=x(b).eq(0).clone()[0],c=a.parentNode;c&&c.replaceChild(d,a);d.appendChild(a)},remove:Gb,detach:function(a){Gb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;if(c){b=new U(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Eb,removeClass:Db,toggleClass:function(a,b,d){b&&r(b.split(" "),function(b){var e=d;A(e)&&(e=!Cb(a,b));(e?Eb:Db)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},
find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:qc,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=Ab(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:E,type:f,target:a},b.type&&(c=S(c,
b)),b=ja(g),e=d?[c].concat(d):[c],r(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){U.prototype[b]=function(b,c,e){for(var f,g=0,k=this.length;g<k;g++)A(f)?(f=a(this[g],b,c,e),w(f)&&(f=x(f))):pc(f,a(this[g],b,c,e));return w(f)?f:this}});U.prototype.bind=U.prototype.on;U.prototype.unbind=U.prototype.off;var rh=Object.create(null);pd.prototype={_idx:function(a){a!==this._lastKey&&(this._lastKey=a,this._lastIndex=this._keys.indexOf(a));return this._lastIndex},_transformKey:function(a){return Y(a)?
rh:a},get:function(a){a=this._transformKey(a);a=this._idx(a);if(-1!==a)return this._values[a]},has:function(a){a=this._transformKey(a);return-1!==this._idx(a)},set:function(a,b){a=this._transformKey(a);var d=this._idx(a);-1===d&&(d=this._lastIndex=this._keys.length);this._keys[d]=a;this._values[d]=b},delete:function(a){a=this._transformKey(a);a=this._idx(a);if(-1===a)return!1;this._keys.splice(a,1);this._values.splice(a,1);this._lastKey=NaN;this._lastIndex=-1;return!0}};var Ib=pd,og=[function(){this.$get=
[function(){return Ib}]}],Bg=/^([^(]+?)=>/,Cg=/^[^(]*\(\s*([^)]*)\)/m,sh=/,/,th=/^\s*(_?)(\S+?)\1\s*$/,Ag=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ca=F("$injector");fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw C(d)&&d||(d=a.name||Dg(a)),Ca("strictdi",d);b=qd(a);r(b[1].split(sh),function(a){a.replace(th,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,tb(a[b],"fn"),c=a.slice(0,b)):tb(a,"fn",!0);return c};var ne=F("$animate"),
Ef=function(){this.$get=E},Ff=function(){var a=new Ib,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=C(b)?b.split(" "):H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=Eg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Eb(a,e);f&&Db(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g,
k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Cf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw ne("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g,
d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,ne("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){e=f;break a}}e=void 0}!e||e.parentNode||e.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,
off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.cancel&&a.cancel()},enter:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"enter",ra(l))},move:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"move",ra(l))},leave:function(b,c){return a.push(b,"leave",ra(c),function(){b.remove()})},addClass:function(b,c,d){d=ra(d);d.addClass=ib(d.addclass,c);return a.push(b,"addClass",d)},removeClass:function(b,c,d){d=ra(d);d.removeClass=ib(d.removeClass,
c);return a.push(b,"removeClass",d)},setClass:function(b,c,d,f){f=ra(f);f.addClass=ib(f.addClass,c);f.removeClass=ib(f.removeClass,d);return a.push(b,"setClass",f)},animate:function(b,c,d,f,m){m=ra(m);m.from=m.from?S(m.from,c):c;m.to=m.to?S(m.to,d):d;m.tempClasses=ib(m.tempClasses,f||"ng-inline-animate");return a.push(b,"animate",m)}}}]}],Hf=function(){this.$get=["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a=
!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},Gf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(a,b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){c()?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;r(a,function(a){a.done(c)})};
f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:E,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&
this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(r(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return f}]},Df=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&&
(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);k||h.complete();k=!0});return h}var g=e||{};g.$$prepared||(g=Ia(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var k,h=new d;return{start:f,end:f}}}]},$=F("$compile"),uc=new function(){};Zc.$inject=["$provide","$$sanitizeUriProvider"];Kb.prototype.isFirstChange=function(){return this.previousValue===uc};var rd=/^((?:x|data)[:\-_])/i,Jg=
/[:\-_]+(.)/g,xd=F("$controller"),wd=/^(\S+)(\s+as\s+([\w$]+))?$/,Of=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof x&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},yd="application/json",xc={"Content-Type":yd+";charset=utf-8"},Mg=/^\[|^\{(?!\{)/,Ng={"[":/]$/,"{":/}$/},Lg=/^\)]\}',?\n/,Lb=F("$http"),Ma=ca.$interpolateMinErr=F("$interpolate");Ma.throwNoconcat=function(a){throw Ma("noconcat",a);};Ma.interr=function(a,b){return Ma("interr",a,b.toString())};
var Qg=F("$interval"),Xf=function(){this.$get=function(){function a(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var b=ca.callbacks,d={};return{createCallback:function(c){c="_"+(b.$$counter++).toString(36);var e="angular.callbacks."+c,f=a(c);d[e]=b[c]=f;return e},wasCalled:function(a){return d[a].called},getResponse:function(a){return d[a].data},removeCallback:function(a){delete b[d[a].id];delete d[a]}}}},uh=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Rg={http:80,https:443,ftp:21},kb=F("$location"),
Sg=/^\s*[\\/]{2,}/,vh={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){for(var a=this.$$path,b=this.$$hash,d=Ce(this.$$search),b=b?"#"+ic(b):"",a=a.split("/"),c=a.length;c--;)a[c]=ic(a[c].replace(/%2F/g,"/"));this.$$url=a.join("/")+(d?"?"+d:"")+b;this.$$absUrl=this.$$normalizeUrl(this.$$url);this.$$urlUpdatedByLocation=!0},absUrl:Mb("$$absUrl"),url:function(a){if(A(a))return this.$$url;var b=uh.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||
"");this.hash(b[5]||"");return this},protocol:Mb("$$protocol"),host:Mb("$$host"),port:Mb("$$port"),path:Fd("$$path",function(a){a=null!==a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(C(a)||X(a))a=a.toString(),this.$$search=hc(a);else if(D(a))a=Ia(a,{}),r(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw kb("isrcharg");break;default:A(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();
return this},hash:Fd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};r([Ed,Ac,zc],function(a){a.prototype=Object.create(vh);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==zc||!this.$$html5)throw kb("nostate");this.$$state=A(b)?null:b;this.$$urlUpdatedByLocation=!0;return this}});var Ya=F("$parse"),Wg={}.constructor.prototype.valueOf,Vb=T();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Vb[a]=
!0});var wh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Ob=function(a){this.options=a};Ob.prototype={constructor:Ob,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,
text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Vb[b],e=Vb[d];Vb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===
typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},
isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=
w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,
text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+
1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=wh[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var q=function(a,b){this.lexer=a;this.options=b};q.Program="Program";q.ExpressionStatement="ExpressionStatement";q.AssignmentExpression="AssignmentExpression";q.ConditionalExpression=
"ConditionalExpression";q.LogicalExpression="LogicalExpression";q.BinaryExpression="BinaryExpression";q.UnaryExpression="UnaryExpression";q.CallExpression="CallExpression";q.MemberExpression="MemberExpression";q.Identifier="Identifier";q.Literal="Literal";q.ArrayExpression="ArrayExpression";q.Property="Property";q.ObjectExpression="ObjectExpression";q.ThisExpression="ThisExpression";q.LocalsExpression="LocalsExpression";q.NGValueParameter="NGValueParameter";q.prototype={ast:function(a){this.text=
a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:q.Program,body:a}},expressionStatement:function(){return{type:q.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},
expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();if(this.expect("=")){if(!Jd(a))throw Ya("lval");a={type:q.AssignmentExpression,left:a,right:this.assignment(),operator:"="}}return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:q.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:q.LogicalExpression,
operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:q.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:q.BinaryExpression,operator:b.text,
left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},
primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",
this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());
return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");
return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),
b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe",
this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Hd=2;Ld.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[],
body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Kd(a))this.state.computing="assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Id(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage=
"main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Tg,Ug,Gd);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+
";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},
recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0,
void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right,
b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)),
h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b,
m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)):
(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context,
g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId();
h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0:h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+
b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,
b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,
b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(C(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(X(a))return a.toString();if(!0===a)return"true";if(!1===
a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Md.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Kd(a))c=this.recurse(d);d=Id(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body,
function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left),
e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,
e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n<g.length;++n)p.push(g[n](a,c,d,f));a=e.apply(void 0,p,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,f){var p=e(a,c,d,f),n;if(null!=p.value){n=[];for(var s=0;s<g.length;++s)n.push(g[s](a,c,d,f));n=p.value.apply(p.context,n)}return b?
{value:n}:n};case q.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,f,g){var p=c(a,d,f,g);a=e(a,d,f,g);p.context[p.name]=a;return b?{value:a}:a};case q.ArrayExpression:return g=[],r(a.elements,function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case q.ObjectExpression:return g=[],r(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}):
g.push({key:a.key.type===q.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},n=0;n<g.length;++n)g[n].computed?f[g[n].key(a,c,d,e)]=g[n].value(a,c,d,e):f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case q.ThisExpression:return function(a){return b?{value:a}:a};case q.LocalsExpression:return function(a,c){return b?{value:c}:c};case q.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d,
c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?-d:-0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=Gd(k,c);return d?{value:k}:k}},"binary-":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=(w(k)?k:0)-(w(c)?c:0);return d?{value:k}:k}},"binary*":function(a,b,
d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c,
e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=
a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c=
e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d,
c,e,f){return f?f[b]:a(d,c,e)}}};Nb.prototype={constructor:Nb,parse:function(a){a=this.getAst(a);var b=this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a),
oneTime:b}}};var Ea=F("$sce"),W={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Dc=/_([a-z])/g,Zg=F("$templateRequest"),$g=F("$timeout"),aa=z.document.createElement("a"),Qd=ga(z.location.href),Na;aa.href="http://[::1]";var ah="[::1]"===aa.hostname;Rd.$inject=["$document"];fd.$inject=["$provide"];var Yd=22,Xd=".",Fc="0";Sd.$inject=["$locale"];Ud.$inject=["$locale"];var lh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0),
MMMM:lb("Month"),MMM:lb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:lb("Month",!1,!0),dd:ea("Date",2),d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:lb("Day"),EEE:lb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Pb(Math[0<a?"floor":"ceil"](a/60),2)+Pb(Math.abs(a%60),2))},
ww:$d(2),w:$d(1),G:Gc,GG:Gc,GGG:Gc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},kh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,jh=/^-?\d+$/;Td.$inject=["$locale"];var eh=ia(K),fh=ia(vb);Vd.$inject=["$parse"];var Re=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href";
b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),wb={};r(Hb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=xa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});wb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(vd,function(a,b){wb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ke))){e.$set("ngPattern",new RegExp(c[1],
c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=xa("ng-"+a);wb[b]=["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),wa&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var mb={$addControl:E,$getControls:ia([]),$$renameControl:function(a,
b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Qb.$inject=["$element","$attrs","$scope","$animate","$interpolate"];Qb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)},
$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=mb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,
Wb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,Za,Wb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==mb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element,
"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ce({clazz:Qb,set:function(a,b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var oe=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Qb,compile:function(d,f){d.addClass(Za).addClass(nb);
var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))}));
d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,mb)})}}}}}]},Se=oe(),df=oe(!0),mh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,xh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,yh=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[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])?)*$/,
nh=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,pe=/^(\d{4,})-(\d{2})-(\d{2})$/,qe=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Oc=/^(\d{4,})-W(\d\d)$/,re=/^(\d{4,})-(\d\d)$/,se=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ee=T();r(["date","datetime-local","month","time","week"],function(a){ee[a]=!0});var te={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c)},date:ob("date",pe,Rb(pe,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ob("datetimelocal",qe,Rb(qe,"yyyy MM dd HH mm ss sss".split(" ")),
"yyyy-MM-ddTHH:mm:ss.sss"),time:ob("time",se,Rb(se,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ob("week",Oc,function(a,b){if(ha(a))return a;if(C(a)){Oc.lastIndex=0;var d=Oc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Zd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:ob("month",re,Rb(re,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Jc(a,b,d,c,"number");fe(c);Sa(a,
b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||A(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||A(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)||
A(s)||ge(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||xh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||yh.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==V(d.ngTrim);A(d.name)&&b.attr("name",++qb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g=
V(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=V(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);Y(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);Y(c.$modelValue)||(m?(a=b.val(),n<a&&(b.val(n),a=n<p?p:n),c.$setViewValue(a)):c.$validate())}function l(a){s=
na(a);Y(c.$modelValue)||(m?c.$viewValue!==b.val()&&c.$setViewValue(b.val()):c.$validate())}Jc(a,b,d,c,"range");fe(c);Sa(a,b,d,c,e,f);var m=c.$$hasNativeValidators&&"range"===b[0].type,p=m?0:void 0,n=m?100:void 0,s=m?1:void 0,r=b[0].validity;a=w(d.min);e=w(d.max);f=w(d.step);var q=c.$render;c.$render=m&&w(r.rangeUnderflow)&&w(r.rangeOverflow)?function(){q();c.$setViewValue(b.val())}:q;a&&(p=na(d.min),c.$validators.min=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(p)||b>=p},g("min",k));
e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:function(a,b){return c.$isEmpty(b)||A(s)||ge(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=he(k,a,"ngTrueValue",d.ngTrueValue,!0),l=he(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=
function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},$c=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(te[K(g.type)]||te.text)(e,f,g,k[0],b,a,d,c)}}}}],Af=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}};
return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&&Object.defineProperty(b,"value",a)}}}}},zh=/^(true|false|\d+)$/,xf=function(){function a(a,d,c){var e=w(c)?c:9===wa?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return zh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue,
function(b){a(d,f,b)})}}}},We=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=jc(a)})}}}}],Ye=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=A(a)?"":a})}}}}],
Xe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],wf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ze=Lc("",!0),af=Lc("Odd",0),$e=Lc("Even",1),bf=Ra({compile:function(a,
b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),cf=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ed={},Ah={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=xa("ng-"+a);ed[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return sd(d,c,e,b,a,Ah[a])}]});var ff=["$animate","$compile",function(a,b){return{multiElement:!0,
transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=ub(k.clone),a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],gf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",
controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1===a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded",
f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],zf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?(d.empty(),a(gd(e.template,z.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],hf=Ra({priority:450,compile:function(){return{pre:function(a,
b,d){a.$eval(d.ngInit)}}}}),vf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?V(e):e;c.$parsers.push(function(a){if(!A(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?V(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},nb="ng-valid",be="ng-invalid",Za="ng-pristine",Wb="ng-dirty",pb=F("ngModel");Sb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");
Sb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet=function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw pb("nonassign",this.$$attr.ngModel,Aa(this.$$element));},$render:E,$isEmpty:function(a){return A(a)||
""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Wb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element,
Za);this.$$animate.addClass(this.$$element,Wb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!Y(this.$modelValue)){var a=
this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e,
g){var h=e(a,b);if(!h||!B(h.then))throw pb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(A(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a,
b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid=
A(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;d<this.$parsers.length;d++)if(a=this.$parsers[d](a),A(a)){this.$$parserValid=!1;break}Y(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));var c=this.$modelValue,e=this.$options.getOption("allowInvalid");this.$$rawModelValue=a;e&&(this.$modelValue=a,b.$modelValue!==c&&b.$$writeModelToScope());this.$$runValidators(a,this.$$lastCommittedViewValue,function(d){e||(b.$modelValue=
d?a:void 0,b.$modelValue!==c&&b.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue);r(this.$viewChangeListeners,function(a){try{a()}catch(b){this.$$exceptionHandler(b)}},this)},$setViewValue:function(a,b){this.$viewValue=a;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(b)},$$debounceViewValueCommit:function(a){var b=this.$options.getOption("debounce");X(b[a])?b=b[a]:X(b["default"])&&-1===this.$options.getOption("updateOn").indexOf(a)?
b=b["default"]:X(b["*"])&&(b=b["*"]);this.$$timeout.cancel(this.$$pendingDebounce);var d=this;0<b?this.$$pendingDebounce=this.$$timeout(function(){d.$commitViewValue()},b):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){d.$commitViewValue()})},$overrideModelOptions:function(a){this.$options=this.$options.createChild(a);this.$$setUpdateOnEvents()},$processModelValue:function(){var a=this.$$format();this.$viewValue!==a&&(this.$$updateEmptyClasses(a),this.$viewValue=this.$$lastCommittedViewValue=
a,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,E))},$$format:function(){for(var a=this.$formatters,b=a.length,d=this.$modelValue;b--;)d=a[b](d);return d},$$setModelValue:function(a){this.$modelValue=this.$$rawModelValue=a;this.$$parserValid=void 0;this.$processModelValue()},$$setUpdateOnEvents:function(){this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler);if(this.$$updateEvents=this.$options.getOption("updateOn"))this.$$element.on(this.$$updateEvents,
this.$$updateEventHandler)},$$updateEventHandler:function(a){this.$$debounceViewValueCommit(a&&a.type)}};ce({clazz:Sb,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]}});var uf=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Sb,priority:1,compile:function(b){b.addClass(Za).addClass("ng-untouched").addClass(nb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;if(f=f[2])g.$options=f.$options;g.$$initGetterSetters();b.$addControl(g);
e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){function g(){k.$setTouched()}var k=f[0];k.$$setUpdateOnEvents();c.on("blur",function(){k.$touched||(a.$$phase?b.$evalAsync(g):b.$apply(g))})}}}}}],Tb,Bh=/(\s+|^)default(\s+|$)/;Mc.prototype={getOption:function(a){return this.$$options[a]},createChild:function(a){var b=!1;a=S({},a);r(a,function(d,c){"$inherit"===d?"*"===c?b=!0:(a[c]=
this.$$options[c],"updateOn"===c&&(a.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===c&&(a.updateOnDefault=!1,a[c]=V(d.replace(Bh,function(){a.updateOnDefault=!0;return" "})))},this);b&&(delete a["*"],ie(a,this.$$options));ie(a,Tb.$$options);return new Mc(a)}};Tb=new Mc({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var yf=function(){function a(a,d){this.$$attrs=a;this.$$scope=d}a.$inject=["$attrs","$scope"];a.prototype={$onInit:function(){var a=
this.parentCtrl?this.parentCtrl.$options:Tb,d=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=a.createChild(d)}};return{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:a}},jf=Ra({terminal:!0,priority:1E3}),Ch=F("ngOptions"),Dh=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
sf=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!r&&za(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var p=a.match(Dh);if(!p)throw Ch("iexp",a,Aa(b));var n=p[5]||p[7],r=p[6];a=/ as /.test(p[0])&&p[1];var q=p[9];b=d(p[2]?p[1]:n);var t=a&&d(a)||b,w=q&&d(q),v=q?function(a,b){return w(c,b)}:function(a){return La(a)},
x=function(a,b){return v(a,B(a,b))},A=d(p[2]||p[1]),y=d(p[3]||""),J=d(p[4]||""),I=d(p[8]),z={},B=r?function(a,b){z[r]=b;z[n]=a;return z}:function(a){z[n]=a;return z};return{trackBy:q,getTrackByValue:x,getWatchables:d(I,function(a){var b=[];a=a||[];for(var d=f(a),e=d.length,g=0;g<e;g++){var k=a===d?g:d[g],l=a[k],k=B(l,k),l=v(l,k);b.push(l);if(p[2]||p[1])l=A(c,k),b.push(l);p[4]&&(k=J(c,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},d=I(c)||[],g=f(d),k=g.length,n=0;n<k;n++){var p=d===
g?n:g[n],r=B(d[p],p),s=t(c,r),p=v(s,r),w=A(c,r),z=y(c,r),r=J(c,r),s=new e(p,s,w,z,r);a.push(s);b[p]=s}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[x(a)]},getViewValueFromOption:function(a){return q?Ia(a.viewValue):a.viewValue}}}}}var e=z.document.createElement("option"),f=z.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=E},post:function(d,k,h,l){function m(a){var b=(a=v.getOptionFromViewValue(a))&&
a.element;b&&!b.selected&&(b.selected=!0);return a}function p(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);b.value=a.selectValue}var n=l[0],q=l[1],A=h.multiple;l=0;for(var t=k.children(),z=t.length;l<z;l++)if(""===t[l].value){n.hasEmptyOption=!0;n.emptyOption=t.eq(l);break}k.empty();l=!!n.emptyOption;x(e.cloneNode(!1)).val("?");var v,B=c(h.ngOptions,k,d),C=b[0].createDocumentFragment();n.generateUnknownOptionValue=function(a){return"?"};A?(n.writeValue=
function(a){if(v){var b=a&&a.map(m)||[];v.items.forEach(function(a){a.element.selected&&-1===Array.prototype.indexOf.call(b,a)&&(a.element.selected=!1)})}},n.readValue=function(){var a=k.val()||[],b=[];r(a,function(a){(a=v.selectValueMap[a])&&!a.disabled&&b.push(v.getViewValueFromOption(a))});return b},B.trackBy&&d.$watchCollection(function(){if(H(q.$viewValue))return q.$viewValue.map(function(a){return B.getTrackByValue(a)})},function(){q.$render()})):(n.writeValue=function(a){if(v){var b=k[0].options[k[0].selectedIndex],
c=v.getOptionFromViewValue(a);b&&b.removeAttribute("selected");c?(k[0].value!==c.selectValue&&(n.removeUnknownOption(),k[0].value=c.selectValue,c.element.selected=!0),c.element.setAttribute("selected","selected")):n.selectUnknownOrEmptyOption(a)}},n.readValue=function(){var a=v.selectValueMap[k.val()];return a&&!a.disabled?(n.unselectEmptyOption(),n.removeUnknownOption(),v.getViewValueFromOption(a)):null},B.trackBy&&d.$watch(function(){return B.getTrackByValue(q.$viewValue)},function(){q.$render()}));
l&&(a(n.emptyOption)(d),k.prepend(n.emptyOption),8===n.emptyOption[0].nodeType?(n.hasEmptyOption=!1,n.registerOption=function(a,b){""===b.val()&&(n.hasEmptyOption=!0,n.emptyOption=b,n.emptyOption.removeClass("ng-scope"),q.$render(),b.on("$destroy",function(){var a=n.$isEmptyOptionSelected();n.hasEmptyOption=!1;n.emptyOption=void 0;a&&q.$render()}))}):n.emptyOption.removeClass("ng-scope"));d.$watchCollection(B.getWatchables,function(){var a=v&&n.readValue();if(v)for(var b=v.items.length-1;0<=b;b--){var c=
v.items[b];w(c.group)?Gb(c.element.parentNode):Gb(c.element)}v=B.getOptions();var d={};v.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);var c=e.cloneNode(!1);b.appendChild(c);p(a,c)}else b=e.cloneNode(!1),C.appendChild(b),p(a,b)});k[0].appendChild(C);q.$render();q.$isEmpty(a)||(b=n.readValue(),(B.trackBy||A?va(a,b):a===b)||(q.$setViewValue(b),q.$render()))})}}}}],kf=["$locale","$interpolate","$log",
function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,k){function h(a){g.text(a||"")}var l=k.count,m=k.$attr.when&&g.attr(k.$attr.when),p=k.offset||0,n=f.$eval(m)||{},q={},w=b.startSymbol(),t=b.endSymbol(),x=w+l+"-"+p+t,v=ca.noop,z;r(k,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+K(c[2]),n[c]=g.attr(k.$attr[b]))});r(n,function(a,d){q[d]=b(a.replace(c,x))});f.$watch(l,function(b){var c=parseFloat(b),e=Y(c);e||c in n||(c=a.pluralCat(c-p));c===z||e&&Y(z)||(v(),e=q[c],A(e)?
(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),v=E,h()):v=f.$watch(e,h),z=c)})}}}],ue=F("ngRef"),lf=["$parse",function(a){return{priority:-1,restrict:"A",compile:function(b,d){var c=xa(ua(b)),e=a(d.ngRef),f=e.assign||function(){throw ue("nonassign",d.ngRef);};return function(a,b,h){var l;if(h.hasOwnProperty("ngRefRead"))if("$element"===h.ngRefRead)l=b;else{if(l=b.data("$"+h.ngRefRead+"Controller"),!l)throw ue("noctrl",h.ngRefRead,d.ngRef);}else l=b.data("$"+c+"Controller");l=
l||b;f(a,l);b.on("$destroy",function(){e(a)===l&&f(a,null)})}}}}],mf=["$parse","$animate","$compile",function(a,b,d){var c=F("ngRepeat"),e=function(a,b,c,d,e,f,g){a[c]=d;e&&(a[e]=f);a.$index=b;a.$first=0===b;a.$last=b===g-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))},f=function(a,b,c){return La(c)},g=function(a,b){return b};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(k,h){var l=h.ngRepeat,m=d.$$createComment("end ngRepeat",
l),p=l.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw c("iexp",l);var n=p[1],q=p[2],w=p[3],t=p[4],p=n.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!p)throw c("iidexp",n);var x=p[3]||p[1],v=p[2];if(w&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(w)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(w)))throw c("badident",w);var A;if(t){var z={$id:La},y=a(t);A=function(a,b,c,d){v&&
(z[v]=b);z[x]=c;z.$index=d;return y(a,z)}}return function(a,d,h,k,n){var p=T();a.$watchCollection(q,function(h){var k,q,t=d[0],s,y=T(),B,C,E,D,H,F,K;w&&(a[w]=h);if(za(h))H=h,q=A||f;else for(K in q=A||g,H=[],h)ta.call(h,K)&&"$"!==K.charAt(0)&&H.push(K);B=H.length;K=Array(B);for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],D=q(a,C,E,k),p[D])F=p[D],delete p[D],y[D]=F,K[k]=F;else{if(y[D])throw r(K,function(a){a&&a.scope&&(p[a.id]=a)}),c("dupes",l,D,E);K[k]={id:D,scope:void 0,clone:void 0};y[D]=!0}z&&(z[x]=void 0);
for(s in p){F=p[s];D=ub(F.clone);b.leave(D);if(D[0].parentNode)for(k=0,q=D.length;k<q;k++)D[k].$$NG_REMOVED=!0;F.scope.$destroy()}for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],F=K[k],F.scope){s=t;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);F.clone[0]!==s&&b.move(ub(F.clone),null,t);t=F.clone[F.clone.length-1];e(F.scope,k,x,E,v,C,B)}else n(function(a,c){F.scope=c;var d=m.cloneNode(!1);a[a.length++]=d;b.enter(a,null,t);t=d;F.clone=a;y[F.id]=F;e(F.scope,k,x,E,v,C,B)});p=y})}}}}],nf=["$animate",function(a){return{restrict:"A",
multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ef=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],of=Ra(function(a,b,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&r(d,function(a,c){b.css(c,"")});a&&b.css(a)})}),pf=["$animate","$compile",function(a,
b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],k=[],h=[],l=[],m=function(a,b){return function(c){!1!==c&&a.splice(b,1)}};d.$watch(e.ngSwitch||e.on,function(c){for(var d,e;h.length;)a.cancel(h.pop());d=0;for(e=l.length;d<e;++d){var q=ub(k[d].clone);l[d].$destroy();(h[d]=a.leave(q)).done(m(h,d))}k.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&r(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");
k.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],qf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){a=d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function(a,b,c){return c[b-1]!==a});r(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:e,element:b})})}}),rf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,
element:b})}}),Eh=F("ngTransclude"),tf=["$compile",function(a){return{restrict:"EAC",compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,k){function h(){d(a,function(a){b.append(a)})}if(!k)throw Eh("orphan",Aa(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;k(function(a,c){var d;if(d=a.length)a:{d=0;for(var f=a.length;d<f;d++){var g=a[d];if(g.nodeType!==Pa||g.nodeValue.trim()){d=!0;break a}}d=void 0}d?b.append(a):(h(),c.$destroy())},
null,f);f&&!k.isSlotFilled(f)&&h()}}}}],Te=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],Fh={$setViewValue:E,$render:E},Gh=["$element","$scope",function(a,b){function d(){g||(g=!0,b.$$postDigest(function(){g=!1;e.ngModelCtrl.$render()}))}function c(a){k||(k=!0,b.$$postDigest(function(){b.$$destroyed||(k=!1,e.ngModelCtrl.$setViewValue(e.readValue()),a&&e.ngModelCtrl.$render())}))}var e=this,f=new Ib;e.selectValueMap=
{};e.ngModelCtrl=Fh;e.multiple=!1;e.unknownOption=x(z.document.createElement("option"));e.hasEmptyOption=!1;e.emptyOption=void 0;e.renderUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);a.prepend(e.unknownOption);Oa(e.unknownOption,!0);a.val(b)};e.updateUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);Oa(e.unknownOption,!0);a.val(b)};e.generateUnknownOptionValue=function(a){return"? "+La(a)+" ?"};e.removeUnknownOption=function(){e.unknownOption.parent()&&
e.unknownOption.remove()};e.selectEmptyOption=function(){e.emptyOption&&(a.val(""),Oa(e.emptyOption,!0))};e.unselectEmptyOption=function(){e.hasEmptyOption&&Oa(e.emptyOption,!1)};b.$on("$destroy",function(){e.renderUnknownOption=E});e.readValue=function(){var b=a.val(),b=b in e.selectValueMap?e.selectValueMap[b]:b;return e.hasOption(b)?b:null};e.writeValue=function(b){var c=a[0].options[a[0].selectedIndex];c&&Oa(x(c),!1);e.hasOption(b)?(e.removeUnknownOption(),c=La(b),a.val(c in e.selectValueMap?
c:b),Oa(x(a[0].options[a[0].selectedIndex]),!0)):e.selectUnknownOrEmptyOption(b)};e.addOption=function(a,b){if(8!==b[0].nodeType){Ja(a,'"option value"');""===a&&(e.hasEmptyOption=!0,e.emptyOption=b);var c=f.get(a)||0;f.set(a,c+1);d()}};e.removeOption=function(a){var b=f.get(a);b&&(1===b?(f.delete(a),""===a&&(e.hasEmptyOption=!1,e.emptyOption=void 0)):f.set(a,b-1))};e.hasOption=function(a){return!!f.get(a)};e.$hasEmptyOption=function(){return e.hasEmptyOption};e.$isUnknownOptionSelected=function(){return a[0].options[0]===
e.unknownOption[0]};e.$isEmptyOptionSelected=function(){return e.hasEmptyOption&&a[0].options[a[0].selectedIndex]===e.emptyOption[0]};e.selectUnknownOrEmptyOption=function(a){null==a&&e.emptyOption?(e.removeUnknownOption(),e.selectEmptyOption()):e.unknownOption.parent().length?e.updateUnknownOption(a):e.renderUnknownOption(a)};var g=!1,k=!1;e.registerOption=function(a,b,f,g,k){if(f.$attr.ngValue){var q,r;f.$observe("value",function(a){var d,f=b.prop("selected");w(r)&&(e.removeOption(q),delete e.selectValueMap[r],
d=!0);r=La(a);q=a;e.selectValueMap[r]=a;e.addOption(a,b);b.attr("value",r);d&&f&&c()})}else g?f.$observe("value",function(a){e.readValue();var d,f=b.prop("selected");w(q)&&(e.removeOption(q),d=!0);q=a;e.addOption(a,b);d&&f&&c()}):k?a.$watch(k,function(a,d){f.$set("value",a);var g=b.prop("selected");d!==a&&e.removeOption(d);e.addOption(a,b);d&&g&&c()}):e.addOption(f.value,b);f.$observe("disabled",function(a){if("true"===a||a&&b.prop("selected"))e.multiple?c(!0):(e.ngModelCtrl.$setViewValue(null),e.ngModelCtrl.$render())});
b.on("$destroy",function(){var a=e.readValue(),b=f.value;e.removeOption(b);d();(e.multiple&&a&&-1!==a.indexOf(b)||a===b)&&c(!0)})}}],Ue=function(){return{restrict:"E",require:["select","?ngModel"],controller:Gh,priority:1,link:{pre:function(a,b,d,c){var e=c[0],f=c[1];if(f){if(e.ngModelCtrl=f,b.on("change",function(){e.removeUnknownOption();a.$apply(function(){f.$setViewValue(e.readValue())})}),d.multiple){e.multiple=!0;e.readValue=function(){var a=[];r(b.find("option"),function(b){b.selected&&!b.disabled&&
(b=b.value,a.push(b in e.selectValueMap?e.selectValueMap[b]:b))});return a};e.writeValue=function(a){r(b.find("option"),function(b){var c=!!a&&(-1!==Array.prototype.indexOf.call(a,b.value)||-1!==Array.prototype.indexOf.call(a,e.selectValueMap[b.value]));c!==b.selected&&Oa(x(b),c)})};var g,k=NaN;a.$watch(function(){k!==f.$viewValue||va(g,f.$viewValue)||(g=ja(f.$viewValue),f.$render());k=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}else e.registerOption=E},post:function(a,b,d,c){var e=
c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},Ve=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,e;w(d.ngValue)||(w(d.value)?c=a(d.value,!0):(e=a(b.text(),!0))||d.$set("value",b.text()));return function(a,b,d){var h=b.parent();(h=h.data("$selectController")||h.parent().data("$selectController"))&&h.registerOption(a,b,d,c,e)}}}}],bd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=
c.hasOwnProperty("required")||a(c.ngRequired)(b);c.ngRequired||(c.required=!0);e.$validators.required=function(a,b){return!f||!e.$isEmpty(b)};c.$observe("required",function(a){f!==a&&(f=a,e.$validate())})}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",compile:function(b,d){var c,e;d.ngPattern&&(c=d.ngPattern,e="/"===d.ngPattern.charAt(0)&&ke.test(d.ngPattern)?function(){return d.ngPattern}:a(d.ngPattern));return function(a,b,d,h){if(h){var l=d.pattern;d.ngPattern?l=e(a):c=d.pattern;
var m=je(l,c,b);d.$observe("pattern",function(a){var d=m;m=je(a,c,b);(d&&d.toString())!==(m&&m.toString())&&h.$validate()});h.$validators.pattern=function(a,b){return h.$isEmpty(b)||A(m)||m.test(b)}}}}}}],dd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.maxlength||a(c.ngMaxlength)(b),g=Ub(f);c.$observe("maxlength",function(a){f!==a&&(g=Ub(a),f=a,e.$validate())});e.$validators.maxlength=function(a,b){return 0>g||e.$isEmpty(b)||b.length<=g}}}}}],cd=
["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Ub(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Ub(a)||-1,f=a,e.$validate())});e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];z.angular.bootstrap?z.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Je(),Oe(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==
b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),
WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,
c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ee(z.document,Wc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(window.angular.element("<style>").text('@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}'));
//# sourceMappingURL=angular.min.js.map
;
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
 * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
 */
;window.Modernizr=function(a,b,c){function C(a){j.cssText=a}function D(a,b){return C(n.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a){var e=a[d];if(!F(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d||b):f}return!1}function I(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return E(b,"string")||E(b,"undefined")?G(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),H(e,b,c))}function J(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.8.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=E(e[d],"function"),E(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),A={}.hasOwnProperty,B;!E(A,"undefined")&&!E(A.call,"undefined")?B=function(a,b){return A.call(a,b)}:B=function(a,b){return b in a&&E(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return I("flexWrap")},s.flexboxlegacy=function(){return I("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!E(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!I("indexedDB",a)},s.hashchange=function(){return z("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return C("background-color:rgba(150,255,150,.5)"),F(j.backgroundColor,"rgba")},s.hsla=function(){return C("background-color:hsla(120,40%,100%,.5)"),F(j.backgroundColor,"rgba")||F(j.backgroundColor,"hsla")},s.multiplebgs=function(){return C("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return I("backgroundSize")},s.borderimage=function(){return I("borderImage")},s.borderradius=function(){return I("borderRadius")},s.boxshadow=function(){return I("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return D("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return I("animationName")},s.csscolumns=function(){return I("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return C((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),F(j.backgroundImage,"gradient")},s.cssreflections=function(){return I("boxReflect")},s.csstransforms=function(){return!!I("transform")},s.csstransforms3d=function(){var a=!!I("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return I("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var K in s)B(s,K)&&(x=K.toLowerCase(),e[x]=s[K](),v.push((e[x]?"":"no-")+x));return e.input||J(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)B(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},C(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=z,e.testProp=function(a){return G([a])},e.testAllProps=I,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};;
/*!
 * ASP.NET SignalR JavaScript Library 2.4.1
 * http://signalr.net/
 *
 * Copyright (c) .NET Foundation. All rights reserved.
 * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 *
 */
(function(n,t,i){function w(t,i){var u,f;if(n.isArray(t)){for(u=t.length-1;u>=0;u--)f=t[u],n.type(f)==="string"&&r.transports[f]||(i.log("Invalid transport: "+f+", removing it from the transports list."),t.splice(u,1));t.length===0&&(i.log("No transports remain within the specified transport array."),t=null)}else if(r.transports[t]||t==="auto"){if(t==="auto"&&r._.ieVersion<=8)return["longPolling"]}else i.log("Invalid transport: "+t.toString()+"."),t=null;return t}function b(n){return n==="http:"?80:n==="https:"?443:void 0}function a(n,t){return t.match(/:\d+$/)?t:t+":"+b(n)}function k(t,i){var u=this,r=[];u.tryBuffer=function(i){return t.state===n.signalR.connectionState.connecting?(r.push(i),!0):!1};u.drain=function(){if(t.state===n.signalR.connectionState.connected)while(r.length>0)i(r.shift())};u.clear=function(){r=[]}}var f={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",errorRedirectionExceedsLimit:"Negotiate redirection limit exceeded.",errorDuringStartRequest:"Error during start request. Stopping the connection.",errorFromServer:"Error message received from the server: '{0}'.",stoppedDuringStartRequest:"The connection was stopped during the start request.",errorParsingStartResponse:"Error parsing start response: '{0}'. Stopping the connection.",invalidStartResponse:"Invalid start response: '{0}'. Stopping the connection.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",aspnetCoreSignalrServer:"Detected a connection attempt to an ASP.NET Core SignalR Server. This client only supports connecting to an ASP.NET SignalR Server. See https://aka.ms/signalr-core-differences for details.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server.  Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",noConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting.",reconnectTimeout:"Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",reconnectWindowTimeout:"The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection.",jsonpNotSupportedWithAccessToken:"The JSONP protocol does not support connections that require a Bearer token to connect, such as the Azure SignalR Service."};if(typeof n!="function")throw new Error(f.nojQuery);var r,h,o=t.document.readyState==="complete",e=n(t),c="__Negotiate Aborted__",u={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},v=function(n,i){if(i!==!1){var r;typeof t.console!="undefined"&&(r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r))}},s=function(t,i,r){return i===t.state?(t.state=r,n(t).triggerHandler(u.onStateChanged,[{oldState:i,newState:r}]),!0):!1},y=function(n){return n.state===r.connectionState.disconnected},l=function(n){return n._.keepAliveData.activated&&n.transport.supportsKeepAlive(n)},p=function(i){var f,e;i._.configuredStopReconnectingTimeout||(e=function(t){var i=r._.format(r.resources.reconnectTimeout,t.disconnectTimeout);t.log(i);n(t).triggerHandler(u.onError,[r._.error(i,"TimeoutException")]);t.stop(!1,!1)},i.reconnecting(function(){var n=this;n.state===r.connectionState.reconnecting&&(f=t.setTimeout(function(){e(n)},n.disconnectTimeout))}),i.stateChanged(function(n){n.oldState===r.connectionState.reconnecting&&t.clearTimeout(f)}),i._.configuredStopReconnectingTimeout=!0)};if(r=function(n,t,i){return new r.fn.init(n,t,i)},r._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:function(){var i,n;return t.navigator.appName==="Microsoft Internet Explorer"&&(n=/MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent),n&&(i=t.parseFloat(n[1]))),i}(),error:function(n,t,i){var r=new Error(n);return r.source=t,typeof i!="undefined"&&(r.context=i),r},transportError:function(n,t,r,u){var f=this.error(n,r,u);return f.transport=t?t.name:i,f},format:function(){for(var t=arguments[0],n=0;n<arguments.length-1;n++)t=t.replace("{"+n+"}",arguments[n+1]);return t},firefoxMajorVersion:function(n){var t=n.match(/Firefox\/(\d+)/);return!t||!t.length||t.length<2?0:parseInt(t[1],10)},configurePingInterval:function(i){var f=i._.config,e=function(t){n(i).triggerHandler(u.onError,[t])};f&&!i._.pingIntervalId&&f.pingInterval&&(i._.pingIntervalId=t.setInterval(function(){r.transports._logic.pingServer(i).fail(e)},f.pingInterval))}},r.events=u,r.resources=f,r.ajaxDefaults={processData:!0,timeout:null,async:!0,global:!1,cache:!1},r.changeState=s,r.isDisconnecting=y,r.connectionState={connecting:0,connected:1,reconnecting:2,disconnected:4},r.hub={start:function(){throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'><\/script>.");}},typeof e.on=="function")e.on("load",function(){o=!0});else e.load(function(){o=!0});r.fn=r.prototype={init:function(t,i,r){var f=n(this);this.url=t;this.qs=i;this.lastError=null;this._={keepAliveData:{},connectingMessageBuffer:new k(this,function(n){f.triggerHandler(u.onReceived,[n])}),lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null,totalTransportConnectTimeout:0,redirectQs:null};typeof r=="boolean"&&(this.logging=r)},_parseResponse:function(n){var t=this;return n?typeof n=="string"?t.json.parse(n):n:n},_originalJson:t.JSON,json:t.JSON,isCrossDomain:function(i,r){var u;return(i=n.trim(i),r=r||t.location,i.indexOf("http")!==0)?!1:(u=t.document.createElement("a"),u.href=i,u.protocol+a(u.protocol,u.host)!==r.protocol+a(r.protocol,r.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:r.connectionState.disconnected,clientProtocol:"2.1",supportedProtocols:["1.5","2.0","2.1"],negotiateRedirectSupportedProtocols:["2.0","2.1"],reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(i,h){var a=this,v={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},g,y=a._deferral||n.Deferred(),b=t.document.createElement("a"),nt=function(i,u){i.url===u&&i.baseUrl||(i.url=u,b.href=i.url,b.protocol&&b.protocol!==":"?(i.protocol=b.protocol,i.host=b.host):(i.protocol=t.document.location.protocol,i.host=b.host||t.document.location.host),i.baseUrl=i.protocol+"//"+i.host,i.wsProtocol=i.protocol==="https:"?"wss://":"ws://",i.url.indexOf("//")===0&&(i.url=t.location.protocol+i.url,i.log("Protocol relative URL detected, normalizing it to '"+i.url+"'.")),i.isCrossDomain(i.url)&&(i.log("Auto detected cross domain url."),v.transport==="auto"&&(v.transport=["webSockets","serverSentEvents","longPolling"]),typeof i.withCredentials=="undefined"&&(i.withCredentials=!0),n.support.cors||(i.ajaxDataType="jsonp",i.log("Using jsonp because this browser doesn't support CORS.")),i.contentType=r._.defaultContentType))},d,k;if(a.lastError=null,a._deferral=y,!a.json)throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");if(n.type(i)==="function"?h=i:n.type(i)==="object"&&(n.extend(v,i),n.type(v.callback)==="function"&&(h=v.callback)),v.transport=w(v.transport,a),!v.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");return(a._.config=v,!o&&v.waitForPageLoad===!0)?(a._.deferredStartHandler=function(){a.start(i,h)},e.bind("load",a._.deferredStartHandler),y.promise()):a.state===r.connectionState.connecting?y.promise():s(a,r.connectionState.disconnected,r.connectionState.connecting)===!1?(y.resolve(a),y.promise()):(p(a),v.transport==="auto"&&v.jsonp===!0&&(v.transport="longPolling"),a.withCredentials=v.withCredentials,a._originalUrl=a.url,a.ajaxDataType=v.jsonp?"jsonp":"text",nt(a,a.url),n(a).bind(u.onStart,function(){n.type(h)==="function"&&h.call(a);y.resolve(a)}),a._.initHandler=r.transports._logic.initHandler(a),g=function(i,o){var c=r._.error(f.noTransportOnInit);if(o=o||0,o>=i.length){o===0?a.log("No transports supported by the server were selected."):o===1?a.log("No fallback transports were selected."):a.log("Fallback transports exhausted.");n(a).triggerHandler(u.onError,[c]);y.reject(c);a.stop();return}if(a.state!==r.connectionState.disconnected){var p=i[o],h=r.transports[p],v=function(){g(i,o+1)};a.transport=h;try{a._.initHandler.start(h,function(){var f=r._.firefoxMajorVersion(t.navigator.userAgent)>=11,i=!0;a.log("The start request succeeded. Transitioning to the connected state.");l(a)&&r.transports._logic.monitorKeepAlive(a);r.transports._logic.startHeartbeat(a);r._.configurePingInterval(a);s(a,r.connectionState.connecting,r.connectionState.connected)||a.log("WARNING! The connection was not in the connecting state.");a._.connectingMessageBuffer.drain();n(a).triggerHandler(u.onStart);e.bind("unload",function(){a.log("Window unloading, stopping the connection.");a.stop(i)});f&&e.bind("beforeunload",function(){t.setTimeout(function(){a.stop(i)},0)})},v)}catch(w){a.log(h.name+" transport threw '"+w.message+"' when attempting to start.");v()}}},d=a.url+"/negotiate",k=function(t,i){var e=r._.error(f.errorOnNegotiate,t,i._.negotiateRequest);n(i).triggerHandler(u.onError,e);y.reject(e);i.stop()},n(a).triggerHandler(u.onStarting),d=r.transports._logic.prepareQueryString(a,d),a.log("Negotiating with '"+d+"'."),a._.negotiateRequest=function(){var t,h=0,w=100,i,e,o=[],s=[],l=function(n,t){var u=r.transports._logic.prepareQueryString(n,n.url+"/negotiate"),i;return n.log("Negotiating with '"+u+"'."),i={url:u,error:function(t,i){i!==c?k(t,n):y.reject(r._.error(f.stoppedWhileNegotiating,null,n._.negotiateRequest))},success:t},n.accessToken&&(i.headers={Authorization:"Bearer "+n.accessToken}),r.transports._logic.ajax(n,i)},p=function(c){try{t=a._parseResponse(c)}catch(d){k(r._.error(f.errorParsingNegotiateResponse,d),a);return}if(t.availableTransports){e=r._.error(f.aspnetCoreSignalrServer);n(a).triggerHandler(u.onError,[e]);y.reject(e);return}if(!t.ProtocolVersion||a.supportedProtocols.indexOf(t.ProtocolVersion)===-1){e=r._.error(r._.format(f.protocolIncompatible,a.clientProtocol,t.ProtocolVersion));n(a).triggerHandler(u.onError,[e]);y.reject(e);return}if(a.negotiateRedirectSupportedProtocols.indexOf(t.ProtocolVersion)!==-1){if(t.Error){e=r._.error(r._.format(f.errorFromServer,t.Error));n(a).triggerHandler(u.onError,[e]);y.reject(e);return}if(t.RedirectUrl){if(h===w){k(r._.error(f.errorRedirectionExceedsLimit),a);return}v.transport==="auto"&&(v.transport=["webSockets","serverSentEvents","longPolling"]);a.log("Received redirect to: "+t.RedirectUrl);a.accessToken=t.AccessToken;var b=t.RedirectUrl.split("?",2);if(nt(a,b[0]),a._.redirectQs=b.length===2?b[1]:null,a.ajaxDataType==="jsonp"&&a.accessToken){k(r._.error(f.jsonpNotSupportedWithAccessToken),a);return}h++;l(a,p);return}}i=a._.keepAliveData;a.appRelativeUrl=t.Url;a.id=t.ConnectionId;a.token=t.ConnectionToken;a.webSocketServerUrl=t.WebSocketServerUrl;a._.pollTimeout=t.ConnectionTimeout*1e3+1e4;a.disconnectTimeout=t.DisconnectTimeout*1e3;a._.totalTransportConnectTimeout=a.transportConnectTimeout+t.TransportConnectTimeout*1e3;t.KeepAliveTimeout?(i.activated=!0,i.timeout=t.KeepAliveTimeout*1e3,i.timeoutWarning=i.timeout*a.keepAliveWarnAt,a._.beatInterval=(i.timeout-i.timeoutWarning)/3):i.activated=!1;a.reconnectWindow=a.disconnectTimeout+(i.timeout||0);n.each(r.transports,function(n){if(n.indexOf("_")===0||n==="webSockets"&&!t.TryWebSockets)return!0;s.push(n)});n.isArray(v.transport)?n.each(v.transport,function(t,i){n.inArray(i,s)>=0&&o.push(i)}):v.transport==="auto"?o=s:n.inArray(v.transport,s)>=0&&o.push(v.transport);g(o)};return l(a,p)}(),y.promise())},starting:function(t){var i=this;return n(i).bind(u.onStarting,function(){t.call(i)}),i},send:function(n){var t=this;if(t.state===r.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(t.state===r.connectionState.connecting)throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");return t.transport.send(t,n),t},received:function(t){var i=this;return n(i).bind(u.onReceived,function(n,r){t.call(i,r)}),i},stateChanged:function(t){var i=this;return n(i).bind(u.onStateChanged,function(n,r){t.call(i,r)}),i},error:function(t){var i=this;return n(i).bind(u.onError,function(n,r,u){i.lastError=r;t.call(i,r,u)}),i},disconnected:function(t){var i=this;return n(i).bind(u.onDisconnect,function(){t.call(i)}),i},connectionSlow:function(t){var i=this;return n(i).bind(u.onConnectionSlow,function(){t.call(i)}),i},reconnecting:function(t){var i=this;return n(i).bind(u.onReconnecting,function(){t.call(i)}),i},reconnected:function(t){var i=this;return n(i).bind(u.onReconnect,function(){t.call(i)}),i},stop:function(i,h){var a=this,v=a._deferral;if(a._.deferredStartHandler&&e.unbind("load",a._.deferredStartHandler),delete a._.config,delete a._.deferredStartHandler,!o&&(!a._.config||a._.config.waitForPageLoad===!0)){a.log("Stopping connection prior to negotiate.");v&&v.reject(r._.error(f.stoppedWhileLoading));return}if(a.state!==r.connectionState.disconnected)return a.log("Stopping connection."),t.clearTimeout(a._.beatHandle),t.clearInterval(a._.pingIntervalId),a.transport&&(a.transport.stop(a),h!==!1&&a.transport.abort(a,i),l(a)&&r.transports._logic.stopMonitoringKeepAlive(a),a.transport=null),a._.negotiateRequest&&(a._.negotiateRequest.abort(c),delete a._.negotiateRequest),a._.initHandler&&a._.initHandler.stop(),delete a._deferral,delete a.messageId,delete a.groupsToken,delete a.id,delete a._.pingIntervalId,delete a._.lastMessageAt,delete a._.lastActiveAt,a._.connectingMessageBuffer.clear(),n(a).unbind(u.onStart),delete a.accessToken,delete a.protocol,delete a.host,delete a.baseUrl,delete a.wsProtocol,delete a.contentType,a.url=a._originalUrl,a._.redirectQs=null,s(a,a.state,r.connectionState.disconnected),n(a).triggerHandler(u.onDisconnect),a},log:function(n){v(n,this.logging)}};r.fn.init.prototype=r.fn;r.noConflict=function(){return n.connection===r&&(n.connection=h),r};n.connection&&(h=n.connection);n.connection=n.signalR=r})(window.jQuery,window),function(n,t,i){function s(n){n._.keepAliveData.monitoring&&l(n);u.markActive(n)&&(n._.beatHandle=t.setTimeout(function(){s(n)},n._.beatInterval))}function l(t){var i=t._.keepAliveData,u;t.state===r.connectionState.connected&&(u=(new Date).getTime()-t._.lastMessageAt,u>=i.timeout?(t.log("Keep alive timed out.  Notifying transport that connection has been lost."),t.transport.lostConnection(t)):u>=i.timeoutWarning?i.userNotified||(t.log("Keep alive has been missed, connection may be dead/slow."),n(t).triggerHandler(f.onConnectionSlow),i.userNotified=!0):i.userNotified=!1)}function e(n,t){var i=n.url+t;return n.transport&&(i+="?transport="+n.transport.name),u.prepareQueryString(n,i)}function h(n){this.connection=n;this.startRequested=!1;this.startCompleted=!1;this.connectionStopped=!1}var r=n.signalR,f=n.signalR.events,c=n.signalR.changeState,o="__Start Aborted__",u;r.transports={};h.prototype={start:function(n,r,u){var f=this,e=f.connection,o=!1;if(f.startRequested||f.connectionStopped){e.log("WARNING! "+n.name+" transport cannot be started. Initialization ongoing or completed.");return}e.log(n.name+" transport starting.");n.start(e,function(){o||f.initReceived(n,r)},function(t){return o||(o=!0,f.transportFailed(n,t,u)),!f.startCompleted||f.connectionStopped});f.transportTimeoutHandle=t.setTimeout(function(){o||(o=!0,e.log(n.name+" transport timed out when trying to connect."),f.transportFailed(n,i,u))},e._.totalTransportConnectTimeout)},stop:function(){this.connectionStopped=!0;t.clearTimeout(this.transportTimeoutHandle);r.transports._logic.tryAbortStartRequest(this.connection)},initReceived:function(n,i){var u=this,f=u.connection;if(u.startRequested){f.log("WARNING! The client received multiple init messages.");return}u.connectionStopped||(u.startRequested=!0,t.clearTimeout(u.transportTimeoutHandle),f.log(n.name+" transport connected. Initiating start request."),r.transports._logic.ajaxStart(f,function(){u.startCompleted=!0;i()}))},transportFailed:function(i,u,e){var o=this.connection,h=o._deferral,s;this.connectionStopped||(t.clearTimeout(this.transportTimeoutHandle),this.startRequested?this.startCompleted||(s=r._.error(r.resources.errorDuringStartRequest,u),o.log(i.name+" transport failed during the start request. Stopping the connection."),n(o).triggerHandler(f.onError,[s]),h&&h.reject(s),o.stop()):(i.stop(o),o.log(i.name+" transport failed to connect. Attempting to fall back."),e()))}};u=r.transports._logic={ajax:function(t,i){return n.ajax(n.extend(!0,{},n.signalR.ajaxDefaults,{type:"GET",data:{},xhrFields:{withCredentials:t.withCredentials},contentType:t.contentType,dataType:t.ajaxDataType},i))},pingServer:function(t){var e,f,i=n.Deferred();return t.transport?(e=t.url+"/ping",e=u.addQs(e,t.qs),f=u.ajax(t,{url:e,headers:t.accessToken?{Authorization:"Bearer "+t.accessToken}:{},success:function(n){var u;try{u=t._parseResponse(n)}catch(e){i.reject(r._.transportError(r.resources.pingServerFailedParse,t.transport,e,f));t.stop();return}u.Response==="pong"?i.resolve():i.reject(r._.transportError(r._.format(r.resources.pingServerFailedInvalidResponse,n),t.transport,null,f))},error:function(n){n.status===401||n.status===403?(i.reject(r._.transportError(r._.format(r.resources.pingServerFailedStatusCode,n.status),t.transport,n,f)),t.stop()):i.reject(r._.transportError(r.resources.pingServerFailed,t.transport,n,f))}})):i.reject(r._.transportError(r.resources.noConnectionTransport,t.transport)),i.promise()},prepareQueryString:function(n,i){var r;return r=u.addQs(i,"clientProtocol="+n.clientProtocol),r=typeof n._.redirectQs=="string"?u.addQs(r,n._.redirectQs):u.addQs(r,n.qs),n.token&&(r+="&connectionToken="+t.encodeURIComponent(n.token)),n.data&&(r+="&connectionData="+t.encodeURIComponent(n.data)),r},addQs:function(t,i){var r=t.indexOf("?")!==-1?"&":"?",u;if(!i)return t;if(typeof i=="object")return t+r+n.param(i);if(typeof i=="string")return u=i.charAt(0),(u==="?"||u==="&")&&(r=""),t+r+i;throw new Error("Query string property must be either a string or object.");},getUrl:function(n,i,r,f,e){var h=i==="webSockets"?"":n.baseUrl,o=h+n.appRelativeUrl,s="transport="+i;return!e&&n.groupsToken&&(s+="&groupsToken="+t.encodeURIComponent(n.groupsToken)),r?(o+=f?"/poll":"/reconnect",!e&&n.messageId&&(s+="&messageId="+t.encodeURIComponent(n.messageId))):o+="/connect",o+="?"+s,o=u.prepareQueryString(n,o),n.transport&&n.accessToken&&(n.transport.name==="serverSentEvents"||n.transport.name==="webSockets")&&(o+="&access_token="+t.encodeURIComponent(n.accessToken)),e||(o+="&tid="+Math.floor(Math.random()*11)),o},maximizePersistentResponse:function(n){return{MessageId:n.C,Messages:n.M,Initialized:typeof n.S!="undefined"?!0:!1,ShouldReconnect:typeof n.T!="undefined"?!0:!1,LongPollDelay:n.L,GroupsToken:n.G,Error:n.E}},updateGroups:function(n,t){t&&(n.groupsToken=t)},stringifySend:function(n,t){return typeof t=="string"||typeof t=="undefined"||t===null?t:n.json.stringify(t)},ajaxSend:function(t,i){var h=u.stringifySend(t,i),c=e(t,"/send"),o,s=function(t,u){n(u).triggerHandler(f.onError,[r._.transportError(r.resources.sendFailed,u.transport,t,o),i])};return o=u.ajax(t,{url:c,type:t.ajaxDataType==="jsonp"?"GET":"POST",contentType:r._.defaultContentType,headers:t.accessToken?{Authorization:"Bearer "+t.accessToken}:{},data:{data:h},success:function(n){var i;if(n){try{i=t._parseResponse(n)}catch(r){s(r,t);t.stop();return}u.triggerReceived(t,i)}},error:function(n,i){i!=="abort"&&i!=="parsererror"&&s(n,t)}})},ajaxAbort:function(n,t){if(typeof n.transport!="undefined"){t=typeof t=="undefined"?!0:t;var i=e(n,"/abort");u.ajax(n,{url:i,async:t,timeout:1e3,type:"POST",headers:n.accessToken?{Authorization:"Bearer "+n.accessToken}:{},dataType:"text"});n.log("Fired ajax abort async = "+t+".")}},ajaxStart:function(t,i){var h=function(n){var i=t._deferral;i&&i.reject(n)},s=function(i){t.log("The start request failed. Stopping the connection.");n(t).triggerHandler(f.onError,[i]);h(i);t.stop()};t._.startRequest=u.ajax(t,{url:e(t,"/start"),headers:t.accessToken?{Authorization:"Bearer "+t.accessToken}:{},success:function(n,u,f){var e;try{e=t._parseResponse(n)}catch(o){s(r._.error(r._.format(r.resources.errorParsingStartResponse,n),o,f));return}e.Response==="started"?i():s(r._.error(r._.format(r.resources.invalidStartResponse,n),null,f))},error:function(n,i,u){i!==o?s(r._.error(r.resources.errorDuringStartRequest,u,n)):(t.log("The start request aborted because connection.stop() was called."),h(r._.error(r.resources.stoppedDuringStartRequest,null,n)))}})},tryAbortStartRequest:function(n){n._.startRequest&&(n._.startRequest.abort(o),delete n._.startRequest)},tryInitialize:function(n,t,i){t.Initialized&&i?i():t.Initialized&&n.log("WARNING! The client received an init message after reconnecting.")},triggerReceived:function(t,i){t._.connectingMessageBuffer.tryBuffer(i)||n(t).triggerHandler(f.onReceived,[i])},processMessages:function(t,i,f){var e;if(i&&typeof i.I!="undefined"){u.triggerReceived(t,i);return}if(u.markLastMessage(t),i){if(e=u.maximizePersistentResponse(i),e.Error){t.log("Received an error message from the server: "+i.E);n(t).triggerHandler(r.events.onError,[r._.error(i.E,"ServerError")]);t.stop(!1,!1);return}u.updateGroups(t,e.GroupsToken);e.MessageId&&(t.messageId=e.MessageId);e.Messages&&(n.each(e.Messages,function(n,i){u.triggerReceived(t,i)}),u.tryInitialize(t,e,f))}},monitorKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring?t.log("Tried to monitor keep alive but it's already being monitored."):(i.monitoring=!0,u.markLastMessage(t),t._.keepAliveData.reconnectKeepAliveUpdate=function(){u.markLastMessage(t)},n(t).bind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t.log("Now monitoring keep alive with a warning timeout of "+i.timeoutWarning+", keep alive timeout of "+i.timeout+" and disconnecting timeout of "+t.disconnectTimeout))},stopMonitoringKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring&&(i.monitoring=!1,n(t).unbind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t._.keepAliveData={},t.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(n){n._.lastActiveAt=(new Date).getTime();s(n)},markLastMessage:function(n){n._.lastMessageAt=(new Date).getTime()},markActive:function(n){return u.verifyLastActive(n)?(n._.lastActiveAt=(new Date).getTime(),!0):!1},isConnectedOrReconnecting:function(n){return n.state===r.connectionState.connected||n.state===r.connectionState.reconnecting},ensureReconnectingState:function(t){return c(t,r.connectionState.connected,r.connectionState.reconnecting)===!0&&n(t).triggerHandler(f.onReconnecting),t.state===r.connectionState.reconnecting},clearReconnectTimeout:function(n){n&&n._.reconnectTimeout&&(t.clearTimeout(n._.reconnectTimeout),delete n._.reconnectTimeout)},verifyLastActive:function(t){if((new Date).getTime()-t._.lastActiveAt>=t.reconnectWindow){var i=r._.format(r.resources.reconnectWindowTimeout,new Date(t._.lastActiveAt),t.reconnectWindow);return t.log(i),n(t).triggerHandler(f.onError,[r._.error(i,"TimeoutException")]),t.stop(!1,!1),!1}return!0},reconnect:function(n,i){var f=r.transports[i];if(u.isConnectedOrReconnecting(n)&&!n._.reconnectTimeout){if(!u.verifyLastActive(n))return;n._.reconnectTimeout=t.setTimeout(function(){u.verifyLastActive(n)&&(f.stop(n),u.ensureReconnectingState(n)&&(n.log(i+" reconnecting."),f.start(n)))},n.reconnectDelay)}},handleParseFailure:function(t,i,u,e,o){var s=r._.transportError(r._.format(r.resources.parseFailed,i),t.transport,u,o);e&&e(s)?t.log("Failed to parse server response while attempting to connect."):(n(t).triggerHandler(f.onError,[s]),t.stop())},initHandler:function(n){return new h(n)},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(n,t){var i=n.signalR,u=n.signalR.events,f=n.signalR.changeState,r=i.transports._logic;i.transports.webSockets={name:"webSockets",supportsKeepAlive:function(){return!0},send:function(t,f){var e=r.stringifySend(t,f);try{t.socket.send(e)}catch(o){n(t).triggerHandler(u.onError,[i._.transportError(i.resources.webSocketsInvalidState,t.transport,o,t.socket),f])}},start:function(e,o,s){var h,c=!1,l=this,a=!o,v=n(e);if(!t.WebSocket){s();return}e.socket||(h=e.webSocketServerUrl?e.webSocketServerUrl:e.wsProtocol+e.host,h+=r.getUrl(e,this.name,a),e.log("Connecting to websocket endpoint '"+h+"'."),e.socket=new t.WebSocket(h),e.socket.onopen=function(){c=!0;e.log("Websocket opened.");r.clearReconnectTimeout(e);f(e,i.connectionState.reconnecting,i.connectionState.connected)===!0&&v.triggerHandler(u.onReconnect)},e.socket.onclose=function(t){var r;this===e.socket&&(c&&typeof t.wasClean!="undefined"&&t.wasClean===!1?(r=i._.transportError(i.resources.webSocketClosed,e.transport,t),e.log("Unclean disconnect from websocket: "+(t.reason||"[no reason given]."))):e.log("Websocket closed."),s&&s(r)||(r&&n(e).triggerHandler(u.onError,[r]),l.reconnect(e)))},e.socket.onmessage=function(n){var t;try{t=e._parseResponse(n.data)}catch(i){r.handleParseFailure(e,n.data,i,s,n);return}t&&r.processMessages(e,t,o)})},reconnect:function(n){r.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},stop:function(n){r.clearReconnectTimeout(n);n.socket&&(n.log("Closing the Websocket."),n.socket.close(),n.socket=null)},abort:function(n,t){r.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var i=n.signalR,u=n.signalR.events,e=n.signalR.changeState,r=i.transports._logic,f=function(n){t.clearTimeout(n._.reconnectAttemptTimeoutHandle);delete n._.reconnectAttemptTimeoutHandle};i.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:function(){return!0},timeOut:3e3,start:function(o,s,h){var c=this,l=!1,a=n(o),v=!s,y;if(o.eventSource&&(o.log("The connection already has an event source. Stopping it."),o.stop()),!t.EventSource){h&&(o.log("This browser doesn't support SSE."),h());return}y=r.getUrl(o,this.name,v);try{o.log("Attempting to connect to SSE endpoint '"+y+"'.");o.eventSource=new t.EventSource(y,{withCredentials:o.withCredentials})}catch(p){o.log("EventSource failed trying to connect with error "+p.Message+".");h?h():(a.triggerHandler(u.onError,[i._.transportError(i.resources.eventSourceFailedToConnect,o.transport,p)]),v&&c.reconnect(o));return}v&&(o._.reconnectAttemptTimeoutHandle=t.setTimeout(function(){l===!1&&o.eventSource.readyState!==t.EventSource.OPEN&&c.reconnect(o)},c.timeOut));o.eventSource.addEventListener("open",function(){o.log("EventSource connected.");f(o);r.clearReconnectTimeout(o);l===!1&&(l=!0,e(o,i.connectionState.reconnecting,i.connectionState.connected)===!0&&a.triggerHandler(u.onReconnect))},!1);o.eventSource.addEventListener("message",function(n){var t;if(n.data!=="initialized"){try{t=o._parseResponse(n.data)}catch(i){r.handleParseFailure(o,n.data,i,h,n);return}r.processMessages(o,t,s)}},!1);o.eventSource.addEventListener("error",function(n){var r=i._.transportError(i.resources.eventSourceError,o.transport,n);this===o.eventSource&&(h&&h(r)||(o.log("EventSource readyState: "+o.eventSource.readyState+"."),n.eventPhase===t.EventSource.CLOSED?(o.log("EventSource reconnecting due to the server connection ending."),c.reconnect(o)):(o.log("EventSource error."),a.triggerHandler(u.onError,[r]))))},!1)},reconnect:function(n){r.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){r.ajaxSend(n,t)},stop:function(n){f(n);r.clearReconnectTimeout(n);n&&n.eventSource&&(n.log("EventSource calling close()."),n.eventSource.close(),n.eventSource=null,delete n.eventSource)},abort:function(n,t){r.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var r=n.signalR,e=n.signalR.events,o=n.signalR.changeState,i=r.transports._logic,u=function(){var n=t.document.createElement("iframe");return n.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),n},f=function(){var i=null,f=1e3,n=0;return{prevent:function(){r._.ieVersion<=8&&(n===0&&(i=t.setInterval(function(){var n=u();t.document.body.appendChild(n);t.document.body.removeChild(n);n=null},f)),n++)},cancel:function(){n===1&&t.clearInterval(i);n>0&&n--}}}();r.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:function(){return!0},iframeClearThreshold:50,start:function(n,r,e){if(n.accessToken){e&&(n.log("Forever Frame does not support connections that require a Bearer token to connect, such as the Azure SignalR Service."),e());return}var l=this,s=i.foreverFrame.count+=1,h,o=u(),c=function(){n.log("Forever frame iframe finished loading and is no longer receiving messages.");e&&e()||l.reconnect(n)};if(t.EventSource){e&&(n.log("Forever Frame is not supported by SignalR on browsers with SSE support."),e());return}o.setAttribute("data-signalr-connection-id",n.id);f.prevent();h=i.getUrl(n,this.name);h+="&frameId="+s;t.document.documentElement.appendChild(o);n.log("Binding to iframe's load event.");o.addEventListener?o.addEventListener("load",c,!1):o.attachEvent&&o.attachEvent("onload",c);o.src=h;i.foreverFrame.connections[s]=n;n.frame=o;n.frameId=s;r&&(n.onSuccess=function(){n.log("Iframe transport started.");r()})},reconnect:function(n){var r=this;i.isConnectedOrReconnecting(n)&&i.verifyLastActive(n)&&t.setTimeout(function(){if(i.verifyLastActive(n)&&n.frame&&i.ensureReconnectingState(n)){var u=n.frame,t=i.getUrl(n,r.name,!0)+"&frameId="+n.frameId;n.log("Updating iframe src to '"+t+"'.");u.src=t}},n.reconnectDelay)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){i.ajaxSend(n,t)},receive:function(t,u){var f,e,o;if(t.json!==t._originalJson&&(u=t._originalJson.stringify(u)),o=t._parseResponse(u),i.processMessages(t,o,t.onSuccess),t.state===n.signalR.connectionState.connected&&(t.frameMessageCount=(t.frameMessageCount||0)+1,t.frameMessageCount>r.transports.foreverFrame.iframeClearThreshold&&(t.frameMessageCount=0,f=t.frame.contentWindow||t.frame.contentDocument,f&&f.document&&f.document.body)))for(e=f.document.body;e.firstChild;)e.removeChild(e.firstChild)},stop:function(n){var r=null;if(f.cancel(),n.frame){if(n.frame.stop)n.frame.stop();else try{r=n.frame.contentWindow||n.frame.contentDocument;r.document&&r.document.execCommand&&r.document.execCommand("Stop")}catch(u){n.log("Error occurred when stopping foreverFrame transport. Message = "+u.message+".")}n.frame.parentNode===t.document.documentElement&&t.document.documentElement.removeChild(n.frame);delete i.foreverFrame.connections[n.frameId];n.frame=null;n.frameId=null;delete n.frame;delete n.frameId;delete n.onSuccess;delete n.frameMessageCount;n.log("Stopping forever frame.")}},abort:function(n,t){i.ajaxAbort(n,t)},getConnection:function(n){return i.foreverFrame.connections[n]},started:function(t){o(t,r.connectionState.reconnecting,r.connectionState.connected)===!0&&n(t).triggerHandler(e.onReconnect)}}}(window.jQuery,window),function(n,t){var r=n.signalR,u=n.signalR.events,e=n.signalR.changeState,f=n.signalR.isDisconnecting,i=r.transports._logic;r.transports.longPolling={name:"longPolling",supportsKeepAlive:function(){return!1},reconnectDelay:3e3,start:function(o,s,h){var a=this,v=function(){v=n.noop;o.log("LongPolling connected.");s?s():o.log("WARNING! The client received an init message after reconnecting.")},y=function(n){return h(n)?(o.log("LongPolling failed to connect."),!0):!1},c=o._,l=0,p=function(i){t.clearTimeout(c.reconnectTimeoutId);c.reconnectTimeoutId=null;e(i,r.connectionState.reconnecting,r.connectionState.connected)===!0&&(i.log("Raising the reconnect event"),n(i).triggerHandler(u.onReconnect))},w=36e5;o.pollXhr&&(o.log("Polling xhr requests already exists, aborting."),o.stop());o.messageId=null;c.reconnectTimeoutId=null;c.pollTimeoutId=t.setTimeout(function(){(function e(s,h){var g=s.messageId,nt=g===null,k=!nt,tt=!h,d=i.getUrl(s,a.name,k,tt,!0),b={};(s.messageId&&(b.messageId=s.messageId),s.groupsToken&&(b.groupsToken=s.groupsToken),f(s)!==!0)&&(o.log("Opening long polling request to '"+d+"'."),s.pollXhr=i.ajax(o,{xhrFields:{onprogress:function(){i.markLastMessage(o)}},url:d,type:"POST",contentType:r._.defaultContentType,data:b,timeout:o._.pollTimeout,headers:o.accessToken?{Authorization:"Bearer "+o.accessToken}:{},success:function(r){var h,w=0,u,a;o.log("Long poll complete.");l=0;try{h=o._parseResponse(r)}catch(b){i.handleParseFailure(s,r,b,y,s.pollXhr);return}(c.reconnectTimeoutId!==null&&p(s),h&&(u=i.maximizePersistentResponse(h)),i.processMessages(s,h,v),u&&n.type(u.LongPollDelay)==="number"&&(w=u.LongPollDelay),f(s)!==!0)&&(a=u&&u.ShouldReconnect,!a||i.ensureReconnectingState(s))&&(w>0?c.pollTimeoutId=t.setTimeout(function(){e(s,a)},w):e(s,a))},error:function(f,h){var v=r._.transportError(r.resources.longPollFailed,o.transport,f,s.pollXhr);if(t.clearTimeout(c.reconnectTimeoutId),c.reconnectTimeoutId=null,h==="abort"){o.log("Aborted xhr request.");return}if(!y(v)){if(l++,o.state!==r.connectionState.reconnecting&&(o.log("An error occurred using longPolling. Status = "+h+".  Response = "+f.responseText+"."),n(s).triggerHandler(u.onError,[v])),(o.state===r.connectionState.connected||o.state===r.connectionState.reconnecting)&&!i.verifyLastActive(o))return;if(!i.ensureReconnectingState(s))return;c.pollTimeoutId=t.setTimeout(function(){e(s,!0)},a.reconnectDelay)}}}),k&&h===!0&&(c.reconnectTimeoutId=t.setTimeout(function(){p(s)},Math.min(1e3*(Math.pow(2,l)-1),w))))})(o)},250)},lostConnection:function(n){n.pollXhr&&n.pollXhr.abort("lostConnection")},send:function(n,t){i.ajaxSend(n,t)},stop:function(n){t.clearTimeout(n._.pollTimeoutId);t.clearTimeout(n._.reconnectTimeoutId);delete n._.pollTimeoutId;delete n._.reconnectTimeoutId;n.pollXhr&&(n.pollXhr.abort(),n.pollXhr=null,delete n.pollXhr)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n){function r(n){return n+s}function c(n,t,i){for(var f=n.length,u=[],r=0;r<f;r+=1)n.hasOwnProperty(r)&&(u[r]=t.call(i,n[r],r,n));return u}function l(t){return n.isFunction(t)?null:n.type(t)==="undefined"?null:t}function u(n){for(var t in n)if(n.hasOwnProperty(t))return!0;return!1}function f(n,t){var i=n._.invocationCallbacks,r,f;u(i)&&n.log("Clearing hub invocation callbacks with error: "+t+".");n._.invocationCallbackId=0;delete n._.invocationCallbacks;n._.invocationCallbacks={};for(f in i)r=i[f],r.method.call(r.scope,{E:t})}function e(t){return n.isFunction(t)&&t.toString().slice(0,256).indexOf("// Call the client hub method")>=0}function i(n,t){return new i.fn.init(n,t)}function t(i,r){var u={qs:null,logging:!1,useDefaultPath:!0};return n.extend(u,r),(!i||u.useDefaultPath)&&(i=(i||"")+"/signalr"),new t.fn.init(i,u)}var o=0,s=".hubProxy",h=n.signalR;i.fn=i.prototype={init:function(n,t){this.state={};this.connection=n;this.hubName=t;this._={callbackMap:{}}},constructor:i,hasSubscriptions:function(){return u(this._.callbackMap)},on:function(t,i,u){var c=this,l=c._.callbackMap,v=!u&&e(i),f,h,s,a;for(u=u||i,u._signalRGuid||(u._signalRGuid=o++),t=t.toLowerCase(),f=l[t],f||(f=[],l[t]=f),s=0;s<f.length;s++)(f[s].guid===u._signalRGuid||v&&f[s].isFromOldGeneratedHubProxy)&&(h=f[s]);return h||(h={guid:u._signalRGuid,eventHandlers:[],isFromOldGeneratedHubProxy:v},l[t].push(h)),a=function(n,t){i.apply(c,t)},h.eventHandlers.push(a),n(c).bind(r(t),a),c},off:function(t,i,u){var s=this,l=s._.callbackMap,f,a=!u&&e(i),h,v,o,c;if(u=u||i,t=t.toLowerCase(),f=l[t],f)if(i){for(o=0;o<f.length;o++)(f[o].guid===u._signalRGuid||a&&f[o].isFromOldGeneratedHubProxy)&&(v=o,h=f[o]);if(h){for(c=0;c<h.eventHandlers.length;c++)n(s).unbind(r(t),h.eventHandlers[c]);f.splice(o,1);f.length===0&&delete l[t]}}else i||(n(s).unbind(r(t)),delete l[t]);return s},invoke:function(t){var i=this,r=i.connection,e=n.makeArray(arguments).slice(1),o=c(e,l),f={H:i.hubName,M:t,A:o,I:r._.invocationCallbackId},u=n.Deferred(),s=function(f){var e=i._maximizeHubResponse(f),s,o;n.extend(i.state,e.State);e.Progress?u.notifyWith?u.notifyWith(i,[e.Progress.Data]):r._.progressjQueryVersionLogged||(r.log("A hub method invocation progress update was received but the version of jQuery in use ("+n.prototype.jquery+") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."),r._.progressjQueryVersionLogged=!0):e.Error?(e.StackTrace&&r.log(e.Error+"\n"+e.StackTrace+"."),s=e.IsHubException?"HubException":"Exception",o=h._.error(e.Error,s),o.data=e.ErrorData,r.log(i.hubName+"."+t+" failed to execute. Error: "+o.message),u.rejectWith(i,[o])):(r.log("Invoked "+i.hubName+"."+t),u.resolveWith(i,[e.Result]))};return r._.invocationCallbacks[r._.invocationCallbackId.toString()]={scope:i,method:s},r._.invocationCallbackId+=1,n.isEmptyObject(i.state)||(f.S=i.state),r.log("Invoking "+i.hubName+"."+t),r.send(f),u.promise()},_maximizeHubResponse:function(n){return{State:n.S,Result:n.R,Progress:n.P?{Id:n.P.I,Data:n.P.D}:null,Id:n.I,IsHubException:n.H,Error:n.E,StackTrace:n.T,ErrorData:n.D}}};i.fn.init.prototype=i.fn;t.fn=t.prototype=n.connection();t.fn.init=function(t,i){var e={qs:null,logging:!1,useDefaultPath:!0},u=this;n.extend(e,i);n.signalR.fn.init.call(u,t,e.qs,e.logging);u.proxies={};u._.invocationCallbackId=0;u._.invocationCallbacks={};u.received(function(t){var f,o,e,i,s,h;t&&(typeof t.P!="undefined"?(e=t.P.I.toString(),i=u._.invocationCallbacks[e],i&&i.method.call(i.scope,t)):typeof t.I!="undefined"?(e=t.I.toString(),i=u._.invocationCallbacks[e],i&&(u._.invocationCallbacks[e]=null,delete u._.invocationCallbacks[e],i.method.call(i.scope,t))):(f=this._maximizeClientHubInvocation(t),u.log("Triggering client hub event '"+f.Method+"' on hub '"+f.Hub+"'."),s=f.Hub.toLowerCase(),h=f.Method.toLowerCase(),o=this.proxies[s],n.extend(o.state,f.State),n(o).triggerHandler(r(h),[f.Args])))});u.error(function(n,t){var i,r;t&&(i=t.I,r=u._.invocationCallbacks[i],r&&(u._.invocationCallbacks[i]=null,delete u._.invocationCallbacks[i],r.method.call(r.scope,{E:n})))});u.reconnecting(function(){u.transport&&u.transport.name==="webSockets"&&f(u,"Connection started reconnecting before invocation result was received.")});u.disconnected(function(){f(u,"Connection was disconnected before invocation result was received.")})};t.fn._maximizeClientHubInvocation=function(n){return{Hub:n.H,Method:n.M,Args:n.A,State:n.S}};t.fn._registerSubscribedHubs=function(){var t=this;t._subscribedToHubs||(t._subscribedToHubs=!0,t.starting(function(){var i=[];n.each(t.proxies,function(n){this.hasSubscriptions()&&(i.push({name:n}),t.log("Client subscribed to hub '"+n+"'."))});i.length===0&&t.log("No hubs have been subscribed to.  The client will not receive data from hubs.  To fix, declare at least one client side function prior to connection start for each hub you wish to subscribe to.");t.data=t.json.stringify(i)}))};t.fn.createHubProxy=function(n){n=n.toLowerCase();var t=this.proxies[n];return t||(t=i(this,n),this.proxies[n]=t),this._registerSubscribedHubs(),t};t.fn.init.prototype=t.fn;n.hubConnection=t}(window.jQuery,window),function(n){n.signalR.version="2.4.1"}(window.jQuery);;
// Domain Public by Eric Wendelin http://www.eriwen.com/ (2008)
//                  Luke Smith http://lucassmith.name/ (2008)
//                  Loic Dachary <loic@dachary.org> (2008)
//                  Johan Euphrosine <proppy@aminche.com> (2008)
//                  Oyvind Sean Kinsey http://kinsey.no/blog (2010)
//                  Victor Homyakov <victor-homyakov@users.sourceforge.net> (2010)
/*global module, exports, define, ActiveXObject*/
(function(global, factory) {
    if (typeof exports === 'object') {
        // Node
        module.exports = factory();
    } else if (typeof define === 'function' && define.amd) {
        // AMD
        define(factory);
    } else {
        // Browser globals
        global.printStackTrace = factory();
    }
}(this, function() {
    /**
     * Main function giving a function stack trace with a forced or passed in Error
     *
     * @cfg {Error} e The error to create a stacktrace from (optional)
     * @cfg {Boolean} guess If we should try to resolve the names of anonymous functions
     * @return {Array} of Strings with functions, lines, files, and arguments where possible
     */
    function printStackTrace(options) {
        options = options || {guess: true};
        var ex = options.e || null, guess = !!options.guess, mode = options.mode || null;
        var p = new printStackTrace.implementation(), result = p.run(ex, mode);
        return (guess) ? p.guessAnonymousFunctions(result) : result;
    }

    printStackTrace.implementation = function() {
    };

    printStackTrace.implementation.prototype = {
        /**
         * @param {Error} [ex] The error to create a stacktrace from (optional)
         * @param {String} [mode] Forced mode (optional, mostly for unit tests)
         */
        run: function(ex, mode) {
            ex = ex || this.createException();
            mode = mode || this.mode(ex);
            if (mode === 'other') {
                return this.other(arguments.callee);
            } else {
                return this[mode](ex);
            }
        },

        createException: function() {
            try {
                this.undef();
            } catch (e) {
                return e;
            }
        },

        /**
         * Mode could differ for different exception, e.g.
         * exceptions in Chrome may or may not have arguments or stack.
         *
         * @return {String} mode of operation for the exception
         */
        mode: function(e) {
            if (typeof window !== 'undefined' && window.navigator.userAgent.indexOf('PhantomJS') > -1) {
                return 'phantomjs';
            }

            if (e['arguments'] && e.stack) {
                return 'chrome';
            }

            if (e.stack && e.sourceURL) {
                return 'safari';
            }

            if (e.stack && e.number) {
                return 'ie';
            }

            if (e.stack && e.fileName) {
                return 'firefox';
            }

            if (e.message && e['opera#sourceloc']) {
                // e.message.indexOf("Backtrace:") > -1 -> opera9
                // 'opera#sourceloc' in e -> opera9, opera10a
                // !e.stacktrace -> opera9
                if (!e.stacktrace) {
                    return 'opera9'; // use e.message
                }
                if (e.message.indexOf('\n') > -1 && e.message.split('\n').length > e.stacktrace.split('\n').length) {
                    // e.message may have more stack entries than e.stacktrace
                    return 'opera9'; // use e.message
                }
                return 'opera10a'; // use e.stacktrace
            }

            if (e.message && e.stack && e.stacktrace) {
                // e.stacktrace && e.stack -> opera10b
                if (e.stacktrace.indexOf("called from line") < 0) {
                    return 'opera10b'; // use e.stacktrace, format differs from 'opera10a'
                }
                // e.stacktrace && e.stack -> opera11
                return 'opera11'; // use e.stacktrace, format differs from 'opera10a', 'opera10b'
            }

            if (e.stack && !e.fileName) {
                // Chrome 27 does not have e.arguments as earlier versions,
                // but still does not have e.fileName as Firefox
                return 'chrome';
            }

            return 'other';
        },

        /**
         * Given a context, function name, and callback function, overwrite it so that it calls
         * printStackTrace() first with a callback and then runs the rest of the body.
         *
         * @param {Object} context of execution (e.g. window)
         * @param {String} functionName to instrument
         * @param {Function} callback function to call with a stack trace on invocation
         */
        instrumentFunction: function(context, functionName, callback) {
            context = context || window;
            var original = context[functionName];
            context[functionName] = function instrumented() {
                callback.call(this, printStackTrace().slice(4));
                return context[functionName]._instrumented.apply(this, arguments);
            };
            context[functionName]._instrumented = original;
        },

        /**
         * Given a context and function name of a function that has been
         * instrumented, revert the function to it's original (non-instrumented)
         * state.
         *
         * @param {Object} context of execution (e.g. window)
         * @param {String} functionName to de-instrument
         */
        deinstrumentFunction: function(context, functionName) {
            if (context[functionName].constructor === Function &&
                context[functionName]._instrumented &&
                context[functionName]._instrumented.constructor === Function) {
                context[functionName] = context[functionName]._instrumented;
            }
        },

        /**
         * Given an Error object, return a formatted Array based on Chrome's stack string.
         *
         * @param e - Error object to inspect
         * @return Array<String> of function calls, files and line numbers
         */
        chrome: function(e) {
            return (e.stack + '\n')
                .replace(/^[\s\S]+?\s+at\s+/, ' at ') // remove message
                .replace(/^\s+(at eval )?at\s+/gm, '') // remove 'at' and indentation
                .replace(/^([^\(]+?)([\n$])/gm, '{anonymous}() ($1)$2')
                .replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}() ($1)')
                .replace(/^(.+) \((.+)\)$/gm, '$1@$2')
                .split('\n')
                .slice(0, -1);
        },

        /**
         * Given an Error object, return a formatted Array based on Safari's stack string.
         *
         * @param e - Error object to inspect
         * @return Array<String> of function calls, files and line numbers
         */
        safari: function(e) {
            return e.stack.replace(/\[native code\]\n/m, '')
                .replace(/^(?=\w+Error\:).*$\n/m, '')
                .replace(/^@/gm, '{anonymous}()@')
                .split('\n');
        },

        /**
         * Given an Error object, return a formatted Array based on IE's stack string.
         *
         * @param e - Error object to inspect
         * @return Array<String> of function calls, files and line numbers
         */
        ie: function(e) {
            return e.stack
                .replace(/^\s*at\s+(.*)$/gm, '$1')
                .replace(/^Anonymous function\s+/gm, '{anonymous}() ')
                .replace(/^(.+)\s+\((.+)\)$/gm, '$1@$2')
                .split('\n')
                .slice(1);
        },

        /**
         * Given an Error object, return a formatted Array based on Firefox's stack string.
         *
         * @param e - Error object to inspect
         * @return Array<String> of function calls, files and line numbers
         */
        firefox: function(e) {
            return e.stack.replace(/(?:\n@:0)?\s+$/m, '')
                .replace(/^(?:\((\S*)\))?@/gm, '{anonymous}($1)@')
                .split('\n');
        },

        opera11: function(e) {
            var ANON = '{anonymous}', lineRE = /^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/;
            var lines = e.stacktrace.split('\n'), result = [];

            for (var i = 0, len = lines.length; i < len; i += 2) {
                var match = lineRE.exec(lines[i]);
                if (match) {
                    var location = match[4] + ':' + match[1] + ':' + match[2];
                    var fnName = match[3] || "global code";
                    fnName = fnName.replace(/<anonymous function: (\S+)>/, "$1").replace(/<anonymous function>/, ANON);
                    result.push(fnName + '@' + location + ' -- ' + lines[i + 1].replace(/^\s+/, ''));
                }
            }

            return result;
        },

        opera10b: function(e) {
            // "<anonymous function: run>([arguments not available])@file://localhost/G:/js/stacktrace.js:27\n" +
            // "printStackTrace([arguments not available])@file://localhost/G:/js/stacktrace.js:18\n" +
            // "@file://localhost/G:/js/test/functional/testcase1.html:15"
            var lineRE = /^(.*)@(.+):(\d+)$/;
            var lines = e.stacktrace.split('\n'), result = [];

            for (var i = 0, len = lines.length; i < len; i++) {
                var match = lineRE.exec(lines[i]);
                if (match) {
                    var fnName = match[1] ? (match[1] + '()') : "global code";
                    result.push(fnName + '@' + match[2] + ':' + match[3]);
                }
            }

            return result;
        },

        /**
         * Given an Error object, return a formatted Array based on Opera 10's stacktrace string.
         *
         * @param e - Error object to inspect
         * @return Array<String> of function calls, files and line numbers
         */
        opera10a: function(e) {
            // "  Line 27 of linked script file://localhost/G:/js/stacktrace.js\n"
            // "  Line 11 of inline#1 script in file://localhost/G:/js/test/functional/testcase1.html: In function foo\n"
            var ANON = '{anonymous}', lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
            var lines = e.stacktrace.split('\n'), result = [];

            for (var i = 0, len = lines.length; i < len; i += 2) {
                var match = lineRE.exec(lines[i]);
                if (match) {
                    var fnName = match[3] || ANON;
                    result.push(fnName + '()@' + match[2] + ':' + match[1] + ' -- ' + lines[i + 1].replace(/^\s+/, ''));
                }
            }

            return result;
        },

        // Opera 7.x-9.2x only!
        opera9: function(e) {
            // "  Line 43 of linked script file://localhost/G:/js/stacktrace.js\n"
            // "  Line 7 of inline#1 script in file://localhost/G:/js/test/functional/testcase1.html\n"
            var ANON = '{anonymous}', lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
            var lines = e.message.split('\n'), result = [];

            for (var i = 2, len = lines.length; i < len; i += 2) {
                var match = lineRE.exec(lines[i]);
                if (match) {
                    result.push(ANON + '()@' + match[2] + ':' + match[1] + ' -- ' + lines[i + 1].replace(/^\s+/, ''));
                }
            }

            return result;
        },

        phantomjs: function(e) {
            var ANON = '{anonymous}', lineRE = /(\S+) \((\S+)\)/i;
            var lines = e.stack.split('\n'), result = [];

            for (var i = 1, len = lines.length; i < len; i++) {
                lines[i] = lines[i].replace(/^\s+at\s+/gm, '');
                var match = lineRE.exec(lines[i]);
                if (match) {
                    result.push(match[1] + '()@' + match[2]);
                }
                else {
                    result.push(ANON + '()@' + lines[i]);
                }
            }

            return result;
        },

        // Safari 5-, IE 9-, and others
        other: function(curr) {
            var ANON = '{anonymous}', fnRE = /function(?:\s+([\w$]+))?\s*\(/, stack = [], fn, args, maxStackSize = 10;
            var slice = Array.prototype.slice;
            while (curr && stack.length < maxStackSize) {
                fn = fnRE.test(curr.toString()) ? RegExp.$1 || ANON : ANON;
                try {
                    args = slice.call(curr['arguments'] || []);
                } catch (e) {
                    args = ['Cannot access arguments: ' + e];
                }
                stack[stack.length] = fn + '(' + this.stringifyArguments(args) + ')';
                try {
                    curr = curr.caller;
                } catch (e) {
                    stack[stack.length] = 'Cannot access caller: ' + e;
                    break;
                }
            }
            return stack;
        },

        /**
         * Given arguments array as a String, substituting type names for non-string types.
         *
         * @param {Arguments,Array} args
         * @return {String} stringified arguments
         */
        stringifyArguments: function(args) {
            var result = [];
            var slice = Array.prototype.slice;
            for (var i = 0; i < args.length; ++i) {
                var arg = args[i];
                if (arg === undefined) {
                    result[i] = 'undefined';
                } else if (arg === null) {
                    result[i] = 'null';
                } else if (arg.constructor) {
                    // TODO constructor comparison does not work for iframes
                    if (arg.constructor === Array) {
                        if (arg.length < 3) {
                            result[i] = '[' + this.stringifyArguments(arg) + ']';
                        } else {
                            result[i] = '[' + this.stringifyArguments(slice.call(arg, 0, 1)) + '...' + this.stringifyArguments(slice.call(arg, -1)) + ']';
                        }
                    } else if (arg.constructor === Object) {
                        result[i] = '#object';
                    } else if (arg.constructor === Function) {
                        result[i] = '#function';
                    } else if (arg.constructor === String) {
                        result[i] = '"' + arg + '"';
                    } else if (arg.constructor === Number) {
                        result[i] = arg;
                    } else {
                        result[i] = '?';
                    }
                }
            }
            return result.join(',');
        },

        sourceCache: {},

        /**
         * @return {String} the text from a given URL
         */
        ajax: function(url) {
            var req = this.createXMLHTTPObject();
            if (req) {
                try {
                    req.open('GET', url, false);
                    //req.overrideMimeType('text/plain');
                    //req.overrideMimeType('text/javascript');
                    req.send(null);
                    //return req.status == 200 ? req.responseText : '';
                    return req.responseText;
                } catch (e) {
                }
            }
            return '';
        },

        /**
         * Try XHR methods in order and store XHR factory.
         *
         * @return {XMLHttpRequest} XHR function or equivalent
         */
        createXMLHTTPObject: function() {
            var xmlhttp, XMLHttpFactories = [
                function() {
                    return new XMLHttpRequest();
                }, function() {
                    return new ActiveXObject('Msxml2.XMLHTTP');
                }, function() {
                    return new ActiveXObject('Msxml3.XMLHTTP');
                }, function() {
                    return new ActiveXObject('Microsoft.XMLHTTP');
                }
            ];
            for (var i = 0; i < XMLHttpFactories.length; i++) {
                try {
                    xmlhttp = XMLHttpFactories[i]();
                    // Use memoization to cache the factory
                    this.createXMLHTTPObject = XMLHttpFactories[i];
                    return xmlhttp;
                } catch (e) {
                }
            }
        },

        /**
         * Given a URL, check if it is in the same domain (so we can get the source
         * via Ajax).
         *
         * @param url {String} source url
         * @return {Boolean} False if we need a cross-domain request
         */
        isSameDomain: function(url) {
            return typeof location !== "undefined" && url.indexOf(location.hostname) !== -1; // location may not be defined, e.g. when running from nodejs.
        },

        /**
         * Get source code from given URL if in the same domain.
         *
         * @param url {String} JS source URL
         * @return {Array} Array of source code lines
         */
        getSource: function(url) {
            // TODO reuse source from script tags?
            if (!(url in this.sourceCache)) {
                this.sourceCache[url] = this.ajax(url).split('\n');
            }
            return this.sourceCache[url];
        },

        guessAnonymousFunctions: function(stack) {
            for (var i = 0; i < stack.length; ++i) {
                var reStack = /\{anonymous\}\(.*\)@(.*)/,
                    reRef = /^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/,
                    frame = stack[i], ref = reStack.exec(frame);

                if (ref) {
                    var m = reRef.exec(ref[1]);
                    if (m) { // If falsey, we did not get any file/line information
                        var file = m[1], lineno = m[2], charno = m[3] || 0;
                        if (file && this.isSameDomain(file) && lineno) {
                            var functionName = this.guessAnonymousFunction(file, lineno, charno);
                            stack[i] = frame.replace('{anonymous}', functionName);
                        }
                    }
                }
            }
            return stack;
        },

        guessAnonymousFunction: function(url, lineNo, charNo) {
            var ret;
            try {
                ret = this.findFunctionName(this.getSource(url), lineNo);
            } catch (e) {
                ret = 'getSource failed with url: ' + url + ', exception: ' + e.toString();
            }
            return ret;
        },

        findFunctionName: function(source, lineNo) {
            // FIXME findFunctionName fails for compressed source
            // (more than one function on the same line)
            // function {name}({args}) m[1]=name m[2]=args
            var reFunctionDeclaration = /function\s+([^(]*?)\s*\(([^)]*)\)/;
            // {name} = function ({args}) TODO args capture
            // /['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function(?:[^(]*)/
            var reFunctionExpression = /['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/;
            // {name} = eval()
            var reFunctionEvaluation = /['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/;
            // Walk backwards in the source lines until we find
            // the line which matches one of the patterns above
            var code = "", line, maxLines = Math.min(lineNo, 20), m, commentPos;
            for (var i = 0; i < maxLines; ++i) {
                // lineNo is 1-based, source[] is 0-based
                line = source[lineNo - i - 1];
                commentPos = line.indexOf('//');
                if (commentPos >= 0) {
                    line = line.substr(0, commentPos);
                }
                // TODO check other types of comments? Commented code may lead to false positive
                if (line) {
                    code = line + code;
                    m = reFunctionExpression.exec(code);
                    if (m && m[1]) {
                        return m[1];
                    }
                    m = reFunctionDeclaration.exec(code);
                    if (m && m[1]) {
                        //return m[1] + "(" + (m[2] || "") + ")";
                        return m[1];
                    }
                    m = reFunctionEvaluation.exec(code);
                    if (m && m[1]) {
                        return m[1];
                    }
                }
            }
            return '(?)';
        }
    };

    return printStackTrace;
}));
;
/*
 AngularJS v1.8.2
 (c) 2010-2020 Google LLC. http://angularjs.org
 License: MIT
*/
(function(I,b){'use strict';function z(b,h){var d=[],c=b.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(b,c,h,k){b="?"===k||"*?"===k;k="*"===k||"*?"===k;d.push({name:h,optional:b});c=c||"";return(b?"(?:"+c:c+"(?:")+(k?"(.+?)":"([^/]+)")+(b?"?)?":")")}).replace(/([/$*])/g,"\\$1");h.ignoreTrailingSlashes&&(c=c.replace(/\/+$/,"")+"/*");return{keys:d,regexp:new RegExp("^"+c+"(?:[?#]|$)",h.caseInsensitiveMatch?"i":"")}}function A(b){p&&b.get("$route")}function v(u,h,d){return{restrict:"ECA",
terminal:!0,priority:400,transclude:"element",link:function(c,f,g,l,k){function q(){r&&(d.cancel(r),r=null);m&&(m.$destroy(),m=null);s&&(r=d.leave(s),r.done(function(b){!1!==b&&(r=null)}),s=null)}function C(){var g=u.current&&u.current.locals;if(b.isDefined(g&&g.$template)){var g=c.$new(),l=u.current;s=k(g,function(g){d.enter(g,null,s||f).done(function(d){!1===d||!b.isDefined(w)||w&&!c.$eval(w)||h()});q()});m=l.scope=g;m.$emit("$viewContentLoaded");m.$eval(p)}else q()}var m,s,r,w=g.autoscroll,p=g.onload||
"";c.$on("$routeChangeSuccess",C);C()}}}function x(b,h,d){return{restrict:"ECA",priority:-400,link:function(c,f){var g=d.current,l=g.locals;f.html(l.$template);var k=b(f.contents());if(g.controller){l.$scope=c;var q=h(g.controller,l);g.controllerAs&&(c[g.controllerAs]=q);f.data("$ngControllerController",q);f.children().data("$ngControllerController",q)}c[g.resolveAs||"$resolve"]=l;k(c)}}}var D,E,F,G,y=b.module("ngRoute",[]).info({angularVersion:"1.8.2"}).provider("$route",function(){function u(d,
c){return b.extend(Object.create(d),c)}D=b.isArray;E=b.isObject;F=b.isDefined;G=b.noop;var h={};this.when=function(d,c){var f;f=void 0;if(D(c)){f=f||[];for(var g=0,l=c.length;g<l;g++)f[g]=c[g]}else if(E(c))for(g in f=f||{},c)if("$"!==g.charAt(0)||"$"!==g.charAt(1))f[g]=c[g];f=f||c;b.isUndefined(f.reloadOnUrl)&&(f.reloadOnUrl=!0);b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0);b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch);h[d]=b.extend(f,{originalPath:d},
d&&z(d,f));d&&(g="/"===d[d.length-1]?d.substr(0,d.length-1):d+"/",h[g]=b.extend({originalPath:d,redirectTo:d},z(g,f)));return this};this.caseInsensitiveMatch=!1;this.otherwise=function(b){"string"===typeof b&&(b={redirectTo:b});this.when(null,b);return this};p=!0;this.eagerInstantiationEnabled=function(b){return F(b)?(p=b,this):p};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser",function(d,c,f,g,l,k,q,p){function m(a){var e=t.current;n=A();(x=
!B&&n&&e&&n.$$route===e.$$route&&(!n.reloadOnUrl||!n.reloadOnSearch&&b.equals(n.pathParams,e.pathParams)))||!e&&!n||d.$broadcast("$routeChangeStart",n,e).defaultPrevented&&a&&a.preventDefault()}function s(){var a=t.current,e=n;if(x)a.params=e.params,b.copy(a.params,f),d.$broadcast("$routeUpdate",a);else if(e||a){B=!1;t.current=e;var c=g.resolve(e);p.$$incOutstandingRequestCount("$route");c.then(r).then(w).then(function(g){return g&&c.then(y).then(function(c){e===t.current&&(e&&(e.locals=c,b.copy(e.params,
f)),d.$broadcast("$routeChangeSuccess",e,a))})}).catch(function(b){e===t.current&&d.$broadcast("$routeChangeError",e,a,b)}).finally(function(){p.$$completeOutstandingRequest(G,"$route")})}}function r(a){var e={route:a,hasRedirection:!1};if(a)if(a.redirectTo)if(b.isString(a.redirectTo))e.path=v(a.redirectTo,a.params),e.search=a.params,e.hasRedirection=!0;else{var d=c.path(),f=c.search();a=a.redirectTo(a.pathParams,d,f);b.isDefined(a)&&(e.url=a,e.hasRedirection=!0)}else if(a.resolveRedirectTo)return g.resolve(l.invoke(a.resolveRedirectTo)).then(function(a){b.isDefined(a)&&
(e.url=a,e.hasRedirection=!0);return e});return e}function w(a){var b=!0;if(a.route!==t.current)b=!1;else if(a.hasRedirection){var g=c.url(),d=a.url;d?c.url(d).replace():d=c.path(a.path).search(a.search).replace().url();d!==g&&(b=!1)}return b}function y(a){if(a){var e=b.extend({},a.resolve);b.forEach(e,function(a,c){e[c]=b.isString(a)?l.get(a):l.invoke(a,null,null,c)});a=z(a);b.isDefined(a)&&(e.$template=a);return g.all(e)}}function z(a){var e,c;b.isDefined(e=a.template)?b.isFunction(e)&&(e=e(a.params)):
b.isDefined(c=a.templateUrl)&&(b.isFunction(c)&&(c=c(a.params)),b.isDefined(c)&&(a.loadedTemplateUrl=q.valueOf(c),e=k(c)));return e}function A(){var a,e;b.forEach(h,function(d,g){var f;if(f=!e){var h=c.path();f=d.keys;var l={};if(d.regexp)if(h=d.regexp.exec(h)){for(var k=1,p=h.length;k<p;++k){var m=f[k-1],n=h[k];m&&n&&(l[m.name]=n)}f=l}else f=null;else f=null;f=a=f}f&&(e=u(d,{params:b.extend({},c.search(),a),pathParams:a}),e.$$route=d)});return e||h[null]&&u(h[null],{params:{},pathParams:{}})}function v(a,
c){var d=[];b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),g=f[1];d.push(c[g]);d.push(f[2]||"");delete c[g]}});return d.join("")}var B=!1,n,x,t={routes:h,reload:function(){B=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;B=!1}};d.$evalAsync(function(){m(a);a.defaultPrevented||s()})},updateParams:function(a){if(this.current&&this.current.$$route)a=b.extend({},this.current.params,a),c.path(v(this.current.$$route.originalPath,
a)),c.search(a);else throw H("norout");}};d.$on("$locationChangeStart",m);d.$on("$locationChangeSuccess",s);return t}]}).run(A),H=b.$$minErr("ngRoute"),p;A.$inject=["$injector"];y.provider("$routeParams",function(){this.$get=function(){return{}}});y.directive("ngView",v);y.directive("ngView",x);v.$inject=["$route","$anchorScroll","$animate"];x.$inject=["$compile","$controller","$route"]})(window,window.angular);
//# sourceMappingURL=angular-route.min.js.map
;
//! moment.js
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
!function (e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.moment = t() }(this, function () { "use strict"; var H; function f() { return H.apply(null, arguments) } function a(e) { return e instanceof Array || "[object Array]" === Object.prototype.toString.call(e) } function F(e) { return null != e && "[object Object]" === Object.prototype.toString.call(e) } function c(e, t) { return Object.prototype.hasOwnProperty.call(e, t) } function L(e) { if (Object.getOwnPropertyNames) return 0 === Object.getOwnPropertyNames(e).length; for (var t in e) if (c(e, t)) return; return 1 } function o(e) { return void 0 === e } function u(e) { return "number" == typeof e || "[object Number]" === Object.prototype.toString.call(e) } function V(e) { return e instanceof Date || "[object Date]" === Object.prototype.toString.call(e) } function G(e, t) { for (var n = [], s = e.length, i = 0; i < s; ++i)n.push(t(e[i], i)); return n } function E(e, t) { for (var n in t) c(t, n) && (e[n] = t[n]); return c(t, "toString") && (e.toString = t.toString), c(t, "valueOf") && (e.valueOf = t.valueOf), e } function l(e, t, n, s) { return Pt(e, t, n, s, !0).utc() } function m(e) { return null == e._pf && (e._pf = { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidEra: null, invalidMonth: null, invalidFormat: !1, userInvalidated: !1, iso: !1, parsedDateParts: [], era: null, meridiem: null, rfc2822: !1, weekdayMismatch: !1 }), e._pf } function A(e) { if (null == e._isValid) { var t = m(e), n = j.call(t.parsedDateParts, function (e) { return null != e }), n = !isNaN(e._d.getTime()) && t.overflow < 0 && !t.empty && !t.invalidEra && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && n); if (e._strict && (n = n && 0 === t.charsLeftOver && 0 === t.unusedTokens.length && void 0 === t.bigHour), null != Object.isFrozen && Object.isFrozen(e)) return n; e._isValid = n } return e._isValid } function I(e) { var t = l(NaN); return null != e ? E(m(t), e) : m(t).userInvalidated = !0, t } var j = Array.prototype.some || function (e) { for (var t = Object(this), n = t.length >>> 0, s = 0; s < n; s++)if (s in t && e.call(this, t[s], s, t)) return !0; return !1 }, Z = f.momentProperties = [], z = !1; function $(e, t) { var n, s, i, r = Z.length; if (o(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), o(t._i) || (e._i = t._i), o(t._f) || (e._f = t._f), o(t._l) || (e._l = t._l), o(t._strict) || (e._strict = t._strict), o(t._tzm) || (e._tzm = t._tzm), o(t._isUTC) || (e._isUTC = t._isUTC), o(t._offset) || (e._offset = t._offset), o(t._pf) || (e._pf = m(t)), o(t._locale) || (e._locale = t._locale), 0 < r) for (n = 0; n < r; n++)o(i = t[s = Z[n]]) || (e[s] = i); return e } function q(e) { $(this, e), this._d = new Date(null != e._d ? e._d.getTime() : NaN), this.isValid() || (this._d = new Date(NaN)), !1 === z && (z = !0, f.updateOffset(this), z = !1) } function h(e) { return e instanceof q || null != e && null != e._isAMomentObject } function B(e) { !1 === f.suppressDeprecationWarnings && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + e) } function e(r, a) { var o = !0; return E(function () { if (null != f.deprecationHandler && f.deprecationHandler(null, r), o) { for (var e, t, n = [], s = arguments.length, i = 0; i < s; i++) { if (e = "", "object" == typeof arguments[i]) { for (t in e += "\n[" + i + "] ", arguments[0]) c(arguments[0], t) && (e += t + ": " + arguments[0][t] + ", "); e = e.slice(0, -2) } else e = arguments[i]; n.push(e) } B(r + "\nArguments: " + Array.prototype.slice.call(n).join("") + "\n" + (new Error).stack), o = !1 } return a.apply(this, arguments) }, a) } var J = {}; function Q(e, t) { null != f.deprecationHandler && f.deprecationHandler(e, t), J[e] || (B(t), J[e] = !0) } function d(e) { return "undefined" != typeof Function && e instanceof Function || "[object Function]" === Object.prototype.toString.call(e) } function X(e, t) { var n, s = E({}, e); for (n in t) c(t, n) && (F(e[n]) && F(t[n]) ? (s[n] = {}, E(s[n], e[n]), E(s[n], t[n])) : null != t[n] ? s[n] = t[n] : delete s[n]); for (n in e) c(e, n) && !c(t, n) && F(e[n]) && (s[n] = E({}, s[n])); return s } function K(e) { null != e && this.set(e) } f.suppressDeprecationWarnings = !1, f.deprecationHandler = null; var ee = Object.keys || function (e) { var t, n = []; for (t in e) c(e, t) && n.push(t); return n }; function r(e, t, n) { var s = "" + Math.abs(e); return (0 <= e ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, t - s.length)).toString().substr(1) + s } var te = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, ne = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, se = {}, ie = {}; function s(e, t, n, s) { var i = "string" == typeof s ? function () { return this[s]() } : s; e && (ie[e] = i), t && (ie[t[0]] = function () { return r(i.apply(this, arguments), t[1], t[2]) }), n && (ie[n] = function () { return this.localeData().ordinal(i.apply(this, arguments), e) }) } function re(e, t) { return e.isValid() ? (t = ae(t, e.localeData()), se[t] = se[t] || function (s) { for (var e, i = s.match(te), t = 0, r = i.length; t < r; t++)ie[i[t]] ? i[t] = ie[i[t]] : i[t] = (e = i[t]).match(/\[[\s\S]/) ? e.replace(/^\[|\]$/g, "") : e.replace(/\\/g, ""); return function (e) { for (var t = "", n = 0; n < r; n++)t += d(i[n]) ? i[n].call(e, s) : i[n]; return t } }(t), se[t](e)) : e.localeData().invalidDate() } function ae(e, t) { var n = 5; function s(e) { return t.longDateFormat(e) || e } for (ne.lastIndex = 0; 0 <= n && ne.test(e);)e = e.replace(ne, s), ne.lastIndex = 0, --n; return e } var oe = {}; function t(e, t) { var n = e.toLowerCase(); oe[n] = oe[n + "s"] = oe[t] = e } function _(e) { return "string" == typeof e ? oe[e] || oe[e.toLowerCase()] : void 0 } function ue(e) { var t, n, s = {}; for (n in e) c(e, n) && (t = _(n)) && (s[t] = e[n]); return s } var le = {}; function n(e, t) { le[e] = t } function he(e) { return e % 4 == 0 && e % 100 != 0 || e % 400 == 0 } function y(e) { return e < 0 ? Math.ceil(e) || 0 : Math.floor(e) } function g(e) { var e = +e, t = 0; return t = 0 != e && isFinite(e) ? y(e) : t } function de(t, n) { return function (e) { return null != e ? (fe(this, t, e), f.updateOffset(this, n), this) : ce(this, t) } } function ce(e, t) { return e.isValid() ? e._d["get" + (e._isUTC ? "UTC" : "") + t]() : NaN } function fe(e, t, n) { e.isValid() && !isNaN(n) && ("FullYear" === t && he(e.year()) && 1 === e.month() && 29 === e.date() ? (n = g(n), e._d["set" + (e._isUTC ? "UTC" : "") + t](n, e.month(), We(n, e.month()))) : e._d["set" + (e._isUTC ? "UTC" : "") + t](n)) } var i = /\d/, w = /\d\d/, me = /\d{3}/, _e = /\d{4}/, ye = /[+-]?\d{6}/, p = /\d\d?/, ge = /\d\d\d\d?/, we = /\d\d\d\d\d\d?/, pe = /\d{1,3}/, ke = /\d{1,4}/, ve = /[+-]?\d{1,6}/, Me = /\d+/, De = /[+-]?\d+/, Se = /Z|[+-]\d\d:?\d\d/gi, Ye = /Z|[+-]\d\d(?::?\d\d)?/gi, k = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; function v(e, n, s) { be[e] = d(n) ? n : function (e, t) { return e && s ? s : n } } function Oe(e, t) { return c(be, e) ? be[e](t._strict, t._locale) : new RegExp(M(e.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (e, t, n, s, i) { return t || n || s || i }))) } function M(e) { return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") } var be = {}, xe = {}; function D(e, n) { var t, s, i = n; for ("string" == typeof e && (e = [e]), u(n) && (i = function (e, t) { t[n] = g(e) }), s = e.length, t = 0; t < s; t++)xe[e[t]] = i } function Te(e, i) { D(e, function (e, t, n, s) { n._w = n._w || {}, i(e, n._w, n, s) }) } var S, Y = 0, O = 1, b = 2, x = 3, T = 4, N = 5, Ne = 6, Pe = 7, Re = 8; function We(e, t) { if (isNaN(e) || isNaN(t)) return NaN; var n = (t % (n = 12) + n) % n; return e += (t - n) / 12, 1 == n ? he(e) ? 29 : 28 : 31 - n % 7 % 2 } S = Array.prototype.indexOf || function (e) { for (var t = 0; t < this.length; ++t)if (this[t] === e) return t; return -1 }, s("M", ["MM", 2], "Mo", function () { return this.month() + 1 }), s("MMM", 0, 0, function (e) { return this.localeData().monthsShort(this, e) }), s("MMMM", 0, 0, function (e) { return this.localeData().months(this, e) }), t("month", "M"), n("month", 8), v("M", p), v("MM", p, w), v("MMM", function (e, t) { return t.monthsShortRegex(e) }), v("MMMM", function (e, t) { return t.monthsRegex(e) }), D(["M", "MM"], function (e, t) { t[O] = g(e) - 1 }), D(["MMM", "MMMM"], function (e, t, n, s) { s = n._locale.monthsParse(e, s, n._strict); null != s ? t[O] = s : m(n).invalidMonth = e }); var Ce = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), Ue = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), He = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, Fe = k, Le = k; function Ve(e, t) { var n; if (e.isValid()) { if ("string" == typeof t) if (/^\d+$/.test(t)) t = g(t); else if (!u(t = e.localeData().monthsParse(t))) return; n = Math.min(e.date(), We(e.year(), t)), e._d["set" + (e._isUTC ? "UTC" : "") + "Month"](t, n) } } function Ge(e) { return null != e ? (Ve(this, e), f.updateOffset(this, !0), this) : ce(this, "Month") } function Ee() { function e(e, t) { return t.length - e.length } for (var t, n = [], s = [], i = [], r = 0; r < 12; r++)t = l([2e3, r]), n.push(this.monthsShort(t, "")), s.push(this.months(t, "")), i.push(this.months(t, "")), i.push(this.monthsShort(t, "")); for (n.sort(e), s.sort(e), i.sort(e), r = 0; r < 12; r++)n[r] = M(n[r]), s[r] = M(s[r]); for (r = 0; r < 24; r++)i[r] = M(i[r]); this._monthsRegex = new RegExp("^(" + i.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + s.join("|") + ")", "i"), this._monthsShortStrictRegex = new RegExp("^(" + n.join("|") + ")", "i") } function Ae(e) { return he(e) ? 366 : 365 } s("Y", 0, 0, function () { var e = this.year(); return e <= 9999 ? r(e, 4) : "+" + e }), s(0, ["YY", 2], 0, function () { return this.year() % 100 }), s(0, ["YYYY", 4], 0, "year"), s(0, ["YYYYY", 5], 0, "year"), s(0, ["YYYYYY", 6, !0], 0, "year"), t("year", "y"), n("year", 1), v("Y", De), v("YY", p, w), v("YYYY", ke, _e), v("YYYYY", ve, ye), v("YYYYYY", ve, ye), D(["YYYYY", "YYYYYY"], Y), D("YYYY", function (e, t) { t[Y] = 2 === e.length ? f.parseTwoDigitYear(e) : g(e) }), D("YY", function (e, t) { t[Y] = f.parseTwoDigitYear(e) }), D("Y", function (e, t) { t[Y] = parseInt(e, 10) }), f.parseTwoDigitYear = function (e) { return g(e) + (68 < g(e) ? 1900 : 2e3) }; var Ie = de("FullYear", !0); function je(e, t, n, s, i, r, a) { var o; return e < 100 && 0 <= e ? (o = new Date(e + 400, t, n, s, i, r, a), isFinite(o.getFullYear()) && o.setFullYear(e)) : o = new Date(e, t, n, s, i, r, a), o } function Ze(e) { var t; return e < 100 && 0 <= e ? ((t = Array.prototype.slice.call(arguments))[0] = e + 400, t = new Date(Date.UTC.apply(null, t)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e)) : t = new Date(Date.UTC.apply(null, arguments)), t } function ze(e, t, n) { n = 7 + t - n; return n - (7 + Ze(e, 0, n).getUTCDay() - t) % 7 - 1 } function $e(e, t, n, s, i) { var r, t = 1 + 7 * (t - 1) + (7 + n - s) % 7 + ze(e, s, i), n = t <= 0 ? Ae(r = e - 1) + t : t > Ae(e) ? (r = e + 1, t - Ae(e)) : (r = e, t); return { year: r, dayOfYear: n } } function qe(e, t, n) { var s, i, r = ze(e.year(), t, n), r = Math.floor((e.dayOfYear() - r - 1) / 7) + 1; return r < 1 ? s = r + P(i = e.year() - 1, t, n) : r > P(e.year(), t, n) ? (s = r - P(e.year(), t, n), i = e.year() + 1) : (i = e.year(), s = r), { week: s, year: i } } function P(e, t, n) { var s = ze(e, t, n), t = ze(e + 1, t, n); return (Ae(e) - s + t) / 7 } s("w", ["ww", 2], "wo", "week"), s("W", ["WW", 2], "Wo", "isoWeek"), t("week", "w"), t("isoWeek", "W"), n("week", 5), n("isoWeek", 5), v("w", p), v("ww", p, w), v("W", p), v("WW", p, w), Te(["w", "ww", "W", "WW"], function (e, t, n, s) { t[s.substr(0, 1)] = g(e) }); function Be(e, t) { return e.slice(t, 7).concat(e.slice(0, t)) } s("d", 0, "do", "day"), s("dd", 0, 0, function (e) { return this.localeData().weekdaysMin(this, e) }), s("ddd", 0, 0, function (e) { return this.localeData().weekdaysShort(this, e) }), s("dddd", 0, 0, function (e) { return this.localeData().weekdays(this, e) }), s("e", 0, 0, "weekday"), s("E", 0, 0, "isoWeekday"), t("day", "d"), t("weekday", "e"), t("isoWeekday", "E"), n("day", 11), n("weekday", 11), n("isoWeekday", 11), v("d", p), v("e", p), v("E", p), v("dd", function (e, t) { return t.weekdaysMinRegex(e) }), v("ddd", function (e, t) { return t.weekdaysShortRegex(e) }), v("dddd", function (e, t) { return t.weekdaysRegex(e) }), Te(["dd", "ddd", "dddd"], function (e, t, n, s) { s = n._locale.weekdaysParse(e, s, n._strict); null != s ? t.d = s : m(n).invalidWeekday = e }), Te(["d", "e", "E"], function (e, t, n, s) { t[s] = g(e) }); var Je = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), Qe = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), Xe = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), Ke = k, et = k, tt = k; function nt() { function e(e, t) { return t.length - e.length } for (var t, n, s, i = [], r = [], a = [], o = [], u = 0; u < 7; u++)s = l([2e3, 1]).day(u), t = M(this.weekdaysMin(s, "")), n = M(this.weekdaysShort(s, "")), s = M(this.weekdays(s, "")), i.push(t), r.push(n), a.push(s), o.push(t), o.push(n), o.push(s); i.sort(e), r.sort(e), a.sort(e), o.sort(e), this._weekdaysRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp("^(" + a.join("|") + ")", "i"), this._weekdaysShortStrictRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._weekdaysMinStrictRegex = new RegExp("^(" + i.join("|") + ")", "i") } function st() { return this.hours() % 12 || 12 } function it(e, t) { s(e, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), t) }) } function rt(e, t) { return t._meridiemParse } s("H", ["HH", 2], 0, "hour"), s("h", ["hh", 2], 0, st), s("k", ["kk", 2], 0, function () { return this.hours() || 24 }), s("hmm", 0, 0, function () { return "" + st.apply(this) + r(this.minutes(), 2) }), s("hmmss", 0, 0, function () { return "" + st.apply(this) + r(this.minutes(), 2) + r(this.seconds(), 2) }), s("Hmm", 0, 0, function () { return "" + this.hours() + r(this.minutes(), 2) }), s("Hmmss", 0, 0, function () { return "" + this.hours() + r(this.minutes(), 2) + r(this.seconds(), 2) }), it("a", !0), it("A", !1), t("hour", "h"), n("hour", 13), v("a", rt), v("A", rt), v("H", p), v("h", p), v("k", p), v("HH", p, w), v("hh", p, w), v("kk", p, w), v("hmm", ge), v("hmmss", we), v("Hmm", ge), v("Hmmss", we), D(["H", "HH"], x), D(["k", "kk"], function (e, t, n) { e = g(e); t[x] = 24 === e ? 0 : e }), D(["a", "A"], function (e, t, n) { n._isPm = n._locale.isPM(e), n._meridiem = e }), D(["h", "hh"], function (e, t, n) { t[x] = g(e), m(n).bigHour = !0 }), D("hmm", function (e, t, n) { var s = e.length - 2; t[x] = g(e.substr(0, s)), t[T] = g(e.substr(s)), m(n).bigHour = !0 }), D("hmmss", function (e, t, n) { var s = e.length - 4, i = e.length - 2; t[x] = g(e.substr(0, s)), t[T] = g(e.substr(s, 2)), t[N] = g(e.substr(i)), m(n).bigHour = !0 }), D("Hmm", function (e, t, n) { var s = e.length - 2; t[x] = g(e.substr(0, s)), t[T] = g(e.substr(s)) }), D("Hmmss", function (e, t, n) { var s = e.length - 4, i = e.length - 2; t[x] = g(e.substr(0, s)), t[T] = g(e.substr(s, 2)), t[N] = g(e.substr(i)) }); k = de("Hours", !0); var at, ot = { calendar: { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }, longDateFormat: { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, invalidDate: "Invalid date", ordinal: "%d", dayOfMonthOrdinalParse: /\d{1,2}/, relativeTime: { future: "in %s", past: "%s ago", s: "a few seconds", ss: "%d seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", w: "a week", ww: "%d weeks", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }, months: Ce, monthsShort: Ue, week: { dow: 0, doy: 6 }, weekdays: Je, weekdaysMin: Xe, weekdaysShort: Qe, meridiemParse: /[ap]\.?m?\.?/i }, R = {}, ut = {}; function lt(e) { return e && e.toLowerCase().replace("_", "-") } function ht(e) { for (var t, n, s, i, r = 0; r < e.length;) { for (t = (i = lt(e[r]).split("-")).length, n = (n = lt(e[r + 1])) ? n.split("-") : null; 0 < t;) { if (s = dt(i.slice(0, t).join("-"))) return s; if (n && n.length >= t && function (e, t) { for (var n = Math.min(e.length, t.length), s = 0; s < n; s += 1)if (e[s] !== t[s]) return s; return n }(i, n) >= t - 1) break; t-- } r++ } return at } function dt(t) { var e; if (void 0 === R[t] && "undefined" != typeof module && module && module.exports && null != t.match("^[^/\\\\]*$")) try { e = at._abbr, require("./locale/" + t), ct(e) } catch (e) { R[t] = null } return R[t] } function ct(e, t) { return e && ((t = o(t) ? mt(e) : ft(e, t)) ? at = t : "undefined" != typeof console && console.warn && console.warn("Locale " + e + " not found. Did you forget to load it?")), at._abbr } function ft(e, t) { if (null === t) return delete R[e], null; var n, s = ot; if (t.abbr = e, null != R[e]) Q("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), s = R[e]._config; else if (null != t.parentLocale) if (null != R[t.parentLocale]) s = R[t.parentLocale]._config; else { if (null == (n = dt(t.parentLocale))) return ut[t.parentLocale] || (ut[t.parentLocale] = []), ut[t.parentLocale].push({ name: e, config: t }), null; s = n._config } return R[e] = new K(X(s, t)), ut[e] && ut[e].forEach(function (e) { ft(e.name, e.config) }), ct(e), R[e] } function mt(e) { var t; if (!(e = e && e._locale && e._locale._abbr ? e._locale._abbr : e)) return at; if (!a(e)) { if (t = dt(e)) return t; e = [e] } return ht(e) } function _t(e) { var t = e._a; return t && -2 === m(e).overflow && (t = t[O] < 0 || 11 < t[O] ? O : t[b] < 1 || t[b] > We(t[Y], t[O]) ? b : t[x] < 0 || 24 < t[x] || 24 === t[x] && (0 !== t[T] || 0 !== t[N] || 0 !== t[Ne]) ? x : t[T] < 0 || 59 < t[T] ? T : t[N] < 0 || 59 < t[N] ? N : t[Ne] < 0 || 999 < t[Ne] ? Ne : -1, m(e)._overflowDayOfYear && (t < Y || b < t) && (t = b), m(e)._overflowWeeks && -1 === t && (t = Pe), m(e)._overflowWeekday && -1 === t && (t = Re), m(e).overflow = t), e } var yt = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, gt = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, wt = /Z|[+-]\d\d(?::?\d\d)?/, pt = [["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/], ["YYYYMM", /\d{6}/, !1], ["YYYY", /\d{4}/, !1]], kt = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], vt = /^\/?Date\((-?\d+)/i, Mt = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, Dt = { UT: 0, GMT: 0, EDT: -240, EST: -300, CDT: -300, CST: -360, MDT: -360, MST: -420, PDT: -420, PST: -480 }; function St(e) { var t, n, s, i, r, a, o = e._i, u = yt.exec(o) || gt.exec(o), o = pt.length, l = kt.length; if (u) { for (m(e).iso = !0, t = 0, n = o; t < n; t++)if (pt[t][1].exec(u[1])) { i = pt[t][0], s = !1 !== pt[t][2]; break } if (null == i) e._isValid = !1; else { if (u[3]) { for (t = 0, n = l; t < n; t++)if (kt[t][1].exec(u[3])) { r = (u[2] || " ") + kt[t][0]; break } if (null == r) return void (e._isValid = !1) } if (s || null == r) { if (u[4]) { if (!wt.exec(u[4])) return void (e._isValid = !1); a = "Z" } e._f = i + (r || "") + (a || ""), Tt(e) } else e._isValid = !1 } } else e._isValid = !1 } function Yt(e, t, n, s, i, r) { e = [function (e) { e = parseInt(e, 10); { if (e <= 49) return 2e3 + e; if (e <= 999) return 1900 + e } return e }(e), Ue.indexOf(t), parseInt(n, 10), parseInt(s, 10), parseInt(i, 10)]; return r && e.push(parseInt(r, 10)), e } function Ot(e) { var t, n, s, i, r = Mt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "")); r ? (t = Yt(r[4], r[3], r[2], r[5], r[6], r[7]), n = r[1], s = t, i = e, n && Qe.indexOf(n) !== new Date(s[0], s[1], s[2]).getDay() ? (m(i).weekdayMismatch = !0, i._isValid = !1) : (e._a = t, e._tzm = (n = r[8], s = r[9], i = r[10], n ? Dt[n] : s ? 0 : 60 * (((n = parseInt(i, 10)) - (s = n % 100)) / 100) + s), e._d = Ze.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), m(e).rfc2822 = !0)) : e._isValid = !1 } function bt(e, t, n) { return null != e ? e : null != t ? t : n } function xt(e) { var t, n, s, i, r, a, o, u, l, h, d, c = []; if (!e._d) { for (s = e, i = new Date(f.now()), n = s._useUTC ? [i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()] : [i.getFullYear(), i.getMonth(), i.getDate()], e._w && null == e._a[b] && null == e._a[O] && (null != (i = (s = e)._w).GG || null != i.W || null != i.E ? (u = 1, l = 4, r = bt(i.GG, s._a[Y], qe(W(), 1, 4).year), a = bt(i.W, 1), ((o = bt(i.E, 1)) < 1 || 7 < o) && (h = !0)) : (u = s._locale._week.dow, l = s._locale._week.doy, d = qe(W(), u, l), r = bt(i.gg, s._a[Y], d.year), a = bt(i.w, d.week), null != i.d ? ((o = i.d) < 0 || 6 < o) && (h = !0) : null != i.e ? (o = i.e + u, (i.e < 0 || 6 < i.e) && (h = !0)) : o = u), a < 1 || a > P(r, u, l) ? m(s)._overflowWeeks = !0 : null != h ? m(s)._overflowWeekday = !0 : (d = $e(r, a, o, u, l), s._a[Y] = d.year, s._dayOfYear = d.dayOfYear)), null != e._dayOfYear && (i = bt(e._a[Y], n[Y]), (e._dayOfYear > Ae(i) || 0 === e._dayOfYear) && (m(e)._overflowDayOfYear = !0), h = Ze(i, 0, e._dayOfYear), e._a[O] = h.getUTCMonth(), e._a[b] = h.getUTCDate()), t = 0; t < 3 && null == e._a[t]; ++t)e._a[t] = c[t] = n[t]; for (; t < 7; t++)e._a[t] = c[t] = null == e._a[t] ? 2 === t ? 1 : 0 : e._a[t]; 24 === e._a[x] && 0 === e._a[T] && 0 === e._a[N] && 0 === e._a[Ne] && (e._nextDay = !0, e._a[x] = 0), e._d = (e._useUTC ? Ze : je).apply(null, c), r = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), null != e._tzm && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[x] = 24), e._w && void 0 !== e._w.d && e._w.d !== r && (m(e).weekdayMismatch = !0) } } function Tt(e) { if (e._f === f.ISO_8601) St(e); else if (e._f === f.RFC_2822) Ot(e); else { e._a = [], m(e).empty = !0; for (var t, n, s, i, r, a = "" + e._i, o = a.length, u = 0, l = ae(e._f, e._locale).match(te) || [], h = l.length, d = 0; d < h; d++)n = l[d], (t = (a.match(Oe(n, e)) || [])[0]) && (0 < (s = a.substr(0, a.indexOf(t))).length && m(e).unusedInput.push(s), a = a.slice(a.indexOf(t) + t.length), u += t.length), ie[n] ? (t ? m(e).empty = !1 : m(e).unusedTokens.push(n), s = n, r = e, null != (i = t) && c(xe, s) && xe[s](i, r._a, r, s)) : e._strict && !t && m(e).unusedTokens.push(n); m(e).charsLeftOver = o - u, 0 < a.length && m(e).unusedInput.push(a), e._a[x] <= 12 && !0 === m(e).bigHour && 0 < e._a[x] && (m(e).bigHour = void 0), m(e).parsedDateParts = e._a.slice(0), m(e).meridiem = e._meridiem, e._a[x] = function (e, t, n) { if (null == n) return t; return null != e.meridiemHour ? e.meridiemHour(t, n) : null != e.isPM ? ((e = e.isPM(n)) && t < 12 && (t += 12), t = e || 12 !== t ? t : 0) : t }(e._locale, e._a[x], e._meridiem), null !== (o = m(e).era) && (e._a[Y] = e._locale.erasConvertYear(o, e._a[Y])), xt(e), _t(e) } } function Nt(e) { var t, n, s, i = e._i, r = e._f; if (e._locale = e._locale || mt(e._l), null === i || void 0 === r && "" === i) return I({ nullInput: !0 }); if ("string" == typeof i && (e._i = i = e._locale.preparse(i)), h(i)) return new q(_t(i)); if (V(i)) e._d = i; else if (a(r)) !function (e) { var t, n, s, i, r, a, o = !1, u = e._f.length; if (0 === u) return m(e).invalidFormat = !0, e._d = new Date(NaN); for (i = 0; i < u; i++)r = 0, a = !1, t = $({}, e), null != e._useUTC && (t._useUTC = e._useUTC), t._f = e._f[i], Tt(t), A(t) && (a = !0), r = (r += m(t).charsLeftOver) + 10 * m(t).unusedTokens.length, m(t).score = r, o ? r < s && (s = r, n = t) : (null == s || r < s || a) && (s = r, n = t, a && (o = !0)); E(e, n || t) }(e); else if (r) Tt(e); else if (o(r = (i = e)._i)) i._d = new Date(f.now()); else V(r) ? i._d = new Date(r.valueOf()) : "string" == typeof r ? (n = i, null !== (t = vt.exec(n._i)) ? n._d = new Date(+t[1]) : (St(n), !1 === n._isValid && (delete n._isValid, Ot(n), !1 === n._isValid && (delete n._isValid, n._strict ? n._isValid = !1 : f.createFromInputFallback(n))))) : a(r) ? (i._a = G(r.slice(0), function (e) { return parseInt(e, 10) }), xt(i)) : F(r) ? (t = i)._d || (s = void 0 === (n = ue(t._i)).day ? n.date : n.day, t._a = G([n.year, n.month, s, n.hour, n.minute, n.second, n.millisecond], function (e) { return e && parseInt(e, 10) }), xt(t)) : u(r) ? i._d = new Date(r) : f.createFromInputFallback(i); return A(e) || (e._d = null), e } function Pt(e, t, n, s, i) { var r = {}; return !0 !== t && !1 !== t || (s = t, t = void 0), !0 !== n && !1 !== n || (s = n, n = void 0), (F(e) && L(e) || a(e) && 0 === e.length) && (e = void 0), r._isAMomentObject = !0, r._useUTC = r._isUTC = i, r._l = n, r._i = e, r._f = t, r._strict = s, (i = new q(_t(Nt(i = r))))._nextDay && (i.add(1, "d"), i._nextDay = void 0), i } function W(e, t, n, s) { return Pt(e, t, n, s, !1) } f.createFromInputFallback = e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function (e) { e._d = new Date(e._i + (e._useUTC ? " UTC" : "")) }), f.ISO_8601 = function () { }, f.RFC_2822 = function () { }; ge = e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function () { var e = W.apply(null, arguments); return this.isValid() && e.isValid() ? e < this ? this : e : I() }), we = e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function () { var e = W.apply(null, arguments); return this.isValid() && e.isValid() ? this < e ? this : e : I() }); function Rt(e, t) { var n, s; if (!(t = 1 === t.length && a(t[0]) ? t[0] : t).length) return W(); for (n = t[0], s = 1; s < t.length; ++s)t[s].isValid() && !t[s][e](n) || (n = t[s]); return n } var Wt = ["year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond"]; function Ct(e) { var e = ue(e), t = e.year || 0, n = e.quarter || 0, s = e.month || 0, i = e.week || e.isoWeek || 0, r = e.day || 0, a = e.hour || 0, o = e.minute || 0, u = e.second || 0, l = e.millisecond || 0; this._isValid = function (e) { var t, n, s = !1, i = Wt.length; for (t in e) if (c(e, t) && (-1 === S.call(Wt, t) || null != e[t] && isNaN(e[t]))) return !1; for (n = 0; n < i; ++n)if (e[Wt[n]]) { if (s) return !1; parseFloat(e[Wt[n]]) !== g(e[Wt[n]]) && (s = !0) } return !0 }(e), this._milliseconds = +l + 1e3 * u + 6e4 * o + 1e3 * a * 60 * 60, this._days = +r + 7 * i, this._months = +s + 3 * n + 12 * t, this._data = {}, this._locale = mt(), this._bubble() } function Ut(e) { return e instanceof Ct } function Ht(e) { return e < 0 ? -1 * Math.round(-1 * e) : Math.round(e) } function Ft(e, n) { s(e, 0, 0, function () { var e = this.utcOffset(), t = "+"; return e < 0 && (e = -e, t = "-"), t + r(~~(e / 60), 2) + n + r(~~e % 60, 2) }) } Ft("Z", ":"), Ft("ZZ", ""), v("Z", Ye), v("ZZ", Ye), D(["Z", "ZZ"], function (e, t, n) { n._useUTC = !0, n._tzm = Vt(Ye, e) }); var Lt = /([\+\-]|\d\d)/gi; function Vt(e, t) { var t = (t || "").match(e); return null === t ? null : 0 === (t = 60 * (e = ((t[t.length - 1] || []) + "").match(Lt) || ["-", 0, 0])[1] + g(e[2])) ? 0 : "+" === e[0] ? t : -t } function Gt(e, t) { var n; return t._isUTC ? (t = t.clone(), n = (h(e) || V(e) ? e : W(e)).valueOf() - t.valueOf(), t._d.setTime(t._d.valueOf() + n), f.updateOffset(t, !1), t) : W(e).local() } function Et(e) { return -Math.round(e._d.getTimezoneOffset()) } function At() { return !!this.isValid() && (this._isUTC && 0 === this._offset) } f.updateOffset = function () { }; var It = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, jt = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function C(e, t) { var n, s = e, i = null; return Ut(e) ? s = { ms: e._milliseconds, d: e._days, M: e._months } : u(e) || !isNaN(+e) ? (s = {}, t ? s[t] = +e : s.milliseconds = +e) : (i = It.exec(e)) ? (n = "-" === i[1] ? -1 : 1, s = { y: 0, d: g(i[b]) * n, h: g(i[x]) * n, m: g(i[T]) * n, s: g(i[N]) * n, ms: g(Ht(1e3 * i[Ne])) * n }) : (i = jt.exec(e)) ? (n = "-" === i[1] ? -1 : 1, s = { y: Zt(i[2], n), M: Zt(i[3], n), w: Zt(i[4], n), d: Zt(i[5], n), h: Zt(i[6], n), m: Zt(i[7], n), s: Zt(i[8], n) }) : null == s ? s = {} : "object" == typeof s && ("from" in s || "to" in s) && (t = function (e, t) { var n; if (!e.isValid() || !t.isValid()) return { milliseconds: 0, months: 0 }; t = Gt(t, e), e.isBefore(t) ? n = zt(e, t) : ((n = zt(t, e)).milliseconds = -n.milliseconds, n.months = -n.months); return n }(W(s.from), W(s.to)), (s = {}).ms = t.milliseconds, s.M = t.months), i = new Ct(s), Ut(e) && c(e, "_locale") && (i._locale = e._locale), Ut(e) && c(e, "_isValid") && (i._isValid = e._isValid), i } function Zt(e, t) { e = e && parseFloat(e.replace(",", ".")); return (isNaN(e) ? 0 : e) * t } function zt(e, t) { var n = {}; return n.months = t.month() - e.month() + 12 * (t.year() - e.year()), e.clone().add(n.months, "M").isAfter(t) && --n.months, n.milliseconds = +t - +e.clone().add(n.months, "M"), n } function $t(s, i) { return function (e, t) { var n; return null === t || isNaN(+t) || (Q(i, "moment()." + i + "(period, number) is deprecated. Please use moment()." + i + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), n = e, e = t, t = n), qt(this, C(e, t), s), this } } function qt(e, t, n, s) { var i = t._milliseconds, r = Ht(t._days), t = Ht(t._months); e.isValid() && (s = null == s || s, t && Ve(e, ce(e, "Month") + t * n), r && fe(e, "Date", ce(e, "Date") + r * n), i && e._d.setTime(e._d.valueOf() + i * n), s && f.updateOffset(e, r || t)) } C.fn = Ct.prototype, C.invalid = function () { return C(NaN) }; Ce = $t(1, "add"), Je = $t(-1, "subtract"); function Bt(e) { return "string" == typeof e || e instanceof String } function Jt(e) { return h(e) || V(e) || Bt(e) || u(e) || function (t) { var e = a(t), n = !1; e && (n = 0 === t.filter(function (e) { return !u(e) && Bt(t) }).length); return e && n }(e) || function (e) { var t, n, s = F(e) && !L(e), i = !1, r = ["years", "year", "y", "months", "month", "M", "days", "day", "d", "dates", "date", "D", "hours", "hour", "h", "minutes", "minute", "m", "seconds", "second", "s", "milliseconds", "millisecond", "ms"], a = r.length; for (t = 0; t < a; t += 1)n = r[t], i = i || c(e, n); return s && i }(e) || null == e } function Qt(e, t) { if (e.date() < t.date()) return -Qt(t, e); var n = 12 * (t.year() - e.year()) + (t.month() - e.month()), s = e.clone().add(n, "months"), t = t - s < 0 ? (t - s) / (s - e.clone().add(n - 1, "months")) : (t - s) / (e.clone().add(1 + n, "months") - s); return -(n + t) || 0 } function Xt(e) { return void 0 === e ? this._locale._abbr : (null != (e = mt(e)) && (this._locale = e), this) } f.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ", f.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]"; Xe = e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function (e) { return void 0 === e ? this.localeData() : this.locale(e) }); function Kt() { return this._locale } var en = 126227808e5; function tn(e, t) { return (e % t + t) % t } function nn(e, t, n) { return e < 100 && 0 <= e ? new Date(e + 400, t, n) - en : new Date(e, t, n).valueOf() } function sn(e, t, n) { return e < 100 && 0 <= e ? Date.UTC(e + 400, t, n) - en : Date.UTC(e, t, n) } function rn(e, t) { return t.erasAbbrRegex(e) } function an() { for (var e = [], t = [], n = [], s = [], i = this.eras(), r = 0, a = i.length; r < a; ++r)t.push(M(i[r].name)), e.push(M(i[r].abbr)), n.push(M(i[r].narrow)), s.push(M(i[r].name)), s.push(M(i[r].abbr)), s.push(M(i[r].narrow)); this._erasRegex = new RegExp("^(" + s.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + t.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + e.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp("^(" + n.join("|") + ")", "i") } function on(e, t) { s(0, [e, e.length], 0, t) } function un(e, t, n, s, i) { var r; return null == e ? qe(this, s, i).year : (r = P(e, s, i), function (e, t, n, s, i) { e = $e(e, t, n, s, i), t = Ze(e.year, 0, e.dayOfYear); return this.year(t.getUTCFullYear()), this.month(t.getUTCMonth()), this.date(t.getUTCDate()), this }.call(this, e, t = r < t ? r : t, n, s, i)) } s("N", 0, 0, "eraAbbr"), s("NN", 0, 0, "eraAbbr"), s("NNN", 0, 0, "eraAbbr"), s("NNNN", 0, 0, "eraName"), s("NNNNN", 0, 0, "eraNarrow"), s("y", ["y", 1], "yo", "eraYear"), s("y", ["yy", 2], 0, "eraYear"), s("y", ["yyy", 3], 0, "eraYear"), s("y", ["yyyy", 4], 0, "eraYear"), v("N", rn), v("NN", rn), v("NNN", rn), v("NNNN", function (e, t) { return t.erasNameRegex(e) }), v("NNNNN", function (e, t) { return t.erasNarrowRegex(e) }), D(["N", "NN", "NNN", "NNNN", "NNNNN"], function (e, t, n, s) { s = n._locale.erasParse(e, s, n._strict); s ? m(n).era = s : m(n).invalidEra = e }), v("y", Me), v("yy", Me), v("yyy", Me), v("yyyy", Me), v("yo", function (e, t) { return t._eraYearOrdinalRegex || Me }), D(["y", "yy", "yyy", "yyyy"], Y), D(["yo"], function (e, t, n, s) { var i; n._locale._eraYearOrdinalRegex && (i = e.match(n._locale._eraYearOrdinalRegex)), n._locale.eraYearOrdinalParse ? t[Y] = n._locale.eraYearOrdinalParse(e, i) : t[Y] = parseInt(e, 10) }), s(0, ["gg", 2], 0, function () { return this.weekYear() % 100 }), s(0, ["GG", 2], 0, function () { return this.isoWeekYear() % 100 }), on("gggg", "weekYear"), on("ggggg", "weekYear"), on("GGGG", "isoWeekYear"), on("GGGGG", "isoWeekYear"), t("weekYear", "gg"), t("isoWeekYear", "GG"), n("weekYear", 1), n("isoWeekYear", 1), v("G", De), v("g", De), v("GG", p, w), v("gg", p, w), v("GGGG", ke, _e), v("gggg", ke, _e), v("GGGGG", ve, ye), v("ggggg", ve, ye), Te(["gggg", "ggggg", "GGGG", "GGGGG"], function (e, t, n, s) { t[s.substr(0, 2)] = g(e) }), Te(["gg", "GG"], function (e, t, n, s) { t[s] = f.parseTwoDigitYear(e) }), s("Q", 0, "Qo", "quarter"), t("quarter", "Q"), n("quarter", 7), v("Q", i), D("Q", function (e, t) { t[O] = 3 * (g(e) - 1) }), s("D", ["DD", 2], "Do", "date"), t("date", "D"), n("date", 9), v("D", p), v("DD", p, w), v("Do", function (e, t) { return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient }), D(["D", "DD"], b), D("Do", function (e, t) { t[b] = g(e.match(p)[0]) }); ke = de("Date", !0); s("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), t("dayOfYear", "DDD"), n("dayOfYear", 4), v("DDD", pe), v("DDDD", me), D(["DDD", "DDDD"], function (e, t, n) { n._dayOfYear = g(e) }), s("m", ["mm", 2], 0, "minute"), t("minute", "m"), n("minute", 14), v("m", p), v("mm", p, w), D(["m", "mm"], T); var ln, _e = de("Minutes", !1), ve = (s("s", ["ss", 2], 0, "second"), t("second", "s"), n("second", 15), v("s", p), v("ss", p, w), D(["s", "ss"], N), de("Seconds", !1)); for (s("S", 0, 0, function () { return ~~(this.millisecond() / 100) }), s(0, ["SS", 2], 0, function () { return ~~(this.millisecond() / 10) }), s(0, ["SSS", 3], 0, "millisecond"), s(0, ["SSSS", 4], 0, function () { return 10 * this.millisecond() }), s(0, ["SSSSS", 5], 0, function () { return 100 * this.millisecond() }), s(0, ["SSSSSS", 6], 0, function () { return 1e3 * this.millisecond() }), s(0, ["SSSSSSS", 7], 0, function () { return 1e4 * this.millisecond() }), s(0, ["SSSSSSSS", 8], 0, function () { return 1e5 * this.millisecond() }), s(0, ["SSSSSSSSS", 9], 0, function () { return 1e6 * this.millisecond() }), t("millisecond", "ms"), n("millisecond", 16), v("S", pe, i), v("SS", pe, w), v("SSS", pe, me), ln = "SSSS"; ln.length <= 9; ln += "S")v(ln, Me); function hn(e, t) { t[Ne] = g(1e3 * ("0." + e)) } for (ln = "S"; ln.length <= 9; ln += "S")D(ln, hn); ye = de("Milliseconds", !1), s("z", 0, 0, "zoneAbbr"), s("zz", 0, 0, "zoneName"); i = q.prototype; function dn(e) { return e } i.add = Ce, i.calendar = function (e, t) { 1 === arguments.length && (arguments[0] ? Jt(arguments[0]) ? (e = arguments[0], t = void 0) : function (e) { for (var t = F(e) && !L(e), n = !1, s = ["sameDay", "nextDay", "lastDay", "nextWeek", "lastWeek", "sameElse"], i = 0; i < s.length; i += 1)n = n || c(e, s[i]); return t && n }(arguments[0]) && (t = arguments[0], e = void 0) : t = e = void 0); var e = e || W(), n = Gt(e, this).startOf("day"), n = f.calendarFormat(this, n) || "sameElse", t = t && (d(t[n]) ? t[n].call(this, e) : t[n]); return this.format(t || this.localeData().calendar(n, this, W(e))) }, i.clone = function () { return new q(this) }, i.diff = function (e, t, n) { var s, i, r; if (!this.isValid()) return NaN; if (!(s = Gt(e, this)).isValid()) return NaN; switch (i = 6e4 * (s.utcOffset() - this.utcOffset()), t = _(t)) { case "year": r = Qt(this, s) / 12; break; case "month": r = Qt(this, s); break; case "quarter": r = Qt(this, s) / 3; break; case "second": r = (this - s) / 1e3; break; case "minute": r = (this - s) / 6e4; break; case "hour": r = (this - s) / 36e5; break; case "day": r = (this - s - i) / 864e5; break; case "week": r = (this - s - i) / 6048e5; break; default: r = this - s }return n ? r : y(r) }, i.endOf = function (e) { var t, n; if (void 0 === (e = _(e)) || "millisecond" === e || !this.isValid()) return this; switch (n = this._isUTC ? sn : nn, e) { case "year": t = n(this.year() + 1, 0, 1) - 1; break; case "quarter": t = n(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; break; case "month": t = n(this.year(), this.month() + 1, 1) - 1; break; case "week": t = n(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; break; case "isoWeek": t = n(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; break; case "day": case "date": t = n(this.year(), this.month(), this.date() + 1) - 1; break; case "hour": t = this._d.valueOf(), t += 36e5 - tn(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5) - 1; break; case "minute": t = this._d.valueOf(), t += 6e4 - tn(t, 6e4) - 1; break; case "second": t = this._d.valueOf(), t += 1e3 - tn(t, 1e3) - 1; break }return this._d.setTime(t), f.updateOffset(this, !0), this }, i.format = function (e) { return e = e || (this.isUtc() ? f.defaultFormatUtc : f.defaultFormat), e = re(this, e), this.localeData().postformat(e) }, i.from = function (e, t) { return this.isValid() && (h(e) && e.isValid() || W(e).isValid()) ? C({ to: this, from: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() }, i.fromNow = function (e) { return this.from(W(), e) }, i.to = function (e, t) { return this.isValid() && (h(e) && e.isValid() || W(e).isValid()) ? C({ from: this, to: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() }, i.toNow = function (e) { return this.to(W(), e) }, i.get = function (e) { return d(this[e = _(e)]) ? this[e]() : this }, i.invalidAt = function () { return m(this).overflow }, i.isAfter = function (e, t) { return e = h(e) ? e : W(e), !(!this.isValid() || !e.isValid()) && ("millisecond" === (t = _(t) || "millisecond") ? this.valueOf() > e.valueOf() : e.valueOf() < this.clone().startOf(t).valueOf()) }, i.isBefore = function (e, t) { return e = h(e) ? e : W(e), !(!this.isValid() || !e.isValid()) && ("millisecond" === (t = _(t) || "millisecond") ? this.valueOf() < e.valueOf() : this.clone().endOf(t).valueOf() < e.valueOf()) }, i.isBetween = function (e, t, n, s) { return e = h(e) ? e : W(e), t = h(t) ? t : W(t), !!(this.isValid() && e.isValid() && t.isValid()) && (("(" === (s = s || "()")[0] ? this.isAfter(e, n) : !this.isBefore(e, n)) && (")" === s[1] ? this.isBefore(t, n) : !this.isAfter(t, n))) }, i.isSame = function (e, t) { var e = h(e) ? e : W(e); return !(!this.isValid() || !e.isValid()) && ("millisecond" === (t = _(t) || "millisecond") ? this.valueOf() === e.valueOf() : (e = e.valueOf(), this.clone().startOf(t).valueOf() <= e && e <= this.clone().endOf(t).valueOf())) }, i.isSameOrAfter = function (e, t) { return this.isSame(e, t) || this.isAfter(e, t) }, i.isSameOrBefore = function (e, t) { return this.isSame(e, t) || this.isBefore(e, t) }, i.isValid = function () { return A(this) }, i.lang = Xe, i.locale = Xt, i.localeData = Kt, i.max = we, i.min = ge, i.parsingFlags = function () { return E({}, m(this)) }, i.set = function (e, t) { if ("object" == typeof e) for (var n = function (e) { var t, n = []; for (t in e) c(e, t) && n.push({ unit: t, priority: le[t] }); return n.sort(function (e, t) { return e.priority - t.priority }), n }(e = ue(e)), s = n.length, i = 0; i < s; i++)this[n[i].unit](e[n[i].unit]); else if (d(this[e = _(e)])) return this[e](t); return this }, i.startOf = function (e) { var t, n; if (void 0 === (e = _(e)) || "millisecond" === e || !this.isValid()) return this; switch (n = this._isUTC ? sn : nn, e) { case "year": t = n(this.year(), 0, 1); break; case "quarter": t = n(this.year(), this.month() - this.month() % 3, 1); break; case "month": t = n(this.year(), this.month(), 1); break; case "week": t = n(this.year(), this.month(), this.date() - this.weekday()); break; case "isoWeek": t = n(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); break; case "day": case "date": t = n(this.year(), this.month(), this.date()); break; case "hour": t = this._d.valueOf(), t -= tn(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5); break; case "minute": t = this._d.valueOf(), t -= tn(t, 6e4); break; case "second": t = this._d.valueOf(), t -= tn(t, 1e3); break }return this._d.setTime(t), f.updateOffset(this, !0), this }, i.subtract = Je, i.toArray = function () { var e = this; return [e.year(), e.month(), e.date(), e.hour(), e.minute(), e.second(), e.millisecond()] }, i.toObject = function () { var e = this; return { years: e.year(), months: e.month(), date: e.date(), hours: e.hours(), minutes: e.minutes(), seconds: e.seconds(), milliseconds: e.milliseconds() } }, i.toDate = function () { return new Date(this.valueOf()) }, i.toISOString = function (e) { if (!this.isValid()) return null; var t = (e = !0 !== e) ? this.clone().utc() : this; return t.year() < 0 || 9999 < t.year() ? re(t, e ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ") : d(Date.prototype.toISOString) ? e ? this.toDate().toISOString() : new Date(this.valueOf() + 60 * this.utcOffset() * 1e3).toISOString().replace("Z", re(t, "Z")) : re(t, e ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ") }, i.inspect = function () { if (!this.isValid()) return "moment.invalid(/* " + this._i + " */)"; var e, t = "moment", n = ""; return this.isLocal() || (t = 0 === this.utcOffset() ? "moment.utc" : "moment.parseZone", n = "Z"), t = "[" + t + '("]', e = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", this.format(t + e + "-MM-DD[T]HH:mm:ss.SSS" + (n + '[")]')) }, "undefined" != typeof Symbol && null != Symbol.for && (i[Symbol.for("nodejs.util.inspect.custom")] = function () { return "Moment<" + this.format() + ">" }), i.toJSON = function () { return this.isValid() ? this.toISOString() : null }, i.toString = function () { return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ") }, i.unix = function () { return Math.floor(this.valueOf() / 1e3) }, i.valueOf = function () { return this._d.valueOf() - 6e4 * (this._offset || 0) }, i.creationData = function () { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict } }, i.eraName = function () { for (var e, t = this.localeData().eras(), n = 0, s = t.length; n < s; ++n) { if (e = this.clone().startOf("day").valueOf(), t[n].since <= e && e <= t[n].until) return t[n].name; if (t[n].until <= e && e <= t[n].since) return t[n].name } return "" }, i.eraNarrow = function () { for (var e, t = this.localeData().eras(), n = 0, s = t.length; n < s; ++n) { if (e = this.clone().startOf("day").valueOf(), t[n].since <= e && e <= t[n].until) return t[n].narrow; if (t[n].until <= e && e <= t[n].since) return t[n].narrow } return "" }, i.eraAbbr = function () { for (var e, t = this.localeData().eras(), n = 0, s = t.length; n < s; ++n) { if (e = this.clone().startOf("day").valueOf(), t[n].since <= e && e <= t[n].until) return t[n].abbr; if (t[n].until <= e && e <= t[n].since) return t[n].abbr } return "" }, i.eraYear = function () { for (var e, t, n = this.localeData().eras(), s = 0, i = n.length; s < i; ++s)if (e = n[s].since <= n[s].until ? 1 : -1, t = this.clone().startOf("day").valueOf(), n[s].since <= t && t <= n[s].until || n[s].until <= t && t <= n[s].since) return (this.year() - f(n[s].since).year()) * e + n[s].offset; return this.year() }, i.year = Ie, i.isLeapYear = function () { return he(this.year()) }, i.weekYear = function (e) { return un.call(this, e, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy) }, i.isoWeekYear = function (e) { return un.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4) }, i.quarter = i.quarters = function (e) { return null == e ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (e - 1) + this.month() % 3) }, i.month = Ge, i.daysInMonth = function () { return We(this.year(), this.month()) }, i.week = i.weeks = function (e) { var t = this.localeData().week(this); return null == e ? t : this.add(7 * (e - t), "d") }, i.isoWeek = i.isoWeeks = function (e) { var t = qe(this, 1, 4).week; return null == e ? t : this.add(7 * (e - t), "d") }, i.weeksInYear = function () { var e = this.localeData()._week; return P(this.year(), e.dow, e.doy) }, i.weeksInWeekYear = function () { var e = this.localeData()._week; return P(this.weekYear(), e.dow, e.doy) }, i.isoWeeksInYear = function () { return P(this.year(), 1, 4) }, i.isoWeeksInISOWeekYear = function () { return P(this.isoWeekYear(), 1, 4) }, i.date = ke, i.day = i.days = function (e) { if (!this.isValid()) return null != e ? this : NaN; var t, n, s = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); return null != e ? (t = e, n = this.localeData(), e = "string" != typeof t ? t : isNaN(t) ? "number" == typeof (t = n.weekdaysParse(t)) ? t : null : parseInt(t, 10), this.add(e - s, "d")) : s }, i.weekday = function (e) { if (!this.isValid()) return null != e ? this : NaN; var t = (this.day() + 7 - this.localeData()._week.dow) % 7; return null == e ? t : this.add(e - t, "d") }, i.isoWeekday = function (e) { return this.isValid() ? null != e ? (t = e, n = this.localeData(), n = "string" == typeof t ? n.weekdaysParse(t) % 7 || 7 : isNaN(t) ? null : t, this.day(this.day() % 7 ? n : n - 7)) : this.day() || 7 : null != e ? this : NaN; var t, n }, i.dayOfYear = function (e) { var t = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1; return null == e ? t : this.add(e - t, "d") }, i.hour = i.hours = k, i.minute = i.minutes = _e, i.second = i.seconds = ve, i.millisecond = i.milliseconds = ye, i.utcOffset = function (e, t, n) { var s, i = this._offset || 0; if (!this.isValid()) return null != e ? this : NaN; if (null == e) return this._isUTC ? i : Et(this); if ("string" == typeof e) { if (null === (e = Vt(Ye, e))) return this } else Math.abs(e) < 16 && !n && (e *= 60); return !this._isUTC && t && (s = Et(this)), this._offset = e, this._isUTC = !0, null != s && this.add(s, "m"), i !== e && (!t || this._changeInProgress ? qt(this, C(e - i, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, f.updateOffset(this, !0), this._changeInProgress = null)), this }, i.utc = function (e) { return this.utcOffset(0, e) }, i.local = function (e) { return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(Et(this), "m")), this }, i.parseZone = function () { var e; return null != this._tzm ? this.utcOffset(this._tzm, !1, !0) : "string" == typeof this._i && (null != (e = Vt(Se, this._i)) ? this.utcOffset(e) : this.utcOffset(0, !0)), this }, i.hasAlignedHourOffset = function (e) { return !!this.isValid() && (e = e ? W(e).utcOffset() : 0, (this.utcOffset() - e) % 60 == 0) }, i.isDST = function () { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() }, i.isLocal = function () { return !!this.isValid() && !this._isUTC }, i.isUtcOffset = function () { return !!this.isValid() && this._isUTC }, i.isUtc = At, i.isUTC = At, i.zoneAbbr = function () { return this._isUTC ? "UTC" : "" }, i.zoneName = function () { return this._isUTC ? "Coordinated Universal Time" : "" }, i.dates = e("dates accessor is deprecated. Use date instead.", ke), i.months = e("months accessor is deprecated. Use month instead", Ge), i.years = e("years accessor is deprecated. Use year instead", Ie), i.zone = e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", function (e, t) { return null != e ? (this.utcOffset(e = "string" != typeof e ? -e : e, t), this) : -this.utcOffset() }), i.isDSTShifted = e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", function () { if (!o(this._isDSTShifted)) return this._isDSTShifted; var e, t = {}; return $(t, this), (t = Nt(t))._a ? (e = (t._isUTC ? l : W)(t._a), this._isDSTShifted = this.isValid() && 0 < function (e, t, n) { for (var s = Math.min(e.length, t.length), i = Math.abs(e.length - t.length), r = 0, a = 0; a < s; a++)(n && e[a] !== t[a] || !n && g(e[a]) !== g(t[a])) && r++; return r + i }(t._a, e.toArray())) : this._isDSTShifted = !1, this._isDSTShifted }); w = K.prototype; function cn(e, t, n, s) { var i = mt(), s = l().set(s, t); return i[n](s, e) } function fn(e, t, n) { if (u(e) && (t = e, e = void 0), e = e || "", null != t) return cn(e, t, n, "month"); for (var s = [], i = 0; i < 12; i++)s[i] = cn(e, i, n, "month"); return s } function mn(e, t, n, s) { t = ("boolean" == typeof e ? u(t) && (n = t, t = void 0) : (t = e, e = !1, u(n = t) && (n = t, t = void 0)), t || ""); var i, r = mt(), a = e ? r._week.dow : 0, o = []; if (null != n) return cn(t, (n + a) % 7, s, "day"); for (i = 0; i < 7; i++)o[i] = cn(t, (i + a) % 7, s, "day"); return o } w.calendar = function (e, t, n) { return d(e = this._calendar[e] || this._calendar.sameElse) ? e.call(t, n) : e }, w.longDateFormat = function (e) { var t = this._longDateFormat[e], n = this._longDateFormat[e.toUpperCase()]; return t || !n ? t : (this._longDateFormat[e] = n.match(te).map(function (e) { return "MMMM" === e || "MM" === e || "DD" === e || "dddd" === e ? e.slice(1) : e }).join(""), this._longDateFormat[e]) }, w.invalidDate = function () { return this._invalidDate }, w.ordinal = function (e) { return this._ordinal.replace("%d", e) }, w.preparse = dn, w.postformat = dn, w.relativeTime = function (e, t, n, s) { var i = this._relativeTime[n]; return d(i) ? i(e, t, n, s) : i.replace(/%d/i, e) }, w.pastFuture = function (e, t) { return d(e = this._relativeTime[0 < e ? "future" : "past"]) ? e(t) : e.replace(/%s/i, t) }, w.set = function (e) { var t, n; for (n in e) c(e, n) && (d(t = e[n]) ? this[n] = t : this["_" + n] = t); this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source) }, w.eras = function (e, t) { for (var n, s = this._eras || mt("en")._eras, i = 0, r = s.length; i < r; ++i) { switch (typeof s[i].since) { case "string": n = f(s[i].since).startOf("day"), s[i].since = n.valueOf(); break }switch (typeof s[i].until) { case "undefined": s[i].until = 1 / 0; break; case "string": n = f(s[i].until).startOf("day").valueOf(), s[i].until = n.valueOf(); break } } return s }, w.erasParse = function (e, t, n) { var s, i, r, a, o, u = this.eras(); for (e = e.toUpperCase(), s = 0, i = u.length; s < i; ++s)if (r = u[s].name.toUpperCase(), a = u[s].abbr.toUpperCase(), o = u[s].narrow.toUpperCase(), n) switch (t) { case "N": case "NN": case "NNN": if (a === e) return u[s]; break; case "NNNN": if (r === e) return u[s]; break; case "NNNNN": if (o === e) return u[s]; break } else if (0 <= [r, a, o].indexOf(e)) return u[s] }, w.erasConvertYear = function (e, t) { var n = e.since <= e.until ? 1 : -1; return void 0 === t ? f(e.since).year() : f(e.since).year() + (t - e.offset) * n }, w.erasAbbrRegex = function (e) { return c(this, "_erasAbbrRegex") || an.call(this), e ? this._erasAbbrRegex : this._erasRegex }, w.erasNameRegex = function (e) { return c(this, "_erasNameRegex") || an.call(this), e ? this._erasNameRegex : this._erasRegex }, w.erasNarrowRegex = function (e) { return c(this, "_erasNarrowRegex") || an.call(this), e ? this._erasNarrowRegex : this._erasRegex }, w.months = function (e, t) { return e ? (a(this._months) ? this._months : this._months[(this._months.isFormat || He).test(t) ? "format" : "standalone"])[e.month()] : a(this._months) ? this._months : this._months.standalone }, w.monthsShort = function (e, t) { return e ? (a(this._monthsShort) ? this._monthsShort : this._monthsShort[He.test(t) ? "format" : "standalone"])[e.month()] : a(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone }, w.monthsParse = function (e, t, n) { var s, i; if (this._monthsParseExact) return function (e, t, n) { var s, i, r, e = e.toLocaleLowerCase(); if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], s = 0; s < 12; ++s)r = l([2e3, s]), this._shortMonthsParse[s] = this.monthsShort(r, "").toLocaleLowerCase(), this._longMonthsParse[s] = this.months(r, "").toLocaleLowerCase(); return n ? "MMM" === t ? -1 !== (i = S.call(this._shortMonthsParse, e)) ? i : null : -1 !== (i = S.call(this._longMonthsParse, e)) ? i : null : "MMM" === t ? -1 !== (i = S.call(this._shortMonthsParse, e)) || -1 !== (i = S.call(this._longMonthsParse, e)) ? i : null : -1 !== (i = S.call(this._longMonthsParse, e)) || -1 !== (i = S.call(this._shortMonthsParse, e)) ? i : null }.call(this, e, t, n); for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), s = 0; s < 12; s++) { if (i = l([2e3, s]), n && !this._longMonthsParse[s] && (this._longMonthsParse[s] = new RegExp("^" + this.months(i, "").replace(".", "") + "$", "i"), this._shortMonthsParse[s] = new RegExp("^" + this.monthsShort(i, "").replace(".", "") + "$", "i")), n || this._monthsParse[s] || (i = "^" + this.months(i, "") + "|^" + this.monthsShort(i, ""), this._monthsParse[s] = new RegExp(i.replace(".", ""), "i")), n && "MMMM" === t && this._longMonthsParse[s].test(e)) return s; if (n && "MMM" === t && this._shortMonthsParse[s].test(e)) return s; if (!n && this._monthsParse[s].test(e)) return s } }, w.monthsRegex = function (e) { return this._monthsParseExact ? (c(this, "_monthsRegex") || Ee.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (c(this, "_monthsRegex") || (this._monthsRegex = Le), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex) }, w.monthsShortRegex = function (e) { return this._monthsParseExact ? (c(this, "_monthsRegex") || Ee.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (c(this, "_monthsShortRegex") || (this._monthsShortRegex = Fe), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex) }, w.week = function (e) { return qe(e, this._week.dow, this._week.doy).week }, w.firstDayOfYear = function () { return this._week.doy }, w.firstDayOfWeek = function () { return this._week.dow }, w.weekdays = function (e, t) { return t = a(this._weekdays) ? this._weekdays : this._weekdays[e && !0 !== e && this._weekdays.isFormat.test(t) ? "format" : "standalone"], !0 === e ? Be(t, this._week.dow) : e ? t[e.day()] : t }, w.weekdaysMin = function (e) { return !0 === e ? Be(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin }, w.weekdaysShort = function (e) { return !0 === e ? Be(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort }, w.weekdaysParse = function (e, t, n) { var s, i; if (this._weekdaysParseExact) return function (e, t, n) { var s, i, r, e = e.toLocaleLowerCase(); if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], s = 0; s < 7; ++s)r = l([2e3, 1]).day(s), this._minWeekdaysParse[s] = this.weekdaysMin(r, "").toLocaleLowerCase(), this._shortWeekdaysParse[s] = this.weekdaysShort(r, "").toLocaleLowerCase(), this._weekdaysParse[s] = this.weekdays(r, "").toLocaleLowerCase(); return n ? "dddd" === t ? -1 !== (i = S.call(this._weekdaysParse, e)) ? i : null : "ddd" === t ? -1 !== (i = S.call(this._shortWeekdaysParse, e)) ? i : null : -1 !== (i = S.call(this._minWeekdaysParse, e)) ? i : null : "dddd" === t ? -1 !== (i = S.call(this._weekdaysParse, e)) || -1 !== (i = S.call(this._shortWeekdaysParse, e)) || -1 !== (i = S.call(this._minWeekdaysParse, e)) ? i : null : "ddd" === t ? -1 !== (i = S.call(this._shortWeekdaysParse, e)) || -1 !== (i = S.call(this._weekdaysParse, e)) || -1 !== (i = S.call(this._minWeekdaysParse, e)) ? i : null : -1 !== (i = S.call(this._minWeekdaysParse, e)) || -1 !== (i = S.call(this._weekdaysParse, e)) || -1 !== (i = S.call(this._shortWeekdaysParse, e)) ? i : null }.call(this, e, t, n); for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), s = 0; s < 7; s++) { if (i = l([2e3, 1]).day(s), n && !this._fullWeekdaysParse[s] && (this._fullWeekdaysParse[s] = new RegExp("^" + this.weekdays(i, "").replace(".", "\\.?") + "$", "i"), this._shortWeekdaysParse[s] = new RegExp("^" + this.weekdaysShort(i, "").replace(".", "\\.?") + "$", "i"), this._minWeekdaysParse[s] = new RegExp("^" + this.weekdaysMin(i, "").replace(".", "\\.?") + "$", "i")), this._weekdaysParse[s] || (i = "^" + this.weekdays(i, "") + "|^" + this.weekdaysShort(i, "") + "|^" + this.weekdaysMin(i, ""), this._weekdaysParse[s] = new RegExp(i.replace(".", ""), "i")), n && "dddd" === t && this._fullWeekdaysParse[s].test(e)) return s; if (n && "ddd" === t && this._shortWeekdaysParse[s].test(e)) return s; if (n && "dd" === t && this._minWeekdaysParse[s].test(e)) return s; if (!n && this._weekdaysParse[s].test(e)) return s } }, w.weekdaysRegex = function (e) { return this._weekdaysParseExact ? (c(this, "_weekdaysRegex") || nt.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (c(this, "_weekdaysRegex") || (this._weekdaysRegex = Ke), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex) }, w.weekdaysShortRegex = function (e) { return this._weekdaysParseExact ? (c(this, "_weekdaysRegex") || nt.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (c(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = et), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) }, w.weekdaysMinRegex = function (e) { return this._weekdaysParseExact ? (c(this, "_weekdaysRegex") || nt.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (c(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = tt), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) }, w.isPM = function (e) { return "p" === (e + "").toLowerCase().charAt(0) }, w.meridiem = function (e, t, n) { return 11 < e ? n ? "pm" : "PM" : n ? "am" : "AM" }, ct("en", { eras: [{ since: "0001-01-01", until: 1 / 0, offset: 1, name: "Anno Domini", narrow: "AD", abbr: "AD" }, { since: "0000-12-31", until: -1 / 0, offset: 1, name: "Before Christ", narrow: "BC", abbr: "BC" }], dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function (e) { var t = e % 10; return e + (1 === g(e % 100 / 10) ? "th" : 1 == t ? "st" : 2 == t ? "nd" : 3 == t ? "rd" : "th") } }), f.lang = e("moment.lang is deprecated. Use moment.locale instead.", ct), f.langData = e("moment.langData is deprecated. Use moment.localeData instead.", mt); var _n = Math.abs; function yn(e, t, n, s) { t = C(t, n); return e._milliseconds += s * t._milliseconds, e._days += s * t._days, e._months += s * t._months, e._bubble() } function gn(e) { return e < 0 ? Math.floor(e) : Math.ceil(e) } function wn(e) { return 4800 * e / 146097 } function pn(e) { return 146097 * e / 4800 } function kn(e) { return function () { return this.as(e) } } pe = kn("ms"), me = kn("s"), Ce = kn("m"), we = kn("h"), ge = kn("d"), Je = kn("w"), k = kn("M"), _e = kn("Q"), ve = kn("y"); function vn(e) { return function () { return this.isValid() ? this._data[e] : NaN } } var ye = vn("milliseconds"), ke = vn("seconds"), Ie = vn("minutes"), w = vn("hours"), Mn = vn("days"), Dn = vn("months"), Sn = vn("years"); var Yn = Math.round, On = { ss: 44, s: 45, m: 45, h: 22, d: 26, w: null, M: 11 }; function bn(e, t, n, s) { var i = C(e).abs(), r = Yn(i.as("s")), a = Yn(i.as("m")), o = Yn(i.as("h")), u = Yn(i.as("d")), l = Yn(i.as("M")), h = Yn(i.as("w")), i = Yn(i.as("y")), r = (r <= n.ss ? ["s", r] : r < n.s && ["ss", r]) || a <= 1 && ["m"] || a < n.m && ["mm", a] || o <= 1 && ["h"] || o < n.h && ["hh", o] || u <= 1 && ["d"] || u < n.d && ["dd", u]; return (r = (r = null != n.w ? r || h <= 1 && ["w"] || h < n.w && ["ww", h] : r) || l <= 1 && ["M"] || l < n.M && ["MM", l] || i <= 1 && ["y"] || ["yy", i])[2] = t, r[3] = 0 < +e, r[4] = s, function (e, t, n, s, i) { return i.relativeTime(t || 1, !!n, e, s) }.apply(null, r) } var xn = Math.abs; function Tn(e) { return (0 < e) - (e < 0) || +e } function Nn() { if (!this.isValid()) return this.localeData().invalidDate(); var e, t, n, s, i, r, a, o = xn(this._milliseconds) / 1e3, u = xn(this._days), l = xn(this._months), h = this.asSeconds(); return h ? (e = y(o / 60), t = y(e / 60), o %= 60, e %= 60, n = y(l / 12), l %= 12, s = o ? o.toFixed(3).replace(/\.?0+$/, "") : "", i = Tn(this._months) !== Tn(h) ? "-" : "", r = Tn(this._days) !== Tn(h) ? "-" : "", a = Tn(this._milliseconds) !== Tn(h) ? "-" : "", (h < 0 ? "-" : "") + "P" + (n ? i + n + "Y" : "") + (l ? i + l + "M" : "") + (u ? r + u + "D" : "") + (t || e || o ? "T" : "") + (t ? a + t + "H" : "") + (e ? a + e + "M" : "") + (o ? a + s + "S" : "")) : "P0D" } var U = Ct.prototype; return U.isValid = function () { return this._isValid }, U.abs = function () { var e = this._data; return this._milliseconds = _n(this._milliseconds), this._days = _n(this._days), this._months = _n(this._months), e.milliseconds = _n(e.milliseconds), e.seconds = _n(e.seconds), e.minutes = _n(e.minutes), e.hours = _n(e.hours), e.months = _n(e.months), e.years = _n(e.years), this }, U.add = function (e, t) { return yn(this, e, t, 1) }, U.subtract = function (e, t) { return yn(this, e, t, -1) }, U.as = function (e) { if (!this.isValid()) return NaN; var t, n, s = this._milliseconds; if ("month" === (e = _(e)) || "quarter" === e || "year" === e) switch (t = this._days + s / 864e5, n = this._months + wn(t), e) { case "month": return n; case "quarter": return n / 3; case "year": return n / 12 } else switch (t = this._days + Math.round(pn(this._months)), e) { case "week": return t / 7 + s / 6048e5; case "day": return t + s / 864e5; case "hour": return 24 * t + s / 36e5; case "minute": return 1440 * t + s / 6e4; case "second": return 86400 * t + s / 1e3; case "millisecond": return Math.floor(864e5 * t) + s; default: throw new Error("Unknown unit " + e) } }, U.asMilliseconds = pe, U.asSeconds = me, U.asMinutes = Ce, U.asHours = we, U.asDays = ge, U.asWeeks = Je, U.asMonths = k, U.asQuarters = _e, U.asYears = ve, U.valueOf = function () { return this.isValid() ? this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * g(this._months / 12) : NaN }, U._bubble = function () { var e = this._milliseconds, t = this._days, n = this._months, s = this._data; return 0 <= e && 0 <= t && 0 <= n || e <= 0 && t <= 0 && n <= 0 || (e += 864e5 * gn(pn(n) + t), n = t = 0), s.milliseconds = e % 1e3, e = y(e / 1e3), s.seconds = e % 60, e = y(e / 60), s.minutes = e % 60, e = y(e / 60), s.hours = e % 24, t += y(e / 24), n += e = y(wn(t)), t -= gn(pn(e)), e = y(n / 12), n %= 12, s.days = t, s.months = n, s.years = e, this }, U.clone = function () { return C(this) }, U.get = function (e) { return e = _(e), this.isValid() ? this[e + "s"]() : NaN }, U.milliseconds = ye, U.seconds = ke, U.minutes = Ie, U.hours = w, U.days = Mn, U.weeks = function () { return y(this.days() / 7) }, U.months = Dn, U.years = Sn, U.humanize = function (e, t) { if (!this.isValid()) return this.localeData().invalidDate(); var n = !1, s = On; return "object" == typeof e && (t = e, e = !1), "boolean" == typeof e && (n = e), "object" == typeof t && (s = Object.assign({}, On, t), null != t.s && null == t.ss && (s.ss = t.s - 1)), e = this.localeData(), t = bn(this, !n, s, e), n && (t = e.pastFuture(+this, t)), e.postformat(t) }, U.toISOString = Nn, U.toString = Nn, U.toJSON = Nn, U.locale = Xt, U.localeData = Kt, U.toIsoString = e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", Nn), U.lang = Xe, s("X", 0, 0, "unix"), s("x", 0, 0, "valueOf"), v("x", De), v("X", /[+-]?\d+(\.\d{1,3})?/), D("X", function (e, t, n) { n._d = new Date(1e3 * parseFloat(e)) }), D("x", function (e, t, n) { n._d = new Date(g(e)) }), f.version = "2.29.4", H = W, f.fn = i, f.min = function () { return Rt("isBefore", [].slice.call(arguments, 0)) }, f.max = function () { return Rt("isAfter", [].slice.call(arguments, 0)) }, f.now = function () { return Date.now ? Date.now() : +new Date }, f.utc = l, f.unix = function (e) { return W(1e3 * e) }, f.months = function (e, t) { return fn(e, t, "months") }, f.isDate = V, f.locale = ct, f.invalid = I, f.duration = C, f.isMoment = h, f.weekdays = function (e, t, n) { return mn(e, t, n, "weekdays") }, f.parseZone = function () { return W.apply(null, arguments).parseZone() }, f.localeData = mt, f.isDuration = Ut, f.monthsShort = function (e, t) { return fn(e, t, "monthsShort") }, f.weekdaysMin = function (e, t, n) { return mn(e, t, n, "weekdaysMin") }, f.defineLocale = ft, f.updateLocale = function (e, t) { var n, s; return null != t ? (s = ot, null != R[e] && null != R[e].parentLocale ? R[e].set(X(R[e]._config, t)) : (t = X(s = null != (n = dt(e)) ? n._config : s, t), null == n && (t.abbr = e), (s = new K(t)).parentLocale = R[e], R[e] = s), ct(e)) : null != R[e] && (null != R[e].parentLocale ? (R[e] = R[e].parentLocale, e === ct() && ct(e)) : null != R[e] && delete R[e]), R[e] }, f.locales = function () { return ee(R) }, f.weekdaysShort = function (e, t, n) { return mn(e, t, n, "weekdaysShort") }, f.normalizeUnits = _, f.relativeTimeRounding = function (e) { return void 0 === e ? Yn : "function" == typeof e && (Yn = e, !0) }, f.relativeTimeThreshold = function (e, t) { return void 0 !== On[e] && (void 0 === t ? On[e] : (On[e] = t, "s" === e && (On.ss = t - 1), !0)) }, f.calendarFormat = function (e, t) { return (e = e.diff(t, "days", !0)) < -6 ? "sameElse" : e < -1 ? "lastWeek" : e < 0 ? "lastDay" : e < 1 ? "sameDay" : e < 2 ? "nextDay" : e < 7 ? "nextWeek" : "sameElse" }, f.prototype = i, f.HTML5_FMT = { DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", DATE: "YYYY-MM-DD", TIME: "HH:mm", TIME_SECONDS: "HH:mm:ss", TIME_MS: "HH:mm:ss.SSS", WEEK: "GGGG-[W]WW", MONTH: "YYYY-MM" }, f });
//# sourceMappingURL=moment.min.js.map;
/*! version : 4.17.47
 =========================================================
 bootstrap-datetimejs
 https://github.com/Eonasdan/bootstrap-datetimepicker
 Copyright (c) 2015 Jonathan Peterson
 =========================================================
 */
/*
 The MIT License (MIT)

 Copyright (c) 2015 Jonathan Peterson (@Eonasdan)

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 */
/*global define:false */
/*global exports:false */
/*global require:false */
/*global jQuery:false */
/*global moment:false */
!function (a) { "use strict"; if ("function" == typeof define && define.amd) define(["jquery", "moment"], a); else if ("object" == typeof exports) module.exports = a(require("jquery"), require("moment")); else { if ("undefined" == typeof jQuery) throw "bootstrap-datetimepicker requires jQuery to be loaded first"; if ("undefined" == typeof moment) throw "bootstrap-datetimepicker requires Moment.js to be loaded first"; a(jQuery, moment) } }(function (a, b) {
    "use strict"; if (!b) throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first"); var c = function (c, d) {
        var e, f, g, h, i, j, k, l = {}, m = !0, n = !1, o = !1, p = 0, q = [{ clsName: "days", navFnc: "M", navStep: 1 }, { clsName: "months", navFnc: "y", navStep: 1 }, { clsName: "years", navFnc: "y", navStep: 10 }, { clsName: "decades", navFnc: "y", navStep: 100 }], r = ["days", "months", "years", "decades"], s = ["top", "bottom", "auto"], t = ["left", "right", "auto"], u = ["default", "top", "bottom"], v = { up: 38, 38: "up", down: 40, 40: "down", left: 37, 37: "left", right: 39, 39: "right", tab: 9, 9: "tab", escape: 27, 27: "escape", enter: 13, 13: "enter", pageUp: 33, 33: "pageUp", pageDown: 34, 34: "pageDown", shift: 16, 16: "shift", control: 17, 17: "control", space: 32, 32: "space", t: 84, 84: "t", delete: 46, 46: "delete" }, w = {}, x = function () { return void 0 !== b.tz && void 0 !== d.timeZone && null !== d.timeZone && "" !== d.timeZone }, y = function (a) { var c; return c = void 0 === a || null === a ? b() : b.isDate(a) || b.isMoment(a) ? b(a) : x() ? b.tz(a, j, d.useStrict, d.timeZone) : b(a, j, d.useStrict), x() && c.tz(d.timeZone), c }, z = function (a) { if ("string" != typeof a || a.length > 1) throw new TypeError("isEnabled expects a single character string parameter"); switch (a) { case "y": return i.indexOf("Y") !== -1; case "M": return i.indexOf("M") !== -1; case "d": return i.toLowerCase().indexOf("d") !== -1; case "h": case "H": return i.toLowerCase().indexOf("h") !== -1; case "m": return i.indexOf("m") !== -1; case "s": return i.indexOf("s") !== -1; default: return !1 } }, A = function () { return z("h") || z("m") || z("s") }, B = function () { return z("y") || z("M") || z("d") }, C = function () { var b = a("<thead>").append(a("<tr>").append(a("<th>").addClass("prev").attr("data-action", "previous").append(a("<span>").addClass(d.icons.previous))).append(a("<th>").addClass("picker-switch").attr("data-action", "pickerSwitch").attr("colspan", d.calendarWeeks ? "6" : "5")).append(a("<th>").addClass("next").attr("data-action", "next").append(a("<span>").addClass(d.icons.next)))), c = a("<tbody>").append(a("<tr>").append(a("<td>").attr("colspan", d.calendarWeeks ? "8" : "7"))); return [a("<div>").addClass("datepicker-days").append(a("<table>").addClass("table-condensed").append(b).append(a("<tbody>"))), a("<div>").addClass("datepicker-months").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())), a("<div>").addClass("datepicker-years").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())), a("<div>").addClass("datepicker-decades").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone()))] }, D = function () { var b = a("<tr>"), c = a("<tr>"), e = a("<tr>"); return z("h") && (b.append(a("<td>").append(a("<a>").attr({ href: "#", tabindex: "-1", title: d.tooltips.incrementHour }).addClass("btn").attr("data-action", "incrementHours").append(a("<span>").addClass(d.icons.up)))), c.append(a("<td>").append(a("<span>").addClass("timepicker-hour").attr({ "data-time-component": "hours", title: d.tooltips.pickHour }).attr("data-action", "showHours"))), e.append(a("<td>").append(a("<a>").attr({ href: "#", tabindex: "-1", title: d.tooltips.decrementHour }).addClass("btn").attr("data-action", "decrementHours").append(a("<span>").addClass(d.icons.down))))), z("m") && (z("h") && (b.append(a("<td>").addClass("separator")), c.append(a("<td>").addClass("separator").html(":")), e.append(a("<td>").addClass("separator"))), b.append(a("<td>").append(a("<a>").attr({ href: "#", tabindex: "-1", title: d.tooltips.incrementMinute }).addClass("btn").attr("data-action", "incrementMinutes").append(a("<span>").addClass(d.icons.up)))), c.append(a("<td>").append(a("<span>").addClass("timepicker-minute").attr({ "data-time-component": "minutes", title: d.tooltips.pickMinute }).attr("data-action", "showMinutes"))), e.append(a("<td>").append(a("<a>").attr({ href: "#", tabindex: "-1", title: d.tooltips.decrementMinute }).addClass("btn").attr("data-action", "decrementMinutes").append(a("<span>").addClass(d.icons.down))))), z("s") && (z("m") && (b.append(a("<td>").addClass("separator")), c.append(a("<td>").addClass("separator").html(":")), e.append(a("<td>").addClass("separator"))), b.append(a("<td>").append(a("<a>").attr({ href: "#", tabindex: "-1", title: d.tooltips.incrementSecond }).addClass("btn").attr("data-action", "incrementSeconds").append(a("<span>").addClass(d.icons.up)))), c.append(a("<td>").append(a("<span>").addClass("timepicker-second").attr({ "data-time-component": "seconds", title: d.tooltips.pickSecond }).attr("data-action", "showSeconds"))), e.append(a("<td>").append(a("<a>").attr({ href: "#", tabindex: "-1", title: d.tooltips.decrementSecond }).addClass("btn").attr("data-action", "decrementSeconds").append(a("<span>").addClass(d.icons.down))))), h || (b.append(a("<td>").addClass("separator")), c.append(a("<td>").append(a("<button>").addClass("btn btn-primary").attr({ "data-action": "togglePeriod", tabindex: "-1", title: d.tooltips.togglePeriod }))), e.append(a("<td>").addClass("separator"))), a("<div>").addClass("timepicker-picker").append(a("<table>").addClass("table-condensed").append([b, c, e])) }, E = function () { var b = a("<div>").addClass("timepicker-hours").append(a("<table>").addClass("table-condensed")), c = a("<div>").addClass("timepicker-minutes").append(a("<table>").addClass("table-condensed")), d = a("<div>").addClass("timepicker-seconds").append(a("<table>").addClass("table-condensed")), e = [D()]; return z("h") && e.push(b), z("m") && e.push(c), z("s") && e.push(d), e }, F = function () { var b = []; return d.showTodayButton && b.push(a("<td>").append(a("<a>").attr({ "data-action": "today", title: d.tooltips.today }).append(a("<span>").addClass(d.icons.today)))), !d.sideBySide && B() && A() && b.push(a("<td>").append(a("<a>").attr({ "data-action": "togglePicker", title: d.tooltips.selectTime }).append(a("<span>").addClass(d.icons.time)))), d.showClear && b.push(a("<td>").append(a("<a>").attr({ "data-action": "clear", title: d.tooltips.clear }).append(a("<span>").addClass(d.icons.clear)))), d.showClose && b.push(a("<td>").append(a("<a>").attr({ "data-action": "close", title: d.tooltips.close }).append(a("<span>").addClass(d.icons.close)))), a("<table>").addClass("table-condensed").append(a("<tbody>").append(a("<tr>").append(b))) }, G = function () { var b = a("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"), c = a("<div>").addClass("datepicker").append(C()), e = a("<div>").addClass("timepicker").append(E()), f = a("<ul>").addClass("list-unstyled"), g = a("<li>").addClass("picker-switch" + (d.collapse ? " accordion-toggle" : "")).append(F()); return d.inline && b.removeClass("dropdown-menu"), h && b.addClass("usetwentyfour"), z("s") && !h && b.addClass("wider"), d.sideBySide && B() && A() ? (b.addClass("timepicker-sbs"), "top" === d.toolbarPlacement && b.append(g), b.append(a("<div>").addClass("row").append(c.addClass("col-md-6")).append(e.addClass("col-md-6"))), "bottom" === d.toolbarPlacement && b.append(g), b) : ("top" === d.toolbarPlacement && f.append(g), B() && f.append(a("<li>").addClass(d.collapse && A() ? "collapse in" : "").append(c)), "default" === d.toolbarPlacement && f.append(g), A() && f.append(a("<li>").addClass(d.collapse && B() ? "collapse" : "").append(e)), "bottom" === d.toolbarPlacement && f.append(g), b.append(f)) }, H = function () { var b, e = {}; return b = c.is("input") || d.inline ? c.data() : c.find("input").data(), b.dateOptions && b.dateOptions instanceof Object && (e = a.extend(!0, e, b.dateOptions)), a.each(d, function (a) { var c = "date" + a.charAt(0).toUpperCase() + a.slice(1); void 0 !== b[c] && (e[a] = b[c]) }), e }, I = function () { var b, e = (n || c).position(), f = (n || c).offset(), g = d.widgetPositioning.vertical, h = d.widgetPositioning.horizontal; if (d.widgetParent) b = d.widgetParent.append(o); else if (c.is("input")) b = c.after(o).parent(); else { if (d.inline) return void (b = c.append(o)); b = c, c.children().first().after(o) } if ("auto" === g && (g = f.top + 1.5 * o.height() >= a(window).height() + a(window).scrollTop() && o.height() + c.outerHeight() < f.top ? "top" : "bottom"), "auto" === h && (h = b.width() < f.left + o.outerWidth() / 2 && f.left + o.outerWidth() > a(window).width() ? "right" : "left"), "top" === g ? o.addClass("top").removeClass("bottom") : o.addClass("bottom").removeClass("top"), "right" === h ? o.addClass("pull-right") : o.removeClass("pull-right"), "static" === b.css("position") && (b = b.parents().filter(function () { return "static" !== a(this).css("position") }).first()), 0 === b.length) throw new Error("datetimepicker component should be placed within a non-static positioned container"); o.css({ top: "top" === g ? "auto" : e.top + c.outerHeight(), bottom: "top" === g ? b.outerHeight() - (b === c ? 0 : e.top) : "auto", left: "left" === h ? b === c ? 0 : e.left : "auto", right: "left" === h ? "auto" : b.outerWidth() - c.outerWidth() - (b === c ? 0 : e.left) }) }, J = function (a) { "dp.change" === a.type && (a.date && a.date.isSame(a.oldDate) || !a.date && !a.oldDate) || c.trigger(a) }, K = function (a) { "y" === a && (a = "YYYY"), J({ type: "dp.update", change: a, viewDate: f.clone() }) }, L = function (a) { o && (a && (k = Math.max(p, Math.min(3, k + a))), o.find(".datepicker > div").hide().filter(".datepicker-" + q[k].clsName).show()) }, M = function () { var b = a("<tr>"), c = f.clone().startOf("w").startOf("d"); for (d.calendarWeeks === !0 && b.append(a("<th>").addClass("cw").text("#")); c.isBefore(f.clone().endOf("w"));)b.append(a("<th>").addClass("dow").text(c.format("dd"))), c.add(1, "d"); o.find(".datepicker-days thead").append(b) }, N = function (a) { return d.disabledDates[a.format("YYYY-MM-DD")] === !0 }, O = function (a) { return d.enabledDates[a.format("YYYY-MM-DD")] === !0 }, P = function (a) { return d.disabledHours[a.format("H")] === !0 }, Q = function (a) { return d.enabledHours[a.format("H")] === !0 }, R = function (b, c) { if (!b.isValid()) return !1; if (d.disabledDates && "d" === c && N(b)) return !1; if (d.enabledDates && "d" === c && !O(b)) return !1; if (d.minDate && b.isBefore(d.minDate, c)) return !1; if (d.maxDate && b.isAfter(d.maxDate, c)) return !1; if (d.daysOfWeekDisabled && "d" === c && d.daysOfWeekDisabled.indexOf(b.day()) !== -1) return !1; if (d.disabledHours && ("h" === c || "m" === c || "s" === c) && P(b)) return !1; if (d.enabledHours && ("h" === c || "m" === c || "s" === c) && !Q(b)) return !1; if (d.disabledTimeIntervals && ("h" === c || "m" === c || "s" === c)) { var e = !1; if (a.each(d.disabledTimeIntervals, function () { if (b.isBetween(this[0], this[1])) return e = !0, !1 }), e) return !1 } return !0 }, S = function () { for (var b = [], c = f.clone().startOf("y").startOf("d"); c.isSame(f, "y");)b.push(a("<span>").attr("data-action", "selectMonth").addClass("month").text(c.format("MMM"))), c.add(1, "M"); o.find(".datepicker-months td").empty().append(b) }, T = function () { var b = o.find(".datepicker-months"), c = b.find("th"), g = b.find("tbody").find("span"); c.eq(0).find("span").attr("title", d.tooltips.prevYear), c.eq(1).attr("title", d.tooltips.selectYear), c.eq(2).find("span").attr("title", d.tooltips.nextYear), b.find(".disabled").removeClass("disabled"), R(f.clone().subtract(1, "y"), "y") || c.eq(0).addClass("disabled"), c.eq(1).text(f.year()), R(f.clone().add(1, "y"), "y") || c.eq(2).addClass("disabled"), g.removeClass("active"), e.isSame(f, "y") && !m && g.eq(e.month()).addClass("active"), g.each(function (b) { R(f.clone().month(b), "M") || a(this).addClass("disabled") }) }, U = function () { var a = o.find(".datepicker-years"), b = a.find("th"), c = f.clone().subtract(5, "y"), g = f.clone().add(6, "y"), h = ""; for (b.eq(0).find("span").attr("title", d.tooltips.prevDecade), b.eq(1).attr("title", d.tooltips.selectDecade), b.eq(2).find("span").attr("title", d.tooltips.nextDecade), a.find(".disabled").removeClass("disabled"), d.minDate && d.minDate.isAfter(c, "y") && b.eq(0).addClass("disabled"), b.eq(1).text(c.year() + "-" + g.year()), d.maxDate && d.maxDate.isBefore(g, "y") && b.eq(2).addClass("disabled"); !c.isAfter(g, "y");)h += '<span data-action="selectYear" class="year' + (c.isSame(e, "y") && !m ? " active" : "") + (R(c, "y") ? "" : " disabled") + '">' + c.year() + "</span>", c.add(1, "y"); a.find("td").html(h) }, V = function () { var a, c = o.find(".datepicker-decades"), g = c.find("th"), h = b({ y: f.year() - f.year() % 100 - 1 }), i = h.clone().add(100, "y"), j = h.clone(), k = !1, l = !1, m = ""; for (g.eq(0).find("span").attr("title", d.tooltips.prevCentury), g.eq(2).find("span").attr("title", d.tooltips.nextCentury), c.find(".disabled").removeClass("disabled"), (h.isSame(b({ y: 1900 })) || d.minDate && d.minDate.isAfter(h, "y")) && g.eq(0).addClass("disabled"), g.eq(1).text(h.year() + "-" + i.year()), (h.isSame(b({ y: 2e3 })) || d.maxDate && d.maxDate.isBefore(i, "y")) && g.eq(2).addClass("disabled"); !h.isAfter(i, "y");)a = h.year() + 12, k = d.minDate && d.minDate.isAfter(h, "y") && d.minDate.year() <= a, l = d.maxDate && d.maxDate.isAfter(h, "y") && d.maxDate.year() <= a, m += '<span data-action="selectDecade" class="decade' + (e.isAfter(h) && e.year() <= a ? " active" : "") + (R(h, "y") || k || l ? "" : " disabled") + '" data-selection="' + (h.year() + 6) + '">' + (h.year() + 1) + " - " + (h.year() + 12) + "</span>", h.add(12, "y"); m += "<span></span><span></span><span></span>", c.find("td").html(m), g.eq(1).text(j.year() + 1 + "-" + h.year()) }, W = function () { var b, c, g, h = o.find(".datepicker-days"), i = h.find("th"), j = [], k = []; if (B()) { for (i.eq(0).find("span").attr("title", d.tooltips.prevMonth), i.eq(1).attr("title", d.tooltips.selectMonth), i.eq(2).find("span").attr("title", d.tooltips.nextMonth), h.find(".disabled").removeClass("disabled"), i.eq(1).text(f.format(d.dayViewHeaderFormat)), R(f.clone().subtract(1, "M"), "M") || i.eq(0).addClass("disabled"), R(f.clone().add(1, "M"), "M") || i.eq(2).addClass("disabled"), b = f.clone().startOf("M").startOf("w").startOf("d"), g = 0; g < 42; g++)0 === b.weekday() && (c = a("<tr>"), d.calendarWeeks && c.append('<td class="cw">' + b.week() + "</td>"), j.push(c)), k = ["day"], b.isBefore(f, "M") && k.push("old"), b.isAfter(f, "M") && k.push("new"), b.isSame(e, "d") && !m && k.push("active"), R(b, "d") || k.push("disabled"), b.isSame(y(), "d") && k.push("today"), 0 !== b.day() && 6 !== b.day() || k.push("weekend"), J({ type: "dp.classify", date: b, classNames: k }), c.append('<td data-action="selectDay" data-day="' + b.format("L") + '" class="' + k.join(" ") + '">' + b.date() + "</td>"), b.add(1, "d"); h.find("tbody").empty().append(j), T(), U(), V() } }, X = function () { var b = o.find(".timepicker-hours table"), c = f.clone().startOf("d"), d = [], e = a("<tr>"); for (f.hour() > 11 && !h && c.hour(12); c.isSame(f, "d") && (h || f.hour() < 12 && c.hour() < 12 || f.hour() > 11);)c.hour() % 4 === 0 && (e = a("<tr>"), d.push(e)), e.append('<td data-action="selectHour" class="hour' + (R(c, "h") ? "" : " disabled") + '">' + c.format(h ? "HH" : "hh") + "</td>"), c.add(1, "h"); b.empty().append(d) }, Y = function () { for (var b = o.find(".timepicker-minutes table"), c = f.clone().startOf("h"), e = [], g = a("<tr>"), h = 1 === d.stepping ? 5 : d.stepping; f.isSame(c, "h");)c.minute() % (4 * h) === 0 && (g = a("<tr>"), e.push(g)), g.append('<td data-action="selectMinute" class="minute' + (R(c, "m") ? "" : " disabled") + '">' + c.format("mm") + "</td>"), c.add(h, "m"); b.empty().append(e) }, Z = function () { for (var b = o.find(".timepicker-seconds table"), c = f.clone().startOf("m"), d = [], e = a("<tr>"); f.isSame(c, "m");)c.second() % 20 === 0 && (e = a("<tr>"), d.push(e)), e.append('<td data-action="selectSecond" class="second' + (R(c, "s") ? "" : " disabled") + '">' + c.format("ss") + "</td>"), c.add(5, "s"); b.empty().append(d) }, $ = function () { var a, b, c = o.find(".timepicker span[data-time-component]"); h || (a = o.find(".timepicker [data-action=togglePeriod]"), b = e.clone().add(e.hours() >= 12 ? -12 : 12, "h"), a.text(e.format("A")), R(b, "h") ? a.removeClass("disabled") : a.addClass("disabled")), c.filter("[data-time-component=hours]").text(e.format(h ? "HH" : "hh")), c.filter("[data-time-component=minutes]").text(e.format("mm")), c.filter("[data-time-component=seconds]").text(e.format("ss")), X(), Y(), Z() }, _ = function () { o && (W(), $()) }, aa = function (a) { var b = m ? null : e; if (!a) return m = !0, g.val(""), c.data("date", ""), J({ type: "dp.change", date: !1, oldDate: b }), void _(); if (a = a.clone().locale(d.locale), x() && a.tz(d.timeZone), 1 !== d.stepping) for (a.minutes(Math.round(a.minutes() / d.stepping) * d.stepping).seconds(0); d.minDate && a.isBefore(d.minDate);)a.add(d.stepping, "minutes"); R(a) ? (e = a, f = e.clone(), g.val(e.format(i)), c.data("date", e.format(i)), m = !1, _(), J({ type: "dp.change", date: e.clone(), oldDate: b })) : (d.keepInvalid ? J({ type: "dp.change", date: a, oldDate: b }) : g.val(m ? "" : e.format(i)), J({ type: "dp.error", date: a, oldDate: b })) }, ba = function () { var b = !1; return o ? (o.find(".collapse").each(function () { var c = a(this).data("collapse"); return !c || !c.transitioning || (b = !0, !1) }), b ? l : (n && n.hasClass("btn") && n.toggleClass("active"), o.hide(), a(window).off("resize", I), o.off("click", "[data-action]"), o.off("mousedown", !1), o.remove(), o = !1, J({ type: "dp.hide", date: e.clone() }), g.blur(), f = e.clone(), l)) : l }, ca = function () { aa(null) }, da = function (a) { return void 0 === d.parseInputDate ? (!b.isMoment(a) || a instanceof Date) && (a = y(a)) : a = d.parseInputDate(a), a }, ea = { next: function () { var a = q[k].navFnc; f.add(q[k].navStep, a), W(), K(a) }, previous: function () { var a = q[k].navFnc; f.subtract(q[k].navStep, a), W(), K(a) }, pickerSwitch: function () { L(1) }, selectMonth: function (b) { var c = a(b.target).closest("tbody").find("span").index(a(b.target)); f.month(c), k === p ? (aa(e.clone().year(f.year()).month(f.month())), d.inline || ba()) : (L(-1), W()), K("M") }, selectYear: function (b) { var c = parseInt(a(b.target).text(), 10) || 0; f.year(c), k === p ? (aa(e.clone().year(f.year())), d.inline || ba()) : (L(-1), W()), K("YYYY") }, selectDecade: function (b) { var c = parseInt(a(b.target).data("selection"), 10) || 0; f.year(c), k === p ? (aa(e.clone().year(f.year())), d.inline || ba()) : (L(-1), W()), K("YYYY") }, selectDay: function (b) { var c = f.clone(); a(b.target).is(".old") && c.subtract(1, "M"), a(b.target).is(".new") && c.add(1, "M"), aa(c.date(parseInt(a(b.target).text(), 10))), A() || d.keepOpen || d.inline || ba() }, incrementHours: function () { var a = e.clone().add(1, "h"); R(a, "h") && aa(a) }, incrementMinutes: function () { var a = e.clone().add(d.stepping, "m"); R(a, "m") && aa(a) }, incrementSeconds: function () { var a = e.clone().add(1, "s"); R(a, "s") && aa(a) }, decrementHours: function () { var a = e.clone().subtract(1, "h"); R(a, "h") && aa(a) }, decrementMinutes: function () { var a = e.clone().subtract(d.stepping, "m"); R(a, "m") && aa(a) }, decrementSeconds: function () { var a = e.clone().subtract(1, "s"); R(a, "s") && aa(a) }, togglePeriod: function () { aa(e.clone().add(e.hours() >= 12 ? -12 : 12, "h")) }, togglePicker: function (b) { var c, e = a(b.target), f = e.closest("ul"), g = f.find(".in"), h = f.find(".collapse:not(.in)"); if (g && g.length) { if (c = g.data("collapse"), c && c.transitioning) return; g.collapse ? (g.collapse("hide"), h.collapse("show")) : (g.removeClass("in"), h.addClass("in")), e.is("span") ? e.toggleClass(d.icons.time + " " + d.icons.date) : e.find("span").toggleClass(d.icons.time + " " + d.icons.date) } }, showPicker: function () { o.find(".timepicker > div:not(.timepicker-picker)").hide(), o.find(".timepicker .timepicker-picker").show() }, showHours: function () { o.find(".timepicker .timepicker-picker").hide(), o.find(".timepicker .timepicker-hours").show() }, showMinutes: function () { o.find(".timepicker .timepicker-picker").hide(), o.find(".timepicker .timepicker-minutes").show() }, showSeconds: function () { o.find(".timepicker .timepicker-picker").hide(), o.find(".timepicker .timepicker-seconds").show() }, selectHour: function (b) { var c = parseInt(a(b.target).text(), 10); h || (e.hours() >= 12 ? 12 !== c && (c += 12) : 12 === c && (c = 0)), aa(e.clone().hours(c)), ea.showPicker.call(l) }, selectMinute: function (b) { aa(e.clone().minutes(parseInt(a(b.target).text(), 10))), ea.showPicker.call(l) }, selectSecond: function (b) { aa(e.clone().seconds(parseInt(a(b.target).text(), 10))), ea.showPicker.call(l) }, clear: ca, today: function () { var a = y(); R(a, "d") && aa(a) }, close: ba }, fa = function (b) { return !a(b.currentTarget).is(".disabled") && (ea[a(b.currentTarget).data("action")].apply(l, arguments), !1) }, ga = function () { var b, c = { year: function (a) { return a.month(0).date(1).hours(0).seconds(0).minutes(0) }, month: function (a) { return a.date(1).hours(0).seconds(0).minutes(0) }, day: function (a) { return a.hours(0).seconds(0).minutes(0) }, hour: function (a) { return a.seconds(0).minutes(0) }, minute: function (a) { return a.seconds(0) } }; return g.prop("disabled") || !d.ignoreReadonly && g.prop("readonly") || o ? l : (void 0 !== g.val() && 0 !== g.val().trim().length ? aa(da(g.val().trim())) : m && d.useCurrent && (d.inline || g.is("input") && 0 === g.val().trim().length) && (b = y(), "string" == typeof d.useCurrent && (b = c[d.useCurrent](b)), aa(b)), o = G(), M(), S(), o.find(".timepicker-hours").hide(), o.find(".timepicker-minutes").hide(), o.find(".timepicker-seconds").hide(), _(), L(), a(window).on("resize", I), o.on("click", "[data-action]", fa), o.on("mousedown", !1), n && n.hasClass("btn") && n.toggleClass("active"), I(), o.show(), d.focusOnShow && !g.is(":focus") && g.focus(), J({ type: "dp.show" }), l) }, ha = function () { return o ? ba() : ga() }, ia = function (a) { var b, c, e, f, g = null, h = [], i = {}, j = a.which, k = "p"; w[j] = k; for (b in w) w.hasOwnProperty(b) && w[b] === k && (h.push(b), parseInt(b, 10) !== j && (i[b] = !0)); for (b in d.keyBinds) if (d.keyBinds.hasOwnProperty(b) && "function" == typeof d.keyBinds[b] && (e = b.split(" "), e.length === h.length && v[j] === e[e.length - 1])) { for (f = !0, c = e.length - 2; c >= 0; c--)if (!(v[e[c]] in i)) { f = !1; break } if (f) { g = d.keyBinds[b]; break } } g && (g.call(l, o), a.stopPropagation(), a.preventDefault()) }, ja = function (a) { w[a.which] = "r", a.stopPropagation(), a.preventDefault() }, ka = function (b) { var c = a(b.target).val().trim(), d = c ? da(c) : null; return aa(d), b.stopImmediatePropagation(), !1 }, la = function () { g.on({ change: ka, blur: d.debug ? "" : ba, keydown: ia, keyup: ja, focus: d.allowInputToggle ? ga : "" }), c.is("input") ? g.on({ focus: ga }) : n && (n.on("click", ha), n.on("mousedown", !1)) }, ma = function () { g.off({ change: ka, blur: blur, keydown: ia, keyup: ja, focus: d.allowInputToggle ? ba : "" }), c.is("input") ? g.off({ focus: ga }) : n && (n.off("click", ha), n.off("mousedown", !1)) }, na = function (b) { var c = {}; return a.each(b, function () { var a = da(this); a.isValid() && (c[a.format("YYYY-MM-DD")] = !0) }), !!Object.keys(c).length && c }, oa = function (b) { var c = {}; return a.each(b, function () { c[this] = !0 }), !!Object.keys(c).length && c }, pa = function () { var a = d.format || "L LT"; i = a.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (a) { var b = e.localeData().longDateFormat(a) || a; return b.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (a) { return e.localeData().longDateFormat(a) || a }) }), j = d.extraFormats ? d.extraFormats.slice() : [], j.indexOf(a) < 0 && j.indexOf(i) < 0 && j.push(i), h = i.toLowerCase().indexOf("a") < 1 && i.replace(/\[.*?\]/g, "").indexOf("h") < 1, z("y") && (p = 2), z("M") && (p = 1), z("d") && (p = 0), k = Math.max(p, k), m || aa(e) }; if (l.destroy = function () { ba(), ma(), c.removeData("DateTimePicker"), c.removeData("date") }, l.toggle = ha, l.show = ga, l.hide = ba, l.disable = function () { return ba(), n && n.hasClass("btn") && n.addClass("disabled"), g.prop("disabled", !0), l }, l.enable = function () { return n && n.hasClass("btn") && n.removeClass("disabled"), g.prop("disabled", !1), l }, l.ignoreReadonly = function (a) { if (0 === arguments.length) return d.ignoreReadonly; if ("boolean" != typeof a) throw new TypeError("ignoreReadonly () expects a boolean parameter"); return d.ignoreReadonly = a, l }, l.options = function (b) { if (0 === arguments.length) return a.extend(!0, {}, d); if (!(b instanceof Object)) throw new TypeError("options() options parameter should be an object"); return a.extend(!0, d, b), a.each(d, function (a, b) { if (void 0 === l[a]) throw new TypeError("option " + a + " is not recognized!"); l[a](b) }), l }, l.date = function (a) { if (0 === arguments.length) return m ? null : e.clone(); if (!(null === a || "string" == typeof a || b.isMoment(a) || a instanceof Date)) throw new TypeError("date() parameter must be one of [null, string, moment or Date]"); return aa(null === a ? null : da(a)), l }, l.format = function (a) { if (0 === arguments.length) return d.format; if ("string" != typeof a && ("boolean" != typeof a || a !== !1)) throw new TypeError("format() expects a string or boolean:false parameter " + a); return d.format = a, i && pa(), l }, l.timeZone = function (a) { if (0 === arguments.length) return d.timeZone; if ("string" != typeof a) throw new TypeError("newZone() expects a string parameter"); return d.timeZone = a, l }, l.dayViewHeaderFormat = function (a) { if (0 === arguments.length) return d.dayViewHeaderFormat; if ("string" != typeof a) throw new TypeError("dayViewHeaderFormat() expects a string parameter"); return d.dayViewHeaderFormat = a, l }, l.extraFormats = function (a) { if (0 === arguments.length) return d.extraFormats; if (a !== !1 && !(a instanceof Array)) throw new TypeError("extraFormats() expects an array or false parameter"); return d.extraFormats = a, j && pa(), l }, l.disabledDates = function (b) { if (0 === arguments.length) return d.disabledDates ? a.extend({}, d.disabledDates) : d.disabledDates; if (!b) return d.disabledDates = !1, _(), l; if (!(b instanceof Array)) throw new TypeError("disabledDates() expects an array parameter"); return d.disabledDates = na(b), d.enabledDates = !1, _(), l }, l.enabledDates = function (b) { if (0 === arguments.length) return d.enabledDates ? a.extend({}, d.enabledDates) : d.enabledDates; if (!b) return d.enabledDates = !1, _(), l; if (!(b instanceof Array)) throw new TypeError("enabledDates() expects an array parameter"); return d.enabledDates = na(b), d.disabledDates = !1, _(), l }, l.daysOfWeekDisabled = function (a) { if (0 === arguments.length) return d.daysOfWeekDisabled.splice(0); if ("boolean" == typeof a && !a) return d.daysOfWeekDisabled = !1, _(), l; if (!(a instanceof Array)) throw new TypeError("daysOfWeekDisabled() expects an array parameter"); if (d.daysOfWeekDisabled = a.reduce(function (a, b) { return b = parseInt(b, 10), b > 6 || b < 0 || isNaN(b) ? a : (a.indexOf(b) === -1 && a.push(b), a) }, []).sort(), d.useCurrent && !d.keepInvalid) { for (var b = 0; !R(e, "d");) { if (e.add(1, "d"), 31 === b) throw "Tried 31 times to find a valid date"; b++ } aa(e) } return _(), l }, l.maxDate = function (a) { if (0 === arguments.length) return d.maxDate ? d.maxDate.clone() : d.maxDate; if ("boolean" == typeof a && a === !1) return d.maxDate = !1, _(), l; "string" == typeof a && ("now" !== a && "moment" !== a || (a = y())); var b = da(a); if (!b.isValid()) throw new TypeError("maxDate() Could not parse date parameter: " + a); if (d.minDate && b.isBefore(d.minDate)) throw new TypeError("maxDate() date parameter is before options.minDate: " + b.format(i)); return d.maxDate = b, d.useCurrent && !d.keepInvalid && e.isAfter(a) && aa(d.maxDate), f.isAfter(b) && (f = b.clone().subtract(d.stepping, "m")), _(), l }, l.minDate = function (a) { if (0 === arguments.length) return d.minDate ? d.minDate.clone() : d.minDate; if ("boolean" == typeof a && a === !1) return d.minDate = !1, _(), l; "string" == typeof a && ("now" !== a && "moment" !== a || (a = y())); var b = da(a); if (!b.isValid()) throw new TypeError("minDate() Could not parse date parameter: " + a); if (d.maxDate && b.isAfter(d.maxDate)) throw new TypeError("minDate() date parameter is after options.maxDate: " + b.format(i)); return d.minDate = b, d.useCurrent && !d.keepInvalid && e.isBefore(a) && aa(d.minDate), f.isBefore(b) && (f = b.clone().add(d.stepping, "m")), _(), l }, l.defaultDate = function (a) { if (0 === arguments.length) return d.defaultDate ? d.defaultDate.clone() : d.defaultDate; if (!a) return d.defaultDate = !1, l; "string" == typeof a && (a = "now" === a || "moment" === a ? y() : y(a)); var b = da(a); if (!b.isValid()) throw new TypeError("defaultDate() Could not parse date parameter: " + a); if (!R(b)) throw new TypeError("defaultDate() date passed is invalid according to component setup validations"); return d.defaultDate = b, (d.defaultDate && d.inline || "" === g.val().trim()) && aa(d.defaultDate), l }, l.locale = function (a) { if (0 === arguments.length) return d.locale; if (!b.localeData(a)) throw new TypeError("locale() locale " + a + " is not loaded from moment locales!"); return d.locale = a, e.locale(d.locale), f.locale(d.locale), i && pa(), o && (ba(), ga()), l }, l.stepping = function (a) { return 0 === arguments.length ? d.stepping : (a = parseInt(a, 10), (isNaN(a) || a < 1) && (a = 1), d.stepping = a, l) }, l.useCurrent = function (a) { var b = ["year", "month", "day", "hour", "minute"]; if (0 === arguments.length) return d.useCurrent; if ("boolean" != typeof a && "string" != typeof a) throw new TypeError("useCurrent() expects a boolean or string parameter"); if ("string" == typeof a && b.indexOf(a.toLowerCase()) === -1) throw new TypeError("useCurrent() expects a string parameter of " + b.join(", ")); return d.useCurrent = a, l }, l.collapse = function (a) { if (0 === arguments.length) return d.collapse; if ("boolean" != typeof a) throw new TypeError("collapse() expects a boolean parameter"); return d.collapse === a ? l : (d.collapse = a, o && (ba(), ga()), l) }, l.icons = function (b) { if (0 === arguments.length) return a.extend({}, d.icons); if (!(b instanceof Object)) throw new TypeError("icons() expects parameter to be an Object"); return a.extend(d.icons, b), o && (ba(), ga()), l }, l.tooltips = function (b) { if (0 === arguments.length) return a.extend({}, d.tooltips); if (!(b instanceof Object)) throw new TypeError("tooltips() expects parameter to be an Object"); return a.extend(d.tooltips, b), o && (ba(), ga()), l }, l.useStrict = function (a) { if (0 === arguments.length) return d.useStrict; if ("boolean" != typeof a) throw new TypeError("useStrict() expects a boolean parameter"); return d.useStrict = a, l }, l.sideBySide = function (a) { if (0 === arguments.length) return d.sideBySide; if ("boolean" != typeof a) throw new TypeError("sideBySide() expects a boolean parameter"); return d.sideBySide = a, o && (ba(), ga()), l }, l.viewMode = function (a) { if (0 === arguments.length) return d.viewMode; if ("string" != typeof a) throw new TypeError("viewMode() expects a string parameter"); if (r.indexOf(a) === -1) throw new TypeError("viewMode() parameter must be one of (" + r.join(", ") + ") value"); return d.viewMode = a, k = Math.max(r.indexOf(a), p), L(), l }, l.toolbarPlacement = function (a) { if (0 === arguments.length) return d.toolbarPlacement; if ("string" != typeof a) throw new TypeError("toolbarPlacement() expects a string parameter"); if (u.indexOf(a) === -1) throw new TypeError("toolbarPlacement() parameter must be one of (" + u.join(", ") + ") value"); return d.toolbarPlacement = a, o && (ba(), ga()), l }, l.widgetPositioning = function (b) { if (0 === arguments.length) return a.extend({}, d.widgetPositioning); if ("[object Object]" !== {}.toString.call(b)) throw new TypeError("widgetPositioning() expects an object variable"); if (b.horizontal) { if ("string" != typeof b.horizontal) throw new TypeError("widgetPositioning() horizontal variable must be a string"); if (b.horizontal = b.horizontal.toLowerCase(), t.indexOf(b.horizontal) === -1) throw new TypeError("widgetPositioning() expects horizontal parameter to be one of (" + t.join(", ") + ")"); d.widgetPositioning.horizontal = b.horizontal } if (b.vertical) { if ("string" != typeof b.vertical) throw new TypeError("widgetPositioning() vertical variable must be a string"); if (b.vertical = b.vertical.toLowerCase(), s.indexOf(b.vertical) === -1) throw new TypeError("widgetPositioning() expects vertical parameter to be one of (" + s.join(", ") + ")"); d.widgetPositioning.vertical = b.vertical } return _(), l }, l.calendarWeeks = function (a) { if (0 === arguments.length) return d.calendarWeeks; if ("boolean" != typeof a) throw new TypeError("calendarWeeks() expects parameter to be a boolean value"); return d.calendarWeeks = a, _(), l }, l.showTodayButton = function (a) { if (0 === arguments.length) return d.showTodayButton; if ("boolean" != typeof a) throw new TypeError("showTodayButton() expects a boolean parameter"); return d.showTodayButton = a, o && (ba(), ga()), l }, l.showClear = function (a) { if (0 === arguments.length) return d.showClear; if ("boolean" != typeof a) throw new TypeError("showClear() expects a boolean parameter"); return d.showClear = a, o && (ba(), ga()), l }, l.widgetParent = function (b) { if (0 === arguments.length) return d.widgetParent; if ("string" == typeof b && (b = a(b)), null !== b && "string" != typeof b && !(b instanceof a)) throw new TypeError("widgetParent() expects a string or a jQuery object parameter"); return d.widgetParent = b, o && (ba(), ga()), l }, l.keepOpen = function (a) { if (0 === arguments.length) return d.keepOpen; if ("boolean" != typeof a) throw new TypeError("keepOpen() expects a boolean parameter"); return d.keepOpen = a, l }, l.focusOnShow = function (a) { if (0 === arguments.length) return d.focusOnShow; if ("boolean" != typeof a) throw new TypeError("focusOnShow() expects a boolean parameter"); return d.focusOnShow = a, l }, l.inline = function (a) { if (0 === arguments.length) return d.inline; if ("boolean" != typeof a) throw new TypeError("inline() expects a boolean parameter"); return d.inline = a, l }, l.clear = function () { return ca(), l }, l.keyBinds = function (a) { return 0 === arguments.length ? d.keyBinds : (d.keyBinds = a, l) }, l.getMoment = function (a) { return y(a) }, l.debug = function (a) { if ("boolean" != typeof a) throw new TypeError("debug() expects a boolean parameter"); return d.debug = a, l }, l.allowInputToggle = function (a) { if (0 === arguments.length) return d.allowInputToggle; if ("boolean" != typeof a) throw new TypeError("allowInputToggle() expects a boolean parameter"); return d.allowInputToggle = a, l }, l.showClose = function (a) { if (0 === arguments.length) return d.showClose; if ("boolean" != typeof a) throw new TypeError("showClose() expects a boolean parameter"); return d.showClose = a, l }, l.keepInvalid = function (a) {
            if (0 === arguments.length) return d.keepInvalid; if ("boolean" != typeof a) throw new TypeError("keepInvalid() expects a boolean parameter");
            return d.keepInvalid = a, l
        }, l.datepickerInput = function (a) { if (0 === arguments.length) return d.datepickerInput; if ("string" != typeof a) throw new TypeError("datepickerInput() expects a string parameter"); return d.datepickerInput = a, l }, l.parseInputDate = function (a) { if (0 === arguments.length) return d.parseInputDate; if ("function" != typeof a) throw new TypeError("parseInputDate() sholud be as function"); return d.parseInputDate = a, l }, l.disabledTimeIntervals = function (b) { if (0 === arguments.length) return d.disabledTimeIntervals ? a.extend({}, d.disabledTimeIntervals) : d.disabledTimeIntervals; if (!b) return d.disabledTimeIntervals = !1, _(), l; if (!(b instanceof Array)) throw new TypeError("disabledTimeIntervals() expects an array parameter"); return d.disabledTimeIntervals = b, _(), l }, l.disabledHours = function (b) { if (0 === arguments.length) return d.disabledHours ? a.extend({}, d.disabledHours) : d.disabledHours; if (!b) return d.disabledHours = !1, _(), l; if (!(b instanceof Array)) throw new TypeError("disabledHours() expects an array parameter"); if (d.disabledHours = oa(b), d.enabledHours = !1, d.useCurrent && !d.keepInvalid) { for (var c = 0; !R(e, "h");) { if (e.add(1, "h"), 24 === c) throw "Tried 24 times to find a valid date"; c++ } aa(e) } return _(), l }, l.enabledHours = function (b) { if (0 === arguments.length) return d.enabledHours ? a.extend({}, d.enabledHours) : d.enabledHours; if (!b) return d.enabledHours = !1, _(), l; if (!(b instanceof Array)) throw new TypeError("enabledHours() expects an array parameter"); if (d.enabledHours = oa(b), d.disabledHours = !1, d.useCurrent && !d.keepInvalid) { for (var c = 0; !R(e, "h");) { if (e.add(1, "h"), 24 === c) throw "Tried 24 times to find a valid date"; c++ } aa(e) } return _(), l }, l.viewDate = function (a) { if (0 === arguments.length) return f.clone(); if (!a) return f = e.clone(), l; if (!("string" == typeof a || b.isMoment(a) || a instanceof Date)) throw new TypeError("viewDate() parameter must be one of [string, moment or Date]"); return f = da(a), K(), l }, c.is("input")) g = c; else if (g = c.find(d.datepickerInput), 0 === g.length) g = c.find("input"); else if (!g.is("input")) throw new Error('CSS class "' + d.datepickerInput + '" cannot be applied to non input element'); if (c.hasClass("input-group") && (n = 0 === c.find(".datepickerbutton").length ? c.find(".input-group-addon") : c.find(".datepickerbutton")), !d.inline && !g.is("input")) throw new Error("Could not initialize DateTimePicker without an input element"); return e = y(), f = e.clone(), a.extend(!0, d, H()), l.options(d), pa(), la(), g.prop("disabled") && l.disable(), g.is("input") && 0 !== g.val().trim().length ? aa(da(g.val().trim())) : d.defaultDate && void 0 === g.attr("placeholder") && aa(d.defaultDate), d.inline && ga(), l
    }; return a.fn.datetimepicker = function (b) { b = b || {}; var d, e = Array.prototype.slice.call(arguments, 1), f = !0, g = ["destroy", "hide", "show", "toggle"]; if ("object" == typeof b) return this.each(function () { var d, e = a(this); e.data("DateTimePicker") || (d = a.extend(!0, {}, a.fn.datetimepicker.defaults, b), e.data("DateTimePicker", c(e, d))) }); if ("string" == typeof b) return this.each(function () { var c = a(this), g = c.data("DateTimePicker"); if (!g) throw new Error('bootstrap-datetimepicker("' + b + '") method was called on an element that is not using DateTimePicker'); d = g[b].apply(g, e), f = d === g }), f || a.inArray(b, g) > -1 ? this : d; throw new TypeError("Invalid arguments for DateTimePicker: " + b) }, a.fn.datetimepicker.defaults = { timeZone: "", format: !1, dayViewHeaderFormat: "MMMM YYYY", extraFormats: !1, stepping: 1, minDate: !1, maxDate: !1, useCurrent: !0, collapse: !0, locale: b.locale(), defaultDate: !1, disabledDates: !1, enabledDates: !1, icons: { time: "glyphicon glyphicon-time", date: "glyphicon glyphicon-calendar", up: "glyphicon glyphicon-chevron-up", down: "glyphicon glyphicon-chevron-down", previous: "glyphicon glyphicon-chevron-left", next: "glyphicon glyphicon-chevron-right", today: "glyphicon glyphicon-screenshot", clear: "glyphicon glyphicon-trash", close: "glyphicon glyphicon-remove" }, tooltips: { today: "Go to today", clear: "Clear selection", close: "Close the picker", selectMonth: "Select Month", prevMonth: "Previous Month", nextMonth: "Next Month", selectYear: "Select Year", prevYear: "Previous Year", nextYear: "Next Year", selectDecade: "Select Decade", prevDecade: "Previous Decade", nextDecade: "Next Decade", prevCentury: "Previous Century", nextCentury: "Next Century", pickHour: "Pick Hour", incrementHour: "Increment Hour", decrementHour: "Decrement Hour", pickMinute: "Pick Minute", incrementMinute: "Increment Minute", decrementMinute: "Decrement Minute", pickSecond: "Pick Second", incrementSecond: "Increment Second", decrementSecond: "Decrement Second", togglePeriod: "Toggle Period", selectTime: "Select Time" }, useStrict: !1, sideBySide: !1, daysOfWeekDisabled: !1, calendarWeeks: !1, viewMode: "days", toolbarPlacement: "default", showTodayButton: !1, showClear: !1, showClose: !1, widgetPositioning: { horizontal: "auto", vertical: "auto" }, widgetParent: null, ignoreReadonly: !1, keepOpen: !1, focusOnShow: !0, inline: !1, keepInvalid: !1, datepickerInput: ".datepickerinput", keyBinds: { up: function (a) { if (a) { var b = this.date() || this.getMoment(); a.find(".datepicker").is(":visible") ? this.date(b.clone().subtract(7, "d")) : this.date(b.clone().add(this.stepping(), "m")) } }, down: function (a) { if (!a) return void this.show(); var b = this.date() || this.getMoment(); a.find(".datepicker").is(":visible") ? this.date(b.clone().add(7, "d")) : this.date(b.clone().subtract(this.stepping(), "m")) }, "control up": function (a) { if (a) { var b = this.date() || this.getMoment(); a.find(".datepicker").is(":visible") ? this.date(b.clone().subtract(1, "y")) : this.date(b.clone().add(1, "h")) } }, "control down": function (a) { if (a) { var b = this.date() || this.getMoment(); a.find(".datepicker").is(":visible") ? this.date(b.clone().add(1, "y")) : this.date(b.clone().subtract(1, "h")) } }, left: function (a) { if (a) { var b = this.date() || this.getMoment(); a.find(".datepicker").is(":visible") && this.date(b.clone().subtract(1, "d")) } }, right: function (a) { if (a) { var b = this.date() || this.getMoment(); a.find(".datepicker").is(":visible") && this.date(b.clone().add(1, "d")) } }, pageUp: function (a) { if (a) { var b = this.date() || this.getMoment(); a.find(".datepicker").is(":visible") && this.date(b.clone().subtract(1, "M")) } }, pageDown: function (a) { if (a) { var b = this.date() || this.getMoment(); a.find(".datepicker").is(":visible") && this.date(b.clone().add(1, "M")) } }, enter: function () { this.hide() }, escape: function () { this.hide() }, "control space": function (a) { a && a.find(".timepicker").is(":visible") && a.find('.btn[data-action="togglePeriod"]').click() }, t: function () { this.date(this.getMoment()) }, delete: function () { this.clear() } }, debug: !1, allowInputToggle: !1, disabledTimeIntervals: !1, disabledHours: !1, enabledHours: !1, viewDate: !1 }, a.fn.datetimepicker
});;
/**
 * Copyright (c)2005-2009 Matt Kruse (javascripttoolbox.com)
 * 
 * Dual licensed under the MIT and GPL licenses. 
 * This basically means you can use this code however you want for
 * free, but don't claim to have written it yourself!
 * Donations always accepted: http://www.JavascriptToolbox.com/donate/
 * 
 * Please do not link to the .js files on javascripttoolbox.com from
 * your site. Copy the files locally to your server instead.
 * 

        Field	Syntax	Parse	Format
        Year	yyyy	4 digits	4 digits
        Year	yy	2 digits	2 digits
        Year	y	2 or 4 digits	4 digits
        Month	MMM	Name or Abbreviation	Name
        Month	NNN	Abbreviation	Abbreviation
        Month	MM	2 digits (01-12)	2 digits (01-12)
        Month	M	1 or 2 digits (1-12)	1-2 digits (1-12)
        Day of Month	dd	2 digits (01-31)	2 digits (01-31)
        Day of Month	d	1 or 2 digits (1-31)	1-2 digits (1-31)
        Day of Week	EE	Full name (Sunday-Saturday)	Full name
        Day of Week	E	Abbreviation (Sun-Sat)	Abbreviation
        Hour	hh	2 digits (01-12)	2 digits (01-12)
        Hour	h	1 or 2 digits (1-12)	1-2 digits (1-12)
        Hour	HH	2 digits (00-23)	2 digits (00-23)
        Hour	H	1 or 2 digits (0-23)	1-2 digits (0-23)
        Hour	KK	2 digits (00-11)	2 digits (00-11)
        Hour	K	1 or 2 digits (0-11)	1-2 digits (0-11)
        Hour	kk	2 digits (01-24)	2 digits (01-24)
        Hour	k	1 or 2 digits (1-24)	1-2 digits (1-24)
        Minute	mm	2 digits (00-59)	2 digits (00-59)
        Minute	m	1 or 2 digits (0-59)	1-2 digits (0-59)
        Second	ss	2 digits (00-59)	2 digits (00-59)
        Second	s	1 or 2 digits (0-59)	1-2 digits (0-59)
        AM/PM	a	AM/am/PM/pm	AM/PM

*/




eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('8.$2m=1.2n;8.Q=u(x){e(x<0||x>9?"":"0")+x};8.1g=B R(\'2o\',\'2p\',\'2l\',\'2k\',\'1z\',\'2g\',\'2h\',\'2i\',\'2j\',\'2q\',\'2r\',\'2y\');8.14=B R(\'2z\',\'2A\',\'2x\',\'2w\',\'1z\',\'2s\',\'2t\',\'2u\',\'2v\',\'2f\',\'2b\',\'1R\');8.1d=B R(\'1W\',\'1Z\',\'1Y\',\'1V\',\'1U\',\'1S\',\'1T\');8.1f=B R(\'1X\',\'2e\',\'20\',\'2c\',\'2d\',\'2a\',\'27\');8.1s=1L;3(!8.C.1c){8.C.1c=u(){b S=7.1y();e(S<16?S+16:S)}}8.1q=u(r,t){3(1e(t)=="1a"||t==f||t==""){b 1D=B R(\'y-M-d\',\'G d, y\',\'G d,y\',\'y-G-d\',\'d-G-y\',\'G d\',\'G-d\',\'d-G\');b 1v=B R(\'M/d/y\',\'M-d-y\',\'M.d.y\',\'M/d\',\'M-d\');b 1t=B R(\'d/M/y\',\'d-M-y\',\'d.M.y\',\'d/M\',\'d-M\');b 1u=B R(1D,8.1s?1v:1t,8.1s?1t:1v);Z(b i=0;i<1u.g;i++){b l=1u[i];Z(b j=0;j<l.g;j++){b d=8.1q(r,l[j]);3(d!=f){e d}}}e f};7.1I=u(r){Z(b i=0;i<r.g;i++){3("26".2C(r.U(i))==-1){e 13}}e 1L};7.O=u(1E,i,1i,1C){Z(b x=1C;x>=1i;x--){b 5=1E.T(i,i+x);3(5.g<1i){e f}3(7.1I(5)){e 5}}e f};r=r+"";t=t+"";b o=0;b D=0;b c="";b 5="";b 2T="";b x,y;b A=B 8().1c();b v=1;b I=1;b p=0;b J=0;b L=0;b 10="";W(D<t.g){c=t.U(D);5="";W((t.U(D)==c)&&(D<t.g)){5+=t.U(D++)}3(5=="19"||5=="S"||5=="y"){3(5=="19"){x=4;y=4}3(5=="S"){x=2;y=2}3(5=="y"){x=2;y=4}A=7.O(r,o,x,y);3(A==f){e f}o+=A.g;3(A.g==2){3(A>2V){A=16+(A-0)}q{A=2R+(A-0)}}}q 3(5=="G"||5=="1P"){v=0;b Y=(5=="G"?(8.1g.2O(8.14)):8.14);Z(b i=0;i<Y.g;i++){b 1h=Y[i];3(r.T(o,o+1h.g).V()==1h.V()){v=(i%12)+1;o+=1h.g;1A}}3((v<1)||(v>12)){e f}}q 3(5=="1r"||5=="E"){b Y=(5=="1r"?8.1d:8.1f);Z(b i=0;i<Y.g;i++){b 18=Y[i];3(r.T(o,o+18.g).V()==18.V()){o+=18.g;1A}}}q 3(5=="1o"||5=="M"){v=7.O(r,o,5.g,2);3(v==f||(v<1)||(v>12)){e f}o+=v.g}q 3(5=="1m"||5=="d"){I=7.O(r,o,5.g,2);3(I==f||(I<1)||(I>2E)){e f}o+=I.g}q 3(5=="p"||5=="h"){p=7.O(r,o,5.g,2);3(p==f||(p<1)||(p>12)){e f}o+=p.g}q 3(5=="1k"||5=="H"){p=7.O(r,o,5.g,2);3(p==f||(p<0)||(p>23)){e f}o+=p.g}q 3(5=="1l"||5=="K"){p=7.O(r,o,5.g,2);3(p==f||(p<0)||(p>11)){e f}o+=p.g;p++}q 3(5=="1j"||5=="k"){p=7.O(r,o,5.g,2);3(p==f||(p<1)||(p>24)){e f}o+=p.g;p--}q 3(5=="J"||5=="m"){J=7.O(r,o,5.g,2);3(J==f||(J<0)||(J>1K)){e f}o+=J.g}q 3(5=="L"||5=="s"){L=7.O(r,o,5.g,2);3(L==f||(L<0)||(L>1K)){e f}o+=L.g}q 3(5=="a"){3(r.T(o,o+2).V()=="2J"){10="1w"}q 3(r.T(o,o+2).V()=="2N"){10="1x"}q{e f}o+=2}q{3(r.T(o,o+5.g)!=5){e f}q{o+=5.g}}}3(o!=r.g){e f}3(v==2){3(((A%4==0)&&(A%2M!=0))||(A%2L==0)){3(I>29){e f}}q{3(I>28){e f}}}3((v==4)||(v==6)||(v==9)||(v==11)){3(I>2K){e f}}3(p<12&&10=="1x"){p=p-0+12}q 3(p>11&&10=="1w"){p-=12}e B 8(A,v-1,I,p,J,L)};8.2I=u(r,t){e(8.1q(r,t)!=f)};8.C.2D=u(F){3(F==f){e 13}e(7.P()<F.P())};8.C.2F=u(F){3(F==f){e 13}e(7.P()>F.P())};8.C.2G=u(F){3(F==f){e 13}e(7.P()==F.P())};8.C.2W=u(F){3(F==f){e 13}b 1J=B 8(7.P()).1p();b 1F=B 8(F.P()).1p();e(1J.P()==1F.P())};8.C.t=u(t){t=t+"";b X="";b D=0;b c="";b 5="";b y=7.1y()+"";b M=7.1b()+1;b d=7.1Q();b E=7.15();b H=7.1N();b m=7.1G();b s=7.1H();b 19,S,G,1o,1m,p,h,J,L,10,1k,H,1l,K,1j,k;b n=B 2B();3(y.g<4){y=""+(+y+16)}n["y"]=""+y;n["19"]=y;n["S"]=y.T(2,4);n["M"]=M;n["1o"]=8.Q(M);n["G"]=8.1g[M-1];n["1P"]=8.14[M-1];n["d"]=d;n["1m"]=8.Q(d);n["E"]=8.1f[E];n["1r"]=8.1d[E];n["H"]=H;n["1k"]=8.Q(H);3(H==0){n["h"]=12}q 3(H>12){n["h"]=H-12}q{n["h"]=H}n["p"]=8.Q(n["h"]);n["K"]=n["h"]-1;n["k"]=n["H"]+1;n["1l"]=8.Q(n["K"]);n["1j"]=8.Q(n["k"]);3(H>11){n["a"]="1x"}q{n["a"]="1w"}n["m"]=m;n["J"]=8.Q(m);n["s"]=s;n["L"]=8.Q(s);W(D<t.g){c=t.U(D);5="";W((t.U(D)==c)&&(D<t.g)){5+=t.U(D++)}3(1e(n[5])!="1a"){X=X+n[5]}q{X=X+5}}e X};8.C.2P=u(){e 8.1d[7.15()]};8.C.2H=u(){e 8.1f[7.15()]};8.C.2U=u(){e 8.1g[7.1b()]};8.C.2Q=u(){e 8.14[7.1b()]};8.C.1p=u(){7.1O(0);7.1B(0);7.1M(0);7.2S(0);e 7};8.C.1n=u(N,z){3(1e(N)=="1a"||N==f||1e(z)=="1a"||z==f){e 7}z=+z;3(N==\'y\'){7.25(7.1c()+z)}q 3(N==\'M\'){7.22(7.1b()+z)}q 3(N==\'d\'){7.21(7.1Q()+z)}q 3(N==\'w\'){b 17=(z>0)?1:-1;W(z!=0){7.1n(\'d\',17);W(7.15()==0||7.15()==6){7.1n(\'d\',17)}z-=17}}q 3(N==\'h\'){7.1O(7.1N()+z)}q 3(N==\'m\'){7.1B(7.1G()+z)}q 3(N==\'s\'){7.1M(7.1H()+z)}e 7};',62,183,'|||if||token||this|Date|||var|||return|null|length|||||||value|i_val|hh|else|val||format|function|month||||number|year|new|prototype|i_format||date2|MMM||date|mm||ss||interval|getInt|getTime|LZ|Array|yy|substring|charAt|toLowerCase|while|result|names|for|ampm|||false|monthAbbreviations|getDay|1900|step|day_name|yyyy|undefined|getMonth|getFullYear|dayNames|typeof|dayAbbreviations|monthNames|month_name|minlength|kk|HH|KK|dd|add|MM|clearTime|parseString|EE|preferAmericanFormat|dateFirst|checkList|monthFirst|AM|PM|getYear|May|break|setMinutes|maxlength|generalFormats|str|d2|getMinutes|getSeconds|isInteger|d1|59|true|setSeconds|getHours|setHours|NNN|getDate|Dec|Friday|Saturday|Thursday|Wednesday|Sunday|Sun|Tuesday|Monday|Tue|setDate|setMonth|||setFullYear|1234567890|Sat|||Fri|Nov|Wed|Thu|Mon|Oct|June|July|August|September|April|March|VERSION|02|January|February|October|November|Jun|Jul|Aug|Sep|Apr|Mar|December|Jan|Feb|Object|indexOf|isBefore|31|isAfter|equals|getDayAbbreviation|isValid|am|30|400|100|pm|concat|getDayName|getMonthAbbreviation|2000|setMilliseconds|token2|getMonthName|70|equalsIgnoreTime'.split('|'),0,{}))
;
(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
        typeof define === 'function' && define.amd ? define('underscore', factory) :
            (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
                var current = global._;
                var exports = global._ = factory();
                exports.noConflict = function () { global._ = current; return exports; };
            }()));
}(this, (function () {
    //     Underscore.js 1.13.6
    //     https://underscorejs.org
    //     (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
    //     Underscore may be freely distributed under the MIT license.

    // Current version.
    var VERSION = '1.13.6';

    // Establish the root object, `window` (`self`) in the browser, `global`
    // on the server, or `this` in some virtual machines. We use `self`
    // instead of `window` for `WebWorker` support.
    var root = (typeof self == 'object' && self.self === self && self) ||
        (typeof global == 'object' && global.global === global && global) ||
        Function('return this')() ||
        {};

    // Save bytes in the minified (but not gzipped) version:
    var ArrayProto = Array.prototype, ObjProto = Object.prototype;
    var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;

    // Create quick reference variables for speed access to core prototypes.
    var push = ArrayProto.push,
        slice = ArrayProto.slice,
        toString = ObjProto.toString,
        hasOwnProperty = ObjProto.hasOwnProperty;

    // Modern feature detection.
    var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
        supportsDataView = typeof DataView !== 'undefined';

    // All **ECMAScript 5+** native function implementations that we hope to use
    // are declared here.
    var nativeIsArray = Array.isArray,
        nativeKeys = Object.keys,
        nativeCreate = Object.create,
        nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;

    // Create references to these builtin functions because we override them.
    var _isNaN = isNaN,
        _isFinite = isFinite;

    // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
    var hasEnumBug = !{ toString: null }.propertyIsEnumerable('toString');
    var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
        'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];

    // The largest integer that can be represented exactly.
    var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;

    // Some functions take a variable number of arguments, or a few expected
    // arguments at the beginning and then a variable number of values to operate
    // on. This helper accumulates all remaining arguments past the function�s
    // argument length (or an explicit `startIndex`), into an array that becomes
    // the last argument. Similar to ES6�s "rest parameter".
    function restArguments(func, startIndex) {
        startIndex = startIndex == null ? func.length - 1 : +startIndex;
        return function () {
            var length = Math.max(arguments.length - startIndex, 0),
                rest = Array(length),
                index = 0;
            for (; index < length; index++) {
                rest[index] = arguments[index + startIndex];
            }
            switch (startIndex) {
                case 0: return func.call(this, rest);
                case 1: return func.call(this, arguments[0], rest);
                case 2: return func.call(this, arguments[0], arguments[1], rest);
            }
            var args = Array(startIndex + 1);
            for (index = 0; index < startIndex; index++) {
                args[index] = arguments[index];
            }
            args[startIndex] = rest;
            return func.apply(this, args);
        };
    }

    // Is a given variable an object?
    function isObject(obj) {
        var type = typeof obj;
        return type === 'function' || (type === 'object' && !!obj);
    }

    // Is a given value equal to null?
    function isNull(obj) {
        return obj === null;
    }

    // Is a given variable undefined?
    function isUndefined(obj) {
        return obj === void 0;
    }

    // Is a given value a boolean?
    function isBoolean(obj) {
        return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
    }

    // Is a given value a DOM element?
    function isElement(obj) {
        return !!(obj && obj.nodeType === 1);
    }

    // Internal function for creating a `toString`-based type tester.
    function tagTester(name) {
        var tag = '[object ' + name + ']';
        return function (obj) {
            return toString.call(obj) === tag;
        };
    }

    var isString = tagTester('String');

    var isNumber = tagTester('Number');

    var isDate = tagTester('Date');

    var isRegExp = tagTester('RegExp');

    var isError = tagTester('Error');

    var isSymbol = tagTester('Symbol');

    var isArrayBuffer = tagTester('ArrayBuffer');

    var isFunction = tagTester('Function');

    // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
    // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
    var nodelist = root.document && root.document.childNodes;
    if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
        isFunction = function (obj) {
            return typeof obj == 'function' || false;
        };
    }

    var isFunction$1 = isFunction;

    var hasObjectTag = tagTester('Object');

    // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
    // In IE 11, the most common among them, this problem also applies to
    // `Map`, `WeakMap` and `Set`.
    var hasStringTagBug = (
        supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))
    ),
        isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));

    var isDataView = tagTester('DataView');

    // In IE 10 - Edge 13, we need a different heuristic
    // to determine whether an object is a `DataView`.
    function ie10IsDataView(obj) {
        return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
    }

    var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView);

    // Is a given value an array?
    // Delegates to ECMA5's native `Array.isArray`.
    var isArray = nativeIsArray || tagTester('Array');

    // Internal function to check whether `key` is an own property name of `obj`.
    function has$1(obj, key) {
        return obj != null && hasOwnProperty.call(obj, key);
    }

    var isArguments = tagTester('Arguments');

    // Define a fallback version of the method in browsers (ahem, IE < 9), where
    // there isn't any inspectable "Arguments" type.
    (function () {
        if (!isArguments(arguments)) {
            isArguments = function (obj) {
                return has$1(obj, 'callee');
            };
        }
    }());

    var isArguments$1 = isArguments;

    // Is a given object a finite number?
    function isFinite$1(obj) {
        return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
    }

    // Is the given value `NaN`?
    function isNaN$1(obj) {
        return isNumber(obj) && _isNaN(obj);
    }

    // Predicate-generating function. Often useful outside of Underscore.
    function constant(value) {
        return function () {
            return value;
        };
    }

    // Common internal logic for `isArrayLike` and `isBufferLike`.
    function createSizePropertyCheck(getSizeProperty) {
        return function (collection) {
            var sizeProperty = getSizeProperty(collection);
            return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
        }
    }

    // Internal helper to generate a function to obtain property `key` from `obj`.
    function shallowProperty(key) {
        return function (obj) {
            return obj == null ? void 0 : obj[key];
        };
    }

    // Internal helper to obtain the `byteLength` property of an object.
    var getByteLength = shallowProperty('byteLength');

    // Internal helper to determine whether we should spend extensive checks against
    // `ArrayBuffer` et al.
    var isBufferLike = createSizePropertyCheck(getByteLength);

    // Is a given value a typed array?
    var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
    function isTypedArray(obj) {
        // `ArrayBuffer.isView` is the most future-proof, so use it when available.
        // Otherwise, fall back on the above regular expression.
        return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
            isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
    }

    var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);

    // Internal helper to obtain the `length` property of an object.
    var getLength = shallowProperty('length');

    // Internal helper to create a simple lookup structure.
    // `collectNonEnumProps` used to depend on `_.contains`, but this led to
    // circular imports. `emulatedSet` is a one-off solution that only works for
    // arrays of strings.
    function emulatedSet(keys) {
        var hash = {};
        for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
        return {
            contains: function (key) { return hash[key] === true; },
            push: function (key) {
                hash[key] = true;
                return keys.push(key);
            }
        };
    }

    // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
    // be iterated by `for key in ...` and thus missed. Extends `keys` in place if
    // needed.
    function collectNonEnumProps(obj, keys) {
        keys = emulatedSet(keys);
        var nonEnumIdx = nonEnumerableProps.length;
        var constructor = obj.constructor;
        var proto = (isFunction$1(constructor) && constructor.prototype) || ObjProto;

        // Constructor is a special case.
        var prop = 'constructor';
        if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);

        while (nonEnumIdx--) {
            prop = nonEnumerableProps[nonEnumIdx];
            if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
                keys.push(prop);
            }
        }
    }

    // Retrieve the names of an object's own properties.
    // Delegates to **ECMAScript 5**'s native `Object.keys`.
    function keys(obj) {
        if (!isObject(obj)) return [];
        if (nativeKeys) return nativeKeys(obj);
        var keys = [];
        for (var key in obj) if (has$1(obj, key)) keys.push(key);
        // Ahem, IE < 9.
        if (hasEnumBug) collectNonEnumProps(obj, keys);
        return keys;
    }

    // Is a given array, string, or object empty?
    // An "empty" object has no enumerable own-properties.
    function isEmpty(obj) {
        if (obj == null) return true;
        // Skip the more expensive `toString`-based type checks if `obj` has no
        // `.length`.
        var length = getLength(obj);
        if (typeof length == 'number' && (
            isArray(obj) || isString(obj) || isArguments$1(obj)
        )) return length === 0;
        return getLength(keys(obj)) === 0;
    }

    // Returns whether an object has a given set of `key:value` pairs.
    function isMatch(object, attrs) {
        var _keys = keys(attrs), length = _keys.length;
        if (object == null) return !length;
        var obj = Object(object);
        for (var i = 0; i < length; i++) {
            var key = _keys[i];
            if (attrs[key] !== obj[key] || !(key in obj)) return false;
        }
        return true;
    }

    // If Underscore is called as a function, it returns a wrapped object that can
    // be used OO-style. This wrapper holds altered versions of all functions added
    // through `_.mixin`. Wrapped objects may be chained.
    function _$1(obj) {
        if (obj instanceof _$1) return obj;
        if (!(this instanceof _$1)) return new _$1(obj);
        this._wrapped = obj;
    }

    _$1.VERSION = VERSION;

    // Extracts the result from a wrapped and chained object.
    _$1.prototype.value = function () {
        return this._wrapped;
    };

    // Provide unwrapping proxies for some methods used in engine operations
    // such as arithmetic and JSON stringification.
    _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;

    _$1.prototype.toString = function () {
        return String(this._wrapped);
    };

    // Internal function to wrap or shallow-copy an ArrayBuffer,
    // typed array or DataView to a new view, reusing the buffer.
    function toBufferView(bufferSource) {
        return new Uint8Array(
            bufferSource.buffer || bufferSource,
            bufferSource.byteOffset || 0,
            getByteLength(bufferSource)
        );
    }

    // We use this string twice, so give it a name for minification.
    var tagDataView = '[object DataView]';

    // Internal recursive comparison function for `_.isEqual`.
    function eq(a, b, aStack, bStack) {
        // Identical objects are equal. `0 === -0`, but they aren't identical.
        // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
        if (a === b) return a !== 0 || 1 / a === 1 / b;
        // `null` or `undefined` only equal to itself (strict comparison).
        if (a == null || b == null) return false;
        // `NaN`s are equivalent, but non-reflexive.
        if (a !== a) return b !== b;
        // Exhaust primitive checks
        var type = typeof a;
        if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
        return deepEq(a, b, aStack, bStack);
    }

    // Internal recursive comparison function for `_.isEqual`.
    function deepEq(a, b, aStack, bStack) {
        // Unwrap any wrapped objects.
        if (a instanceof _$1) a = a._wrapped;
        if (b instanceof _$1) b = b._wrapped;
        // Compare `[[Class]]` names.
        var className = toString.call(a);
        if (className !== toString.call(b)) return false;
        // Work around a bug in IE 10 - Edge 13.
        if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
            if (!isDataView$1(b)) return false;
            className = tagDataView;
        }
        switch (className) {
            // These types are compared by value.
            case '[object RegExp]':
            // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
            case '[object String]':
                // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
                // equivalent to `new String("5")`.
                return '' + a === '' + b;
            case '[object Number]':
                // `NaN`s are equivalent, but non-reflexive.
                // Object(NaN) is equivalent to NaN.
                if (+a !== +a) return +b !== +b;
                // An `egal` comparison is performed for other numeric values.
                return +a === 0 ? 1 / +a === 1 / b : +a === +b;
            case '[object Date]':
            case '[object Boolean]':
                // Coerce dates and booleans to numeric primitive values. Dates are compared by their
                // millisecond representations. Note that invalid dates with millisecond representations
                // of `NaN` are not equivalent.
                return +a === +b;
            case '[object Symbol]':
                return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
            case '[object ArrayBuffer]':
            case tagDataView:
                // Coerce to typed array so we can fall through.
                return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
        }

        var areArrays = className === '[object Array]';
        if (!areArrays && isTypedArray$1(a)) {
            var byteLength = getByteLength(a);
            if (byteLength !== getByteLength(b)) return false;
            if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
            areArrays = true;
        }
        if (!areArrays) {
            if (typeof a != 'object' || typeof b != 'object') return false;

            // Objects with different constructors are not equivalent, but `Object`s or `Array`s
            // from different frames are.
            var aCtor = a.constructor, bCtor = b.constructor;
            if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
                isFunction$1(bCtor) && bCtor instanceof bCtor)
                && ('constructor' in a && 'constructor' in b)) {
                return false;
            }
        }
        // Assume equality for cyclic structures. The algorithm for detecting cyclic
        // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.

        // Initializing stack of traversed objects.
        // It's done here since we only need them for objects and arrays comparison.
        aStack = aStack || [];
        bStack = bStack || [];
        var length = aStack.length;
        while (length--) {
            // Linear search. Performance is inversely proportional to the number of
            // unique nested structures.
            if (aStack[length] === a) return bStack[length] === b;
        }

        // Add the first object to the stack of traversed objects.
        aStack.push(a);
        bStack.push(b);

        // Recursively compare objects and arrays.
        if (areArrays) {
            // Compare array lengths to determine if a deep comparison is necessary.
            length = a.length;
            if (length !== b.length) return false;
            // Deep compare the contents, ignoring non-numeric properties.
            while (length--) {
                if (!eq(a[length], b[length], aStack, bStack)) return false;
            }
        } else {
            // Deep compare objects.
            var _keys = keys(a), key;
            length = _keys.length;
            // Ensure that both objects contain the same number of properties before comparing deep equality.
            if (keys(b).length !== length) return false;
            while (length--) {
                // Deep compare each member
                key = _keys[length];
                if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
            }
        }
        // Remove the first object from the stack of traversed objects.
        aStack.pop();
        bStack.pop();
        return true;
    }

    // Perform a deep comparison to check if two objects are equal.
    function isEqual(a, b) {
        return eq(a, b);
    }

    // Retrieve all the enumerable property names of an object.
    function allKeys(obj) {
        if (!isObject(obj)) return [];
        var keys = [];
        for (var key in obj) keys.push(key);
        // Ahem, IE < 9.
        if (hasEnumBug) collectNonEnumProps(obj, keys);
        return keys;
    }

    // Since the regular `Object.prototype.toString` type tests don't work for
    // some types in IE 11, we use a fingerprinting heuristic instead, based
    // on the methods. It's not great, but it's the best we got.
    // The fingerprint method lists are defined below.
    function ie11fingerprint(methods) {
        var length = getLength(methods);
        return function (obj) {
            if (obj == null) return false;
            // `Map`, `WeakMap` and `Set` have no enumerable keys.
            var keys = allKeys(obj);
            if (getLength(keys)) return false;
            for (var i = 0; i < length; i++) {
                if (!isFunction$1(obj[methods[i]])) return false;
            }
            // If we are testing against `WeakMap`, we need to ensure that
            // `obj` doesn't have a `forEach` method in order to distinguish
            // it from a regular `Map`.
            return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
        };
    }

    // In the interest of compact minification, we write
    // each string in the fingerprints only once.
    var forEachName = 'forEach',
        hasName = 'has',
        commonInit = ['clear', 'delete'],
        mapTail = ['get', hasName, 'set'];

    // `Map`, `WeakMap` and `Set` each have slightly different
    // combinations of the above sublists.
    var mapMethods = commonInit.concat(forEachName, mapTail),
        weakMapMethods = commonInit.concat(mapTail),
        setMethods = ['add'].concat(commonInit, forEachName, hasName);

    var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');

    var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');

    var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');

    var isWeakSet = tagTester('WeakSet');

    // Retrieve the values of an object's properties.
    function values(obj) {
        var _keys = keys(obj);
        var length = _keys.length;
        var values = Array(length);
        for (var i = 0; i < length; i++) {
            values[i] = obj[_keys[i]];
        }
        return values;
    }

    // Convert an object into a list of `[key, value]` pairs.
    // The opposite of `_.object` with one argument.
    function pairs(obj) {
        var _keys = keys(obj);
        var length = _keys.length;
        var pairs = Array(length);
        for (var i = 0; i < length; i++) {
            pairs[i] = [_keys[i], obj[_keys[i]]];
        }
        return pairs;
    }

    // Invert the keys and values of an object. The values must be serializable.
    function invert(obj) {
        var result = {};
        var _keys = keys(obj);
        for (var i = 0, length = _keys.length; i < length; i++) {
            result[obj[_keys[i]]] = _keys[i];
        }
        return result;
    }

    // Return a sorted list of the function names available on the object.
    function functions(obj) {
        var names = [];
        for (var key in obj) {
            if (isFunction$1(obj[key])) names.push(key);
        }
        return names.sort();
    }

    // An internal function for creating assigner functions.
    function createAssigner(keysFunc, defaults) {
        return function (obj) {
            var length = arguments.length;
            if (defaults) obj = Object(obj);
            if (length < 2 || obj == null) return obj;
            for (var index = 1; index < length; index++) {
                var source = arguments[index],
                    keys = keysFunc(source),
                    l = keys.length;
                for (var i = 0; i < l; i++) {
                    var key = keys[i];
                    if (!defaults || obj[key] === void 0) obj[key] = source[key];
                }
            }
            return obj;
        };
    }

    // Extend a given object with all the properties in passed-in object(s).
    var extend = createAssigner(allKeys);

    // Assigns a given object with all the own properties in the passed-in
    // object(s).
    // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
    var extendOwn = createAssigner(keys);

    // Fill in a given object with default properties.
    var defaults = createAssigner(allKeys, true);

    // Create a naked function reference for surrogate-prototype-swapping.
    function ctor() {
        return function () { };
    }

    // An internal function for creating a new object that inherits from another.
    function baseCreate(prototype) {
        if (!isObject(prototype)) return {};
        if (nativeCreate) return nativeCreate(prototype);
        var Ctor = ctor();
        Ctor.prototype = prototype;
        var result = new Ctor;
        Ctor.prototype = null;
        return result;
    }

    // Creates an object that inherits from the given prototype object.
    // If additional properties are provided then they will be added to the
    // created object.
    function create(prototype, props) {
        var result = baseCreate(prototype);
        if (props) extendOwn(result, props);
        return result;
    }

    // Create a (shallow-cloned) duplicate of an object.
    function clone(obj) {
        if (!isObject(obj)) return obj;
        return isArray(obj) ? obj.slice() : extend({}, obj);
    }

    // Invokes `interceptor` with the `obj` and then returns `obj`.
    // The primary purpose of this method is to "tap into" a method chain, in
    // order to perform operations on intermediate results within the chain.
    function tap(obj, interceptor) {
        interceptor(obj);
        return obj;
    }

    // Normalize a (deep) property `path` to array.
    // Like `_.iteratee`, this function can be customized.
    function toPath$1(path) {
        return isArray(path) ? path : [path];
    }
    _$1.toPath = toPath$1;

    // Internal wrapper for `_.toPath` to enable minification.
    // Similar to `cb` for `_.iteratee`.
    function toPath(path) {
        return _$1.toPath(path);
    }

    // Internal function to obtain a nested property in `obj` along `path`.
    function deepGet(obj, path) {
        var length = path.length;
        for (var i = 0; i < length; i++) {
            if (obj == null) return void 0;
            obj = obj[path[i]];
        }
        return length ? obj : void 0;
    }

    // Get the value of the (deep) property on `path` from `object`.
    // If any property in `path` does not exist or if the value is
    // `undefined`, return `defaultValue` instead.
    // The `path` is normalized through `_.toPath`.
    function get(object, path, defaultValue) {
        var value = deepGet(object, toPath(path));
        return isUndefined(value) ? defaultValue : value;
    }

    // Shortcut function for checking if an object has a given property directly on
    // itself (in other words, not on a prototype). Unlike the internal `has`
    // function, this public version can also traverse nested properties.
    function has(obj, path) {
        path = toPath(path);
        var length = path.length;
        for (var i = 0; i < length; i++) {
            var key = path[i];
            if (!has$1(obj, key)) return false;
            obj = obj[key];
        }
        return !!length;
    }

    // Keep the identity function around for default iteratees.
    function identity(value) {
        return value;
    }

    // Returns a predicate for checking whether an object has a given set of
    // `key:value` pairs.
    function matcher(attrs) {
        attrs = extendOwn({}, attrs);
        return function (obj) {
            return isMatch(obj, attrs);
        };
    }

    // Creates a function that, when passed an object, will traverse that object�s
    // properties down the given `path`, specified as an array of keys or indices.
    function property(path) {
        path = toPath(path);
        return function (obj) {
            return deepGet(obj, path);
        };
    }

    // Internal function that returns an efficient (for current engines) version
    // of the passed-in callback, to be repeatedly applied in other Underscore
    // functions.
    function optimizeCb(func, context, argCount) {
        if (context === void 0) return func;
        switch (argCount == null ? 3 : argCount) {
            case 1: return function (value) {
                return func.call(context, value);
            };
            // The 2-argument case is omitted because we�re not using it.
            case 3: return function (value, index, collection) {
                return func.call(context, value, index, collection);
            };
            case 4: return function (accumulator, value, index, collection) {
                return func.call(context, accumulator, value, index, collection);
            };
        }
        return function () {
            return func.apply(context, arguments);
        };
    }

    // An internal function to generate callbacks that can be applied to each
    // element in a collection, returning the desired result � either `_.identity`,
    // an arbitrary callback, a property matcher, or a property accessor.
    function baseIteratee(value, context, argCount) {
        if (value == null) return identity;
        if (isFunction$1(value)) return optimizeCb(value, context, argCount);
        if (isObject(value) && !isArray(value)) return matcher(value);
        return property(value);
    }

    // External wrapper for our callback generator. Users may customize
    // `_.iteratee` if they want additional predicate/iteratee shorthand styles.
    // This abstraction hides the internal-only `argCount` argument.
    function iteratee(value, context) {
        return baseIteratee(value, context, Infinity);
    }
    _$1.iteratee = iteratee;

    // The function we call internally to generate a callback. It invokes
    // `_.iteratee` if overridden, otherwise `baseIteratee`.
    function cb(value, context, argCount) {
        if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
        return baseIteratee(value, context, argCount);
    }

    // Returns the results of applying the `iteratee` to each element of `obj`.
    // In contrast to `_.map` it returns an object.
    function mapObject(obj, iteratee, context) {
        iteratee = cb(iteratee, context);
        var _keys = keys(obj),
            length = _keys.length,
            results = {};
        for (var index = 0; index < length; index++) {
            var currentKey = _keys[index];
            results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
        }
        return results;
    }

    // Predicate-generating function. Often useful outside of Underscore.
    function noop() { }

    // Generates a function for a given object that returns a given property.
    function propertyOf(obj) {
        if (obj == null) return noop;
        return function (path) {
            return get(obj, path);
        };
    }

    // Run a function **n** times.
    function times(n, iteratee, context) {
        var accum = Array(Math.max(0, n));
        iteratee = optimizeCb(iteratee, context, 1);
        for (var i = 0; i < n; i++) accum[i] = iteratee(i);
        return accum;
    }

    // Return a random integer between `min` and `max` (inclusive).
    function random(min, max) {
        if (max == null) {
            max = min;
            min = 0;
        }
        return min + Math.floor(Math.random() * (max - min + 1));
    }

    // A (possibly faster) way to get the current timestamp as an integer.
    var now = Date.now || function () {
        return new Date().getTime();
    };

    // Internal helper to generate functions for escaping and unescaping strings
    // to/from HTML interpolation.
    function createEscaper(map) {
        var escaper = function (match) {
            return map[match];
        };
        // Regexes for identifying a key that needs to be escaped.
        var source = '(?:' + keys(map).join('|') + ')';
        var testRegexp = RegExp(source);
        var replaceRegexp = RegExp(source, 'g');
        return function (string) {
            string = string == null ? '' : '' + string;
            return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
        };
    }

    // Internal list of HTML entities for escaping.
    var escapeMap = {
        '&': '&amp;',
        '<': '&lt;',
        '>': '&gt;',
        '"': '&quot;',
        "'": '&#x27;',
        '`': '&#x60;'
    };

    // Function for escaping strings to HTML interpolation.
    var _escape = createEscaper(escapeMap);

    // Internal list of HTML entities for unescaping.
    var unescapeMap = invert(escapeMap);

    // Function for unescaping strings from HTML interpolation.
    var _unescape = createEscaper(unescapeMap);

    // By default, Underscore uses ERB-style template delimiters. Change the
    // following template settings to use alternative delimiters.
    var templateSettings = _$1.templateSettings = {
        evaluate: /<%([\s\S]+?)%>/g,
        interpolate: /<%=([\s\S]+?)%>/g,
        escape: /<%-([\s\S]+?)%>/g
    };

    // When customizing `_.templateSettings`, if you don't want to define an
    // interpolation, evaluation or escaping regex, we need one that is
    // guaranteed not to match.
    var noMatch = /(.)^/;

    // Certain characters need to be escaped so that they can be put into a
    // string literal.
    var escapes = {
        "'": "'",
        '\\': '\\',
        '\r': 'r',
        '\n': 'n',
        '\u2028': 'u2028',
        '\u2029': 'u2029'
    };

    var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;

    function escapeChar(match) {
        return '\\' + escapes[match];
    }

    // In order to prevent third-party code injection through
    // `_.templateSettings.variable`, we test it against the following regular
    // expression. It is intentionally a bit more liberal than just matching valid
    // identifiers, but still prevents possible loopholes through defaults or
    // destructuring assignment.
    var bareIdentifier = /^\s*(\w|\$)+\s*$/;

    // JavaScript micro-templating, similar to John Resig's implementation.
    // Underscore templating handles arbitrary delimiters, preserves whitespace,
    // and correctly escapes quotes within interpolated code.
    // NB: `oldSettings` only exists for backwards compatibility.
    function template(text, settings, oldSettings) {
        if (!settings && oldSettings) settings = oldSettings;
        settings = defaults({}, settings, _$1.templateSettings);

        // Combine delimiters into one regular expression via alternation.
        var matcher = RegExp([
            (settings.escape || noMatch).source,
            (settings.interpolate || noMatch).source,
            (settings.evaluate || noMatch).source
        ].join('|') + '|$', 'g');

        // Compile the template source, escaping string literals appropriately.
        var index = 0;
        var source = "__p+='";
        text.replace(matcher, function (match, escape, interpolate, evaluate, offset) {
            source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
            index = offset + match.length;

            if (escape) {
                source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
            } else if (interpolate) {
                source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
            } else if (evaluate) {
                source += "';\n" + evaluate + "\n__p+='";
            }

            // Adobe VMs need the match returned to produce the correct offset.
            return match;
        });
        source += "';\n";

        var argument = settings.variable;
        if (argument) {
            // Insure against third-party code injection. (CVE-2021-23358)
            if (!bareIdentifier.test(argument)) throw new Error(
                'variable is not a bare identifier: ' + argument
            );
        } else {
            // If a variable is not specified, place data values in local scope.
            source = 'with(obj||{}){\n' + source + '}\n';
            argument = 'obj';
        }

        source = "var __t,__p='',__j=Array.prototype.join," +
            "print=function(){__p+=__j.call(arguments,'');};\n" +
            source + 'return __p;\n';

        var render;
        try {
            render = new Function(argument, '_', source);
        } catch (e) {
            e.source = source;
            throw e;
        }

        var template = function (data) {
            return render.call(this, data, _$1);
        };

        // Provide the compiled source as a convenience for precompilation.
        template.source = 'function(' + argument + '){\n' + source + '}';

        return template;
    }

    // Traverses the children of `obj` along `path`. If a child is a function, it
    // is invoked with its parent as context. Returns the value of the final
    // child, or `fallback` if any child is undefined.
    function result(obj, path, fallback) {
        path = toPath(path);
        var length = path.length;
        if (!length) {
            return isFunction$1(fallback) ? fallback.call(obj) : fallback;
        }
        for (var i = 0; i < length; i++) {
            var prop = obj == null ? void 0 : obj[path[i]];
            if (prop === void 0) {
                prop = fallback;
                i = length; // Ensure we don't continue iterating.
            }
            obj = isFunction$1(prop) ? prop.call(obj) : prop;
        }
        return obj;
    }

    // Generate a unique integer id (unique within the entire client session).
    // Useful for temporary DOM ids.
    var idCounter = 0;
    function uniqueId(prefix) {
        var id = ++idCounter + '';
        return prefix ? prefix + id : id;
    }

    // Start chaining a wrapped Underscore object.
    function chain(obj) {
        var instance = _$1(obj);
        instance._chain = true;
        return instance;
    }

    // Internal function to execute `sourceFunc` bound to `context` with optional
    // `args`. Determines whether to execute a function as a constructor or as a
    // normal function.
    function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
        if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
        var self = baseCreate(sourceFunc.prototype);
        var result = sourceFunc.apply(self, args);
        if (isObject(result)) return result;
        return self;
    }

    // Partially apply a function by creating a version that has had some of its
    // arguments pre-filled, without changing its dynamic `this` context. `_` acts
    // as a placeholder by default, allowing any combination of arguments to be
    // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
    var partial = restArguments(function (func, boundArgs) {
        var placeholder = partial.placeholder;
        var bound = function () {
            var position = 0, length = boundArgs.length;
            var args = Array(length);
            for (var i = 0; i < length; i++) {
                args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
            }
            while (position < arguments.length) args.push(arguments[position++]);
            return executeBound(func, bound, this, this, args);
        };
        return bound;
    });

    partial.placeholder = _$1;

    // Create a function bound to a given object (assigning `this`, and arguments,
    // optionally).
    var bind = restArguments(function (func, context, args) {
        if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
        var bound = restArguments(function (callArgs) {
            return executeBound(func, bound, context, this, args.concat(callArgs));
        });
        return bound;
    });

    // Internal helper for collection methods to determine whether a collection
    // should be iterated as an array or as an object.
    // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
    // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
    var isArrayLike = createSizePropertyCheck(getLength);

    // Internal implementation of a recursive `flatten` function.
    function flatten$1(input, depth, strict, output) {
        output = output || [];
        if (!depth && depth !== 0) {
            depth = Infinity;
        } else if (depth <= 0) {
            return output.concat(input);
        }
        var idx = output.length;
        for (var i = 0, length = getLength(input); i < length; i++) {
            var value = input[i];
            if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
                // Flatten current level of array or arguments object.
                if (depth > 1) {
                    flatten$1(value, depth - 1, strict, output);
                    idx = output.length;
                } else {
                    var j = 0, len = value.length;
                    while (j < len) output[idx++] = value[j++];
                }
            } else if (!strict) {
                output[idx++] = value;
            }
        }
        return output;
    }

    // Bind a number of an object's methods to that object. Remaining arguments
    // are the method names to be bound. Useful for ensuring that all callbacks
    // defined on an object belong to it.
    var bindAll = restArguments(function (obj, keys) {
        keys = flatten$1(keys, false, false);
        var index = keys.length;
        if (index < 1) throw new Error('bindAll must be passed function names');
        while (index--) {
            var key = keys[index];
            obj[key] = bind(obj[key], obj);
        }
        return obj;
    });

    // Memoize an expensive function by storing its results.
    function memoize(func, hasher) {
        var memoize = function (key) {
            var cache = memoize.cache;
            var address = '' + (hasher ? hasher.apply(this, arguments) : key);
            if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);
            return cache[address];
        };
        memoize.cache = {};
        return memoize;
    }

    // Delays a function for the given number of milliseconds, and then calls
    // it with the arguments supplied.
    var delay = restArguments(function (func, wait, args) {
        return setTimeout(function () {
            return func.apply(null, args);
        }, wait);
    });

    // Defers a function, scheduling it to run after the current call stack has
    // cleared.
    var defer = partial(delay, _$1, 1);

    // Returns a function, that, when invoked, will only be triggered at most once
    // during a given window of time. Normally, the throttled function will run
    // as much as it can, without ever going more than once per `wait` duration;
    // but if you'd like to disable the execution on the leading edge, pass
    // `{leading: false}`. To disable execution on the trailing edge, ditto.
    function throttle(func, wait, options) {
        var timeout, context, args, result;
        var previous = 0;
        if (!options) options = {};

        var later = function () {
            previous = options.leading === false ? 0 : now();
            timeout = null;
            result = func.apply(context, args);
            if (!timeout) context = args = null;
        };

        var throttled = function () {
            var _now = now();
            if (!previous && options.leading === false) previous = _now;
            var remaining = wait - (_now - previous);
            context = this;
            args = arguments;
            if (remaining <= 0 || remaining > wait) {
                if (timeout) {
                    clearTimeout(timeout);
                    timeout = null;
                }
                previous = _now;
                result = func.apply(context, args);
                if (!timeout) context = args = null;
            } else if (!timeout && options.trailing !== false) {
                timeout = setTimeout(later, remaining);
            }
            return result;
        };

        throttled.cancel = function () {
            clearTimeout(timeout);
            previous = 0;
            timeout = context = args = null;
        };

        return throttled;
    }

    // When a sequence of calls of the returned function ends, the argument
    // function is triggered. The end of a sequence is defined by the `wait`
    // parameter. If `immediate` is passed, the argument function will be
    // triggered at the beginning of the sequence instead of at the end.
    function debounce(func, wait, immediate) {
        var timeout, previous, args, result, context;

        var later = function () {
            var passed = now() - previous;
            if (wait > passed) {
                timeout = setTimeout(later, wait - passed);
            } else {
                timeout = null;
                if (!immediate) result = func.apply(context, args);
                // This check is needed because `func` can recursively invoke `debounced`.
                if (!timeout) args = context = null;
            }
        };

        var debounced = restArguments(function (_args) {
            context = this;
            args = _args;
            previous = now();
            if (!timeout) {
                timeout = setTimeout(later, wait);
                if (immediate) result = func.apply(context, args);
            }
            return result;
        });

        debounced.cancel = function () {
            clearTimeout(timeout);
            timeout = args = context = null;
        };

        return debounced;
    }

    // Returns the first function passed as an argument to the second,
    // allowing you to adjust arguments, run code before and after, and
    // conditionally execute the original function.
    function wrap(func, wrapper) {
        return partial(wrapper, func);
    }

    // Returns a negated version of the passed-in predicate.
    function negate(predicate) {
        return function () {
            return !predicate.apply(this, arguments);
        };
    }

    // Returns a function that is the composition of a list of functions, each
    // consuming the return value of the function that follows.
    function compose() {
        var args = arguments;
        var start = args.length - 1;
        return function () {
            var i = start;
            var result = args[start].apply(this, arguments);
            while (i--) result = args[i].call(this, result);
            return result;
        };
    }

    // Returns a function that will only be executed on and after the Nth call.
    function after(times, func) {
        return function () {
            if (--times < 1) {
                return func.apply(this, arguments);
            }
        };
    }

    // Returns a function that will only be executed up to (but not including) the
    // Nth call.
    function before(times, func) {
        var memo;
        return function () {
            if (--times > 0) {
                memo = func.apply(this, arguments);
            }
            if (times <= 1) func = null;
            return memo;
        };
    }

    // Returns a function that will be executed at most one time, no matter how
    // often you call it. Useful for lazy initialization.
    var once = partial(before, 2);

    // Returns the first key on an object that passes a truth test.
    function findKey(obj, predicate, context) {
        predicate = cb(predicate, context);
        var _keys = keys(obj), key;
        for (var i = 0, length = _keys.length; i < length; i++) {
            key = _keys[i];
            if (predicate(obj[key], key, obj)) return key;
        }
    }

    // Internal function to generate `_.findIndex` and `_.findLastIndex`.
    function createPredicateIndexFinder(dir) {
        return function (array, predicate, context) {
            predicate = cb(predicate, context);
            var length = getLength(array);
            var index = dir > 0 ? 0 : length - 1;
            for (; index >= 0 && index < length; index += dir) {
                if (predicate(array[index], index, array)) return index;
            }
            return -1;
        };
    }

    // Returns the first index on an array-like that passes a truth test.
    var findIndex = createPredicateIndexFinder(1);

    // Returns the last index on an array-like that passes a truth test.
    var findLastIndex = createPredicateIndexFinder(-1);

    // Use a comparator function to figure out the smallest index at which
    // an object should be inserted so as to maintain order. Uses binary search.
    function sortedIndex(array, obj, iteratee, context) {
        iteratee = cb(iteratee, context, 1);
        var value = iteratee(obj);
        var low = 0, high = getLength(array);
        while (low < high) {
            var mid = Math.floor((low + high) / 2);
            if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
        }
        return low;
    }

    // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
    function createIndexFinder(dir, predicateFind, sortedIndex) {
        return function (array, item, idx) {
            var i = 0, length = getLength(array);
            if (typeof idx == 'number') {
                if (dir > 0) {
                    i = idx >= 0 ? idx : Math.max(idx + length, i);
                } else {
                    length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
                }
            } else if (sortedIndex && idx && length) {
                idx = sortedIndex(array, item);
                return array[idx] === item ? idx : -1;
            }
            if (item !== item) {
                idx = predicateFind(slice.call(array, i, length), isNaN$1);
                return idx >= 0 ? idx + i : -1;
            }
            for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
                if (array[idx] === item) return idx;
            }
            return -1;
        };
    }

    // Return the position of the first occurrence of an item in an array,
    // or -1 if the item is not included in the array.
    // If the array is large and already in sort order, pass `true`
    // for **isSorted** to use binary search.
    var indexOf = createIndexFinder(1, findIndex, sortedIndex);

    // Return the position of the last occurrence of an item in an array,
    // or -1 if the item is not included in the array.
    var lastIndexOf = createIndexFinder(-1, findLastIndex);

    // Return the first value which passes a truth test.
    function find(obj, predicate, context) {
        var keyFinder = isArrayLike(obj) ? findIndex : findKey;
        var key = keyFinder(obj, predicate, context);
        if (key !== void 0 && key !== -1) return obj[key];
    }

    // Convenience version of a common use case of `_.find`: getting the first
    // object containing specific `key:value` pairs.
    function findWhere(obj, attrs) {
        return find(obj, matcher(attrs));
    }

    // The cornerstone for collection functions, an `each`
    // implementation, aka `forEach`.
    // Handles raw objects in addition to array-likes. Treats all
    // sparse array-likes as if they were dense.
    function each(obj, iteratee, context) {
        iteratee = optimizeCb(iteratee, context);
        var i, length;
        if (isArrayLike(obj)) {
            for (i = 0, length = obj.length; i < length; i++) {
                iteratee(obj[i], i, obj);
            }
        } else {
            var _keys = keys(obj);
            for (i = 0, length = _keys.length; i < length; i++) {
                iteratee(obj[_keys[i]], _keys[i], obj);
            }
        }
        return obj;
    }

    // Return the results of applying the iteratee to each element.
    function map(obj, iteratee, context) {
        iteratee = cb(iteratee, context);
        var _keys = !isArrayLike(obj) && keys(obj),
            length = (_keys || obj).length,
            results = Array(length);
        for (var index = 0; index < length; index++) {
            var currentKey = _keys ? _keys[index] : index;
            results[index] = iteratee(obj[currentKey], currentKey, obj);
        }
        return results;
    }

    // Internal helper to create a reducing function, iterating left or right.
    function createReduce(dir) {
        // Wrap code that reassigns argument variables in a separate function than
        // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
        var reducer = function (obj, iteratee, memo, initial) {
            var _keys = !isArrayLike(obj) && keys(obj),
                length = (_keys || obj).length,
                index = dir > 0 ? 0 : length - 1;
            if (!initial) {
                memo = obj[_keys ? _keys[index] : index];
                index += dir;
            }
            for (; index >= 0 && index < length; index += dir) {
                var currentKey = _keys ? _keys[index] : index;
                memo = iteratee(memo, obj[currentKey], currentKey, obj);
            }
            return memo;
        };

        return function (obj, iteratee, memo, context) {
            var initial = arguments.length >= 3;
            return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
        };
    }

    // **Reduce** builds up a single result from a list of values, aka `inject`,
    // or `foldl`.
    var reduce = createReduce(1);

    // The right-associative version of reduce, also known as `foldr`.
    var reduceRight = createReduce(-1);

    // Return all the elements that pass a truth test.
    function filter(obj, predicate, context) {
        var results = [];
        predicate = cb(predicate, context);
        each(obj, function (value, index, list) {
            if (predicate(value, index, list)) results.push(value);
        });
        return results;
    }

    // Return all the elements for which a truth test fails.
    function reject(obj, predicate, context) {
        return filter(obj, negate(cb(predicate)), context);
    }

    // Determine whether all of the elements pass a truth test.
    function every(obj, predicate, context) {
        predicate = cb(predicate, context);
        var _keys = !isArrayLike(obj) && keys(obj),
            length = (_keys || obj).length;
        for (var index = 0; index < length; index++) {
            var currentKey = _keys ? _keys[index] : index;
            if (!predicate(obj[currentKey], currentKey, obj)) return false;
        }
        return true;
    }

    // Determine if at least one element in the object passes a truth test.
    function some(obj, predicate, context) {
        predicate = cb(predicate, context);
        var _keys = !isArrayLike(obj) && keys(obj),
            length = (_keys || obj).length;
        for (var index = 0; index < length; index++) {
            var currentKey = _keys ? _keys[index] : index;
            if (predicate(obj[currentKey], currentKey, obj)) return true;
        }
        return false;
    }

    // Determine if the array or object contains a given item (using `===`).
    function contains(obj, item, fromIndex, guard) {
        if (!isArrayLike(obj)) obj = values(obj);
        if (typeof fromIndex != 'number' || guard) fromIndex = 0;
        return indexOf(obj, item, fromIndex) >= 0;
    }

    // Invoke a method (with arguments) on every item in a collection.
    var invoke = restArguments(function (obj, path, args) {
        var contextPath, func;
        if (isFunction$1(path)) {
            func = path;
        } else {
            path = toPath(path);
            contextPath = path.slice(0, -1);
            path = path[path.length - 1];
        }
        return map(obj, function (context) {
            var method = func;
            if (!method) {
                if (contextPath && contextPath.length) {
                    context = deepGet(context, contextPath);
                }
                if (context == null) return void 0;
                method = context[path];
            }
            return method == null ? method : method.apply(context, args);
        });
    });

    // Convenience version of a common use case of `_.map`: fetching a property.
    function pluck(obj, key) {
        return map(obj, property(key));
    }

    // Convenience version of a common use case of `_.filter`: selecting only
    // objects containing specific `key:value` pairs.
    function where(obj, attrs) {
        return filter(obj, matcher(attrs));
    }

    // Return the maximum element (or element-based computation).
    function max(obj, iteratee, context) {
        var result = -Infinity, lastComputed = -Infinity,
            value, computed;
        if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
            obj = isArrayLike(obj) ? obj : values(obj);
            for (var i = 0, length = obj.length; i < length; i++) {
                value = obj[i];
                if (value != null && value > result) {
                    result = value;
                }
            }
        } else {
            iteratee = cb(iteratee, context);
            each(obj, function (v, index, list) {
                computed = iteratee(v, index, list);
                if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {
                    result = v;
                    lastComputed = computed;
                }
            });
        }
        return result;
    }

    // Return the minimum element (or element-based computation).
    function min(obj, iteratee, context) {
        var result = Infinity, lastComputed = Infinity,
            value, computed;
        if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
            obj = isArrayLike(obj) ? obj : values(obj);
            for (var i = 0, length = obj.length; i < length; i++) {
                value = obj[i];
                if (value != null && value < result) {
                    result = value;
                }
            }
        } else {
            iteratee = cb(iteratee, context);
            each(obj, function (v, index, list) {
                computed = iteratee(v, index, list);
                if (computed < lastComputed || (computed === Infinity && result === Infinity)) {
                    result = v;
                    lastComputed = computed;
                }
            });
        }
        return result;
    }

    // Safely create a real, live array from anything iterable.
    var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
    function toArray(obj) {
        if (!obj) return [];
        if (isArray(obj)) return slice.call(obj);
        if (isString(obj)) {
            // Keep surrogate pair characters together.
            return obj.match(reStrSymbol);
        }
        if (isArrayLike(obj)) return map(obj, identity);
        return values(obj);
    }

    // Sample **n** random values from a collection using the modern version of the
    // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher�Yates_shuffle).
    // If **n** is not specified, returns a single random element.
    // The internal `guard` argument allows it to work with `_.map`.
    function sample(obj, n, guard) {
        if (n == null || guard) {
            if (!isArrayLike(obj)) obj = values(obj);
            return obj[random(obj.length - 1)];
        }
        var sample = toArray(obj);
        var length = getLength(sample);
        n = Math.max(Math.min(n, length), 0);
        var last = length - 1;
        for (var index = 0; index < n; index++) {
            var rand = random(index, last);
            var temp = sample[index];
            sample[index] = sample[rand];
            sample[rand] = temp;
        }
        return sample.slice(0, n);
    }

    // Shuffle a collection.
    function shuffle(obj) {
        return sample(obj, Infinity);
    }

    // Sort the object's values by a criterion produced by an iteratee.
    function sortBy(obj, iteratee, context) {
        var index = 0;
        iteratee = cb(iteratee, context);
        return pluck(map(obj, function (value, key, list) {
            return {
                value: value,
                index: index++,
                criteria: iteratee(value, key, list)
            };
        }).sort(function (left, right) {
            var a = left.criteria;
            var b = right.criteria;
            if (a !== b) {
                if (a > b || a === void 0) return 1;
                if (a < b || b === void 0) return -1;
            }
            return left.index - right.index;
        }), 'value');
    }

    // An internal function used for aggregate "group by" operations.
    function group(behavior, partition) {
        return function (obj, iteratee, context) {
            var result = partition ? [[], []] : {};
            iteratee = cb(iteratee, context);
            each(obj, function (value, index) {
                var key = iteratee(value, index, obj);
                behavior(result, value, key);
            });
            return result;
        };
    }

    // Groups the object's values by a criterion. Pass either a string attribute
    // to group by, or a function that returns the criterion.
    var groupBy = group(function (result, value, key) {
        if (has$1(result, key)) result[key].push(value); else result[key] = [value];
    });

    // Indexes the object's values by a criterion, similar to `_.groupBy`, but for
    // when you know that your index values will be unique.
    var indexBy = group(function (result, value, key) {
        result[key] = value;
    });

    // Counts instances of an object that group by a certain criterion. Pass
    // either a string attribute to count by, or a function that returns the
    // criterion.
    var countBy = group(function (result, value, key) {
        if (has$1(result, key)) result[key]++; else result[key] = 1;
    });

    // Split a collection into two arrays: one whose elements all pass the given
    // truth test, and one whose elements all do not pass the truth test.
    var partition = group(function (result, value, pass) {
        result[pass ? 0 : 1].push(value);
    }, true);

    // Return the number of elements in a collection.
    function size(obj) {
        if (obj == null) return 0;
        return isArrayLike(obj) ? obj.length : keys(obj).length;
    }

    // Internal `_.pick` helper function to determine whether `key` is an enumerable
    // property name of `obj`.
    function keyInObj(value, key, obj) {
        return key in obj;
    }

    // Return a copy of the object only containing the allowed properties.
    var pick = restArguments(function (obj, keys) {
        var result = {}, iteratee = keys[0];
        if (obj == null) return result;
        if (isFunction$1(iteratee)) {
            if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
            keys = allKeys(obj);
        } else {
            iteratee = keyInObj;
            keys = flatten$1(keys, false, false);
            obj = Object(obj);
        }
        for (var i = 0, length = keys.length; i < length; i++) {
            var key = keys[i];
            var value = obj[key];
            if (iteratee(value, key, obj)) result[key] = value;
        }
        return result;
    });

    // Return a copy of the object without the disallowed properties.
    var omit = restArguments(function (obj, keys) {
        var iteratee = keys[0], context;
        if (isFunction$1(iteratee)) {
            iteratee = negate(iteratee);
            if (keys.length > 1) context = keys[1];
        } else {
            keys = map(flatten$1(keys, false, false), String);
            iteratee = function (value, key) {
                return !contains(keys, key);
            };
        }
        return pick(obj, iteratee, context);
    });

    // Returns everything but the last entry of the array. Especially useful on
    // the arguments object. Passing **n** will return all the values in
    // the array, excluding the last N.
    function initial(array, n, guard) {
        return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
    }

    // Get the first element of an array. Passing **n** will return the first N
    // values in the array. The **guard** check allows it to work with `_.map`.
    function first(array, n, guard) {
        if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
        if (n == null || guard) return array[0];
        return initial(array, array.length - n);
    }

    // Returns everything but the first entry of the `array`. Especially useful on
    // the `arguments` object. Passing an **n** will return the rest N values in the
    // `array`.
    function rest(array, n, guard) {
        return slice.call(array, n == null || guard ? 1 : n);
    }

    // Get the last element of an array. Passing **n** will return the last N
    // values in the array.
    function last(array, n, guard) {
        if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
        if (n == null || guard) return array[array.length - 1];
        return rest(array, Math.max(0, array.length - n));
    }

    // Trim out all falsy values from an array.
    function compact(array) {
        return filter(array, Boolean);
    }

    // Flatten out an array, either recursively (by default), or up to `depth`.
    // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
    function flatten(array, depth) {
        return flatten$1(array, depth, false);
    }

    // Take the difference between one array and a number of other arrays.
    // Only the elements present in just the first array will remain.
    var difference = restArguments(function (array, rest) {
        rest = flatten$1(rest, true, true);
        return filter(array, function (value) {
            return !contains(rest, value);
        });
    });

    // Return a version of the array that does not contain the specified value(s).
    var without = restArguments(function (array, otherArrays) {
        return difference(array, otherArrays);
    });

    // Produce a duplicate-free version of the array. If the array has already
    // been sorted, you have the option of using a faster algorithm.
    // The faster algorithm will not work with an iteratee if the iteratee
    // is not a one-to-one function, so providing an iteratee will disable
    // the faster algorithm.
    function uniq(array, isSorted, iteratee, context) {
        if (!isBoolean(isSorted)) {
            context = iteratee;
            iteratee = isSorted;
            isSorted = false;
        }
        if (iteratee != null) iteratee = cb(iteratee, context);
        var result = [];
        var seen = [];
        for (var i = 0, length = getLength(array); i < length; i++) {
            var value = array[i],
                computed = iteratee ? iteratee(value, i, array) : value;
            if (isSorted && !iteratee) {
                if (!i || seen !== computed) result.push(value);
                seen = computed;
            } else if (iteratee) {
                if (!contains(seen, computed)) {
                    seen.push(computed);
                    result.push(value);
                }
            } else if (!contains(result, value)) {
                result.push(value);
            }
        }
        return result;
    }

    // Produce an array that contains the union: each distinct element from all of
    // the passed-in arrays.
    var union = restArguments(function (arrays) {
        return uniq(flatten$1(arrays, true, true));
    });

    // Produce an array that contains every item shared between all the
    // passed-in arrays.
    function intersection(array) {
        var result = [];
        var argsLength = arguments.length;
        for (var i = 0, length = getLength(array); i < length; i++) {
            var item = array[i];
            if (contains(result, item)) continue;
            var j;
            for (j = 1; j < argsLength; j++) {
                if (!contains(arguments[j], item)) break;
            }
            if (j === argsLength) result.push(item);
        }
        return result;
    }

    // Complement of zip. Unzip accepts an array of arrays and groups
    // each array's elements on shared indices.
    function unzip(array) {
        var length = (array && max(array, getLength).length) || 0;
        var result = Array(length);

        for (var index = 0; index < length; index++) {
            result[index] = pluck(array, index);
        }
        return result;
    }

    // Zip together multiple lists into a single array -- elements that share
    // an index go together.
    var zip = restArguments(unzip);

    // Converts lists into objects. Pass either a single array of `[key, value]`
    // pairs, or two parallel arrays of the same length -- one of keys, and one of
    // the corresponding values. Passing by pairs is the reverse of `_.pairs`.
    function object(list, values) {
        var result = {};
        for (var i = 0, length = getLength(list); i < length; i++) {
            if (values) {
                result[list[i]] = values[i];
            } else {
                result[list[i][0]] = list[i][1];
            }
        }
        return result;
    }

    // Generate an integer Array containing an arithmetic progression. A port of
    // the native Python `range()` function. See
    // [the Python documentation](https://docs.python.org/library/functions.html#range).
    function range(start, stop, step) {
        if (stop == null) {
            stop = start || 0;
            start = 0;
        }
        if (!step) {
            step = stop < start ? -1 : 1;
        }

        var length = Math.max(Math.ceil((stop - start) / step), 0);
        var range = Array(length);

        for (var idx = 0; idx < length; idx++, start += step) {
            range[idx] = start;
        }

        return range;
    }

    // Chunk a single array into multiple arrays, each containing `count` or fewer
    // items.
    function chunk(array, count) {
        if (count == null || count < 1) return [];
        var result = [];
        var i = 0, length = array.length;
        while (i < length) {
            result.push(slice.call(array, i, i += count));
        }
        return result;
    }

    // Helper function to continue chaining intermediate results.
    function chainResult(instance, obj) {
        return instance._chain ? _$1(obj).chain() : obj;
    }

    // Add your own custom functions to the Underscore object.
    function mixin(obj) {
        each(functions(obj), function (name) {
            var func = _$1[name] = obj[name];
            _$1.prototype[name] = function () {
                var args = [this._wrapped];
                push.apply(args, arguments);
                return chainResult(this, func.apply(_$1, args));
            };
        });
        return _$1;
    }

    // Add all mutator `Array` functions to the wrapper.
    each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function (name) {
        var method = ArrayProto[name];
        _$1.prototype[name] = function () {
            var obj = this._wrapped;
            if (obj != null) {
                method.apply(obj, arguments);
                if ((name === 'shift' || name === 'splice') && obj.length === 0) {
                    delete obj[0];
                }
            }
            return chainResult(this, obj);
        };
    });

    // Add all accessor `Array` functions to the wrapper.
    each(['concat', 'join', 'slice'], function (name) {
        var method = ArrayProto[name];
        _$1.prototype[name] = function () {
            var obj = this._wrapped;
            if (obj != null) obj = method.apply(obj, arguments);
            return chainResult(this, obj);
        };
    });

    // Named Exports

    var allExports = {
        __proto__: null,
        VERSION: VERSION,
        restArguments: restArguments,
        isObject: isObject,
        isNull: isNull,
        isUndefined: isUndefined,
        isBoolean: isBoolean,
        isElement: isElement,
        isString: isString,
        isNumber: isNumber,
        isDate: isDate,
        isRegExp: isRegExp,
        isError: isError,
        isSymbol: isSymbol,
        isArrayBuffer: isArrayBuffer,
        isDataView: isDataView$1,
        isArray: isArray,
        isFunction: isFunction$1,
        isArguments: isArguments$1,
        isFinite: isFinite$1,
        isNaN: isNaN$1,
        isTypedArray: isTypedArray$1,
        isEmpty: isEmpty,
        isMatch: isMatch,
        isEqual: isEqual,
        isMap: isMap,
        isWeakMap: isWeakMap,
        isSet: isSet,
        isWeakSet: isWeakSet,
        keys: keys,
        allKeys: allKeys,
        values: values,
        pairs: pairs,
        invert: invert,
        functions: functions,
        methods: functions,
        extend: extend,
        extendOwn: extendOwn,
        assign: extendOwn,
        defaults: defaults,
        create: create,
        clone: clone,
        tap: tap,
        get: get,
        has: has,
        mapObject: mapObject,
        identity: identity,
        constant: constant,
        noop: noop,
        toPath: toPath$1,
        property: property,
        propertyOf: propertyOf,
        matcher: matcher,
        matches: matcher,
        times: times,
        random: random,
        now: now,
        escape: _escape,
        unescape: _unescape,
        templateSettings: templateSettings,
        template: template,
        result: result,
        uniqueId: uniqueId,
        chain: chain,
        iteratee: iteratee,
        partial: partial,
        bind: bind,
        bindAll: bindAll,
        memoize: memoize,
        delay: delay,
        defer: defer,
        throttle: throttle,
        debounce: debounce,
        wrap: wrap,
        negate: negate,
        compose: compose,
        after: after,
        before: before,
        once: once,
        findKey: findKey,
        findIndex: findIndex,
        findLastIndex: findLastIndex,
        sortedIndex: sortedIndex,
        indexOf: indexOf,
        lastIndexOf: lastIndexOf,
        find: find,
        detect: find,
        findWhere: findWhere,
        each: each,
        forEach: each,
        map: map,
        collect: map,
        reduce: reduce,
        foldl: reduce,
        inject: reduce,
        reduceRight: reduceRight,
        foldr: reduceRight,
        filter: filter,
        select: filter,
        reject: reject,
        every: every,
        all: every,
        some: some,
        any: some,
        contains: contains,
        includes: contains,
        include: contains,
        invoke: invoke,
        pluck: pluck,
        where: where,
        max: max,
        min: min,
        shuffle: shuffle,
        sample: sample,
        sortBy: sortBy,
        groupBy: groupBy,
        indexBy: indexBy,
        countBy: countBy,
        partition: partition,
        toArray: toArray,
        size: size,
        pick: pick,
        omit: omit,
        first: first,
        head: first,
        take: first,
        initial: initial,
        last: last,
        rest: rest,
        tail: rest,
        drop: rest,
        compact: compact,
        flatten: flatten,
        without: without,
        uniq: uniq,
        unique: uniq,
        union: union,
        intersection: intersection,
        difference: difference,
        unzip: unzip,
        transpose: unzip,
        zip: zip,
        object: object,
        range: range,
        chunk: chunk,
        mixin: mixin,
        'default': _$1
    };

    // Default Export

    // Add all of the Underscore functions to the wrapper object.
    var _ = mixin(allExports);
    // Legacy Node.js API.
    _._ = _;

    return _;

})));
//# sourceMappingURL=underscore-umd.js.map;
/*
 AngularJS v1.8.2
 (c) 2010-2020 Google LLC. http://angularjs.org
 License: MIT
*/
(function(n,e){'use strict';function m(d,k,l){var a=l.baseHref(),h=d[0];return function(f,b,c){var d,g;c=c||{};g=c.expires;d=e.isDefined(c.path)?c.path:a;e.isUndefined(b)&&(g="Thu, 01 Jan 1970 00:00:00 GMT",b="");e.isString(g)&&(g=new Date(g));b=encodeURIComponent(f)+"="+encodeURIComponent(b);b=b+(d?";path="+d:"")+(c.domain?";domain="+c.domain:"");b+=g?";expires="+g.toUTCString():"";b+=c.secure?";secure":"";b+=c.samesite?";samesite="+c.samesite:"";c=b.length+1;4096<c&&k.warn("Cookie '"+f+"' possibly not set or overflowed because it was too large ("+
c+" > 4096 bytes)!");h.cookie=b}}e.module("ngCookies",["ng"]).info({angularVersion:"1.8.2"}).provider("$cookies",[function(){var d=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(k,l){return{get:function(a){return k()[a]},getObject:function(a){return(a=this.get(a))?e.fromJson(a):a},getAll:function(){return k()},put:function(a,h,f){l(a,h,f?e.extend({},d,f):d)},putObject:function(a,d,f){this.put(a,e.toJson(d),f)},remove:function(a,h){l(a,void 0,h?e.extend({},d,h):d)}}}]}]);m.$inject=
["$document","$log","$browser"];e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=m})})(window,window.angular);
//# sourceMappingURL=angular-cookies.min.js.map
;
/*
 AngularJS v1.8.2
 (c) 2010-2020 Google LLC. http://angularjs.org
 License: MIT
*/
(function(s,e){'use strict';function O(e){var g=[];B(g,D).chars(e);return g.join("")}var C=e.$$minErr("$sanitize"),E,g,F,G,H,q,D,I,J,B;e.module("ngSanitize",[]).provider("$sanitize",function(){function h(a,d){return A(a.split(","),d)}function A(a,d){var c={},b;for(b=0;b<a.length;b++)c[d?q(a[b]):a[b]]=!0;return c}function t(a,d){d&&d.length&&g(a,A(d))}function P(a){for(var d={},c=0,b=a.length;c<b;c++){var k=a[c];d[k.name]=k.value}return d}function K(a){return a.replace(/&/g,"&amp;").replace(Q,function(a){var c=
a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(c-55296)+(a-56320)+65536)+";"}).replace(u,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function z(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var d=a.attributes,c=0,b=d.length;c<b;c++){var k=d[c],f=k.name.toLowerCase();if("xmlns:ns1"===f||0===f.lastIndexOf("ns1:",0))a.removeAttributeNode(k),c--,b--}(d=a.firstChild)&&z(d);a=v("nextSibling",a)}}function v(a,d){var c=d[a];if(c&&I.call(d,c))throw C("elclob",
d.outerHTML||d.outerText);return c}var y=!1,f=!1;this.$get=["$$sanitizeUri",function(a){y=!0;f&&g(m,l);return function(d){var c=[];J(d,B(c,function(b,c){return!/^unsafe:/.test(a(b,c))}));return c.join("")}}];this.enableSvg=function(a){return H(a)?(f=a,this):f};this.addValidElements=function(a){y||(G(a)&&(a={htmlElements:a}),t(l,a.svgElements),t(r,a.htmlVoidElements),t(m,a.htmlVoidElements),t(m,a.htmlElements));return this};this.addValidAttrs=function(a){y||g(L,A(a,!0));return this};E=e.bind;g=e.extend;
F=e.forEach;G=e.isArray;H=e.isDefined;q=e.$$lowercase;D=e.noop;J=function(a,d){null===a||void 0===a?a="":"string"!==typeof a&&(a=""+a);var c=M(a);if(!c)return"";var b=5;do{if(0===b)throw C("uinput");b--;a=c.innerHTML;c=M(a)}while(a!==c.innerHTML);for(b=c.firstChild;b;){switch(b.nodeType){case 1:d.start(b.nodeName.toLowerCase(),P(b.attributes));break;case 3:d.chars(b.textContent)}var k;if(!(k=b.firstChild)&&(1===b.nodeType&&d.end(b.nodeName.toLowerCase()),k=v("nextSibling",b),!k))for(;null==k;){b=
v("parentNode",b);if(b===c)break;k=v("nextSibling",b);1===b.nodeType&&d.end(b.nodeName.toLowerCase())}b=k}for(;b=c.firstChild;)c.removeChild(b)};B=function(a,d){var c=!1,b=E(a,a.push);return{start:function(a,f){a=q(a);!c&&w[a]&&(c=a);c||!0!==m[a]||(b("<"),b(a),F(f,function(c,f){var e=q(f),h="img"===a&&"src"===e||"background"===e;!0!==L[e]||!0===N[e]&&!d(c,h)||(b(" "),b(f),b('="'),b(K(c)),b('"'))}),b(">"))},end:function(a){a=q(a);c||!0!==m[a]||!0===r[a]||(b("</"),b(a),b(">"));a==c&&(c=!1)},chars:function(a){c||
b(K(a))}}};I=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var Q=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/([^#-~ |!])/g,r=h("area,br,col,hr,img,wbr"),x=h("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),p=h("rp,rt"),n=g({},p,x),x=g({},x,h("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),p=g({},p,h("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
l=h("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=h("script,style"),m=g({},r,x,p,n),N=h("background,cite,href,longdesc,src,xlink:href,xml:base"),n=h("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),
p=h("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",
!0),L=g({},N,p,n),M=function(a,d){function c(b){b="<remove></remove>"+b;try{var c=(new a.DOMParser).parseFromString(b,"text/html").body;c.firstChild.remove();return c}catch(d){}}var b;try{b=!!c("")}catch(f){b=!1}if(b)return c;if(!d||!d.implementation)throw C("noinert");b=d.implementation.createHTMLDocument("inert");var e=(b.documentElement||b.getDocumentElement()).querySelector("body");return function(a){e.innerHTML=a;d.documentMode&&z(e);return e}}(s,s.document)}).info({angularVersion:"1.8.2"});
e.module("ngSanitize").filter("linky",["$sanitize",function(h){var g=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,t=/^mailto:/i,q=e.$$minErr("linky"),s=e.isDefined,z=e.isFunction,v=e.isObject,y=e.isString;return function(f,e,u){function r(e){e&&l.push(O(e))}function x(f,h){var g,a=p(f);l.push("<a ");for(g in a)l.push(g+'="'+a[g]+'" ');!s(e)||"target"in a||l.push('target="',e,'" ');l.push('href="',f.replace(/"/g,"&quot;"),'">');r(h);l.push("</a>")}if(null==
f||""===f)return f;if(!y(f))throw q("notstring",f);for(var p=z(u)?u:v(u)?function(){return u}:function(){return{}},n=f,l=[],w,m;f=n.match(g);)w=f[0],f[2]||f[4]||(w=(f[3]?"http://":"mailto:")+w),m=f.index,r(n.substr(0,m)),x(w,f[0].replace(t,"")),n=n.substring(m+f[0].length);r(n);return h(l.join(""))}}])})(window,window.angular);
//# sourceMappingURL=angular-sanitize.min.js.map
;
/*
 * ngDialog - easy modals and popup windows
 * http://github.com/likeastore/ngDialog
 * (c) 2013-2015 MIT License, https://likeastore.com
 */

(function (root, factory) {
    if (typeof module !== 'undefined' && module.exports) {
        // CommonJS
        if (typeof angular === 'undefined') {
            factory(require('angular'));
        } else {
            factory(angular);
        }
        module.exports = 'ngDialog';
    } else if (typeof define === 'function' && define.amd) {
        // AMD
        define(['angular'], factory);
    } else {
        // Global Variables
        factory(root.angular);
    }
}(this, function (angular) {
    'use strict';

    var m = angular.module('ngDialog', []);

    var $el = angular.element;
    var isDef = angular.isDefined;
    var style = (document.body || document.documentElement).style;
    var animationEndSupport = isDef(style.animation) || isDef(style.WebkitAnimation) || isDef(style.MozAnimation) || isDef(style.MsAnimation) || isDef(style.OAnimation);
    var animationEndEvent = 'animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend';
    var focusableElementSelector = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]';
    var disabledAnimationClass = 'ngdialog-disabled-animation';
    var forceElementsReload = { html: false, body: false };
    var scopes = {};
    var openIdStack = [];
    var keydownIsBound = false;

    m.provider('ngDialog', function () {
        var defaults = this.defaults = {
            className: 'ngdialog-theme-default',
            disableAnimation: false,
            plain: false,
            showClose: true,
            closeByDocument: true,
            closeByEscape: true,
            closeByNavigation: false,
            appendTo: false,
            preCloseCallback: false,
            overlay: true,
            cache: true,
            trapFocus: true,
            preserveFocus: true,
            ariaAuto: true,
            ariaRole: null,
            ariaLabelledById: null,
            ariaLabelledBySelector: null,
            ariaDescribedById: null,
            ariaDescribedBySelector: null
        };

        this.setForceHtmlReload = function (_useIt) {
            forceElementsReload.html = _useIt || false;
        };

        this.setForceBodyReload = function (_useIt) {
            forceElementsReload.body = _useIt || false;
        };

        this.setDefaults = function (newDefaults) {
            angular.extend(defaults, newDefaults);
        };

        var globalID = 0, dialogsCount = 0, closeByDocumentHandler, defers = {};

        this.$get = ['$document', '$templateCache', '$compile', '$q', '$http', '$rootScope', '$timeout', '$window', '$controller', '$injector',
            function ($document, $templateCache, $compile, $q, $http, $rootScope, $timeout, $window, $controller, $injector) {
                var $elements = [];

                var privateMethods = {
                    onDocumentKeydown: function (event) {
                        if (event.keyCode === 27) {
                            publicMethods.close('$escape');
                        }
                    },

                    activate: function($dialog) {
                        var options = $dialog.data('$ngDialogOptions');

                        if (options.trapFocus) {
                            $dialog.on('keydown', privateMethods.onTrapFocusKeydown);

                            // Catch rogue changes (eg. after unfocusing everything by clicking a non-focusable element)
                            $elements.body.on('keydown', privateMethods.onTrapFocusKeydown);
                        }
                    },

                    deactivate: function ($dialog) {
                        $dialog.off('keydown', privateMethods.onTrapFocusKeydown);
                        $elements.body.off('keydown', privateMethods.onTrapFocusKeydown);
                    },

                    deactivateAll: function (els) {
                        angular.forEach(els,function(el) {
                            var $dialog = angular.element(el);
                            privateMethods.deactivate($dialog);
                        });
                    },

                    setBodyPadding: function (width) {
                        var originalBodyPadding = parseInt(($elements.body.css('padding-right') || 0), 10);
                        $elements.body.css('padding-right', (originalBodyPadding + width) + 'px');
                        $elements.body.data('ng-dialog-original-padding', originalBodyPadding);
                        $rootScope.$broadcast('ngDialog.setPadding', width);
                    },

                    resetBodyPadding: function () {
                        var originalBodyPadding = $elements.body.data('ng-dialog-original-padding');
                        if (originalBodyPadding) {
                            $elements.body.css('padding-right', originalBodyPadding + 'px');
                        } else {
                            $elements.body.css('padding-right', '');
                        }
                        $rootScope.$broadcast('ngDialog.setPadding', 0);
                    },

                    performCloseDialog: function ($dialog, value) {
                        var options = $dialog.data('$ngDialogOptions');
                        var id = $dialog.attr('id');
                        var scope = scopes[id];

                        if (!scope) {
                            // Already closed
                            return;
                        }

                        if (typeof $window.Hammer !== 'undefined') {
                            var hammerTime = scope.hammerTime;
                            hammerTime.off('tap', closeByDocumentHandler);
                            hammerTime.destroy && hammerTime.destroy();
                            delete scope.hammerTime;
                        } else {
                            $dialog.unbind('click');
                        }

                        if (dialogsCount === 1) {
                            $elements.body.unbind('keydown', privateMethods.onDocumentKeydown);
                        }

                        if (!$dialog.hasClass('ngdialog-closing')){
                            dialogsCount -= 1;
                        }

                        var previousFocus = $dialog.data('$ngDialogPreviousFocus');
                        if (previousFocus && previousFocus.focus) {
                            previousFocus.focus();
                        }

                        $rootScope.$broadcast('ngDialog.closing', $dialog, value);
                        dialogsCount = dialogsCount < 0 ? 0 : dialogsCount;
                        if (animationEndSupport && !options.disableAnimation) {
                            scope.$destroy();
                            $dialog.unbind(animationEndEvent).bind(animationEndEvent, function () {
                                privateMethods.closeDialogElement($dialog, value);
                            }).addClass('ngdialog-closing');
                        } else {
                            scope.$destroy();
                            privateMethods.closeDialogElement($dialog, value);
                        }
                        if (defers[id]) {
                            defers[id].resolve({
                                id: id,
                                value: value,
                                $dialog: $dialog,
                                remainingDialogs: dialogsCount
                            });
                            delete defers[id];
                        }
                        if (scopes[id]) {
                            delete scopes[id];
                        }
                        openIdStack.splice(openIdStack.indexOf(id), 1);
                        if (!openIdStack.length) {
                            $elements.body.unbind('keydown', privateMethods.onDocumentKeydown);
                            keydownIsBound = false;
                        }
                    },

                    closeDialogElement: function($dialog, value) {
                        $dialog.remove();
                        if (dialogsCount === 0) {
                            $elements.html.removeClass('ngdialog-open');
                            $elements.body.removeClass('ngdialog-open');
                            privateMethods.resetBodyPadding();
                        }
                        $rootScope.$broadcast('ngDialog.closed', $dialog, value);
                    },

                    closeDialog: function ($dialog, value) {
                        var preCloseCallback = $dialog.data('$ngDialogPreCloseCallback');

                        if (preCloseCallback && angular.isFunction(preCloseCallback)) {

                            var preCloseCallbackResult = preCloseCallback.call($dialog, value);

                            if (angular.isObject(preCloseCallbackResult)) {
                                if (preCloseCallbackResult.closePromise) {
                                    preCloseCallbackResult.closePromise.then(function () {
                                        privateMethods.performCloseDialog($dialog, value);
                                    });
                                } else {
                                    preCloseCallbackResult.then(function () {
                                        privateMethods.performCloseDialog($dialog, value);
                                    }, function () {
                                        return;
                                    });
                                }
                            } else if (preCloseCallbackResult !== false) {
                                privateMethods.performCloseDialog($dialog, value);
                            }
                        } else {
                            privateMethods.performCloseDialog($dialog, value);
                        }
                    },

                    onTrapFocusKeydown: function(ev) {
                        var el = angular.element(ev.currentTarget);
                        var $dialog;

                        if (el.hasClass('ngdialog')) {
                            $dialog = el;
                        } else {
                            $dialog = privateMethods.getActiveDialog();

                            if ($dialog === null) {
                                return;
                            }
                        }

                        var isTab = (ev.keyCode === 9);
                        var backward = (ev.shiftKey === true);

                        if (isTab) {
                            privateMethods.handleTab($dialog, ev, backward);
                        }
                    },

                    handleTab: function($dialog, ev, backward) {
                        var focusableElements = privateMethods.getFocusableElements($dialog);

                        if (focusableElements.length === 0) {
                            if (document.activeElement) {
                                document.activeElement.blur();
                            }
                            return;
                        }

                        var currentFocus = document.activeElement;
                        var focusIndex = Array.prototype.indexOf.call(focusableElements, currentFocus);

                        var isFocusIndexUnknown = (focusIndex === -1);
                        var isFirstElementFocused = (focusIndex === 0);
                        var isLastElementFocused = (focusIndex === focusableElements.length - 1);

                        var cancelEvent = false;

                        if (backward) {
                            if (isFocusIndexUnknown || isFirstElementFocused) {
                                focusableElements[focusableElements.length - 1].focus();
                                cancelEvent = true;
                            }
                        } else {
                            if (isFocusIndexUnknown || isLastElementFocused) {
                                focusableElements[0].focus();
                                cancelEvent = true;
                            }
                        }

                        if (cancelEvent) {
                            ev.preventDefault();
                            ev.stopPropagation();
                        }
                    },

                    autoFocus: function($dialog) {
                        var dialogEl = $dialog[0];

                        // Browser's (Chrome 40, Forefix 37, IE 11) don't appear to honor autofocus on the dialog, but we should
                        var autoFocusEl = dialogEl.querySelector('*[autofocus]');
                        if (autoFocusEl !== null) {
                            autoFocusEl.focus();

                            if (document.activeElement === autoFocusEl) {
                                return;
                            }

                            // Autofocus element might was display: none, so let's continue
                        }

                        var focusableElements = privateMethods.getFocusableElements($dialog);

                        if (focusableElements.length > 0) {
                            focusableElements[0].focus();
                            return;
                        }

                        // We need to focus something for the screen readers to notice the dialog
                        var contentElements = privateMethods.filterVisibleElements(dialogEl.querySelectorAll('h1,h2,h3,h4,h5,h6,p,span'));

                        if (contentElements.length > 0) {
                            var contentElement = contentElements[0];
                            $el(contentElement).attr('tabindex', '-1').css('outline', '0');
                            contentElement.focus();
                        }
                    },

                    getFocusableElements: function ($dialog) {
                        var dialogEl = $dialog[0];

                        var rawElements = dialogEl.querySelectorAll(focusableElementSelector);

                        // Ignore untabbable elements, ie. those with tabindex = -1
                        var tabbableElements = privateMethods.filterTabbableElements(rawElements);

                        return privateMethods.filterVisibleElements(tabbableElements);
                    },

                    filterTabbableElements: function (els) {
                        var tabbableFocusableElements = [];

                        for (var i = 0; i < els.length; i++) {
                            var el = els[i];

                            if ($el(el).attr('tabindex') !== '-1') {
                                tabbableFocusableElements.push(el);
                            }
                        }

                        return tabbableFocusableElements;
                    },

                    filterVisibleElements: function (els) {
                        var visibleFocusableElements = [];

                        for (var i = 0; i < els.length; i++) {
                            var el = els[i];

                            if (el.offsetWidth > 0 || el.offsetHeight > 0) {
                                visibleFocusableElements.push(el);
                            }
                        }

                        return visibleFocusableElements;
                    },

                    getActiveDialog: function () {
                        var dialogs = document.querySelectorAll('.ngdialog');

                        if (dialogs.length === 0) {
                            return null;
                        }

                        // TODO: This might be incorrect if there are a mix of open dialogs with different 'appendTo' values
                        return $el(dialogs[dialogs.length - 1]);
                    },

                    applyAriaAttributes: function ($dialog, options) {
                        if (options.ariaAuto) {
                            if (!options.ariaRole) {
                                var detectedRole = (privateMethods.getFocusableElements($dialog).length > 0) ?
                                    'dialog' :
                                    'alertdialog';

                                options.ariaRole = detectedRole;
                            }

                            if (!options.ariaLabelledBySelector) {
                                options.ariaLabelledBySelector = 'h1,h2,h3,h4,h5,h6';
                            }

                            if (!options.ariaDescribedBySelector) {
                                options.ariaDescribedBySelector = 'article,section,p';
                            }
                        }

                        if (options.ariaRole) {
                            $dialog.attr('role', options.ariaRole);
                        }

                        privateMethods.applyAriaAttribute(
                            $dialog, 'aria-labelledby', options.ariaLabelledById, options.ariaLabelledBySelector);

                        privateMethods.applyAriaAttribute(
                            $dialog, 'aria-describedby', options.ariaDescribedById, options.ariaDescribedBySelector);
                    },

                    applyAriaAttribute: function($dialog, attr, id, selector) {
                        if (id) {
                            $dialog.attr(attr, id);
                        }

                        if (selector) {
                            var dialogId = $dialog.attr('id');

                            var firstMatch = $dialog[0].querySelector(selector);

                            if (!firstMatch) {
                                return;
                            }

                            var generatedId = dialogId + '-' + attr;

                            $el(firstMatch).attr('id', generatedId);

                            $dialog.attr(attr, generatedId);

                            return generatedId;
                        }
                    },

                    detectUIRouter: function() {
                        //Detect if ui-router module is installed if not return false
                        try {
                            angular.module('ui.router');
                            return true;
                        } catch(err) {
                            return false;
                        }
                    },

                    getRouterLocationEventName: function() {
                        if(privateMethods.detectUIRouter()) {
                            return '$stateChangeSuccess';
                        }
                        return '$locationChangeSuccess';
                    }
                };

                var publicMethods = {
                    __PRIVATE__: privateMethods,

                    /*
                     * @param {Object} options:
                     * - template {String} - id of ng-template, url for partial, plain string (if enabled)
                     * - plain {Boolean} - enable plain string templates, default false
                     * - scope {Object}
                     * - controller {String}
                     * - controllerAs {String}
                     * - className {String} - dialog theme class
                     * - disableAnimation {Boolean} - set to true to disable animation
                     * - showClose {Boolean} - show close button, default true
                     * - closeByEscape {Boolean} - default true
                     * - closeByDocument {Boolean} - default true
                     * - preCloseCallback {String|Function} - user supplied function name/function called before closing dialog (if set)
                     *
                     * @return {Object} dialog
                     */
                    open: function (opts) {
                        var options = angular.copy(defaults);
                        var localID = ++globalID;
                        var dialogID = 'ngdialog' + localID;
                        openIdStack.push(dialogID);

                        opts = opts || {};
                        angular.extend(options, opts);

                        var defer;
                        defers[dialogID] = defer = $q.defer();

                        var scope;
                        scopes[dialogID] = scope = angular.isObject(options.scope) ? options.scope.$new() : $rootScope.$new();

                        var $dialog, $dialogParent;

                        var resolve = angular.extend({}, options.resolve);

                        angular.forEach(resolve, function (value, key) {
                            resolve[key] = angular.isString(value) ? $injector.get(value) : $injector.invoke(value, null, null, key);
                        });

                        $q.all({
                            template: loadTemplate(options.template || options.templateUrl),
                            locals: $q.all(resolve)
                        }).then(function (setup) {
                            var template = setup.template,
                                locals = setup.locals;

                            if (options.showClose) {
                                template += '<div class="ngdialog-close"></div>';
                            }

                            var hasOverlayClass = options.overlay ? '' : ' ngdialog-no-overlay';
                            $dialog = $el('<div id="ngdialog' + localID + '" class="ngdialog' + hasOverlayClass + '"></div>');
                            $dialog.html((options.overlay ?
                                '<div class="ngdialog-overlay"></div><div class="ngdialog-content" role="document">' + template + '</div>' :
                                '<div class="ngdialog-content" role="document">' + template + '</div>'));

                            $dialog.data('$ngDialogOptions', options);

                            scope.ngDialogId = dialogID;

                            if (options.data && angular.isString(options.data)) {
                                var firstLetter = options.data.replace(/^\s*/, '')[0];
                                scope.ngDialogData = (firstLetter === '{' || firstLetter === '[') ? angular.fromJson(options.data) : options.data;
                                scope.ngDialogData.ngDialogId = dialogID;
                            } else if (options.data && angular.isObject(options.data)) {
                                scope.ngDialogData = options.data;
                                scope.ngDialogData.ngDialogId = dialogID;
                            }

                            if (options.className) {
                                $dialog.addClass(options.className);
                            }

                            if (options.disableAnimation) {
                                $dialog.addClass(disabledAnimationClass);
                            }

                            if (options.appendTo && angular.isString(options.appendTo)) {
                                $dialogParent = angular.element(document.querySelector(options.appendTo));
                            } else {
                                $dialogParent = $elements.body;
                            }

                            privateMethods.applyAriaAttributes($dialog, options);

                            if (options.preCloseCallback) {
                                var preCloseCallback;

                                if (angular.isFunction(options.preCloseCallback)) {
                                    preCloseCallback = options.preCloseCallback;
                                } else if (angular.isString(options.preCloseCallback)) {
                                    if (scope) {
                                        if (angular.isFunction(scope[options.preCloseCallback])) {
                                            preCloseCallback = scope[options.preCloseCallback];
                                        } else if (scope.$parent && angular.isFunction(scope.$parent[options.preCloseCallback])) {
                                            preCloseCallback = scope.$parent[options.preCloseCallback];
                                        } else if ($rootScope && angular.isFunction($rootScope[options.preCloseCallback])) {
                                            preCloseCallback = $rootScope[options.preCloseCallback];
                                        }
                                    }
                                }

                                if (preCloseCallback) {
                                    $dialog.data('$ngDialogPreCloseCallback', preCloseCallback);
                                }
                            }

                            scope.closeThisDialog = function (value) {
                                privateMethods.closeDialog($dialog, value);
                            };

                            if (options.controller && (angular.isString(options.controller) || angular.isArray(options.controller) || angular.isFunction(options.controller))) {

                                var label;

                                if (options.controllerAs && angular.isString(options.controllerAs)) {
                                    label = options.controllerAs;
                                }

                                var controllerInstance = $controller(options.controller, angular.extend(
                                    locals,
                                    {
                                        $scope: scope,
                                        $element: $dialog
                                    }),
                                    true,
                                    label
                                );

                                if(options.bindToController) {
                                    angular.extend(controllerInstance.instance, {ngDialogId: scope.ngDialogId, ngDialogData: scope.ngDialogData, closeThisDialog: scope.closeThisDialog});
                                }

                                $dialog.data('$ngDialogControllerController', controllerInstance());
                            }

                            $timeout(function () {
                                var $activeDialogs = document.querySelectorAll('.ngdialog');
                                privateMethods.deactivateAll($activeDialogs);

                                $compile($dialog)(scope);
                                var widthDiffs = $window.innerWidth - $elements.body.prop('clientWidth');
                                $elements.html.addClass('ngdialog-open');
                                $elements.body.addClass('ngdialog-open');
                                var scrollBarWidth = widthDiffs - ($window.innerWidth - $elements.body.prop('clientWidth'));
                                if (scrollBarWidth > 0) {
                                    privateMethods.setBodyPadding(scrollBarWidth);
                                }
                                $dialogParent.append($dialog);

                                privateMethods.activate($dialog);

                                if (options.trapFocus) {
                                    privateMethods.autoFocus($dialog);
                                }

                                if (options.name) {
                                    $rootScope.$broadcast('ngDialog.opened', {dialog: $dialog, name: options.name});
                                } else {
                                    $rootScope.$broadcast('ngDialog.opened', $dialog);
                                }
                            });

                            if (!keydownIsBound) {
                                $elements.body.bind('keydown', privateMethods.onDocumentKeydown);
                                keydownIsBound = true;
                            }

                            if (options.closeByNavigation) {
                                var eventName = privateMethods.getRouterLocationEventName();
                                $rootScope.$on(eventName, function () {
                                    privateMethods.closeDialog($dialog);
                                });
                            }

                            if (options.preserveFocus) {
                                $dialog.data('$ngDialogPreviousFocus', document.activeElement);
                            }

                            closeByDocumentHandler = function (event) {
                                var isOverlay = options.closeByDocument ? $el(event.target).hasClass('ngdialog-overlay') : false;
                                var isCloseBtn = $el(event.target).hasClass('ngdialog-close');

                                if (isOverlay || isCloseBtn) {
                                    publicMethods.close($dialog.attr('id'), isCloseBtn ? '$closeButton' : '$document');
                                }
                            };

                            if (typeof $window.Hammer !== 'undefined') {
                                var hammerTime = scope.hammerTime = $window.Hammer($dialog[0]);
                                hammerTime.on('tap', closeByDocumentHandler);
                            } else {
                                $dialog.bind('click', closeByDocumentHandler);
                            }

                            dialogsCount += 1;

                            return publicMethods;
                        });

                        return {
                            id: dialogID,
                            closePromise: defer.promise,
                            close: function (value) {
                                privateMethods.closeDialog($dialog, value);
                            }
                        };

                        function loadTemplateUrl (tmpl, config) {
                            $rootScope.$broadcast('ngDialog.templateLoading', tmpl);
                            return $http.get(tmpl, (config || {})).then(function(res) {
                                $rootScope.$broadcast('ngDialog.templateLoaded', tmpl);
                                return res.data || '';
                            });
                        }

                        function loadTemplate (tmpl) {
                            if (!tmpl) {
                                return 'Empty template';
                            }

                            if (angular.isString(tmpl) && options.plain) {
                                return tmpl;
                            }

                            if (typeof options.cache === 'boolean' && !options.cache) {
                                return loadTemplateUrl(tmpl, {cache: false});
                            }

                            return loadTemplateUrl(tmpl, {cache: $templateCache});
                        }
                    },

                    /*
                     * @param {Object} options:
                     * - template {String} - id of ng-template, url for partial, plain string (if enabled)
                     * - plain {Boolean} - enable plain string templates, default false
                     * - name {String}
                     * - scope {Object}
                     * - controller {String}
                     * - controllerAs {String}
                     * - className {String} - dialog theme class
                     * - showClose {Boolean} - show close button, default true
                     * - closeByEscape {Boolean} - default false
                     * - closeByDocument {Boolean} - default false
                     * - preCloseCallback {String|Function} - user supplied function name/function called before closing dialog (if set); not called on confirm
                     *
                     * @return {Object} dialog
                     */
                    openConfirm: function (opts) {
                        var defer = $q.defer();
                        var options = angular.copy(defaults);
                        
                        opts = opts || {};
                        angular.extend(options, opts);

                        options.scope = angular.isObject(options.scope) ? options.scope.$new() : $rootScope.$new();
                        options.scope.confirm = function (value) {
                            defer.resolve(value);
                            var $dialog = $el(document.getElementById(openResult.id));
                            privateMethods.performCloseDialog($dialog, value);
                        };

                        var openResult = publicMethods.open(options);
                        openResult.closePromise.then(function (data) {
                            if (data) {
                                return defer.reject(data.value);
                            }
                            return defer.reject();
                        });

                        return defer.promise;
                    },

                    isOpen: function(id) {
                        var $dialog = $el(document.getElementById(id));
                        return $dialog.length > 0;
                    },

                    /*
                     * @param {String} id
                     * @return {Object} dialog
                     */
                    close: function (id, value) {
                        var $dialog = $el(document.getElementById(id));

                        if ($dialog.length) {
                            privateMethods.closeDialog($dialog, value);
                        } else {
                            if (id === '$escape') {
                                var topDialogId = openIdStack[openIdStack.length - 1];
                                $dialog = $el(document.getElementById(topDialogId));
                                if ($dialog.data('$ngDialogOptions').closeByEscape) {
                                    privateMethods.closeDialog($dialog, '$escape');
                                }
                            } else {
                                publicMethods.closeAll(value);
                            }
                        }

                        return publicMethods;
                    },

                    closeAll: function (value) {
                        var $all = document.querySelectorAll('.ngdialog');

                        // Reverse order to ensure focus restoration works as expected
                        for (var i = $all.length - 1; i >= 0; i--) {
                            var dialog = $all[i];
                            privateMethods.closeDialog($el(dialog), value);
                        }
                    },

                    getOpenDialogs: function() {
                        return openIdStack;
                    },

                    getDefaults: function () {
                        return defaults;
                    }
                };

                angular.forEach(
                    ['html', 'body'],
                    function(elementName) {
                        $elements[elementName] = $document.find(elementName);
                        if (forceElementsReload[elementName]) {
                            var eventName = privateMethods.getRouterLocationEventName();
                            $rootScope.$on(eventName, function () {
                                $elements[elementName] = $document.find(elementName);
                            });
                        }
                    }
                );

                return publicMethods;
            }];
    });

    m.directive('ngDialog', ['ngDialog', function (ngDialog) {
        return {
            restrict: 'A',
            scope: {
                ngDialogScope: '='
            },
            link: function (scope, elem, attrs) {
                elem.on('click', function (e) {
                    e.preventDefault();

                    var ngDialogScope = angular.isDefined(scope.ngDialogScope) ? scope.ngDialogScope : 'noScope';
                    angular.isDefined(attrs.ngDialogClosePrevious) && ngDialog.close(attrs.ngDialogClosePrevious);

                    var defaults = ngDialog.getDefaults();

                    ngDialog.open({
                        template: attrs.ngDialog,
                        className: attrs.ngDialogClass || defaults.className,
                        controller: attrs.ngDialogController,
                        controllerAs: attrs.ngDialogControllerAs,
                        bindToController: attrs.ngDialogBindToController,
                        scope: ngDialogScope,
                        data: attrs.ngDialogData,
                        showClose: attrs.ngDialogShowClose === 'false' ? false : (attrs.ngDialogShowClose === 'true' ? true : defaults.showClose),
                        closeByDocument: attrs.ngDialogCloseByDocument === 'false' ? false : (attrs.ngDialogCloseByDocument === 'true' ? true : defaults.closeByDocument),
                        closeByEscape: attrs.ngDialogCloseByEscape === 'false' ? false : (attrs.ngDialogCloseByEscape === 'true' ? true : defaults.closeByEscape),
                        overlay: attrs.ngDialogOverlay === 'false' ? false : (attrs.ngDialogOverlay === 'true' ? true : defaults.overlay),
                        preCloseCallback: attrs.ngDialogPreCloseCallback || defaults.preCloseCallback
                    });
                });
            }
        };
    }]);

    return m;
}));
;
/*
 * jQuery Iframe Transport Plugin 1.8.2
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2011, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/* global define, window, document */

(function (factory) {
  'use strict';
  if (typeof define === 'function' && define.amd) {
    // Register as an anonymous AMD module:
    define(['jquery'], factory);
  } else {
    // Browser globals:
    factory(window.jQuery);
  }
}(function ($) {
  'use strict';

  // Helper variable to create unique names for the transport iframes:
  var counter = 0;

  // The iframe transport accepts four additional options:
  // options.fileInput: a jQuery collection of file input fields
  // options.paramName: the parameter name for the file form data,
  //  overrides the name property of the file input field(s),
  //  can be a string or an array of strings.
  // options.formData: an array of objects with name and value properties,
  //  equivalent to the return data of .serializeArray(), e.g.:
  //  [{name: 'a', value: 1}, {name: 'b', value: 2}]
  // options.initialIframeSrc: the URL of the initial iframe src,
  //  by default set to "javascript:false;"
  $.ajaxTransport('iframe', function (options) {
    if (options.async) {
      // javascript:false as initial iframe src
      // prevents warning popups on HTTPS in IE6:
      /*jshint scripturl: true */
      var initialIframeSrc = options.initialIframeSrc || 'javascript:false;',
      /*jshint scripturl: false */
        form,
        iframe,
        addParamChar;
      return {
        send: function (_, completeCallback) {
          form = $('<form style="display:none;"></form>');
          form.attr('accept-charset', options.formAcceptCharset);
          addParamChar = /\?/.test(options.url) ? '&' : '?';
          // XDomainRequest only supports GET and POST:
          if (options.type === 'DELETE') {
            options.url = options.url + addParamChar + '_method=DELETE';
            options.type = 'POST';
          } else if (options.type === 'PUT') {
            options.url = options.url + addParamChar + '_method=PUT';
            options.type = 'POST';
          } else if (options.type === 'PATCH') {
            options.url = options.url + addParamChar + '_method=PATCH';
            options.type = 'POST';
          }
          // IE versions below IE8 cannot set the name property of
          // elements that have already been added to the DOM,
          // so we set the name along with the iframe HTML markup:
          counter += 1;
          iframe = $(
            '<iframe src="' + initialIframeSrc +
              '" name="iframe-transport-' + counter + '"></iframe>'
          ).bind('load', function () {
              var fileInputClones,
                paramNames = $.isArray(options.paramName) ?
                  options.paramName : [options.paramName];
              iframe
                .unbind('load')
                .bind('load', function () {
                  var response;
                  // Wrap in a try/catch block to catch exceptions thrown
                  // when trying to access cross-domain iframe contents:
                  try {
                    response = iframe.contents();
                    // Google Chrome and Firefox do not throw an
                    // exception when calling iframe.contents() on
                    // cross-domain requests, so we unify the response:
                    if (!response.length || !response[0].firstChild) {
                      throw new Error();
                    }
                  } catch (e) {
                    response = undefined;
                  }
                  // The complete callback returns the
                  // iframe content document as response object:
                  completeCallback(
                    200,
                    'success',
                    {'iframe': response}
                  );
                  // Fix for IE endless progress bar activity bug
                  // (happens on form submits to iframe targets):
                  $('<iframe src="' + initialIframeSrc + '"></iframe>')
                    .appendTo(form);
                  window.setTimeout(function () {
                    // Removing the form in a setTimeout call
                    // allows Chrome's developer tools to display
                    // the response result
                    form.remove();
                  }, 0);
                });
              form
                .prop('target', iframe.prop('name'))
                .prop('action', options.url)
                .prop('method', options.type);
              if (options.formData) {
                $.each(options.formData, function (index, field) {
                  $('<input type="hidden"/>')
                    .prop('name', field.name)
                    .val(field.value)
                    .appendTo(form);
                });
              }
              if (options.fileInput && options.fileInput.length &&
                options.type === 'POST') {
                fileInputClones = options.fileInput.clone();
                // Insert a clone for each file input field:
                options.fileInput.after(function (index) {
                  return fileInputClones[index];
                });
                if (options.paramName) {
                  options.fileInput.each(function (index) {
                    $(this).prop(
                      'name',
                      paramNames[index] || options.paramName
                    );
                  });
                }
                // Appending the file input fields to the hidden form
                // removes them from their original location:
                form
                  .append(options.fileInput)
                  .prop('enctype', 'multipart/form-data')
                  // enctype must be set as encoding for IE:
                  .prop('encoding', 'multipart/form-data');
                // Remove the HTML5 form attribute from the input(s):
                options.fileInput.removeAttr('form');
              }
              form.submit();
              // Insert the file input fields at their original location
              // by replacing the clones with the originals:
              if (fileInputClones && fileInputClones.length) {
                options.fileInput.each(function (index, input) {
                  var clone = $(fileInputClones[index]);
                  // Restore the original name and form properties:
                  $(input)
                    .prop('name', clone.prop('name'))
                    .attr('form', clone.attr('form'));
                  clone.replaceWith(input);
                });
              }
            });
          form.append(iframe).appendTo(document.body);
        },
        abort: function () {
          if (iframe) {
            // javascript:false as iframe src aborts the request
            // and prevents warning popups on HTTPS in IE6.
            // concat is used to avoid the "Script URL" JSLint error:
            iframe
              .unbind('load')
              .prop('src', initialIframeSrc);
          }
          if (form) {
            form.remove();
          }
        }
      };
    }
  });

  // The iframe transport returns the iframe content document as response.
  // The following adds converters from iframe to text, json, html, xml
  // and script.
  // Please note that the Content-Type for JSON responses has to be text/plain
  // or text/html, if the browser doesn't include application/json in the
  // Accept header, else IE will show a download dialog.
  // The Content-Type for XML responses on the other hand has to be always
  // application/xml or text/xml, so IE properly parses the XML response.
  // See also
  // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
  $.ajaxSetup({
    converters: {
      'iframe text': function (iframe) {
        return iframe && $(iframe[0].body).text();
      },
      'iframe json': function (iframe) {
        return iframe && $.parseJSON($(iframe[0].body).text());
      },
      'iframe html': function (iframe) {
        return iframe && $(iframe[0].body).html();
      },
      'iframe xml': function (iframe) {
        var xmlDoc = iframe && iframe[0];
        return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc :
          $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) ||
            $(xmlDoc.body).html());
      },
      'iframe script': function (iframe) {
        return iframe && $.globalEval($(iframe[0].body).text());
      }
    }
  });

}));
;
/*
 * jQuery File Upload Plugin 5.40.1
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/* jshint nomen:false */
/* global define, window, document, location, Blob, FormData */

(function (factory) {
  'use strict';
  if (typeof define === 'function' && define.amd) {
    // Register as an anonymous AMD module:
    define([
      'jquery',
      'jquery.ui.widget'
    ], factory);
  } else {
    // Browser globals:
    factory(window.jQuery);
  }
}(function ($) {
  'use strict';

  // Detect file input support, based on
  // http://viljamis.com/blog/2012/file-upload-support-on-mobile/
  $.support.fileInput = !(new RegExp(
    // Handle devices which give false positives for the feature detection:
    '(Android (1\\.[0156]|2\\.[01]))' +
      '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +
      '|(w(eb)?OSBrowser)|(webOS)' +
      '|(Kindle/(1\\.0|2\\.[05]|3\\.0))'
  ).test(window.navigator.userAgent) ||
    // Feature detection for all other devices:
    $('<input type="file">').prop('disabled'));

  // The FileReader API is not actually used, but works as feature detection,
  // as some Safari versions (5?) support XHR file uploads via the FormData API,
  // but not non-multipart XHR file uploads.
  // window.XMLHttpRequestUpload is not available on IE10, so we check for
  // window.ProgressEvent instead to detect XHR2 file upload capability:
  $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);
  $.support.xhrFormDataFileUpload = !!window.FormData;

  // Detect support for Blob slicing (required for chunked uploads):
  $.support.blobSlice = window.Blob && (Blob.prototype.slice ||
    Blob.prototype.webkitSlice || Blob.prototype.mozSlice);

  // The fileupload widget listens for change events on file input fields defined
  // via fileInput setting and paste or drop events of the given dropZone.
  // In addition to the default jQuery Widget methods, the fileupload widget
  // exposes the "add" and "send" methods, to add or directly send files using
  // the fileupload API.
  // By default, files added via file input selection, paste, drag & drop or
  // "add" method are uploaded immediately, but it is possible to override
  // the "add" callback option to queue file uploads.
  $.widget('blueimp.fileupload', {

    options: {
      // The drop target element(s), by the default the complete document.
      // Set to null to disable drag & drop support:
      dropZone: $(document),
      // The paste target element(s), by the default the complete document.
      // Set to null to disable paste support:
      pasteZone: $(document),
      // The file input field(s), that are listened to for change events.
      // If undefined, it is set to the file input fields inside
      // of the widget element on plugin initialization.
      // Set to null to disable the change listener.
      fileInput: undefined,
      // By default, the file input field is replaced with a clone after
      // each input field change event. This is required for iframe transport
      // queues and allows change events to be fired for the same file
      // selection, but can be disabled by setting the following option to false:
      replaceFileInput: true,
      // The parameter name for the file form data (the request argument name).
      // If undefined or empty, the name property of the file input field is
      // used, or "files[]" if the file input name property is also empty,
      // can be a string or an array of strings:
      paramName: undefined,
      // By default, each file of a selection is uploaded using an individual
      // request for XHR type uploads. Set to false to upload file
      // selections in one request each:
      singleFileUploads: true,
      // To limit the number of files uploaded with one XHR request,
      // set the following option to an integer greater than 0:
      limitMultiFileUploads: undefined,
      // The following option limits the number of files uploaded with one
      // XHR request to keep the request size under or equal to the defined
      // limit in bytes:
      limitMultiFileUploadSize: undefined,
      // Multipart file uploads add a number of bytes to each uploaded file,
      // therefore the following option adds an overhead for each file used
      // in the limitMultiFileUploadSize configuration:
      limitMultiFileUploadSizeOverhead: 512,
      // Set the following option to true to issue all file upload requests
      // in a sequential order:
      sequentialUploads: false,
      // To limit the number of concurrent uploads,
      // set the following option to an integer greater than 0:
      limitConcurrentUploads: undefined,
      // Set the following option to true to force iframe transport uploads:
      forceIframeTransport: false,
      // Set the following option to the location of a redirect url on the
      // origin server, for cross-domain iframe transport uploads:
      redirect: undefined,
      // The parameter name for the redirect url, sent as part of the form
      // data and set to 'redirect' if this option is empty:
      redirectParamName: undefined,
      // Set the following option to the location of a postMessage window,
      // to enable postMessage transport uploads:
      postMessage: undefined,
      // By default, XHR file uploads are sent as multipart/form-data.
      // The iframe transport is always using multipart/form-data.
      // Set to false to enable non-multipart XHR uploads:
      multipart: true,
      // To upload large files in smaller chunks, set the following option
      // to a preferred maximum chunk size. If set to 0, null or undefined,
      // or the browser does not support the required Blob API, files will
      // be uploaded as a whole.
      maxChunkSize: undefined,
      // When a non-multipart upload or a chunked multipart upload has been
      // aborted, this option can be used to resume the upload by setting
      // it to the size of the already uploaded bytes. This option is most
      // useful when modifying the options object inside of the "add" or
      // "send" callbacks, as the options are cloned for each file upload.
      uploadedBytes: undefined,
      // By default, failed (abort or error) file uploads are removed from the
      // global progress calculation. Set the following option to false to
      // prevent recalculating the global progress data:
      recalculateProgress: true,
      // Interval in milliseconds to calculate and trigger progress events:
      progressInterval: 100,
      // Interval in milliseconds to calculate progress bitrate:
      bitrateInterval: 500,
      // By default, uploads are started automatically when adding files:
      autoUpload: true,

      // Error and info messages:
      messages: {
        uploadedBytes: 'Uploaded bytes exceed file size'
      },

      // Translation function, gets the message key to be translated
      // and an object with context specific data as arguments:
      i18n: function (message, context) {
        message = this.messages[message] || message.toString();
        if (context) {
          $.each(context, function (key, value) {
            message = message.replace('{' + key + '}', value);
          });
        }
        return message;
      },

      // Additional form data to be sent along with the file uploads can be set
      // using this option, which accepts an array of objects with name and
      // value properties, a function returning such an array, a FormData
      // object (for XHR file uploads), or a simple object.
      // The form of the first fileInput is given as parameter to the function:
      formData: function (form) {
        return form.serializeArray();
      },

      // The add callback is invoked as soon as files are added to the fileupload
      // widget (via file input selection, drag & drop, paste or add API call).
      // If the singleFileUploads option is enabled, this callback will be
      // called once for each file in the selection for XHR file uploads, else
      // once for each file selection.
      //
      // The upload starts when the submit method is invoked on the data parameter.
      // The data object contains a files property holding the added files
      // and allows you to override plugin options as well as define ajax settings.
      //
      // Listeners for this callback can also be bound the following way:
      // .bind('fileuploadadd', func);
      //
      // data.submit() returns a Promise object and allows to attach additional
      // handlers using jQuery's Deferred callbacks:
      // data.submit().done(func).fail(func).always(func);
      add: function (e, data) {
        if (e.isDefaultPrevented()) {
          return false;
        }
        if (data.autoUpload || (data.autoUpload !== false &&
          $(this).fileupload('option', 'autoUpload'))) {
          data.process().done(function () {
            data.submit();
          });
        }
      },

      // Other callbacks:

      // Callback for the submit event of each file upload:
      // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);

      // Callback for the start of each file upload request:
      // send: function (e, data) {}, // .bind('fileuploadsend', func);

      // Callback for successful uploads:
      // done: function (e, data) {}, // .bind('fileuploaddone', func);
      // done: function (e, data) {}, // .bind('fileuploaddone', func);

      // Callback for failed (abort or error) uploads:
      // fail: function (e, data) {}, // .bind('fileuploadfail', func);

      // Callback for completed (success, abort or error) requests:
      // always: function (e, data) {}, // .bind('fileuploadalways', func);

      // Callback for upload progress events:
      // progress: function (e, data) {}, // .bind('fileuploadprogress', func);

      // Callback for global upload progress events:
      // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);

      // Callback for uploads start, equivalent to the global ajaxStart event:
      // start: function (e) {}, // .bind('fileuploadstart', func);

      // Callback for uploads stop, equivalent to the global ajaxStop event:
      // stop: function (e) {}, // .bind('fileuploadstop', func);

      // Callback for change events of the fileInput(s):
      // change: function (e, data) {}, // .bind('fileuploadchange', func);

      // Callback for paste events to the pasteZone(s):
      // paste: function (e, data) {}, // .bind('fileuploadpaste', func);

      // Callback for drop events of the dropZone(s):
      // drop: function (e, data) {}, // .bind('fileuploaddrop', func);

      // Callback for dragover events of the dropZone(s):
      // dragover: function (e) {}, // .bind('fileuploaddragover', func);

      // Callback for the start of each chunk upload request:
      // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);

      // Callback for successful chunk uploads:
      // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);

      // Callback for failed (abort or error) chunk uploads:
      // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);

      // Callback for completed (success, abort or error) chunk upload requests:
      // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);

      // The plugin options are used as settings object for the ajax calls.
      // The following are jQuery ajax settings required for the file uploads:
      processData: false,
      contentType: false,
      cache: false
    },

    // A list of options that require reinitializing event listeners and/or
    // special initialization code:
    _specialOptions: [
      'fileInput',
      'dropZone',
      'pasteZone',
      'multipart',
      'forceIframeTransport'
    ],

    _blobSlice: $.support.blobSlice && function () {
      var slice = this.slice || this.webkitSlice || this.mozSlice;
      return slice.apply(this, arguments);
    },

    _BitrateTimer: function () {
      this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());
      this.loaded = 0;
      this.bitrate = 0;
      this.getBitrate = function (now, loaded, interval) {
        var timeDiff = now - this.timestamp;
        if (!this.bitrate || !interval || timeDiff > interval) {
          this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
          this.loaded = loaded;
          this.timestamp = now;
        }
        return this.bitrate;
      };
    },

    _isXHRUpload: function (options) {
      return !options.forceIframeTransport &&
        ((!options.multipart && $.support.xhrFileUpload) ||
          $.support.xhrFormDataFileUpload);
    },

    _getFormData: function (options) {
      var formData;
      if ($.type(options.formData) === 'function') {
        return options.formData(options.form);
      }
      if ($.isArray(options.formData)) {
        return options.formData;
      }
      if ($.type(options.formData) === 'object') {
        formData = [];
        $.each(options.formData, function (name, value) {
          formData.push({name: name, value: value});
        });
        return formData;
      }
      return [];
    },

    _getTotal: function (files) {
      var total = 0;
      $.each(files, function (index, file) {
        total += file.size || 1;
      });
      return total;
    },

    _initProgressObject: function (obj) {
      var progress = {
        loaded: 0,
        total: 0,
        bitrate: 0
      };
      if (obj._progress) {
        $.extend(obj._progress, progress);
      } else {
        obj._progress = progress;
      }
    },

    _initResponseObject: function (obj) {
      var prop;
      if (obj._response) {
        for (prop in obj._response) {
          if (obj._response.hasOwnProperty(prop)) {
            delete obj._response[prop];
          }
        }
      } else {
        obj._response = {};
      }
    },

    _onProgress: function (e, data) {
      if (e.lengthComputable) {
        var now = ((Date.now) ? Date.now() : (new Date()).getTime()),
          loaded;
        if (data._time && data.progressInterval &&
          (now - data._time < data.progressInterval) &&
          e.loaded !== e.total) {
          return;
        }
        data._time = now;
        loaded = Math.floor(
          e.loaded / e.total * (data.chunkSize || data._progress.total)
        ) + (data.uploadedBytes || 0);
        // Add the difference from the previously loaded state
        // to the global loaded counter:
        this._progress.loaded += (loaded - data._progress.loaded);
        this._progress.bitrate = this._bitrateTimer.getBitrate(
          now,
          this._progress.loaded,
          data.bitrateInterval
        );
        data._progress.loaded = data.loaded = loaded;
        data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(
          now,
          loaded,
          data.bitrateInterval
        );
        // Trigger a custom progress event with a total data property set
        // to the file size(s) of the current upload and a loaded data
        // property calculated accordingly:
        this._trigger(
          'progress',
          $.Event('progress', {delegatedEvent: e}),
          data
        );
        // Trigger a global progress event for all current file uploads,
        // including ajax calls queued for sequential file uploads:
        this._trigger(
          'progressall',
          $.Event('progressall', {delegatedEvent: e}),
          this._progress
        );
      }
    },

    _initProgressListener: function (options) {
      var that = this,
        xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
      // Accesss to the native XHR object is required to add event listeners
      // for the upload progress event:
      if (xhr.upload) {
        $(xhr.upload).bind('progress', function (e) {
          var oe = e.originalEvent;
          // Make sure the progress event properties get copied over:
          e.lengthComputable = oe.lengthComputable;
          e.loaded = oe.loaded;
          e.total = oe.total;
          that._onProgress(e, options);
        });
        options.xhr = function () {
          return xhr;
        };
      }
    },

    _isInstanceOf: function (type, obj) {
      // Cross-frame instanceof check
      return Object.prototype.toString.call(obj) === '[object ' + type + ']';
    },

    _initXHRData: function (options) {
      var that = this,
        formData,
        file = options.files[0],
      // Ignore non-multipart setting if not supported:
        multipart = options.multipart || !$.support.xhrFileUpload,
        paramName = $.type(options.paramName) === 'array' ?
          options.paramName[0] : options.paramName;
      options.headers = $.extend({}, options.headers);
      if (options.contentRange) {
        options.headers['Content-Range'] = options.contentRange;
      }
      if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
        options.headers['Content-Disposition'] = 'attachment; filename="' +
          encodeURI(file.name) + '"';
      }
      if (!multipart) {
        options.contentType = file.type || 'application/octet-stream';
        options.data = options.blob || file;
      } else if ($.support.xhrFormDataFileUpload) {
        if (options.postMessage) {
          // window.postMessage does not allow sending FormData
          // objects, so we just add the File/Blob objects to
          // the formData array and let the postMessage window
          // create the FormData object out of this array:
          formData = this._getFormData(options);
          if (options.blob) {
            formData.push({
              name: paramName,
              value: options.blob
            });
          } else {
            $.each(options.files, function (index, file) {
              formData.push({
                name: ($.type(options.paramName) === 'array' &&
                  options.paramName[index]) || paramName,
                value: file
              });
            });
          }
        } else {
          if (that._isInstanceOf('FormData', options.formData)) {
            formData = options.formData;
          } else {
            formData = new FormData();
            $.each(this._getFormData(options), function (index, field) {
              formData.append(field.name, field.value);
            });
          }
          if (options.blob) {
            formData.append(paramName, options.blob, file.name);
          } else {
            $.each(options.files, function (index, file) {
              // This check allows the tests to run with
              // dummy objects:
              if (that._isInstanceOf('File', file) ||
                that._isInstanceOf('Blob', file)) {
                formData.append(
                  ($.type(options.paramName) === 'array' &&
                    options.paramName[index]) || paramName,
                  file,
                  file.uploadName || file.name
                );
              }
            });
          }
        }
        options.data = formData;
      }
      // Blob reference is not needed anymore, free memory:
      options.blob = null;
    },

    _initIframeSettings: function (options) {
      var targetHost = $('<a></a>').prop('href', options.url).prop('host');
      // Setting the dataType to iframe enables the iframe transport:
      options.dataType = 'iframe ' + (options.dataType || '');
      // The iframe transport accepts a serialized array as form data:
      options.formData = this._getFormData(options);
      // Add redirect url to form data on cross-domain uploads:
      if (options.redirect && targetHost && targetHost !== location.host) {
        options.formData.push({
          name: options.redirectParamName || 'redirect',
          value: options.redirect
        });
      }
    },

    _initDataSettings: function (options) {
      if (this._isXHRUpload(options)) {
        if (!this._chunkedUpload(options, true)) {
          if (!options.data) {
            this._initXHRData(options);
          }
          this._initProgressListener(options);
        }
        if (options.postMessage) {
          // Setting the dataType to postmessage enables the
          // postMessage transport:
          options.dataType = 'postmessage ' + (options.dataType || '');
        }
      } else {
        this._initIframeSettings(options);
      }
    },

    _getParamName: function (options) {
      var fileInput = $(options.fileInput),
        paramName = options.paramName;
      if (!paramName) {
        paramName = [];
        fileInput.each(function () {
          var input = $(this),
            name = input.prop('name') || 'files[]',
            i = (input.prop('files') || [1]).length;
          while (i) {
            paramName.push(name);
            i -= 1;
          }
        });
        if (!paramName.length) {
          paramName = [fileInput.prop('name') || 'files[]'];
        }
      } else if (!$.isArray(paramName)) {
        paramName = [paramName];
      }
      return paramName;
    },

    _initFormSettings: function (options) {
      // Retrieve missing options from the input field and the
      // associated form, if available:
      if (!options.form || !options.form.length) {
        options.form = $(options.fileInput.prop('form'));
        // If the given file input doesn't have an associated form,
        // use the default widget file input's form:
        if (!options.form.length) {
          options.form = $(this.options.fileInput.prop('form'));
        }
      }
      options.paramName = this._getParamName(options);
      if (!options.url) {
        options.url = options.form.prop('action') || location.href;
      }
      // The HTTP request method must be "POST" or "PUT":
      options.type = (options.type ||
        ($.type(options.form.prop('method')) === 'string' &&
          options.form.prop('method')) || ''
        ).toUpperCase();
      if (options.type !== 'POST' && options.type !== 'PUT' &&
        options.type !== 'PATCH') {
        options.type = 'POST';
      }
      if (!options.formAcceptCharset) {
        options.formAcceptCharset = options.form.attr('accept-charset');
      }
    },

    _getAJAXSettings: function (data) {
      var options = $.extend({}, this.options, data);
      this._initFormSettings(options);
      this._initDataSettings(options);
      return options;
    },

    // jQuery 1.6 doesn't provide .state(),
    // while jQuery 1.8+ removed .isRejected() and .isResolved():
    _getDeferredState: function (deferred) {
      if (deferred.state) {
        return deferred.state();
      }
      if (deferred.isResolved()) {
        return 'resolved';
      }
      if (deferred.isRejected()) {
        return 'rejected';
      }
      return 'pending';
    },

    // Maps jqXHR callbacks to the equivalent
    // methods of the given Promise object:
    _enhancePromise: function (promise) {
      promise.success = promise.done;
      promise.error = promise.fail;
      promise.complete = promise.always;
      return promise;
    },

    // Creates and returns a Promise object enhanced with
    // the jqXHR methods abort, success, error and complete:
    _getXHRPromise: function (resolveOrReject, context, args) {
      var dfd = $.Deferred(),
        promise = dfd.promise();
      context = context || this.options.context || promise;
      if (resolveOrReject === true) {
        dfd.resolveWith(context, args);
      } else if (resolveOrReject === false) {
        dfd.rejectWith(context, args);
      }
      promise.abort = dfd.promise;
      return this._enhancePromise(promise);
    },

    // Adds convenience methods to the data callback argument:
    _addConvenienceMethods: function (e, data) {
      var that = this,
        getPromise = function (args) {
          return $.Deferred().resolveWith(that, args).promise();
        };
      data.process = function (resolveFunc, rejectFunc) {
        if (resolveFunc || rejectFunc) {
          data._processQueue = this._processQueue =
            (this._processQueue || getPromise([this])).pipe(
              function () {
                if (data.errorThrown) {
                  return $.Deferred()
                    .rejectWith(that, [data]).promise();
                }
                return getPromise(arguments);
              }
            ).pipe(resolveFunc, rejectFunc);
        }
        return this._processQueue || getPromise([this]);
      };
      data.submit = function () {
        if (this.state() !== 'pending') {
          data.jqXHR = this.jqXHR =
            (that._trigger(
              'submit',
              $.Event('submit', {delegatedEvent: e}),
              this
            ) !== false) && that._onSend(e, this);
        }
        return this.jqXHR || that._getXHRPromise();
      };
      data.abort = function () {
        if (this.jqXHR) {
          return this.jqXHR.abort();
        }
        this.errorThrown = 'abort';
        that._trigger('fail', null, this);
        return that._getXHRPromise(false);
      };
      data.state = function () {
        if (this.jqXHR) {
          return that._getDeferredState(this.jqXHR);
        }
        if (this._processQueue) {
          return that._getDeferredState(this._processQueue);
        }
      };
      data.processing = function () {
        return !this.jqXHR && this._processQueue && that
          ._getDeferredState(this._processQueue) === 'pending';
      };
      data.progress = function () {
        return this._progress;
      };
      data.response = function () {
        return this._response;
      };
    },

    // Parses the Range header from the server response
    // and returns the uploaded bytes:
    _getUploadedBytes: function (jqXHR) {
      var range = jqXHR.getResponseHeader('Range'),
        parts = range && range.split('-'),
        upperBytesPos = parts && parts.length > 1 &&
          parseInt(parts[1], 10);
      return upperBytesPos && upperBytesPos + 1;
    },

    // Uploads a file in multiple, sequential requests
    // by splitting the file up in multiple blob chunks.
    // If the second parameter is true, only tests if the file
    // should be uploaded in chunks, but does not invoke any
    // upload requests:
    _chunkedUpload: function (options, testOnly) {
      options.uploadedBytes = options.uploadedBytes || 0;
      var that = this,
        file = options.files[0],
        fs = file.size,
        ub = options.uploadedBytes,
        mcs = options.maxChunkSize || fs,
        slice = this._blobSlice,
        dfd = $.Deferred(),
        promise = dfd.promise(),
        jqXHR,
        upload;
      if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
        options.data) {
        return false;
      }
      if (testOnly) {
        return true;
      }
      if (ub >= fs) {
        file.error = options.i18n('uploadedBytes');
        return this._getXHRPromise(
          false,
          options.context,
          [null, 'error', file.error]
        );
      }
      // The chunk upload method:
      upload = function () {
        // Clone the options object for each chunk upload:
        var o = $.extend({}, options),
          currentLoaded = o._progress.loaded;
        o.blob = slice.call(
          file,
          ub,
          ub + mcs,
          file.type
        );
        // Store the current chunk size, as the blob itself
        // will be dereferenced after data processing:
        o.chunkSize = o.blob.size;

        // Expose the chunk bytes position range:
        o.contentRange = 'bytes ' + ub + '-' +
          (ub + o.chunkSize - 1) + '/' + fs;
        // Process the upload data (the blob and potential form data):
        that._initXHRData(o);
        // Add progress listeners for this chunk upload:
        that._initProgressListener(o);
        jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
          that._getXHRPromise(false, o.context))
          .done(function (result, textStatus, jqXHR) {
            ub = that._getUploadedBytes(jqXHR) ||
              (ub + o.chunkSize);
            // Create a progress event if no final progress event
            // with loaded equaling total has been triggered
            // for this chunk:
            if (currentLoaded + o.chunkSize - o._progress.loaded) {
              that._onProgress($.Event('progress', {
                lengthComputable: true,
                loaded: ub - o.uploadedBytes,
                total: ub - o.uploadedBytes
              }), o);
            }
            options.uploadedBytes = o.uploadedBytes = ub;
            o.result = result;
            o.textStatus = textStatus;
            o.jqXHR = jqXHR;
            that._trigger('chunkdone', null, o);
            that._trigger('chunkalways', null, o);
            if (ub < fs) {
              // File upload not yet complete,
              // continue with the next chunk:
              upload();
            } else {
              dfd.resolveWith(
                o.context,
                [result, textStatus, jqXHR]
              );
            }
          })
          .fail(function (jqXHR, textStatus, errorThrown) {
            o.jqXHR = jqXHR;
            o.textStatus = textStatus;
            o.errorThrown = errorThrown;
            that._trigger('chunkfail', null, o);
            that._trigger('chunkalways', null, o);
            dfd.rejectWith(
              o.context,
              [jqXHR, textStatus, errorThrown]
            );
          });
      };
      this._enhancePromise(promise);
      promise.abort = function () {
        return jqXHR.abort();
      };
      upload();
      return promise;
    },

    _beforeSend: function (e, data) {
      if (this._active === 0) {
        // the start callback is triggered when an upload starts
        // and no other uploads are currently running,
        // equivalent to the global ajaxStart event:
        this._trigger('start');
        // Set timer for global bitrate progress calculation:
        this._bitrateTimer = new this._BitrateTimer();
        // Reset the global progress values:
        this._progress.loaded = this._progress.total = 0;
        this._progress.bitrate = 0;
      }
      // Make sure the container objects for the .response() and
      // .progress() methods on the data object are available
      // and reset to their initial state:
      this._initResponseObject(data);
      this._initProgressObject(data);
      data._progress.loaded = data.loaded = data.uploadedBytes || 0;
      data._progress.total = data.total = this._getTotal(data.files) || 1;
      data._progress.bitrate = data.bitrate = 0;
      this._active += 1;
      // Initialize the global progress values:
      this._progress.loaded += data.loaded;
      this._progress.total += data.total;
    },

    _onDone: function (result, textStatus, jqXHR, options) {
      var total = options._progress.total,
        response = options._response;
      if (options._progress.loaded < total) {
        // Create a progress event if no final progress event
        // with loaded equaling total has been triggered:
        this._onProgress($.Event('progress', {
          lengthComputable: true,
          loaded: total,
          total: total
        }), options);
      }
      response.result = options.result = result;
      response.textStatus = options.textStatus = textStatus;
      response.jqXHR = options.jqXHR = jqXHR;
      this._trigger('done', null, options);
    },

    _onFail: function (jqXHR, textStatus, errorThrown, options) {
      var response = options._response;
      if (options.recalculateProgress) {
        // Remove the failed (error or abort) file upload from
        // the global progress calculation:
        this._progress.loaded -= options._progress.loaded;
        this._progress.total -= options._progress.total;
      }
      response.jqXHR = options.jqXHR = jqXHR;
      response.textStatus = options.textStatus = textStatus;
      response.errorThrown = options.errorThrown = errorThrown;
      this._trigger('fail', null, options);
    },

    _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {
      // jqXHRorResult, textStatus and jqXHRorError are added to the
      // options object via done and fail callbacks
      this._trigger('always', null, options);
    },

    _onSend: function (e, data) {
      if (!data.submit) {
        this._addConvenienceMethods(e, data);
      }
      var that = this,
        jqXHR,
        aborted,
        slot,
        pipe,
        options = that._getAJAXSettings(data),
        send = function () {
          that._sending += 1;
          // Set timer for bitrate progress calculation:
          options._bitrateTimer = new that._BitrateTimer();
          jqXHR = jqXHR || (
            ((aborted || that._trigger(
              'send',
              $.Event('send', {delegatedEvent: e}),
              options
            ) === false) &&
              that._getXHRPromise(false, options.context, aborted)) ||
              that._chunkedUpload(options) || $.ajax(options)
            ).done(function (result, textStatus, jqXHR) {
              that._onDone(result, textStatus, jqXHR, options);
            }).fail(function (jqXHR, textStatus, errorThrown) {
              that._onFail(jqXHR, textStatus, errorThrown, options);
            }).always(function (jqXHRorResult, textStatus, jqXHRorError) {
              that._onAlways(
                jqXHRorResult,
                textStatus,
                jqXHRorError,
                options
              );
              that._sending -= 1;
              that._active -= 1;
              if (options.limitConcurrentUploads &&
                options.limitConcurrentUploads > that._sending) {
                // Start the next queued upload,
                // that has not been aborted:
                var nextSlot = that._slots.shift();
                while (nextSlot) {
                  if (that._getDeferredState(nextSlot) === 'pending') {
                    nextSlot.resolve();
                    break;
                  }
                  nextSlot = that._slots.shift();
                }
              }
              if (that._active === 0) {
                // The stop callback is triggered when all uploads have
                // been completed, equivalent to the global ajaxStop event:
                that._trigger('stop');
              }
            });
          return jqXHR;
        };
      this._beforeSend(e, options);
      if (this.options.sequentialUploads ||
        (this.options.limitConcurrentUploads &&
          this.options.limitConcurrentUploads <= this._sending)) {
        if (this.options.limitConcurrentUploads > 1) {
          slot = $.Deferred();
          this._slots.push(slot);
          pipe = slot.pipe(send);
        } else {
          this._sequence = this._sequence.pipe(send, send);
          pipe = this._sequence;
        }
        // Return the piped Promise object, enhanced with an abort method,
        // which is delegated to the jqXHR object of the current upload,
        // and jqXHR callbacks mapped to the equivalent Promise methods:
        pipe.abort = function () {
          aborted = [undefined, 'abort', 'abort'];
          if (!jqXHR) {
            if (slot) {
              slot.rejectWith(options.context, aborted);
            }
            return send();
          }
          return jqXHR.abort();
        };
        return this._enhancePromise(pipe);
      }
      return send();
    },

    _onAdd: function (e, data) {
      var that = this,
        result = true,
        options = $.extend({}, this.options, data),
        files = data.files,
        filesLength = files.length,
        limit = options.limitMultiFileUploads,
        limitSize = options.limitMultiFileUploadSize,
        overhead = options.limitMultiFileUploadSizeOverhead,
        batchSize = 0,
        paramName = this._getParamName(options),
        paramNameSet,
        paramNameSlice,
        fileSet,
        i,
        j = 0;
      if (limitSize && (!filesLength || files[0].size === undefined)) {
        limitSize = undefined;
      }
      if (!(options.singleFileUploads || limit || limitSize) || !this._isXHRUpload(options)) {
        fileSet = [files];
        paramNameSet = [paramName];
      } else if (!(options.singleFileUploads || limitSize) && limit) {
        fileSet = [];
        paramNameSet = [];
        for (i = 0; i < filesLength; i += limit) {
          fileSet.push(files.slice(i, i + limit));
          paramNameSlice = paramName.slice(i, i + limit);
          if (!paramNameSlice.length) {
            paramNameSlice = paramName;
          }
          paramNameSet.push(paramNameSlice);
        }
      } else if (!options.singleFileUploads && limitSize) {
        fileSet = [];
        paramNameSet = [];
        for (i = 0; i < filesLength; i = i + 1) {
          batchSize += files[i].size + overhead;
          if (i + 1 === filesLength ||
            ((batchSize + files[i + 1].size + overhead) > limitSize) ||
            (limit && i + 1 - j >= limit)) {
            fileSet.push(files.slice(j, i + 1));
            paramNameSlice = paramName.slice(j, i + 1);
            if (!paramNameSlice.length) {
              paramNameSlice = paramName;
            }
            paramNameSet.push(paramNameSlice);
            j = i + 1;
            batchSize = 0;
          }
        }
      } else {
        paramNameSet = paramName;
      }
      data.originalFiles = files;
      $.each(fileSet || files, function (index, element) {
        var newData = $.extend({}, data);
        newData.files = fileSet ? element : [element];
        newData.paramName = paramNameSet[index];
        that._initResponseObject(newData);
        that._initProgressObject(newData);
        that._addConvenienceMethods(e, newData);
        result = that._trigger(
          'add',
          $.Event('add', {delegatedEvent: e}),
          newData
        );
        return result;
      });
      return result;
    },

    _replaceFileInput: function (input) {
      var inputClone = input.clone(true);
      $('<form></form>').append(inputClone)[0].reset();
      // Detaching allows to insert the fileInput on another form
      // without loosing the file input value:
      input.after(inputClone).detach();
      // Avoid memory leaks with the detached file input:
      $.cleanData(input.unbind('remove'));
      // Replace the original file input element in the fileInput
      // elements set with the clone, which has been copied including
      // event handlers:
      this.options.fileInput = this.options.fileInput.map(function (i, el) {
        if (el === input[0]) {
          return inputClone[0];
        }
        return el;
      });
      // If the widget has been initialized on the file input itself,
      // override this.element with the file input clone:
      if (input[0] === this.element[0]) {
        this.element = inputClone;
      }
    },

    _handleFileTreeEntry: function (entry, path) {
      var that = this,
        dfd = $.Deferred(),
        errorHandler = function (e) {
          if (e && !e.entry) {
            e.entry = entry;
          }
          // Since $.when returns immediately if one
          // Deferred is rejected, we use resolve instead.
          // This allows valid files and invalid items
          // to be returned together in one set:
          dfd.resolve([e]);
        },
        dirReader;
      path = path || '';
      if (entry.isFile) {
        if (entry._file) {
          // Workaround for Chrome bug #149735
          entry._file.relativePath = path;
          dfd.resolve(entry._file);
        } else {
          entry.file(function (file) {
            file.relativePath = path;
            dfd.resolve(file);
          }, errorHandler);
        }
      } else if (entry.isDirectory) {
        dirReader = entry.createReader();
        dirReader.readEntries(function (entries) {
          that._handleFileTreeEntries(
              entries,
              path + entry.name + '/'
            ).done(function (files) {
              dfd.resolve(files);
            }).fail(errorHandler);
        }, errorHandler);
      } else {
        // Return an empy list for file system items
        // other than files or directories:
        dfd.resolve([]);
      }
      return dfd.promise();
    },

    _handleFileTreeEntries: function (entries, path) {
      var that = this;
      return $.when.apply(
          $,
          $.map(entries, function (entry) {
            return that._handleFileTreeEntry(entry, path);
          })
        ).pipe(function () {
          return Array.prototype.concat.apply(
            [],
            arguments
          );
        });
    },

    _getDroppedFiles: function (dataTransfer) {
      dataTransfer = dataTransfer || {};
      var items = dataTransfer.items;
      if (items && items.length && (items[0].webkitGetAsEntry ||
        items[0].getAsEntry)) {
        return this._handleFileTreeEntries(
          $.map(items, function (item) {
            var entry;
            if (item.webkitGetAsEntry) {
              entry = item.webkitGetAsEntry();
              if (entry) {
                // Workaround for Chrome bug #149735:
                entry._file = item.getAsFile();
              }
              return entry;
            }
            return item.getAsEntry();
          })
        );
      }
      return $.Deferred().resolve(
        $.makeArray(dataTransfer.files)
      ).promise();
    },

    _getSingleFileInputFiles: function (fileInput) {
      fileInput = $(fileInput);
      var entries = fileInput.prop('webkitEntries') ||
          fileInput.prop('entries'),
        files,
        value;
      if (entries && entries.length) {
        return this._handleFileTreeEntries(entries);
      }
      files = $.makeArray(fileInput.prop('files'));
      if (!files.length) {
        value = fileInput.prop('value');
        if (!value) {
          return $.Deferred().resolve([]).promise();
        }
        // If the files property is not available, the browser does not
        // support the File API and we add a pseudo File object with
        // the input value as name with path information removed:
        files = [
          {name: value.replace(/^.*\\/, '')}
        ];
      } else if (files[0].name === undefined && files[0].fileName) {
        // File normalization for Safari 4 and Firefox 3:
        $.each(files, function (index, file) {
          file.name = file.fileName;
          file.size = file.fileSize;
        });
      }
      return $.Deferred().resolve(files).promise();
    },

    _getFileInputFiles: function (fileInput) {
      if (!(fileInput instanceof $) || fileInput.length === 1) {
        return this._getSingleFileInputFiles(fileInput);
      }
      return $.when.apply(
          $,
          $.map(fileInput, this._getSingleFileInputFiles)
        ).pipe(function () {
          return Array.prototype.concat.apply(
            [],
            arguments
          );
        });
    },

    _onChange: function (e) {
      var that = this,
        data = {
          fileInput: $(e.target),
          form: $(e.target.form)
        };
      this._getFileInputFiles(data.fileInput).always(function (files) {
        data.files = files;
        if (that.options.replaceFileInput) {
          that._replaceFileInput(data.fileInput);
        }
        if (that._trigger(
          'change',
          $.Event('change', {delegatedEvent: e}),
          data
        ) !== false) {
          that._onAdd(e, data);
        }
      });
    },

    _onPaste: function (e) {
      var items = e.originalEvent && e.originalEvent.clipboardData &&
          e.originalEvent.clipboardData.items,
        data = {files: []};
      if (items && items.length) {
        $.each(items, function (index, item) {
          var file = item.getAsFile && item.getAsFile();
          if (file) {
            data.files.push(file);
          }
        });
        if (this._trigger(
          'paste',
          $.Event('paste', {delegatedEvent: e}),
          data
        ) !== false) {
          this._onAdd(e, data);
        }
      }
    },

    _onDrop: function (e) {
      e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
      var that = this,
        dataTransfer = e.dataTransfer,
        data = {};
      if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
        e.preventDefault();
        this._getDroppedFiles(dataTransfer).always(function (files) {
          data.files = files;
          if (that._trigger(
            'drop',
            $.Event('drop', {delegatedEvent: e}),
            data
          ) !== false) {
            that._onAdd(e, data);
          }
        });
      }
    },

    _onDragOver: function (e) {
      e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
      var dataTransfer = e.dataTransfer;
      if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 &&
        this._trigger(
          'dragover',
          $.Event('dragover', {delegatedEvent: e})
        ) !== false) {
        e.preventDefault();
        dataTransfer.dropEffect = 'copy';
      }
    },

    _initEventHandlers: function () {
      if (this._isXHRUpload(this.options)) {
        this._on(this.options.dropZone, {
          dragover: this._onDragOver,
          drop: this._onDrop
        });
        this._on(this.options.pasteZone, {
          paste: this._onPaste
        });
      }
      if ($.support.fileInput) {
        this._on(this.options.fileInput, {
          change: this._onChange
        });
      }
    },

    _destroyEventHandlers: function () {
      this._off(this.options.dropZone, 'dragover drop');
      this._off(this.options.pasteZone, 'paste');
      this._off(this.options.fileInput, 'change');
    },

    _setOption: function (key, value) {
      var reinit = $.inArray(key, this._specialOptions) !== -1;
      if (reinit) {
        this._destroyEventHandlers();
      }
      this._super(key, value);
      if (reinit) {
        this._initSpecialOptions();
        this._initEventHandlers();
      }
    },

    _initSpecialOptions: function () {
      var options = this.options;
      if (options.fileInput === undefined) {
        options.fileInput = this.element.is('input[type="file"]') ?
          this.element : this.element.find('input[type="file"]');
      } else if (!(options.fileInput instanceof $)) {
        options.fileInput = $(options.fileInput);
      }
      if (!(options.dropZone instanceof $)) {
        options.dropZone = $(options.dropZone);
      }
      if (!(options.pasteZone instanceof $)) {
        options.pasteZone = $(options.pasteZone);
      }
    },

    _getRegExp: function (str) {
      var parts = str.split('/'),
        modifiers = parts.pop();
      parts.shift();
      return new RegExp(parts.join('/'), modifiers);
    },

    _isRegExpOption: function (key, value) {
      return key !== 'url' && $.type(value) === 'string' &&
        /^\/.*\/[igm]{0,3}$/.test(value);
    },

    _initDataAttributes: function () {
      var that = this,
        options = this.options,
        clone = $(this.element[0].cloneNode(false));
      // Initialize options set via HTML5 data-attributes:
      $.each(
        clone.data(),
        function (key, value) {
          var dataAttributeName = 'data-' +
            // Convert camelCase to hyphen-ated key:
            key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
          if (clone.attr(dataAttributeName)) {
            if (that._isRegExpOption(key, value)) {
              value = that._getRegExp(value);
            }
            options[key] = value;
          }
        }
      );
    },

    _create: function () {
      this._initDataAttributes();
      this._initSpecialOptions();
      this._slots = [];
      this._sequence = this._getXHRPromise(true);
      this._sending = this._active = 0;
      this._initProgressObject(this);
      this._initEventHandlers();
    },

    // This method is exposed to the widget API and allows to query
    // the number of active uploads:
    active: function () {
      return this._active;
    },

    // This method is exposed to the widget API and allows to query
    // the widget upload progress.
    // It returns an object with loaded, total and bitrate properties
    // for the running uploads:
    progress: function () {
      return this._progress;
    },

    // This method is exposed to the widget API and allows adding files
    // using the fileupload API. The data parameter accepts an object which
    // must have a files property and can contain additional options:
    // .fileupload('add', {files: filesList});
    add: function (data) {
      var that = this;
      if (!data || this.options.disabled) {
        return;
      }
      if (data.fileInput && !data.files) {
        this._getFileInputFiles(data.fileInput).always(function (files) {
          data.files = files;
          that._onAdd(null, data);
        });
      } else {
        data.files = $.makeArray(data.files);
        this._onAdd(null, data);
      }
    },

    // This method is exposed to the widget API and allows sending files
    // using the fileupload API. The data parameter accepts an object which
    // must have a files or fileInput property and can contain additional options:
    // .fileupload('send', {files: filesList});
    // The method returns a Promise object for the file upload call.
    send: function (data) {
      if (data && !this.options.disabled) {
        if (data.fileInput && !data.files) {
          var that = this,
            dfd = $.Deferred(),
            promise = dfd.promise(),
            jqXHR,
            aborted;
          promise.abort = function () {
            aborted = true;
            if (jqXHR) {
              return jqXHR.abort();
            }
            dfd.reject(null, 'abort', 'abort');
            return promise;
          };
          this._getFileInputFiles(data.fileInput).always(
            function (files) {
              if (aborted) {
                return;
              }
              if (!files.length) {
                dfd.reject();
                return;
              }
              data.files = files;
              jqXHR = that._onSend(null, data).then(
                function (result, textStatus, jqXHR) {
                  dfd.resolve(result, textStatus, jqXHR);
                },
                function (jqXHR, textStatus, errorThrown) {
                  dfd.reject(jqXHR, textStatus, errorThrown);
                }
              );
            }
          );
          return this._enhancePromise(promise);
        }
        data.files = $.makeArray(data.files);
        if (data.files.length) {
          return this._onSend(null, data);
        }
      }
      return this._getXHRPromise(false, data && data.context);
    }

  });

}));
;
/*
 * jQuery File Upload Processing Plugin 1.3.0
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2012, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/* jshint nomen:false */
/* global define, window */

(function (factory) {
  'use strict';
  if (typeof define === 'function' && define.amd) {
    // Register as an anonymous AMD module:
    define([
      'jquery',
      './jquery.fileupload'
    ], factory);
  } else {
    // Browser globals:
    factory(
      window.jQuery
    );
  }
}(function ($) {
  'use strict';

  var originalAdd = $.blueimp.fileupload.prototype.options.add;

  // The File Upload Processing plugin extends the fileupload widget
  // with file processing functionality:
  $.widget('blueimp.fileupload', $.blueimp.fileupload, {

    options: {
      // The list of processing actions:
      processQueue: [
        /*
         {
         action: 'log',
         type: 'debug'
         }
         */
      ],
      add: function (e, data) {
        var $this = $(this);
        data.process(function () {
          return $this.fileupload('process', data);
        });
        originalAdd.call(this, e, data);
      }
    },

    processActions: {
      /*
       log: function (data, options) {
       console[options.type](
       'Processing "' + data.files[data.index].name + '"'
       );
       }
       */
    },

    _processFile: function (data, originalData) {
      var that = this,
        dfd = $.Deferred().resolveWith(that, [data]),
        chain = dfd.promise();
      this._trigger('process', null, data);
      $.each(data.processQueue, function (i, settings) {
        var func = function (data) {
          if (originalData.errorThrown) {
            return $.Deferred()
              .rejectWith(that, [originalData]).promise();
          }
          return that.processActions[settings.action].call(
            that,
            data,
            settings
          );
        };
        chain = chain.pipe(func, settings.always && func);
      });
      chain
        .done(function () {
          that._trigger('processdone', null, data);
          that._trigger('processalways', null, data);
        })
        .fail(function () {
          that._trigger('processfail', null, data);
          that._trigger('processalways', null, data);
        });
      return chain;
    },

    // Replaces the settings of each processQueue item that
    // are strings starting with an "@", using the remaining
    // substring as key for the option map,
    // e.g. "@autoUpload" is replaced with options.autoUpload:
    _transformProcessQueue: function (options) {
      var processQueue = [];
      $.each(options.processQueue, function () {
        var settings = {},
          action = this.action,
          prefix = this.prefix === true ? action : this.prefix;
        $.each(this, function (key, value) {
          if ($.type(value) === 'string' &&
            value.charAt(0) === '@') {
            settings[key] = options[
              value.slice(1) || (prefix ? prefix +
                key.charAt(0).toUpperCase() + key.slice(1) : key)
              ];
          } else {
            settings[key] = value;
          }

        });
        processQueue.push(settings);
      });
      options.processQueue = processQueue;
    },

    // Returns the number of files currently in the processsing queue:
    processing: function () {
      return this._processing;
    },

    // Processes the files given as files property of the data parameter,
    // returns a Promise object that allows to bind callbacks:
    process: function (data) {
      var that = this,
        options = $.extend({}, this.options, data);
      if (options.processQueue && options.processQueue.length) {
        this._transformProcessQueue(options);
        if (this._processing === 0) {
          this._trigger('processstart');
        }
        $.each(data.files, function (index) {
          var opts = index ? $.extend({}, options) : options,
            func = function () {
              if (data.errorThrown) {
                return $.Deferred()
                  .rejectWith(that, [data]).promise();
              }
              return that._processFile(opts, data);
            };
          opts.index = index;
          that._processing += 1;
          that._processingQueue = that._processingQueue.pipe(func, func)
            .always(function () {
              that._processing -= 1;
              if (that._processing === 0) {
                that._trigger('processstop');
              }
            });
        });
      }
      return this._processingQueue;
    },

    _create: function () {
      this._super();
      this._processing = 0;
      this._processingQueue = $.Deferred().resolveWith(this)
        .promise();
    }

  });

}));
;
!function(a){"use strict";var b=function(a,c,d){var e,f,g=document.createElement("img");if(g.onerror=c,g.onload=function(){!f||d&&d.noRevoke||b.revokeObjectURL(f),c&&c(b.scale(g,d))},b.isInstanceOf("Blob",a)||b.isInstanceOf("File",a))e=f=b.createObjectURL(a),g._type=a.type;else{if("string"!=typeof a)return!1;e=a,d&&d.crossOrigin&&(g.crossOrigin=d.crossOrigin)}return e?(g.src=e,g):b.readFile(a,function(a){var b=a.target;b&&b.result?g.src=b.result:c&&c(a)})},c=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;b.isInstanceOf=function(a,b){return Object.prototype.toString.call(b)==="[object "+a+"]"},b.transformCoordinates=function(){},b.getTransformedOptions=function(a,b){var c,d,e,f,g=b.aspectRatio;if(!g)return b;c={};for(d in b)b.hasOwnProperty(d)&&(c[d]=b[d]);return c.crop=!0,e=a.naturalWidth||a.width,f=a.naturalHeight||a.height,e/f>g?(c.maxWidth=f*g,c.maxHeight=f):(c.maxWidth=e,c.maxHeight=e/g),c},b.renderImageToCanvas=function(a,b,c,d,e,f,g,h,i,j){return a.getContext("2d").drawImage(b,c,d,e,f,g,h,i,j),a},b.hasCanvasOption=function(a){return a.canvas||a.crop||a.aspectRatio},b.scale=function(a,c){c=c||{};var d,e,f,g,h,i,j,k,l,m=document.createElement("canvas"),n=a.getContext||b.hasCanvasOption(c)&&m.getContext,o=a.naturalWidth||a.width,p=a.naturalHeight||a.height,q=o,r=p,s=function(){var a=Math.max((f||q)/q,(g||r)/r);a>1&&(q*=a,r*=a)},t=function(){var a=Math.min((d||q)/q,(e||r)/r);1>a&&(q*=a,r*=a)};return n&&(c=b.getTransformedOptions(a,c),j=c.left||0,k=c.top||0,c.sourceWidth?(h=c.sourceWidth,void 0!==c.right&&void 0===c.left&&(j=o-h-c.right)):h=o-j-(c.right||0),c.sourceHeight?(i=c.sourceHeight,void 0!==c.bottom&&void 0===c.top&&(k=p-i-c.bottom)):i=p-k-(c.bottom||0),q=h,r=i),d=c.maxWidth,e=c.maxHeight,f=c.minWidth,g=c.minHeight,n&&d&&e&&c.crop?(q=d,r=e,l=h/i-d/e,0>l?(i=e*h/d,void 0===c.top&&void 0===c.bottom&&(k=(p-i)/2)):l>0&&(h=d*i/e,void 0===c.left&&void 0===c.right&&(j=(o-h)/2))):((c.contain||c.cover)&&(f=d=d||f,g=e=e||g),c.cover?(t(),s()):(s(),t())),n?(m.width=q,m.height=r,b.transformCoordinates(m,c),b.renderImageToCanvas(m,a,j,k,h,i,0,0,q,r)):(a.width=q,a.height=r,a)},b.createObjectURL=function(a){return c?c.createObjectURL(a):!1},b.revokeObjectURL=function(a){return c?c.revokeObjectURL(a):!1},b.readFile=function(a,b,c){if(window.FileReader){var d=new FileReader;if(d.onload=d.onerror=b,c=c||"readAsDataURL",d[c])return d[c](a),d}return!1},"function"==typeof define&&define.amd?define(function(){return b}):a.loadImage=b}(this),function(a){"use strict";"function"==typeof define&&define.amd?define(["load-image"],a):a(window.loadImage)}(function(a){"use strict";if(window.navigator&&window.navigator.platform&&/iP(hone|od|ad)/.test(window.navigator.platform)){var b=a.renderImageToCanvas;a.detectSubsampling=function(a){var b,c;return a.width*a.height>1048576?(b=document.createElement("canvas"),b.width=b.height=1,c=b.getContext("2d"),c.drawImage(a,-a.width+1,0),0===c.getImageData(0,0,1,1).data[3]):!1},a.detectVerticalSquash=function(a,b){var c,d,e,f,g,h=a.naturalHeight||a.height,i=document.createElement("canvas"),j=i.getContext("2d");for(b&&(h/=2),i.width=1,i.height=h,j.drawImage(a,0,0),c=j.getImageData(0,0,1,h).data,d=0,e=h,f=h;f>d;)g=c[4*(f-1)+3],0===g?e=f:d=f,f=e+d>>1;return f/h||1},a.renderImageToCanvas=function(c,d,e,f,g,h,i,j,k,l){if("image/jpeg"===d._type){var m,n,o,p,q=c.getContext("2d"),r=document.createElement("canvas"),s=1024,t=r.getContext("2d");if(r.width=s,r.height=s,q.save(),m=a.detectSubsampling(d),m&&(e/=2,f/=2,g/=2,h/=2),n=a.detectVerticalSquash(d,m),m||1!==n){for(f*=n,k=Math.ceil(s*k/g),l=Math.ceil(s*l/h/n),j=0,p=0;h>p;){for(i=0,o=0;g>o;)t.clearRect(0,0,s,s),t.drawImage(d,e,f,g,h,-o,-p,g,h),q.drawImage(r,0,0,s,s,i,j,k,l),o+=s,i+=k;p+=s,j+=l}return q.restore(),c}}return b(c,d,e,f,g,h,i,j,k,l)}}}),function(a){"use strict";"function"==typeof define&&define.amd?define(["load-image"],a):a(window.loadImage)}(function(a){"use strict";var b=a.hasCanvasOption,c=a.transformCoordinates,d=a.getTransformedOptions;a.hasCanvasOption=function(c){return b.call(a,c)||c.orientation},a.transformCoordinates=function(b,d){c.call(a,b,d);var e=b.getContext("2d"),f=b.width,g=b.height,h=d.orientation;if(h&&!(h>8))switch(h>4&&(b.width=g,b.height=f),h){case 2:e.translate(f,0),e.scale(-1,1);break;case 3:e.translate(f,g),e.rotate(Math.PI);break;case 4:e.translate(0,g),e.scale(1,-1);break;case 5:e.rotate(.5*Math.PI),e.scale(1,-1);break;case 6:e.rotate(.5*Math.PI),e.translate(0,-g);break;case 7:e.rotate(.5*Math.PI),e.translate(f,-g),e.scale(-1,1);break;case 8:e.rotate(-.5*Math.PI),e.translate(-f,0)}},a.getTransformedOptions=function(b,c){var e,f,g=d.call(a,b,c),h=g.orientation;if(!h||h>8||1===h)return g;e={};for(f in g)g.hasOwnProperty(f)&&(e[f]=g[f]);switch(g.orientation){case 2:e.left=g.right,e.right=g.left;break;case 3:e.left=g.right,e.top=g.bottom,e.right=g.left,e.bottom=g.top;break;case 4:e.top=g.bottom,e.bottom=g.top;break;case 5:e.left=g.top,e.top=g.left,e.right=g.bottom,e.bottom=g.right;break;case 6:e.left=g.top,e.top=g.right,e.right=g.bottom,e.bottom=g.left;break;case 7:e.left=g.bottom,e.top=g.right,e.right=g.top,e.bottom=g.left;break;case 8:e.left=g.bottom,e.top=g.left,e.right=g.top,e.bottom=g.right}return g.orientation>4&&(e.maxWidth=g.maxHeight,e.maxHeight=g.maxWidth,e.minWidth=g.minHeight,e.minHeight=g.minWidth,e.sourceWidth=g.sourceHeight,e.sourceHeight=g.sourceWidth),e}}),function(a){"use strict";"function"==typeof define&&define.amd?define(["load-image"],a):a(window.loadImage)}(function(a){"use strict";var b=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);a.blobSlice=b&&function(){var a=this.slice||this.webkitSlice||this.mozSlice;return a.apply(this,arguments)},a.metaDataParsers={jpeg:{65505:[]}},a.parseMetaData=function(b,c,d){d=d||{};var e=this,f=d.maxMetaDataSize||262144,g={},h=!(window.DataView&&b&&b.size>=12&&"image/jpeg"===b.type&&a.blobSlice);(h||!a.readFile(a.blobSlice.call(b,0,f),function(b){if(b.target.error)return console.log(b.target.error),void c(g);var f,h,i,j,k=b.target.result,l=new DataView(k),m=2,n=l.byteLength-4,o=m;if(65496===l.getUint16(0)){for(;n>m&&(f=l.getUint16(m),f>=65504&&65519>=f||65534===f);){if(h=l.getUint16(m+2)+2,m+h>l.byteLength){console.log("Invalid meta data: Invalid segment size.");break}if(i=a.metaDataParsers.jpeg[f])for(j=0;j<i.length;j+=1)i[j].call(e,l,m,h,g,d);m+=h,o=m}!d.disableImageHead&&o>6&&(g.imageHead=k.slice?k.slice(0,o):new Uint8Array(k).subarray(0,o))}else console.log("Invalid JPEG file: Missing JPEG marker.");c(g)},"readAsArrayBuffer"))&&c(g)}}),function(a){"use strict";"function"==typeof define&&define.amd?define(["load-image","load-image-meta"],a):a(window.loadImage)}(function(a){"use strict";a.ExifMap=function(){return this},a.ExifMap.prototype.map={Orientation:274},a.ExifMap.prototype.get=function(a){return this[a]||this[this.map[a]]},a.getExifThumbnail=function(a,b,c){var d,e,f;if(!c||b+c>a.byteLength)return void console.log("Invalid Exif data: Invalid thumbnail data.");for(d=[],e=0;c>e;e+=1)f=a.getUint8(b+e),d.push((16>f?"0":"")+f.toString(16));return"data:image/jpeg,%"+d.join("%")},a.exifTagTypes={1:{getValue:function(a,b){return a.getUint8(b)},size:1},2:{getValue:function(a,b){return String.fromCharCode(a.getUint8(b))},size:1,ascii:!0},3:{getValue:function(a,b,c){return a.getUint16(b,c)},size:2},4:{getValue:function(a,b,c){return a.getUint32(b,c)},size:4},5:{getValue:function(a,b,c){return a.getUint32(b,c)/a.getUint32(b+4,c)},size:8},9:{getValue:function(a,b,c){return a.getInt32(b,c)},size:4},10:{getValue:function(a,b,c){return a.getInt32(b,c)/a.getInt32(b+4,c)},size:8}},a.exifTagTypes[7]=a.exifTagTypes[1],a.getExifValue=function(b,c,d,e,f,g){var h,i,j,k,l,m,n=a.exifTagTypes[e];if(!n)return void console.log("Invalid Exif data: Invalid tag type.");if(h=n.size*f,i=h>4?c+b.getUint32(d+8,g):d+8,i+h>b.byteLength)return void console.log("Invalid Exif data: Invalid data offset.");if(1===f)return n.getValue(b,i,g);for(j=[],k=0;f>k;k+=1)j[k]=n.getValue(b,i+k*n.size,g);if(n.ascii){for(l="",k=0;k<j.length&&(m=j[k],"\x00"!==m);k+=1)l+=m;return l}return j},a.parseExifTag=function(b,c,d,e,f){var g=b.getUint16(d,e);f.exif[g]=a.getExifValue(b,c,d,b.getUint16(d+2,e),b.getUint32(d+4,e),e)},a.parseExifTags=function(a,b,c,d,e){var f,g,h;if(c+6>a.byteLength)return void console.log("Invalid Exif data: Invalid directory offset.");if(f=a.getUint16(c,d),g=c+2+12*f,g+4>a.byteLength)return void console.log("Invalid Exif data: Invalid directory size.");for(h=0;f>h;h+=1)this.parseExifTag(a,b,c+2+12*h,d,e);return a.getUint32(g,d)},a.parseExifData=function(b,c,d,e,f){if(!f.disableExif){var g,h,i,j=c+10;if(1165519206===b.getUint32(c+4)){if(j+8>b.byteLength)return void console.log("Invalid Exif data: Invalid segment size.");if(0!==b.getUint16(c+8))return void console.log("Invalid Exif data: Missing byte alignment offset.");switch(b.getUint16(j)){case 18761:g=!0;break;case 19789:g=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}if(42!==b.getUint16(j+2,g))return void console.log("Invalid Exif data: Missing TIFF marker.");h=b.getUint32(j+4,g),e.exif=new a.ExifMap,h=a.parseExifTags(b,j,j+h,g,e),h&&!f.disableExifThumbnail&&(i={exif:{}},h=a.parseExifTags(b,j,j+h,g,i),i.exif[513]&&(e.exif.Thumbnail=a.getExifThumbnail(b,j+i.exif[513],i.exif[514]))),e.exif[34665]&&!f.disableExifSub&&a.parseExifTags(b,j,j+e.exif[34665],g,e),e.exif[34853]&&!f.disableExifGps&&a.parseExifTags(b,j,j+e.exif[34853],g,e)}}},a.metaDataParsers.jpeg[65505].push(a.parseExifData)}),function(a){"use strict";"function"==typeof define&&define.amd?define(["load-image","load-image-exif"],a):a(window.loadImage)}(function(a){"use strict";a.ExifMap.prototype.tags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},a.ExifMap.prototype.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"top-left",2:"top-right",3:"bottom-right",4:"bottom-left",5:"left-top",6:"right-top",7:"right-bottom",8:"left-bottom"}},a.ExifMap.prototype.getText=function(a){var b=this.get(a);switch(a){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[a][b];case"ExifVersion":case"FlashpixVersion":return String.fromCharCode(b[0],b[1],b[2],b[3]);case"ComponentsConfiguration":return this.stringValues[a][b[0]]+this.stringValues[a][b[1]]+this.stringValues[a][b[2]]+this.stringValues[a][b[3]];case"GPSVersionID":return b[0]+"."+b[1]+"."+b[2]+"."+b[3]}return String(b)},function(a){var b,c=a.tags,d=a.map;for(b in c)c.hasOwnProperty(b)&&(d[c[b]]=b)}(a.ExifMap.prototype),a.ExifMap.prototype.getAll=function(){var a,b,c={};for(a in this)this.hasOwnProperty(a)&&(b=this.tags[a],b&&(c[b]=this.getText(b)));return c}});;
/*
 * jQuery File Upload Validation Plugin 1.1.2
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2013, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/* global define, window */

(function (factory) {
  'use strict';
  if (typeof define === 'function' && define.amd) {
    // Register as an anonymous AMD module:
    define([
      'jquery',
      './jquery.fileupload-process'
    ], factory);
  } else {
    // Browser globals:
    factory(
      window.jQuery
    );
  }
}(function ($) {
  'use strict';

  // Append to the default processQueue:
  $.blueimp.fileupload.prototype.options.processQueue.push(
    {
      action: 'validate',
      // Always trigger this action,
      // even if the previous action was rejected:
      always: true,
      // Options taken from the global options map:
      acceptFileTypes: '@',
      maxFileSize: '@',
      minFileSize: '@',
      maxNumberOfFiles: '@',
      disabled: '@disableValidation'
    }
  );

  // The File Upload Validation plugin extends the fileupload widget
  // with file validation functionality:
  $.widget('blueimp.fileupload', $.blueimp.fileupload, {

    options: {
      /*
       // The regular expression for allowed file types, matches
       // against either file type or file name:
       acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
       // The maximum allowed file size in bytes:
       maxFileSize: 10000000, // 10 MB
       // The minimum allowed file size in bytes:
       minFileSize: undefined, // No minimal file size
       // The limit of files to be uploaded:
       maxNumberOfFiles: 10,
       */

      // Function returning the current number of files,
      // has to be overriden for maxNumberOfFiles validation:
      getNumberOfFiles: $.noop,

      // Error and info messages:
      messages: {
        maxNumberOfFiles: 'Maximum number of files exceeded',
        acceptFileTypes: 'File type not allowed',
        maxFileSize: 'File is too large',
        minFileSize: 'File is too small'
      }
    },

    processActions: {

      validate: function (data, options) {
        if (options.disabled) {
          return data;
        }
        var dfd = $.Deferred(),
          settings = this.options,
          file = data.files[data.index],
          fileSize;
        if (options.minFileSize || options.maxFileSize) {
          fileSize = file.size;
        }
        if ($.type(options.maxNumberOfFiles) === 'number' &&
          (settings.getNumberOfFiles() || 0) + data.files.length >
            options.maxNumberOfFiles) {
          file.error = settings.i18n('maxNumberOfFiles');
        } else if (options.acceptFileTypes && !(options.acceptFileTypes.test(file.type) ||
          options.acceptFileTypes.test(file.name))) {
          file.error = settings.i18n('acceptFileTypes');
        } else if (fileSize > options.maxFileSize) {
          file.error = settings.i18n('maxFileSize');
        } else if ($.type(fileSize) === 'number' &&
          fileSize < options.minFileSize) {
          file.error = settings.i18n('minFileSize');
        } else {
          delete file.error;
        }
        if (file.error || data.files.error) {
          data.files.error = true;
          dfd.rejectWith(this, [data]);
        } else {
          dfd.resolveWith(this, [data]);
        }
        return dfd.promise();
      }

    }

  });

}));
;
/*
 * jQuery File Upload AngularJS Plugin 2.2.0
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2013, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/* jshint nomen:false */
/* global define, angular */

(function (factory) {
  'use strict';
  if (typeof define === 'function' && define.amd) {
    // Register as an anonymous AMD module:
    define([
      'jquery',
      'angular',
      './jquery.fileupload-image',
      './jquery.fileupload-audio',
      './jquery.fileupload-video',
      './jquery.fileupload-validate'
    ], factory);
  } else {
    factory();
  }
}(function () {
  'use strict';

  angular.module('blueimp.fileupload', [])

    // The fileUpload service provides configuration options
    // for the fileUpload directive and default handlers for
    // File Upload events:
    .provider('fileUpload', function () {

      var scopeEvalAsync = function (expression) {
          var scope = angular.element(this)
            .fileupload('option', 'scope');
          // Schedule a new $digest cycle if not already inside of one
          // and evaluate the given expression:
          scope.$evalAsync(expression);
        },
        addFileMethods = function (scope, data) {
          var files = data.files,
            file = files[0];
          angular.forEach(files, function (file, index) {
            file._index = index;
            file.$state = function () {
              return data.state();
            };
            file.$processing = function () {
              return data.processing();
            };
            file.$progress = function () {
              return data.progress();
            };
            file.$response = function () {
              return data.response();
            };
          });
          file.$submit = function () {
            if (!file.error) {
              return data.submit();
            }
          };
          file.$cancel = function () {
              console.log('test');
            return data.abort();
          };
        },
        $config;
      $config = this.defaults = {
        handleResponse: function (e, data) {
          var files = data.result && data.result.files;
          if (files) {
            data.scope.replace(data.files, files);
          } else if (data.errorThrown ||
            data.textStatus === 'error') {
            data.files[0].error = data.errorThrown ||
              data.textStatus;
          }
        },
        add: function (e, data) {

          if (e.isDefaultPrevented()) {
            return false;
          }
          var scope = data.scope,
            filesCopy = [];
          angular.forEach(data.files, function (file) {
            filesCopy.push(file);
          });
          scope.$apply(function () {
            addFileMethods(scope, data);
            var method = scope.option('prependFiles') ?
              'unshift' : 'push';
            Array.prototype[method].apply(scope.queue, data.files);
          });
          data.process(function () {
            return scope.process(data);
          }).always(function () {
            scope.$apply(function () {
              addFileMethods(scope, data);
              scope.replace(filesCopy, data.files);
            });
          }).then(function () {
            if ((scope.option('autoUpload') ||
              data.autoUpload) &&
              data.autoUpload !== false) {
              data.submit();
            }
          });
        },
        progress: function (e, data) {
          if (e.isDefaultPrevented()) {
            return false;
          }
          data.scope.$apply();
        },
        done: function (e, data) {
          if (e.isDefaultPrevented()) {
            return false;
          }
          var that = this;
          data.scope.$apply(function () {
            data.handleResponse.call(that, e, data);
          });
        },
        fail: function (e, data) {
          if (e.isDefaultPrevented()) {
            return false;
          }
          var that = this,
            scope = data.scope;
          if (data.errorThrown === 'abort') {
            scope.clear(data.files);
            return;
          }
          scope.$apply(function () {
            data.handleResponse.call(that, e, data);
          });
        },
        stop: scopeEvalAsync,
        processstart: scopeEvalAsync,
        processstop: scopeEvalAsync,
        getNumberOfFiles: function () {
          var scope = this.scope;
          return scope.queue.length - scope.processing();
        },
        dataType: 'json',
        autoUpload: false
      };

      /**
       * Create field data object
       * @type {{}}
       */
      var fieldData = {};

      /**
       * Add field Data to field data object with fieldname
       * @param fieldName
       * @param fileData
       */
      var addFieldData = function addFieldData(fieldName, fileData) {
        fieldData[fieldName].push(fileData);
      };

      /**
       * Remove field data
       * @param fieldName
       * @param fileId
       */
      var removeFieldData = function removeFieldData(fieldName, fileId) {
        angular.forEach(fieldData[fieldName], function (value, key) {
          if (value && value._id) {
            if (value._id === fileId) {
              fieldData[fieldName].splice(key, 1);
            }
          }
        });
      };

      /**
       * Register the field
       * @param fieldName
       * @param fieldData
       * @todo prefill with existing data
       */
      var registerField = function registerField(fieldName) {
        if (!fieldData[fieldName]) {
          fieldData[fieldName] = [];
        }
      };

      this.$get = [
        function () {
          return {
            fieldData: fieldData,
            defaults: $config,
            addFieldData: addFieldData,
            removeFieldData: removeFieldData,
            registerField: registerField
          };
        }
      ];
    })

    // Format byte numbers to readable presentations:
    .provider('formatFileSizeFilter', function () {
      var $config = {
        // Byte units following the IEC format
        // http://en.wikipedia.org/wiki/Kilobyte
        units: [
          {size: 1000000000, suffix: ' GB'},
          {size: 1000000, suffix: ' MB'},
          {size: 1000, suffix: ' KB'}
        ]
      };
      this.defaults = $config;
      this.$get = function () {
        return function (bytes) {
          if (!angular.isNumber(bytes)) {
            return '';
          }
          var unit = true,
            i = 0,
            prefix,
            suffix;
          while (unit) {
            unit = $config.units[i];
            prefix = unit.prefix || '';
            suffix = unit.suffix || '';
            if (i === $config.units.length - 1 || bytes >= unit.size) {
              return prefix + (bytes / unit.size).toFixed(2) + suffix;
            }
            i += 1;
          }
        };
      };
    })

    // The FileUploadController initializes the fileupload widget and
    // provides scope methods to control the File Upload functionality:
    .controller('FileUploadController', [
      '$scope', '$element', '$attrs', '$window', 'fileUpload',
      function ($scope, $element, $attrs, $window, fileUpload) {
        var uploadMethods = {
          progress: function () {
            return $element.fileupload('progress');
          },
          active: function () {
            return $element.fileupload('active');
          },
          option: function (option, data) {
            if (arguments.length === 1) {
              return $element.fileupload('option', option);
            }
            $element.fileupload('option', option, data);
          },
          add: function (data) {
            return $element.fileupload('add', data);
          },
          send: function (data) {
            return $element.fileupload('send', data);
          },
          process: function (data) {
            return $element.fileupload('process', data);
          },
          processing: function (data) {
            return $element.fileupload('processing', data);
          }
        };
        $scope.disabled = !$window.jQuery.support.fileInput;
        $scope.queue = $scope.queue || [];
        $scope.clear = function (files) {
          var queue = this.queue,
            i = queue.length,
            file = files,
            length = 1;
          if (angular.isArray(files)) {
            file = files[0];
            length = files.length;
          }
          while (i) {
            i -= 1;
            if (queue[i] === file) {
              return queue.splice(i, length);
            }
          }
        };
        $scope.replace = function (oldFiles, newFiles) {
          var queue = this.queue,
            file = oldFiles[0],
            i,
            j;
          for (i = 0; i < queue.length; i += 1) {
            if (queue[i] === file) {
              for (j = 0; j < newFiles.length; j += 1) {
                queue[i + j] = newFiles[j];
              }
              return;
            }
          }
        };
        $scope.applyOnQueue = function (method) {
            console.log('canceltest');

          var list = this.queue.slice(0),
            i,
            file;

            console.log(list.length);
          for (i = 0; i < list.length; i += 1) {
              file = list[i];
            if (file[method]) {
              file[method]();
            }
          }
        };
        $scope.submit = function () {
          this.applyOnQueue('$submit');
        };
        $scope.cancel = function () {
            console.log('cancel2');

            this.applyOnQueue('$cancel');
        };
        // Add upload methods to the scope:
        angular.extend($scope, uploadMethods);
        // The fileupload widget will initialize with
        // the options provided via "data-"-parameters,
        // as well as those given via options object:
        $element.fileupload(angular.extend(
            {scope: $scope},
            fileUpload.defaults
          )).on('fileuploadadd', function (e, data) {
          data.scope = $scope;
        }).on('fileuploadfail', function (e, data) {
          if (data.errorThrown === 'abort') {
            return;
          }
          if (data.dataType &&
            data.dataType.indexOf('json') === data.dataType.length - 4) {
            try {
              data.result = angular.fromJson(data.jqXHR.responseText);
            } catch (ignore) {
            }
          }
        }).on([
          'fileuploadadd',
          'fileuploadsubmit',
          'fileuploadsend',
          'fileuploaddone',
          'fileuploadfail',
          'fileuploadalways',
          'fileuploadprogress',
          'fileuploadprogressall',
          'fileuploadstart',
          'fileuploadstop',
          'fileuploadchange',
          'fileuploadpaste',
          'fileuploaddrop',
          'fileuploaddragover',
          'fileuploadchunksend',
          'fileuploadchunkdone',
          'fileuploadchunkfail',
          'fileuploadchunkalways',
          'fileuploadprocessstart',
          'fileuploadprocess',
          'fileuploadprocessdone',
          'fileuploadprocessfail',
          'fileuploadprocessalways',
          'fileuploadprocessstop'
        ].join(' '), function (e, data) {
          if ($scope.$emit(e.type, data).defaultPrevented) {
            e.preventDefault();
          }
        }).on('remove', function () {
          // Remove upload methods from the scope,
          // when the widget is removed:
          var method;
          for (method in uploadMethods) {
            if (uploadMethods.hasOwnProperty(method)) {
              delete $scope[method];
            }
          }
        });
        // Observe option changes:
        $scope.$watch(
          $attrs.fileUpload,
          function (newOptions) {
            if (newOptions) {
              $element.fileupload('option', newOptions);
            }
          }
        );
      }
    ])

    // Provide File Upload progress feedback:
    .controller('FileUploadProgressController', [
      '$scope', '$attrs', '$parse',
      function ($scope, $attrs, $parse) {
        var fn = $parse($attrs.fileUploadProgress),
          update = function () {
            var progress = fn($scope);

            if (!progress || !progress.total) {
              return;
            }
            $scope.num = Math.floor(
              progress.loaded / progress.total * 100
            );
          };
        update();
        $scope.$watch(
          $attrs.fileUploadProgress + '.loaded',
          function (newValue, oldValue) {
            if (newValue !== oldValue) {
              update();
            }
          }
        );
      }
    ])

    // Display File Upload previews:
    .controller('FileUploadPreviewController', [
      '$scope', '$element', '$attrs',
      function ($scope, $element, $attrs) {
        $scope.$watch(
          $attrs.fileUploadPreview + '.preview',
          function (preview) {
            $element.empty();
            if (preview) {
              $element.append(preview);
            }
          }
        );
      }
    ])

    .directive('fileUpload', function () {
      return {
        controller: 'FileUploadController',
        scope: true
      };
    })

    .directive('fileUploadProgress', function () {
      return {
        controller: 'FileUploadProgressController',
        scope: true
      };
    })

    .directive('fileUploadPreview', function () {
      return {
        controller: 'FileUploadPreviewController'
      };
    })

    // Enhance the HTML5 download attribute to
    // allow drag&drop of files to the desktop:
    .directive('download', function () {
      return function (scope, elm) {
        elm.on('dragstart', function (e) {
          try {
            e.originalEvent.dataTransfer.setData(
              'DownloadURL',
              [
                'application/octet-stream',
                elm.prop('download'),
                elm.prop('href')
              ].join(':')
            );
          } catch (ignore) {
          }
        });
      };
    });

}));;
/*! jsTree - v3.3.7 - 2018-11-06 - (MIT) */
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a,b){"use strict";if(!a.jstree){var c=0,d=!1,e=!1,f=!1,g=[],h=a("script:last").attr("src"),i=window.document;a.jstree={version:"3.3.7",defaults:{plugins:[]},plugins:{},path:h&&-1!==h.indexOf("/")?h.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},a.jstree.create=function(b,d){var e=new a.jstree.core(++c),f=d;return d=a.extend(!0,{},a.jstree.defaults,d),f&&f.plugins&&(d.plugins=f.plugins),a.each(d.plugins,function(a,b){"core"!==a&&(e=e.plugin(b,d[b]))}),a(b).data("jstree",e),e.init(b,d),e},a.jstree.destroy=function(){a(".jstree:jstree").jstree("destroy"),a(i).off(".jstree")},a.jstree.core=function(a){this._id=a,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},a.jstree.reference=function(b){var c=null,d=null;if(!b||!b.id||b.tagName&&b.nodeType||(b=b.id),!d||!d.length)try{d=a(b)}catch(e){}if(!d||!d.length)try{d=a("#"+b.replace(a.jstree.idregex,"\\$&"))}catch(e){}return d&&d.length&&(d=d.closest(".jstree")).length&&(d=d.data("jstree"))?c=d:a(".jstree").each(function(){var d=a(this).data("jstree");return d&&d._model.data[b]?(c=d,!1):void 0}),c},a.fn.jstree=function(c){var d="string"==typeof c,e=Array.prototype.slice.call(arguments,1),f=null;return c!==!0||this.length?(this.each(function(){var g=a.jstree.reference(this),h=d&&g?g[c]:null;return f=d&&h?h.apply(g,e):null,g||d||c!==b&&!a.isPlainObject(c)||a.jstree.create(this,c),(g&&!d||c===!0)&&(f=g||!1),null!==f&&f!==b?!1:void 0}),null!==f&&f!==b?f:this):!1},a.expr.pseudos.jstree=a.expr.createPseudo(function(c){return function(c){return a(c).hasClass("jstree")&&a(c).data("jstree")!==b}}),a.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:a.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,keyboard:{"ctrl-space":function(b){b.type="click",a(b.currentTarget).trigger(b)},enter:function(b){b.type="click",a(b.currentTarget).trigger(b)},left:function(b){if(b.preventDefault(),this.is_open(b.currentTarget))this.close_node(b.currentTarget);else{var c=this.get_parent(b.currentTarget);c&&c.id!==a.jstree.root&&this.get_node(c,!0).children(".jstree-anchor").focus()}},up:function(a){a.preventDefault();var b=this.get_prev_dom(a.currentTarget);b&&b.length&&b.children(".jstree-anchor").focus()},right:function(b){if(b.preventDefault(),this.is_closed(b.currentTarget))this.open_node(b.currentTarget,function(a){this.get_node(a,!0).children(".jstree-anchor").focus()});else if(this.is_open(b.currentTarget)){var c=this.get_node(b.currentTarget,!0).children(".jstree-children")[0];c&&a(this._firstChild(c)).children(".jstree-anchor").focus()}},down:function(a){a.preventDefault();var b=this.get_next_dom(a.currentTarget);b&&b.length&&b.children(".jstree-anchor").focus()},"*":function(a){this.open_all()},home:function(b){b.preventDefault();var c=this._firstChild(this.get_container_ul()[0]);c&&a(c).children(".jstree-anchor").filter(":visible").focus()},end:function(a){a.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(a){a.preventDefault(),this.edit(a.currentTarget)}}},a.jstree.core.prototype={plugin:function(b,c){var d=a.jstree.plugins[b];return d?(this._data[b]={},d.prototype=this,new d(c,this)):this},init:function(b,c){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=a(b).addClass("jstree jstree-"+this._id),this.settings=c,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='tree-item'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(a.jstree.root)},destroy:function(a){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(b){}a||this.element.empty(),this.teardown()},_create_prototype_node:function(){var a=i.createElement("LI"),b,c;return a.setAttribute("role","treeitem"),b=i.createElement("I"),b.className="jstree-icon jstree-ocl",b.setAttribute("role","presentation"),a.appendChild(b),b=i.createElement("A"),b.className="jstree-anchor",b.setAttribute("href","#"),b.setAttribute("tabindex","-1"),c=i.createElement("I"),c.className="jstree-icon jstree-themeicon",c.setAttribute("role","presentation"),b.appendChild(c),a.appendChild(b),b=c=null,a},_kbevent_to_func:function(a){var b={8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},c=[];a.ctrlKey&&c.push("ctrl"),a.altKey&&c.push("alt"),a.shiftKey&&c.push("shift"),c.push(b[a.which]||a.which),c=c.sort().join("-").toLowerCase();var d=this.settings.core.keyboard,e,f;for(e in d)if(d.hasOwnProperty(e)&&(f=e,"-"!==f&&"+"!==f&&(f=f.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS"),f=f.split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),f===c))return d[e];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var b="",c=null,d=0;this.element.on("dblclick.jstree",function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;if(i.selection&&i.selection.empty)i.selection.empty();else if(window.getSelection){var b=window.getSelection();try{b.removeAllRanges(),b.collapse()}catch(c){}}}).on("mousedown.jstree",a.proxy(function(a){a.target===this.element[0]&&(a.preventDefault(),d=+new Date)},this)).on("mousedown.jstree",".jstree-ocl",function(a){a.preventDefault()}).on("click.jstree",".jstree-ocl",a.proxy(function(a){this.toggle_node(a.target)},this)).on("dblclick.jstree",".jstree-anchor",a.proxy(function(a){return a.target.tagName&&"input"===a.target.tagName.toLowerCase()?!0:void(this.settings.core.dblclick_toggle&&this.toggle_node(a.target))},this)).on("click.jstree",".jstree-anchor",a.proxy(function(b){b.preventDefault(),b.currentTarget!==i.activeElement&&a(b.currentTarget).focus(),this.activate_node(b.currentTarget,b)},this)).on("keydown.jstree",".jstree-anchor",a.proxy(function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===a.which?a.which=39:39===a.which&&(a.which=37));var b=this._kbevent_to_func(a);if(b){var c=b.call(this,a);if(c===!1||c===!0)return c}},this)).on("load_node.jstree",a.proxy(function(b,c){c.status&&(c.node.id!==a.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(a.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var b=[],c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)b=b.concat(this._model.data[this._data.core.selected[c]].parents);for(b=a.vakata.array_unique(b),c=0,d=b.length;d>c;c++)this.open_node(b[c],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}},this),0))},this)).on("keypress.jstree",a.proxy(function(d){if(d.target.tagName&&"input"===d.target.tagName.toLowerCase())return!0;c&&clearTimeout(c),c=setTimeout(function(){b=""},500);var e=String.fromCharCode(d.which).toLowerCase(),f=this.element.find(".jstree-anchor").filter(":visible"),g=f.index(i.activeElement)||0,h=!1;if(b+=e,b.length>1){if(f.slice(g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return}if(new RegExp("^"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(b)){if(f.slice(g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return}},this)).on("init.jstree",a.proxy(function(){var a=this.settings.core.themes;this._data.core.themes.dots=a.dots,this._data.core.themes.stripes=a.stripes,this._data.core.themes.icons=a.icons,this._data.core.themes.ellipsis=a.ellipsis,this.set_theme(a.name||"default",a.url),this.set_theme_variant(a.variant)},this)).on("loading.jstree",a.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()},this)).on("blur.jstree",".jstree-anchor",a.proxy(function(b){this._data.core.focused=null,a(b.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",a.proxy(function(b){var c=this.get_node(b.currentTarget);c&&c.id&&(this._data.core.focused=c.id),this.element.find(".jstree-hovered").not(b.currentTarget).mouseleave(),a(b.currentTarget).mouseenter(),this.element.attr("tabindex","-1")},this)).on("focus.jstree",a.proxy(function(){if(+new Date-d>500&&!this._data.core.focused&&this.settings.core.restore_focus){d=0;var a=this.get_node(this.element.attr("aria-activedescendant"),!0);a&&a.find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",a.proxy(function(a){this.hover_node(a.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),a(i).off(".jstree-"+this._id)},trigger:function(a,b){b||(b={}),b.instance=this,this.element.triggerHandler(a.replace(".jstree","")+".jstree",b)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(b){var c=this.settings.core.strings;return a.isFunction(c)?c.call(this,b):c&&c[b]?c[b]:b},_firstChild:function(a){a=a?a.firstChild:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_nextSibling:function(a){a=a?a.nextSibling:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_previousSibling:function(a){a=a?a.previousSibling:null;while(null!==a&&1!==a.nodeType)a=a.previousSibling;return a},get_node:function(b,c){b&&b.id&&(b=b.id),b instanceof jQuery&&b.length&&b[0].id&&(b=b[0].id);var d;try{if(this._model.data[b])b=this._model.data[b];else if("string"==typeof b&&this._model.data[b.replace(/^#/,"")])b=this._model.data[b.replace(/^#/,"")];else if("string"==typeof b&&(d=a("#"+b.replace(a.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else if((d=this.element.find(b)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else{if(!(d=this.element.find(b)).length||!d.hasClass("jstree"))return!1;b=this._model.data[a.jstree.root]}return c&&(b=b.id===a.jstree.root?this.element:a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)),b}catch(e){return!1}},get_path:function(b,c,d){if(b=b.parents?b:this.get_node(b),!b||b.id===a.jstree.root||!b.parents)return!1;var e,f,g=[];for(g.push(d?b.id:b.text),e=0,f=b.parents.length;f>e;e++)g.push(d?b.parents[e]:this.get_text(b.parents[e]));return g=g.reverse().slice(1),c?g.join(c):g},get_next_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this._firstChild(this.get_container_ul()[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}if(b.hasClass("jstree-open")){d=this._firstChild(b.children(".jstree-children")[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);if(null!==d)return a(d)}d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return null!==d?a(d):b.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this.get_container_ul()[0].lastChild;while(d&&0===d.offsetHeight)d=this._previousSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);if(null!==d){b=a(d);while(b.hasClass("jstree-open"))b=b.children(".jstree-children").first().children(".jstree-node:visible:last");return b}return d=b[0].parentNode.parentNode,d&&d.className&&-1!==d.className.indexOf("jstree-node")?a(d):!1},get_parent:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.parent:!1},get_children_dom:function(a){return a=this.get_node(a,!0),a[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):a&&a.length?a.children(".jstree-children").children(".jstree-node"):!1},is_parent:function(a){return a=this.get_node(a),a&&(a.state.loaded===!1||a.children.length>0)},is_loaded:function(a){return a=this.get_node(a),a&&a.state.loaded},is_loading:function(a){return a=this.get_node(a),a&&a.state&&a.state.loading},is_open:function(a){return a=this.get_node(a),a&&a.state.opened},is_closed:function(a){return a=this.get_node(a),a&&this.is_parent(a)&&!a.state.opened},is_leaf:function(a){return!this.is_parent(a)},load_node:function(b,c){var d,e,f,g,h;if(a.isArray(b))return this._load_nodes(b.slice(),c),!0;if(b=this.get_node(b),!b)return c&&c.call(this,b,!1),!1;if(b.state.loaded){for(b.state.loaded=!1,f=0,g=b.parents.length;g>f;f++)this._model.data[b.parents[f]].children_d=a.vakata.array_filter(this._model.data[b.parents[f]].children_d,function(c){return-1===a.inArray(c,b.children_d)});for(d=0,e=b.children_d.length;e>d;d++)this._model.data[b.children_d[d]].state.selected&&(h=!0),delete this._model.data[b.children_d[d]];h&&(this._data.core.selected=a.vakata.array_filter(this._data.core.selected,function(c){return-1===a.inArray(c,b.children_d)})),b.children=[],b.children_d=[],h&&this.trigger("changed",{action:"load_node",node:b,selected:this._data.core.selected})}return b.state.failed=!1,b.state.loading=!0,this.get_node(b,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(b,a.proxy(function(a){b=this._model.data[b.id],b.state.loading=!1,b.state.loaded=a,b.state.failed=!b.state.loaded;var d=this.get_node(b,!0),e=0,f=0,g=this._model.data,h=!1;for(e=0,f=b.children.length;f>e;e++)if(g[b.children[e]]&&!g[b.children[e]].state.hidden){h=!0;break}b.state.loaded&&d&&d.length&&(d.removeClass("jstree-closed jstree-open jstree-leaf"),h?"#"!==b.id&&d.addClass(b.state.opened?"jstree-open":"jstree-closed"):d.addClass("jstree-leaf")),d.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:b,status:a}),c&&c.call(this,b,a)},this)),!0},_load_nodes:function(a,b,c,d){var e=!0,f=function(){this._load_nodes(a,b,!0)},g=this._model.data,h,i,j=[];for(h=0,i=a.length;i>h;h++)g[a[h]]&&(!g[a[h]].state.loaded&&!g[a[h]].state.failed||!c&&d)&&(this.is_loading(a[h])||this.load_node(a[h],f),e=!1);if(e){for(h=0,i=a.length;i>h;h++)g[a[h]]&&g[a[h]].state.loaded&&j.push(a[h]);b&&!b.done&&(b.call(this,j),b.done=!0)}},load_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d=[],e=this._model.data,f=e[b.id].children_d,g,h;for(b.state&&!b.state.loaded&&d.push(b.id),g=0,h=f.length;h>g;g++)e[f[g]]&&e[f[g]].state&&!e[f[g]].state.loaded&&d.push(f[g]);d.length?this._load_nodes(d,function(){this.load_all(b,c)}):(c&&c.call(this,b),this.trigger("load_all",{node:b}))},_load_node:function(b,c){var d=this.settings.core.data,e,f=function g(){return 3!==this.nodeType&&8!==this.nodeType};return d?a.isFunction(d)?d.call(this,b,a.proxy(function(d){d===!1?c.call(this,!1):this["string"==typeof d?"_append_html_data":"_append_json_data"](b,"string"==typeof d?a(a.parseHTML(d)).filter(f):d,function(a){c.call(this,a)})},this)):"object"==typeof d?d.url?(d=a.extend(!0,{},d),a.isFunction(d.url)&&(d.url=d.url.call(this,b)),a.isFunction(d.data)&&(d.data=d.data.call(this,b)),a.ajax(d).done(a.proxy(function(d,e,g){var h=g.getResponseHeader("Content-Type");return h&&-1!==h.indexOf("json")||"object"==typeof d?this._append_json_data(b,d,function(a){c.call(this,a)}):h&&-1!==h.indexOf("html")||"string"==typeof d?this._append_html_data(b,a(a.parseHTML(d)).filter(f),function(a){c.call(this,a)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:g})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))},this)).fail(a.proxy(function(a){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:a})},c.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)},this))):(e=a.isArray(d)?a.extend(!0,[],d):a.isPlainObject(d)?a.extend(!0,{},d):d,b.id===a.jstree.root?this._append_json_data(b,e,function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))):"string"==typeof d?b.id===a.jstree.root?this._append_html_data(b,a(a.parseHTML(d)).filter(f),function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1)):c.call(this,!1):b.id===a.jstree.root?this._append_html_data(b,this._data.core.original_container_html.clone(!0),function(a){c.call(this,a)}):c.call(this,!1)},_node_changed:function(b){b=this.get_node(b),b&&-1===a.inArray(b.id,this._model.changed)&&this._model.changed.push(b.id)},_append_html_data:function(b,c,d){b=this.get_node(b),b.children=[],b.children_d=[];var e=c.is("ul")?c.children():c,f=b.id,g=[],h=[],i=this._model.data,j=i[f],k=this._data.core.selected.length,l,m,n;for(e.each(a.proxy(function(b,c){l=this._parse_model_from_html(a(c),f,j.parents.concat()),l&&(g.push(l),h.push(l),i[l].children_d.length&&(h=h.concat(i[l].children_d)))},this)),j.children=g,j.children_d=h,m=0,n=j.parents.length;n>m;m++)i[j.parents[m]].children_d=i[j.parents[m]].children_d.concat(h);this.trigger("model",{nodes:h,parent:f}),f!==a.jstree.root?(this._node_changed(f),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==k&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)},_append_json_data:function(b,c,d,e){if(null!==this.element){b=this.get_node(b),b.children=[],b.children_d=[],c.d&&(c=c.d,"string"==typeof c&&(c=JSON.parse(c))),a.isArray(c)||(c=[c]);var f=null,g={df:this._model.default_state,dat:c,par:b.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},h=function(a,b){a.data&&(a=a.data);var c=a.dat,d=a.par,e=[],f=[],g=[],h=a.df,i=a.t_id,j=a.t_cnt,k=a.m,l=k[d],m=a.sel,n,o,p,q,r=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f,i,j,l,m={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in h)h.hasOwnProperty(f)&&(m.state[f]=h[f]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(m.icon=a.data.jstree.icon),(m.icon===b||null===m.icon||""===m.icon)&&(m.icon=!0),a&&a.data&&(m.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(m.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(m.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(m.li_attr[f]=a.li_attr[f]);if(m.li_attr.id||(m.li_attr.id=e),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(m.a_attr[f]=a.a_attr[f]);for(a&&a.children&&a.children===!0&&(m.state.loaded=!1,m.children=[],m.children_d=[]),k[m.id]=m,f=0,i=m.children.length;i>f;f++)j=r(k[m.children[f]],m.id,d),l=k[j],m.children_d.push(j),l.children_d.length&&(m.children_d=m.children_d.concat(l.children_d));return delete a.data,delete a.children,k[m.id].original=a,m.state.selected&&g.push(m.id),m.id},s=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,l,m,n,o;do e="j"+i+"_"+ ++j;while(k[e]);o={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in h)h.hasOwnProperty(f)&&(o.state[f]=h[f]);if(a&&a.id&&(o.id=a.id.toString()),a&&a.text&&(o.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(o.icon=a.data.jstree.icon),(o.icon===b||null===o.icon||""===o.icon)&&(o.icon=!0),a&&a.data&&(o.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(o.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(o.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(o.li_attr[f]=a.li_attr[f]);if(o.li_attr.id&&!o.id&&(o.id=o.li_attr.id.toString()),o.id||(o.id=e),o.li_attr.id||(o.li_attr.id=o.id),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(o.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,l=a.children.length;l>f;f++)m=s(a.children[f],o.id,d),n=k[m],o.children.push(m),n.children_d.length&&(o.children_d=o.children_d.concat(n.children_d));o.children_d=o.children_d.concat(o.children)}return a&&a.children&&a.children===!0&&(o.state.loaded=!1,o.children=[],o.children_d=[]),delete a.data,delete a.children,o.original=a,k[o.id]=o,o.state.selected&&g.push(o.id),o.id};if(c.length&&c[0].id!==b&&c[0].parent!==b){for(o=0,p=c.length;p>o;o++)c[o].children||(c[o].children=[]),c[o].state||(c[o].state={}),k[c[o].id.toString()]=c[o];for(o=0,p=c.length;p>o;o++)k[c[o].parent.toString()]?(k[c[o].parent.toString()].children.push(c[o].id.toString()),l.children_d.push(c[o].id.toString())):(this._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:c[o].id.toString(),parent:c[o].parent.toString()})},this.settings.core.error.call(this,this._data.core.last_error));for(o=0,p=l.children.length;p>o;o++)n=r(k[l.children[o]],d,l.parents.concat()),f.push(n),k[n].children_d.length&&(f=f.concat(k[n].children_d));for(o=0,p=l.parents.length;p>o;o++)k[l.parents[o]].children_d=k[l.parents[o]].children_d.concat(f);q={cnt:j,mod:k,sel:m,par:d,dpc:f,add:g}}else{for(o=0,p=c.length;p>o;o++)n=s(c[o],d,l.parents.concat()),n&&(e.push(n),f.push(n),k[n].children_d.length&&(f=f.concat(k[n].children_d)));for(l.children=e,l.children_d=f,o=0,p=l.parents.length;p>o;o++)k[l.parents[o]].children_d=k[l.parents[o]].children_d.concat(f);q={cnt:j,mod:k,sel:m,par:d,dpc:f,add:g}}return"undefined"!=typeof window&&"undefined"!=typeof window.document?q:void postMessage(q)},i=function(b,c){if(null!==this.element){this._cnt=b.cnt;var e,f=this._model.data;for(e in f)f.hasOwnProperty(e)&&f[e].state&&f[e].state.loading&&b.mod[e]&&(b.mod[e].state.loading=!0);if(this._model.data=b.mod,c){var g,h=b.add,i=b.sel,j=this._data.core.selected.slice();if(f=this._model.data,i.length!==j.length||a.vakata.array_unique(i.concat(j)).length!==i.length){for(e=0,g=i.length;g>e;e++)-1===a.inArray(i[e],h)&&-1===a.inArray(i[e],j)&&(f[i[e]].state.selected=!1);for(e=0,g=j.length;g>e;e++)-1===a.inArray(j[e],i)&&(f[j[e]].state.selected=!0)}}b.add.length&&(this._data.core.selected=this._data.core.selected.concat(b.add)),this.trigger("model",{nodes:b.dpc,parent:b.par}),b.par!==a.jstree.root?(this._node_changed(b.par),this.redraw()):this.redraw(!0),b.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+h.toString()],{type:"text/javascript"}))),!this._data.core.working||e?(this._data.core.working=!0,f=new window.Worker(this._wrk),f.onmessage=a.proxy(function(a){i.call(this,a.data,!0);try{f.terminate(),f=null}catch(b){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),g.par?f.postMessage(g):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([b,c,d,!0])}catch(j){i.call(this,h(g),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else i.call(this,h(g),!1)}},_parse_model_from_html:function(c,d,e){e=e?[].concat(e):[],d&&e.unshift(d);var f,g,h=this._model.data,i={id:!1,text:!1,icon:!0,parent:d,parents:e,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},j,k,l;for(j in this._model.default_state)this._model.default_state.hasOwnProperty(j)&&(i.state[j]=this._model.default_state[j]);if(k=a.vakata.attributes(c,!0),a.each(k,function(b,c){return c=a.trim(c),c.length?(i.li_attr[b]=c,void("id"===b&&(i.id=c.toString()))):!0}),k=c.children("a").first(),k.length&&(k=a.vakata.attributes(k,!0),a.each(k,function(b,c){c=a.trim(c),c.length&&(i.a_attr[b]=c)})),k=c.children("a").first().length?c.children("a").first().clone():c.clone(),k.children("ins, i, ul").remove(),k=k.html(),k=a("<div />").html(k),i.text=this.settings.core.force_text?k.text():k.html(),k=c.data(),i.data=k?a.extend(!0,{},k):null,i.state.opened=c.hasClass("jstree-open"),i.state.selected=c.children("a").hasClass("jstree-clicked"),i.state.disabled=c.children("a").hasClass("jstree-disabled"),i.data&&i.data.jstree)for(j in i.data.jstree)i.data.jstree.hasOwnProperty(j)&&(i.state[j]=i.data.jstree[j]);k=c.children("a").children(".jstree-themeicon"),k.length&&(i.icon=k.hasClass("jstree-themeicon-hidden")?!1:k.attr("rel")),i.state.icon!==b&&(i.icon=i.state.icon),(i.icon===b||null===i.icon||""===i.icon)&&(i.icon=!0),k=c.children("ul").children("li");do l="j"+this._id+"_"+ ++this._cnt;while(h[l]);return i.id=i.li_attr.id?i.li_attr.id.toString():l,k.length?(k.each(a.proxy(function(b,c){f=this._parse_model_from_html(a(c),i.id,e),g=this._model.data[f],i.children.push(f),g.children_d.length&&(i.children_d=i.children_d.concat(g.children_d))},this)),i.children_d=i.children_d.concat(i.children)):c.hasClass("jstree-closed")&&(i.state.loaded=!1),i.li_attr["class"]&&(i.li_attr["class"]=i.li_attr["class"].replace("jstree-closed","").replace("jstree-open","")),i.a_attr["class"]&&(i.a_attr["class"]=i.a_attr["class"].replace("jstree-clicked","").replace("jstree-disabled","")),h[i.id]=i,i.state.selected&&this._data.core.selected.push(i.id),i.id},_parse_model_from_flat_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f=this._model.data,g=this._model.default_state,h,i,j,k,l={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(h in g)g.hasOwnProperty(h)&&(l.state[h]=g[h]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(h in a.data.jstree)a.data.jstree.hasOwnProperty(h)&&(l.state[h]=a.data.jstree[h]);if(a&&"object"==typeof a.state)for(h in a.state)a.state.hasOwnProperty(h)&&(l.state[h]=a.state[h]);if(a&&"object"==typeof a.li_attr)for(h in a.li_attr)a.li_attr.hasOwnProperty(h)&&(l.li_attr[h]=a.li_attr[h]);if(l.li_attr.id||(l.li_attr.id=e),a&&"object"==typeof a.a_attr)for(h in a.a_attr)a.a_attr.hasOwnProperty(h)&&(l.a_attr[h]=a.a_attr[h]);for(a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),f[l.id]=l,h=0,i=l.children.length;i>h;h++)j=this._parse_model_from_flat_json(f[l.children[h]],l.id,d),k=f[j],l.children_d.push(j),k.children_d.length&&(l.children_d=l.children_d.concat(k.children_d));return delete a.data,delete a.children,f[l.id].original=a,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,g,h,i,j=this._model.data,k=this._model.default_state,l;do e="j"+this._id+"_"+ ++this._cnt;while(j[e]);l={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in k)k.hasOwnProperty(f)&&(l.state[f]=k[f]);if(a&&a.id&&(l.id=a.id.toString()),a&&a.text&&(l.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(l.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(l.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(l.li_attr[f]=a.li_attr[f]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),
l.id||(l.id=e),l.li_attr.id||(l.li_attr.id=l.id),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(l.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,g=a.children.length;g>f;f++)h=this._parse_model_from_json(a.children[f],l.id,d),i=j[h],l.children.push(h),i.children_d.length&&(l.children_d=l.children_d.concat(i.children_d));l.children_d=l.children_d.concat(l.children)}return a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete a.data,delete a.children,l.original=a,j[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){var b=this._model.force_full_redraw?this._model.data[a.jstree.root].children.concat([]):this._model.changed.concat([]),c=i.createElement("UL"),d,e,f,g=this._data.core.focused;for(e=0,f=b.length;f>e;e++)d=this.redraw_node(b[e],!0,this._model.force_full_redraw),d&&this._model.force_full_redraw&&c.appendChild(d);this._model.force_full_redraw&&(c.className=this.get_container_ul()[0].className,c.setAttribute("role","group"),this.element.empty().append(c)),null!==g&&this.settings.core.restore_focus&&(d=this.get_node(g,!0),d&&d.length&&d.children(".jstree-anchor")[0]!==i.activeElement?d.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:b})},redraw:function(a){a&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(b){var c=this.get_node(b),d=!1,e=!1,f=!1,g=i;if(!c)return!1;if(c.id===a.jstree.root)return this.redraw(!0);if(b=this.get_node(b,!0),!b||!b.length)return!1;if(b.children(".jstree-children").remove(),b=b[0],c.children.length&&c.state.loaded){for(f=g.createElement("UL"),f.setAttribute("role","group"),f.className="jstree-children",d=0,e=c.children.length;e>d;d++)f.appendChild(this.redraw_node(c.children[d],!0,!0));b.appendChild(f)}},redraw_node:function(b,c,d,e){var f=this.get_node(b),g=!1,h=!1,j=!1,k=!1,l=!1,m=!1,n="",o=i,p=this._model.data,q=!1,r=!1,s=null,t=0,u=0,v=!1,w=!1;if(!f)return!1;if(f.id===a.jstree.root)return this.redraw(!0);if(c=c||0===f.children.length,b=i.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(f.id[0])?"\\3"+f.id[0]+" "+f.id.substr(1).replace(a.jstree.idregex,"\\$&"):f.id.replace(a.jstree.idregex,"\\$&"))):i.getElementById(f.id))b=a(b),d||(g=b.parent().parent()[0],g===this.element[0]&&(g=null),h=b.index()),c||!f.children.length||b.children(".jstree-children").length||(c=!0),c||(j=b.children(".jstree-children")[0]),q=b.children(".jstree-anchor")[0]===i.activeElement,b.remove();else if(c=!0,!d){if(g=f.parent!==a.jstree.root?a("#"+f.parent.replace(a.jstree.idregex,"\\$&"),this.element)[0]:null,!(null===g||g&&p[f.parent].state.opened))return!1;h=a.inArray(f.id,null===g?p[a.jstree.root].children:p[f.parent].children)}b=this._data.core.node.cloneNode(!0),n="jstree-node ";for(k in f.li_attr)if(f.li_attr.hasOwnProperty(k)){if("id"===k)continue;"class"!==k?b.setAttribute(k,f.li_attr[k]):n+=f.li_attr[k]}for(f.a_attr.id||(f.a_attr.id=f.id+"_anchor"),b.setAttribute("aria-selected",!!f.state.selected),b.setAttribute("aria-level",f.parents.length),b.setAttribute("aria-labelledby",f.a_attr.id),f.state.disabled&&b.setAttribute("aria-disabled",!0),k=0,l=f.children.length;l>k;k++)if(!p[f.children[k]].state.hidden){v=!0;break}if(null!==f.parent&&p[f.parent]&&!f.state.hidden&&(k=a.inArray(f.id,p[f.parent].children),w=f.id,-1!==k))for(k++,l=p[f.parent].children.length;l>k;k++)if(p[p[f.parent].children[k]].state.hidden||(w=p[f.parent].children[k]),w!==f.id)break;f.state.hidden&&(n+=" jstree-hidden"),f.state.loading&&(n+=" jstree-loading"),f.state.loaded&&!v?n+=" jstree-leaf":(n+=f.state.opened&&f.state.loaded?" jstree-open":" jstree-closed",b.setAttribute("aria-expanded",f.state.opened&&f.state.loaded)),w===f.id&&(n+=" jstree-last"),b.id=f.id,b.className=n,n=(f.state.selected?" jstree-clicked":"")+(f.state.disabled?" jstree-disabled":"");for(l in f.a_attr)if(f.a_attr.hasOwnProperty(l)){if("href"===l&&"#"===f.a_attr[l])continue;"class"!==l?b.childNodes[1].setAttribute(l,f.a_attr[l]):n+=" "+f.a_attr[l]}if(n.length&&(b.childNodes[1].className="jstree-anchor "+n),(f.icon&&f.icon!==!0||f.icon===!1)&&(f.icon===!1?b.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===f.icon.indexOf("/")&&-1===f.icon.indexOf(".")?b.childNodes[1].childNodes[0].className+=" "+f.icon+" jstree-themeicon-custom":(b.childNodes[1].childNodes[0].style.backgroundImage='url("'+f.icon+'")',b.childNodes[1].childNodes[0].style.backgroundPosition="center center",b.childNodes[1].childNodes[0].style.backgroundSize="auto",b.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?b.childNodes[1].appendChild(o.createTextNode(f.text)):b.childNodes[1].innerHTML+=f.text,c&&f.children.length&&(f.state.opened||e)&&f.state.loaded){for(m=o.createElement("UL"),m.setAttribute("role","group"),m.className="jstree-children",k=0,l=f.children.length;l>k;k++)m.appendChild(this.redraw_node(f.children[k],c,!0));b.appendChild(m)}if(j&&b.appendChild(j),!d){for(g||(g=this.element[0]),k=0,l=g.childNodes.length;l>k;k++)if(g.childNodes[k]&&g.childNodes[k].className&&-1!==g.childNodes[k].className.indexOf("jstree-children")){s=g.childNodes[k];break}s||(s=o.createElement("UL"),s.setAttribute("role","group"),s.className="jstree-children",g.appendChild(s)),g=s,h<g.childNodes.length?g.insertBefore(b,g.childNodes[h]):g.appendChild(b),q&&(t=this.element[0].scrollTop,u=this.element[0].scrollLeft,b.childNodes[1].focus(),this.element[0].scrollTop=t,this.element[0].scrollLeft=u)}return f.state.opened&&!f.state.loaded&&(f.state.opened=!1,setTimeout(a.proxy(function(){this.open_node(f.id,!1,0)},this),0)),b},open_node:function(c,d,e){var f,g,h,i;if(a.isArray(c)){for(c=c.slice(),f=0,g=c.length;g>f;f++)this.open_node(c[f],d,e);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(e=e===b?this.settings.core.animation:e,this.is_closed(c)?this.is_loaded(c)?(h=this.get_node(c,!0),i=this,h.length&&(e&&h.children(".jstree-children").length&&h.children(".jstree-children").stop(!0,!0),c.children.length&&!this._firstChild(h.children(".jstree-children")[0])&&this.draw_children(c),e?(this.trigger("before_open",{node:c}),h.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded",!0).children(".jstree-children").stop(!0,!0).slideDown(e,function(){this.style.display="",i.element&&i.trigger("after_open",{node:c})})):(this.trigger("before_open",{node:c}),h[0].className=h[0].className.replace("jstree-closed","jstree-open"),h[0].setAttribute("aria-expanded",!0))),c.state.opened=!0,d&&d.call(this,c,!0),h.length||this.trigger("before_open",{node:c}),this.trigger("open_node",{node:c}),e&&h.length||this.trigger("after_open",{node:c}),!0):this.is_loading(c)?setTimeout(a.proxy(function(){this.open_node(c,d,e)},this),500):void this.load_node(c,function(a,b){return b?this.open_node(a,d,e):d?d.call(this,a,!1):!1}):(d&&d.call(this,c,!1),!1)):!1},_open_to:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c,d,e=b.parents;for(c=0,d=e.length;d>c;c+=1)c!==a.jstree.root&&this.open_node(e[c],!1,0);return a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)},close_node:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.close_node(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?this.is_closed(c)?!1:(d=d===b?this.settings.core.animation:d,g=this,h=this.get_node(c,!0),c.state.opened=!1,this.trigger("close_node",{node:c}),void(h.length?d?h.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded",!1).children(".jstree-children").stop(!0,!0).slideUp(d,function(){this.style.display="",h.children(".jstree-children").remove(),g.element&&g.trigger("after_close",{node:c})}):(h[0].className=h[0].className.replace("jstree-open","jstree-closed"),h.attr("aria-expanded",!1).children(".jstree-children").remove(),this.trigger("after_close",{node:c})):this.trigger("after_close",{node:c}))):!1},toggle_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.toggle_node(b[c]);return!0}return this.is_closed(b)?this.open_node(b):this.is_open(b)?this.close_node(b):void 0},open_all:function(b,c,d){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var e=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),f,g,h;if(!e.length){for(f=0,g=b.children_d.length;g>f;f++)this.is_closed(this._model.data[b.children_d[f]])&&(this._model.data[b.children_d[f]].state.opened=!0);return this.trigger("open_all",{node:b})}d=d||e,h=this,e=this.is_closed(b)?e.find(".jstree-closed").addBack():e.find(".jstree-closed"),e.each(function(){h.open_node(this,function(a,b){b&&this.is_parent(a)&&this.open_all(a,c,d)},c||0)}),0===d.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(d)})},close_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),e=this,f,g;for(d.length&&(d=this.is_open(b)?d.find(".jstree-open").addBack():d.find(".jstree-open"),a(d.get().reverse()).each(function(){e.close_node(this,c||0)})),f=0,g=b.children_d.length;g>f;f++)this._model.data[b.children_d[f]].state.opened=!1;this.trigger("close_all",{node:b})},is_disabled:function(a){return a=this.get_node(a),a&&a.state&&a.state.disabled},enable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!1,this.get_node(b,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:b})):!1},disable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!0,this.get_node(b,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:b})):!1},is_hidden:function(a){return a=this.get_node(a),a.state.hidden===!0},hide_node:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.hide_node(b[d],!0);return c||this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden||(b.state.hidden=!0,this._node_changed(b.parent),c||this.redraw(),this.trigger("hide_node",{node:b}))):!1},show_node:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.show_node(b[d],!0);return c||this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden&&(b.state.hidden=!1,this._node_changed(b.parent),c||this.redraw(),this.trigger("show_node",{node:b}))):!1},hide_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&!d[c].state.hidden&&(d[c].state.hidden=!0,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("hide_all",{nodes:e}),e},show_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&d[c].state.hidden&&(d[c].state.hidden=!1,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("show_all",{nodes:e}),e},activate_node:function(a,c){if(this.is_disabled(a))return!1;if(c&&"object"==typeof c||(c={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==b?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&(!c.shiftKey||this._data.core.last_clicked&&this.get_parent(a)&&this.get_parent(a)===this._data.core.last_clicked.parent))if(c.shiftKey){var d=this.get_node(a).id,e=this._data.core.last_clicked.id,f=this.get_node(this._data.core.last_clicked.parent).children,g=!1,h,i;for(h=0,i=f.length;i>h;h+=1)f[h]===d&&(g=!g),f[h]===e&&(g=!g),this.is_disabled(f[h])||!g&&f[h]!==d&&f[h]!==e?this.deselect_node(f[h],!0,c):this.is_hidden(f[h])||this.select_node(f[h],!0,!1,c);this.trigger("changed",{action:"select_node",node:this.get_node(a),selected:this._data.core.selected,event:c})}else this.is_selected(a)?this.deselect_node(a,!1,c):this.select_node(a,!1,!1,c);else!this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&this.is_selected(a)?this.deselect_node(a,!1,c):(this.deselect_all(!0),this.select_node(a,!1,!1,c),this._data.core.last_clicked=this.get_node(a));this.trigger("activate_node",{node:this.get_node(a),event:c})},hover_node:function(a){if(a=this.get_node(a,!0),!a||!a.length||a.children(".jstree-hovered").length)return!1;var b=this.element.find(".jstree-hovered"),c=this.element;b&&b.length&&this.dehover_node(b),a.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(a)}),setTimeout(function(){c.attr("aria-activedescendant",a[0].id)},0)},dehover_node:function(a){return a=this.get_node(a,!0),a&&a.length&&a.children(".jstree-hovered").length?(a.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(a)})):!1},select_node:function(b,c,d,e){var f,g,h,i;if(a.isArray(b)){for(b=b.slice(),g=0,h=b.length;h>g;g++)this.select_node(b[g],c,d,e);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.selected||(b.state.selected=!0,this._data.core.selected.push(b.id),d||(f=this._open_to(b)),f&&f.length&&f.attr("aria-selected",!0).children(".jstree-anchor").addClass("jstree-clicked"),this.trigger("select_node",{node:b,selected:this._data.core.selected,event:e}),c||this.trigger("changed",{action:"select_node",node:b,selected:this._data.core.selected,event:e})))):!1},deselect_node:function(b,c,d){var e,f,g;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.deselect_node(b[e],c,d);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(g=this.get_node(b,!0),void(b.state.selected&&(b.state.selected=!1,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.id),g.length&&g.attr("aria-selected",!1).children(".jstree-anchor").removeClass("jstree-clicked"),this.trigger("deselect_node",{node:b,selected:this._data.core.selected,event:d}),c||this.trigger("changed",{action:"deselect_node",node:b,selected:this._data.core.selected,event:d})))):!1},select_all:function(b){var c=this._data.core.selected.concat([]),d,e;for(this._data.core.selected=this._model.data[a.jstree.root].children_d.concat(),d=0,e=this._data.core.selected.length;e>d;d++)this._model.data[this._data.core.selected[d]]&&(this._model.data[this._data.core.selected[d]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),b||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:c})},deselect_all:function(a){var b=this._data.core.selected.concat([]),c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)this._model.data[this._data.core.selected[c]]&&(this._model.data[this._data.core.selected[c]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").parent().attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:b}),a||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:b})},is_selected:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.selected:!1},get_selected:function(b){return b?a.map(this._data.core.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.core.selected.slice()},get_top_selected:function(b){var c=this.get_selected(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,a.proxy(function(a){return this.get_node(a)},this)):c},get_bottom_selected:function(b){var c=this.get_selected(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,a.proxy(function(a){return this.get_node(a)},this)):d},get_state:function(){var b={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}},c;for(c in this._model.data)this._model.data.hasOwnProperty(c)&&c!==a.jstree.root&&(this._model.data[c].state.loaded&&this.settings.core.loaded_state&&b.core.loaded.push(c),this._model.data[c].state.opened&&b.core.open.push(c),this._model.data[c].state.selected&&b.core.selected.push(c));return b},set_state:function(c,d){if(c){if(c.core&&c.core.selected&&c.core.initial_selection===b&&(c.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),c.core){var e,f,g,h,i;if(c.core.loaded)return this.settings.core.loaded_state&&a.isArray(c.core.loaded)&&c.core.loaded.length?this._load_nodes(c.core.loaded,function(a){delete c.core.loaded,this.set_state(c,d)}):(delete c.core.loaded,this.set_state(c,d)),!1;if(c.core.open)return a.isArray(c.core.open)&&c.core.open.length?this._load_nodes(c.core.open,function(a){this.open_node(a,!1,0),delete c.core.open,this.set_state(c,d)}):(delete c.core.open,this.set_state(c,d)),!1;if(c.core.scroll)return c.core.scroll&&c.core.scroll.left!==b&&this.element.scrollLeft(c.core.scroll.left),c.core.scroll&&c.core.scroll.top!==b&&this.element.scrollTop(c.core.scroll.top),delete c.core.scroll,this.set_state(c,d),!1;if(c.core.selected)return h=this,(c.core.initial_selection===b||c.core.initial_selection===this._data.core.selected.concat([]).sort().join(","))&&(this.deselect_all(),a.each(c.core.selected,function(a,b){h.select_node(b,!1,!0)})),delete c.core.initial_selection,delete c.core.selected,this.set_state(c,d),!1;for(i in c)c.hasOwnProperty(i)&&"core"!==i&&-1===a.inArray(i,this.settings.plugins)&&delete c[i];if(a.isEmptyObject(c.core))return delete c.core,this.set_state(c,d),!1}return a.isEmptyObject(c)?(c=null,d&&d.call(this),this.trigger("set_state"),!1):!0}return!1},refresh:function(b,c){this._data.core.state=c===!0?{}:this.get_state(),c&&a.isFunction(c)&&(this._data.core.state=c.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var d=this.get_container_ul()[0].className;b||(this.element.html("<ul class='"+d+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='treeitem' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(a.jstree.root,function(b,c){c&&(this.get_container_ul()[0].className=d,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(a.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c=[],d=[],e=this._data.core.selected.concat([]);d.push(b.id),b.state.opened===!0&&c.push(b.id),this.get_node(b,!0).find(".jstree-open").each(function(){d.push(this.id),c.push(this.id)}),this._load_nodes(d,a.proxy(function(a){this.open_node(c,!1,0),this.select_node(e),this.trigger("refresh_node",{node:b,nodes:a})},this),!1,!0)},set_id:function(b,c){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var d,e,f=this._model.data,g=b.id;for(c=c.toString(),f[b.parent].children[a.inArray(b.id,f[b.parent].children)]=c,d=0,e=b.parents.length;e>d;d++)f[b.parents[d]].children_d[a.inArray(b.id,f[b.parents[d]].children_d)]=c;for(d=0,e=b.children.length;e>d;d++)f[b.children[d]].parent=c;for(d=0,e=b.children_d.length;e>d;d++)f[b.children_d[d]].parents[a.inArray(b.id,f[b.children_d[d]].parents)]=c;return d=a.inArray(b.id,this._data.core.selected),-1!==d&&(this._data.core.selected[d]=c),d=this.get_node(b.id,!0),d&&(d.attr("id",c),this.element.attr("aria-activedescendant")===b.id&&this.element.attr("aria-activedescendant",c)),delete f[b.id],b.id=c,b.li_attr.id=c,f[c]=b,this.trigger("set_id",{node:b,"new":b.id,old:g}),!0},get_text:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.text:!1},set_text:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.set_text(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.text=c,this.get_node(b,!0).length&&this.redraw_node(b.id),this.trigger("set_text",{obj:b,text:c}),!0):!1},get_json:function(b,c,d){if(b=this.get_node(b||a.jstree.root),!b)return!1;c&&c.flat&&!d&&(d=[]);var e={id:b.id,text:b.text,icon:this.get_icon(b),li_attr:a.extend(!0,{},b.li_attr),a_attr:a.extend(!0,{},b.a_attr),state:{},data:c&&c.no_data?!1:a.extend(!0,a.isArray(b.data)?[]:{},b.data)},f,g;if(c&&c.flat?e.parent=b.parent:e.children=[],c&&c.no_state)delete e.state;else for(f in b.state)b.state.hasOwnProperty(f)&&(e.state[f]=b.state[f]);if(c&&c.no_li_attr&&delete e.li_attr,c&&c.no_a_attr&&delete e.a_attr,c&&c.no_id&&(delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id),c&&c.flat&&b.id!==a.jstree.root&&d.push(e),!c||!c.no_children)for(f=0,g=b.children.length;g>f;f++)c&&c.flat?this.get_json(b.children[f],c,d):e.children.push(this.get_json(b.children[f],c));return c&&c.flat?d:b.id===a.jstree.root?e.children:e},create_node:function(c,d,e,f,g){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return!1;if(e=e===b?"last":e,!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(c))return this.load_node(c,function(){this.create_node(c,d,e,f,!0)});d||(d={text:this.get_string("New node")}),d="string"==typeof d?{text:d}:a.extend(!0,{},d),d.text===b&&(d.text=this.get_string("New node"));var h,i,j,k;switch(c.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":h=this.get_node(c.parent),e=a.inArray(c.id,h.children),c=h;break;case"after":h=this.get_node(c.parent),e=a.inArray(c.id,h.children)+1,c=h;break;case"inside":case"first":e=0;break;case"last":e=c.children.length;break;default:e||(e=0)}if(e>c.children.length&&(e=c.children.length),d.id||(d.id=!0),!this.check("create_node",d,c,e))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(d.id===!0&&delete d.id,d=this._parse_model_from_json(d,c.id,c.parents.concat()),!d)return!1;for(h=this.get_node(d),i=[],i.push(d),i=i.concat(h.children_d),this.trigger("model",{nodes:i,parent:c.id}),c.children_d=c.children_d.concat(i),j=0,k=c.parents.length;k>j;j++)this._model.data[c.parents[j]].children_d=this._model.data[c.parents[j]].children_d.concat(i);for(d=h,h=[],j=0,k=c.children.length;k>j;j++)h[j>=e?j+1:j]=c.children[j];return h[e]=d.id,c.children=h,this.redraw_node(c,!0),this.trigger("create_node",{node:this.get_node(d),parent:c.id,position:e}),f&&f.call(this,this.get_node(d)),d.id},rename_node:function(b,c){var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.rename_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=b.text,this.check("rename_node",b,this.get_parent(b),c)?(this.set_text(b,c),this.trigger("rename_node",{node:b,text:c,old:f}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1)):!1},delete_node:function(b){var c,d,e,f,g,h,i,j,k,l,m,n;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.delete_node(b[c]);return!0}if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;if(e=this.get_node(b.parent),f=a.inArray(b.id,e.children),l=!1,!this.check("delete_node",b,e,f))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==f&&(e.children=a.vakata.array_remove(e.children,f)),g=b.children_d.concat([]),g.push(b.id),h=0,i=b.parents.length;i>h;h++)this._model.data[b.parents[h]].children_d=a.vakata.array_filter(this._model.data[b.parents[h]].children_d,function(b){return-1===a.inArray(b,g)});for(j=0,k=g.length;k>j;j++)if(this._model.data[g[j]].state.selected){l=!0;break}for(l&&(this._data.core.selected=a.vakata.array_filter(this._data.core.selected,function(b){return-1===a.inArray(b,g)})),this.trigger("delete_node",{node:b,parent:e.id}),l&&this.trigger("changed",{action:"delete_node",node:b,selected:this._data.core.selected,parent:e.id}),j=0,k=g.length;k>j;j++)delete this._model.data[g[j]];return-1!==a.inArray(this._data.core.focused,g)&&(this._data.core.focused=null,m=this.element[0].scrollTop,n=this.element[0].scrollLeft,e.id===a.jstree.root?this._model.data[a.jstree.root].children[0]&&this.get_node(this._model.data[a.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(e,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=m,this.element[0].scrollLeft=n),this.redraw_node(e,!0),!0},check:function(b,c,d,e,f){c=c&&c.id?c:this.get_node(c),d=d&&d.id?d:this.get_node(d);var g=b.match(/^move_node|copy_node|create_node$/i)?d:c,h=this.settings.core.check_callback;return"move_node"!==b&&"copy_node"!==b||f&&f.is_multi||c.id!==d.id&&("move_node"!==b||a.inArray(c.id,d.children)!==e)&&-1===a.inArray(d.id,c.children_d)?(g&&g.data&&(g=g.data),g&&g.functions&&(g.functions[b]===!1||g.functions[b]===!0)?(g.functions[b]===!1&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})}),g.functions[b]):h===!1||a.isFunction(h)&&h.call(this,b,c,d,e,f)===!1||h&&h[b]===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1):!0):(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.move_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(r=this.move_node(c[j],d,e,f,g,!1,i))&&(d=r,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;if(l=(c.parent||a.jstree.root).toString(),n=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,o=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),p=!o||!o._id||this._id!==o._id,m=o&&o._id&&l&&o._model.data[l]&&o._model.data[l].children?a.inArray(c.id,o._model.data[l].children):-1,o&&o._id&&(c=o._model.data[c.id]),p)return(r=this.copy_node(c,d,e,f,g,!1,i))?(o&&o.delete_node(c),r):!1;switch(d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,n.children);break;case"after":e=a.inArray(d.id,n.children)+1;break;case"inside":case"first":e=0;break;case"last":e=n.children.length;break;default:e||(e=0)}if(e>n.children.length&&(e=n.children.length),!this.check("move_node",c,n,e,{core:!0,origin:i,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(c.parent===n.id){for(q=n.children.concat(),r=a.inArray(c.id,q),-1!==r&&(q=a.vakata.array_remove(q,r),e>r&&e--),r=[],s=0,t=q.length;t>s;s++)r[s>=e?s+1:s]=q[s];r[e]=c.id,n.children=r,this._node_changed(n.id),this.redraw(n.id===a.jstree.root)}else{for(r=c.children_d.concat(),r.push(c.id),s=0,t=c.parents.length;t>s;s++){for(q=[],w=o._model.data[c.parents[s]].children_d,u=0,v=w.length;v>u;u++)-1===a.inArray(w[u],r)&&q.push(w[u]);o._model.data[c.parents[s]].children_d=q}for(o._model.data[l].children=a.vakata.array_remove_item(o._model.data[l].children,c.id),s=0,t=n.parents.length;t>s;s++)this._model.data[n.parents[s]].children_d=this._model.data[n.parents[s]].children_d.concat(r);for(q=[],s=0,t=n.children.length;t>s;s++)q[s>=e?s+1:s]=n.children[s];for(q[e]=c.id,n.children=q,n.children_d.push(c.id),n.children_d=n.children_d.concat(c.children_d),c.parent=n.id,r=n.parents.concat(),r.unshift(n.id),w=c.parents.length,c.parents=r,r=r.concat(),s=0,t=c.children_d.length;t>s;s++)this._model.data[c.children_d[s]].parents=this._model.data[c.children_d[s]].parents.slice(0,-1*w),Array.prototype.push.apply(this._model.data[c.children_d[s]].parents,r);(l===a.jstree.root||n.id===a.jstree.root)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(l),this._node_changed(n.id)),h||this.redraw()}return f&&f.call(this,c,n,e),this.trigger("move_node",{node:c,parent:n.id,position:e,old_parent:l,old_position:m,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id,old_instance:o,new_instance:this}),c.id},copy_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.copy_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(m=this.copy_node(c[j],d,e,f,g,!0,i))&&(d=m,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;switch(q=(c.parent||a.jstree.root).toString(),r=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,s=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),t=!s||!s._id||this._id!==s._id,s&&s._id&&(c=s._model.data[c.id]),d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,r.children);break;case"after":e=a.inArray(d.id,r.children)+1;break;case"inside":case"first":e=0;break;case"last":e=r.children.length;break;default:e||(e=0)}if(e>r.children.length&&(e=r.children.length),!this.check("copy_node",c,r,e,{core:!0,origin:i,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(p=s?s.get_json(c,{no_id:!0,no_data:!0,no_state:!0}):c,!p)return!1;if(p.id===!0&&delete p.id,p=this._parse_model_from_json(p,r.id,r.parents.concat()),!p)return!1;for(m=this.get_node(p),c&&c.state&&c.state.loaded===!1&&(m.state.loaded=!1),l=[],l.push(p),l=l.concat(m.children_d),this.trigger("model",{nodes:l,parent:r.id}),n=0,o=r.parents.length;o>n;n++)this._model.data[r.parents[n]].children_d=this._model.data[r.parents[n]].children_d.concat(l);for(l=[],n=0,o=r.children.length;o>n;n++)l[n>=e?n+1:n]=r.children[n];return l[e]=m.id,r.children=l,r.children_d.push(m.id),r.children_d=r.children_d.concat(m.children_d),r.id===a.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(r.id),h||this.redraw(r.id===a.jstree.root),f&&f.call(this,m,r,e),this.trigger("copy_node",{node:m,original:c,parent:r.id,position:e,old_parent:q,old_position:s&&s._id&&q&&s._model.data[q]&&s._model.data[q].children?a.inArray(c.id,s._model.data[q].children):-1,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id,old_instance:s,new_instance:this}),m.id},cut:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&g.id!==a.jstree.root&&c.push(g);
return c.length?(d=c,f=this,e="move_node",void this.trigger("cut",{node:b})):!1},copy:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&g.id!==a.jstree.root&&c.push(g);return c.length?(d=c,f=this,e="copy_node",void this.trigger("copy",{node:b})):!1},get_buffer:function(){return{mode:e,node:d,inst:f}},can_paste:function(){return e!==!1&&d!==!1},paste:function(a,b){return a=this.get_node(a),a&&e&&e.match(/^(copy_node|move_node)$/)&&d?(this[e](d,a,b,!1,!1,!1,f)&&this.trigger("paste",{parent:a.id,node:d,mode:e}),d=!1,e=!1,void(f=!1)):!1},clear_buffer:function(){d=!1,e=!1,f=!1,this.trigger("clear_buffer")},edit:function(b,c,d){var e,f,g,h,j,k,l,m,n,o=!1;return(b=this.get_node(b))?this.check("edit",b,this.get_parent(b))?(n=b,c="string"==typeof c?c:b.text,this.set_text(b,""),b=this._open_to(b),n.text=c,e=this._data.core.rtl,f=this.element.width(),this._data.core.focused=n.id,g=b.children(".jstree-anchor").focus(),h=a("<span>"),j=c,k=a("<div />",{css:{position:"absolute",top:"-200px",left:e?"0px":"-1000px",visibility:"hidden"}}).appendTo(i.body),l=a("<input />",{value:j,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:a.proxy(function(c){c.stopImmediatePropagation(),c.preventDefault();var e=h.children(".jstree-rename-input"),f=e.val(),i=this.settings.core.force_text,m;""===f&&(f=j),k.remove(),h.replaceWith(g),h.remove(),j=i?j:a("<div></div>").append(a.parseHTML(j)).html(),b=this.get_node(b),this.set_text(b,j),m=!!this.rename_node(b,i?a("<div></div>").text(f).text():a("<div></div>").append(a.parseHTML(f)).html()),m||this.set_text(b,j),this._data.core.focused=n.id,setTimeout(a.proxy(function(){var a=this.get_node(n.id,!0);a.length&&(this._data.core.focused=n.id,a.children(".jstree-anchor").focus())},this),0),d&&d.call(this,n,m,o),l=null},this),keydown:function(a){var b=a.which;27===b&&(o=!0,this.value=j),(27===b||13===b||37===b||38===b||39===b||40===b||32===b)&&a.stopImmediatePropagation(),(27===b||13===b)&&(a.preventDefault(),this.blur())},click:function(a){a.stopImmediatePropagation()},mousedown:function(a){a.stopImmediatePropagation()},keyup:function(a){l.width(Math.min(k.text("pW"+this.value).width(),f))},keypress:function(a){return 13===a.which?!1:void 0}}),m={fontFamily:g.css("fontFamily")||"",fontSize:g.css("fontSize")||"",fontWeight:g.css("fontWeight")||"",fontStyle:g.css("fontStyle")||"",fontStretch:g.css("fontStretch")||"",fontVariant:g.css("fontVariant")||"",letterSpacing:g.css("letterSpacing")||"",wordSpacing:g.css("wordSpacing")||""},h.attr("class",g.attr("class")).append(g.contents().clone()).append(l),g.replaceWith(h),k.css(m),l.css(m).width(Math.min(k.text("pW"+l[0].value).width(),f))[0].select(),void a(i).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(b){l&&b.target!==l&&a(l).blur()})):(this.settings.core.error.call(this,this._data.core.last_error),!1):!1},set_theme:function(b,c){if(!b)return!1;if(c===!0){var d=this.settings.core.themes.dir;d||(d=a.jstree.path+"/themes"),c=d+"/"+b+"/style.css"}c&&-1===a.inArray(c,g)&&(a("head").append('<link rel="stylesheet" href="'+c+'" type="text/css" />'),g.push(c)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=b,this.element.addClass("jstree-"+b),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+b+"-responsive"),this.trigger("set_theme",{theme:b})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(a){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=a,a&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.set_icon(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(h=c.icon,c.icon=d===!0||null===d||d===b||""===d?!0:d,g=this.get_node(c,!0).children(".jstree-anchor").children(".jstree-themeicon"),d===!1?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),this.hide_icon(c)):d===!0||null===d||d===b||""===d?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),h===!1&&this.show_icon(c)):-1===d.indexOf("/")&&-1===d.indexOf(".")?(g.removeClass(h).css("background",""),g.addClass(d+" jstree-themeicon-custom").attr("rel",d),h===!1&&this.show_icon(c)):(g.removeClass(h).css("background",""),g.addClass("jstree-themeicon-custom").css("background","url('"+d+"') center center no-repeat").attr("rel",d),h===!1&&this.show_icon(c)),!0):!1},get_icon:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.icon:!1},hide_icon:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.hide_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(b.icon=!1,this.get_node(b,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0):!1},show_icon:function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.show_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(e=this.get_node(b,!0),b.icon=e.length?e.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"):!0,b.icon||(b.icon=!0),e.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0):!1}},a.vakata={},a.vakata.attributes=function(b,c){b=a(b)[0];var d=c?{}:[];return b&&b.attributes&&a.each(b.attributes,function(b,e){-1===a.inArray(e.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==e.value&&""!==a.trim(e.value)&&(c?d[e.name]=e.value:d.push(e.name))}),d},a.vakata.array_unique=function(a){var c=[],d,e,f,g={};for(d=0,f=a.length;f>d;d++)g[a[d]]===b&&(c.push(a[d]),g[a[d]]=!0);return c},a.vakata.array_remove=function(a,b){return a.splice(b,1),a},a.vakata.array_remove_item=function(b,c){var d=a.inArray(c,b);return-1!==d?a.vakata.array_remove(b,d):b},a.vakata.array_filter=function(a,b,c,d,e){if(a.filter)return a.filter(b,c);d=[];for(e in a)~~e+""==e+""&&e>=0&&b.call(c,a[e],+e,a)&&d.push(a[e]);return d},a.jstree.plugins.changed=function(a,b){var c=[];this.trigger=function(a,d){var e,f;if(d||(d={}),"changed"===a.replace(".jstree","")){d.changed={selected:[],deselected:[]};var g={};for(e=0,f=c.length;f>e;e++)g[c[e]]=1;for(e=0,f=d.selected.length;f>e;e++)g[d.selected[e]]?g[d.selected[e]]=2:d.changed.selected.push(d.selected[e]);for(e=0,f=c.length;f>e;e++)1===g[c[e]]&&d.changed.deselected.push(c[e]);c=d.selected.slice()}b.trigger.call(this,a,d)},this.refresh=function(a,d){return c=[],b.refresh.apply(this,arguments)}};var j=i.createElement("I");j.className="jstree-icon jstree-checkbox",j.setAttribute("role","presentation"),a.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},a.jstree.plugins.checkbox=function(c,d){this.bind=function(){d.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",a.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",a.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",a.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",a.proxy(function(a,b){var c=this._model.data,d=c[b.parent],e=b.nodes,f,g;for(f=0,g=e.length;g>f;f++)c[e[f]].state.checked=c[e[f]].state.checked||c[e[f]].original&&c[e[f]].original.state&&c[e[f]].original.state.checked,c[e[f]].state.checked&&this._data.checkbox.selected.push(e[f])},this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",a.proxy(function(b,c){var d=this._model.data,e=d[c.parent],f=c.nodes,g=[],h,i,j,k,l,m,n=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection;if(-1!==n.indexOf("down"))if(e.state[o?"selected":"checked"]){for(i=0,j=f.length;j>i;i++)d[f[i]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(f)}else for(i=0,j=f.length;j>i;i++)if(d[f[i]].state[o?"selected":"checked"]){for(k=0,l=d[f[i]].children_d.length;l>k;k++)d[d[f[i]].children_d[k]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(d[f[i]].children_d)}if(-1!==n.indexOf("up")){for(i=0,j=e.children_d.length;j>i;i++)d[e.children_d[i]].children.length||g.push(d[e.children_d[i]].parent);for(g=a.vakata.array_unique(g),k=0,l=g.length;l>k;k++){e=d[g[k]];while(e&&e.id!==a.jstree.root){for(h=0,i=0,j=e.children.length;j>i;i++)h+=d[e.children[i]].state[o?"selected":"checked"];if(h!==j)break;e.state[o?"selected":"checked"]=!0,this._data[o?"core":"checkbox"].selected.push(e.id),m=this.get_node(e,!0),m&&m.length&&m.attr("aria-selected",!0).children(".jstree-anchor").addClass(o?"jstree-clicked":"jstree-checked"),e=this.get_node(e.parent)}}}this._data[o?"core":"checkbox"].selected=a.vakata.array_unique(this._data[o?"core":"checkbox"].selected)},this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",a.proxy(function(b,c){var d=this,e=c.node,f=this._model.data,g=this.get_node(e.parent),h,i,j,k,l=this.settings.checkbox.cascade,m=this.settings.checkbox.tie_selection,n={},o=this._data[m?"core":"checkbox"].selected;for(h=0,i=o.length;i>h;h++)n[o[h]]=!0;if(-1!==l.indexOf("down")){var p=this._cascade_new_checked_state(e.id,!0),q=e.children_d.concat(e.id);for(h=0,i=q.length;i>h;h++)p.indexOf(q[h])>-1?n[q[h]]=!0:delete n[q[h]]}if(-1!==l.indexOf("up"))while(g&&g.id!==a.jstree.root){for(j=0,h=0,i=g.children.length;i>h;h++)j+=f[g.children[h]].state[m?"selected":"checked"];if(j!==i)break;g.state[m?"selected":"checked"]=!0,n[g.id]=!0,k=this.get_node(g,!0),k&&k.length&&k.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),g=this.get_node(g.parent)}o=[];for(h in n)n.hasOwnProperty(h)&&o.push(h);this._data[m?"core":"checkbox"].selected=o},this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",a.proxy(function(b,c){var d=this.get_node(a.jstree.root),e=this._model.data,f,g,h;for(f=0,g=d.children_d.length;g>f;f++)h=e[d.children_d[f]],h&&h.original&&h.original.state&&h.original.state.undetermined&&(h.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",a.proxy(function(a,b){var c=this,d=b.node,e=this.get_node(d,!0),f,g,h,i=this.settings.checkbox.cascade,j=this.settings.checkbox.tie_selection,k=this._data[j?"core":"checkbox"].selected,l={},m=[],n=d.children_d.concat(d.id);if(-1!==i.indexOf("down")){var o=this._cascade_new_checked_state(d.id,!1);k=k.filter(function(a){return-1===n.indexOf(a)||o.indexOf(a)>-1})}if(-1!==i.indexOf("up")&&-1===k.indexOf(d.id)){for(f=0,g=d.parents.length;g>f;f++)h=this._model.data[d.parents[f]],h.state[j?"selected":"checked"]=!1,h&&h.original&&h.original.state&&h.original.state.undetermined&&(h.original.state.undetermined=!1),h=this.get_node(d.parents[f],!0),h&&h.length&&h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(j?"jstree-clicked":"jstree-checked");k=k.filter(function(a){return-1===d.parents.indexOf(a)})}this._data[j?"core":"checkbox"].selected=k},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",a.proxy(function(b,c){var d=this.get_node(c.parent),e=this._model.data,f,g,h,i,j=this.settings.checkbox.tie_selection;while(d&&d.id!==a.jstree.root&&!d.state[j?"selected":"checked"]){for(h=0,f=0,g=d.children.length;g>f;f++)h+=e[d.children[f]].state[j?"selected":"checked"];if(!(g>0&&h===g))break;d.state[j?"selected":"checked"]=!0,this._data[j?"core":"checkbox"].selected.push(d.id),i=this.get_node(d,!0),i&&i.length&&i.attr("aria-selected",!0).children(".jstree-anchor").addClass(j?"jstree-clicked":"jstree-checked"),d=this.get_node(d.parent)}},this)).on("move_node.jstree",a.proxy(function(b,c){var d=c.is_multi,e=c.old_parent,f=this.get_node(c.parent),g=this._model.data,h,i,j,k,l,m=this.settings.checkbox.tie_selection;if(!d){h=this.get_node(e);while(h&&h.id!==a.jstree.root&&!h.state[m?"selected":"checked"]){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(!(k>0&&i===k))break;h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),h=this.get_node(h.parent)}}h=f;while(h&&h.id!==a.jstree.root){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(i===k)h.state[m?"selected":"checked"]||(h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"));else{if(!h.state[m?"selected":"checked"])break;h.state[m?"selected":"checked"]=!1,this._data[m?"core":"checkbox"].selected=a.vakata.array_remove_item(this._data[m?"core":"checkbox"].selected,h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(m?"jstree-clicked":"jstree-checked")}h=this.get_node(h.parent)}},this))},this.get_undetermined=function(c){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var d,e,f,g,h={},i=this._model.data,j=this.settings.checkbox.tie_selection,k=this._data[j?"core":"checkbox"].selected,l=[],m=this,n=[];for(d=0,e=k.length;e>d;d++)if(i[k[d]]&&i[k[d]].parents)for(f=0,g=i[k[d]].parents.length;g>f;f++){if(h[i[k[d]].parents[f]]!==b)break;i[k[d]].parents[f]!==a.jstree.root&&(h[i[k[d]].parents[f]]=!0,l.push(i[k[d]].parents[f]))}for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var c=m.get_node(this),j;if(c)if(c.state.loaded){for(d=0,e=c.children_d.length;e>d;d++)if(j=i[c.children_d[d]],!j.state.loaded&&j.original&&j.original.state&&j.original.state.undetermined&&j.original.state.undetermined===!0)for(h[j.id]===b&&j.id!==a.jstree.root&&(h[j.id]=!0,l.push(j.id)),f=0,g=j.parents.length;g>f;f++)h[j.parents[f]]===b&&j.parents[f]!==a.jstree.root&&(h[j.parents[f]]=!0,l.push(j.parents[f]))}else if(c.original&&c.original.state&&c.original.state.undetermined&&c.original.state.undetermined===!0)for(h[c.id]===b&&c.id!==a.jstree.root&&(h[c.id]=!0,l.push(c.id)),f=0,g=c.parents.length;g>f;f++)h[c.parents[f]]===b&&c.parents[f]!==a.jstree.root&&(h[c.parents[f]]=!0,l.push(c.parents[f]))}),d=0,e=l.length;e>d;d++)i[l[d]].state[j?"selected":"checked"]||n.push(c?i[l[d]]:l[d]);return n},this._undetermined=function(){if(null!==this.element){var a=this.get_undetermined(!1),b,c,d;for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),b=0,c=a.length;c>b;b++)d=this.get_node(a[b],!0),d&&d.length&&d.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments)){var g,h,i=null,k=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(!this.settings.checkbox.tie_selection&&this._model.data[b.id].state.checked&&(i.className+=" jstree-checked"),k=j.cloneNode(!1),this._model.data[b.id].state.checkbox_disabled&&(k.className+=" jstree-checkbox-disabled"),i.insertBefore(k,i.childNodes[0]))}return e||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)),b},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(b){b=this.get_node(b);var c=this.settings.checkbox.cascade,d,e,f=this.settings.checkbox.tie_selection,g=this._data[f?"core":"checkbox"].selected,h=this._model.data;if(!b||b.state[f?"selected":"checked"]===!0||-1===c.indexOf("undetermined")||-1===c.indexOf("down")&&-1===c.indexOf("up"))return!1;if(!b.state.loaded&&b.original.state.undetermined===!0)return!0;for(d=0,e=b.children_d.length;e>d;d++)if(-1!==a.inArray(b.children_d[d],g)||!h[b.children_d[d]].state.loaded&&h[b.children_d[d]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled||(b.state.checkbox_disabled=!0,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:b})))):!1},this.enable_checkbox=function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled&&(b.state.checkbox_disabled=!1,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:b})))):!1},this.activate_node=function(b,c){return a(c.target).hasClass("jstree-checkbox-disabled")?!1:(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||a(c.target).hasClass("jstree-checkbox"))&&(c.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!a(c.target).hasClass("jstree-checkbox")?d.activate_node.call(this,b,c):this.is_disabled(b)?!1:(this.is_checked(b)?this.uncheck_node(b,c):this.check_node(b,c),void this.trigger("activate_node",{node:this.get_node(b)})))},this._cascade_new_checked_state=function(a,b){var c=this,d=this.settings.checkbox.tie_selection,e=this._model.data[a],f=[],g=[],h,i,j;if(!this.settings.checkbox.cascade_to_disabled&&e.state.disabled||!this.settings.checkbox.cascade_to_hidden&&e.state.hidden)j=this.get_checked_descendants(a),e.state[d?"selected":"checked"]&&j.push(e.id),f=f.concat(j);else{if(e.children)for(h=0,i=e.children.length;i>h;h++){var k=e.children[h];j=c._cascade_new_checked_state(k,b),f=f.concat(j),j.indexOf(k)>-1&&g.push(k)}var l=c.get_node(e,!0),m=g.length>0&&g.length<e.children.length;e.original&&e.original.state&&e.original.state.undetermined&&(e.original.state.undetermined=m),m?(e.state[d?"selected":"checked"]=!1,l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(d?"jstree-clicked":"jstree-checked")):b&&g.length===e.children.length?(e.state[d?"selected":"checked"]=b,f.push(e.id),l.attr("aria-selected",!0).children(".jstree-anchor").addClass(d?"jstree-clicked":"jstree-checked")):(e.state[d?"selected":"checked"]=!1,l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(d?"jstree-clicked":"jstree-checked"))}return f},this.get_checked_descendants=function(a){var b=this,c=b.settings.checkbox.tie_selection,d=b._model.data[a];return d.children_d.filter(function(a){return b._model.data[a].state[c?"selected":"checked"]})},this.check_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.select_node(b,!1,!0,c);var d,e,f,g;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.check_node(b[e],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(d=this.get_node(b,!0),void(b.state.checked||(b.state.checked=!0,this._data.checkbox.selected.push(b.id),d&&d.length&&d.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.uncheck_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.deselect_node(b,!1,c);var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.uncheck_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.checked&&(b.state.checked=!1,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,b.id),f.length&&f.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var b=this._data.checkbox.selected.concat([]),c,d;for(this._data.checkbox.selected=this._model.data[a.jstree.root].children_d.concat(),c=0,d=this._data.checkbox.selected.length;d>c;c++)this._model.data[this._data.checkbox.selected[c]]&&(this._model.data[this._data.checkbox.selected[c]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var a=this._data.checkbox.selected.concat([]),b,c;for(b=0,c=this._data.checkbox.selected.length;c>b;b++)this._model.data[this._data.checkbox.selected[b]]&&(this._model.data[this._data.checkbox.selected[b]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:a})},this.is_checked=function(b){return this.settings.checkbox.tie_selection?this.is_selected(b):(b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.checked:!1)},this.get_checked=function(b){return this.settings.checkbox.tie_selection?this.get_selected(b):b?a.map(this._data.checkbox.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.checkbox.selected},this.get_top_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_top_selected(b);var c=this.get_checked(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,a.proxy(function(a){return this.get_node(a)},this)):c},this.get_bottom_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(b);var c=this.get_checked(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,a.proxy(function(a){return this.get_node(a)},this)):d},this.load_node=function(b,c){var e,f,g,h,i,j;if(!a.isArray(b)&&!this.settings.checkbox.tie_selection&&(j=this.get_node(b),j&&j.state.loaded))for(e=0,f=j.children_d.length;f>e;e++)this._model.data[j.children_d[e]].state.checked&&(i=!0,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,j.children_d[e]));return d.load_node.apply(this,arguments)},this.get_state=function(){var a=d.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?a:(a.checkbox=this._data.checkbox.selected.slice(),a)},this.set_state=function(b,c){var e=d.set_state.apply(this,arguments);if(e&&b.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var f=this;a.each(b.checkbox,function(a,b){f.check_node(b)})}return delete b.checkbox,this.set_state(b,c),!1}return e},this.refresh=function(a,b){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),d.refresh.apply(this,arguments)}},a.jstree.defaults.conditionalselect=function(){return!0},a.jstree.plugins.conditionalselect=function(a,b){this.activate_node=function(a,c){return this.settings.conditionalselect.call(this,this.get_node(a),c)?b.activate_node.call(this,a,c):void 0}},a.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(b,c){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.create_node(d,{},"last",function(a){try{c.edit(a)}catch(b){setTimeout(function(){c.edit(a)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.edit(d)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.delete_node(c.get_selected()):c.delete_node(d)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.cut(c.get_top_selected()):c.cut(d)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.copy(c.get_top_selected()):c.copy(d)}},paste:{separator_before:!1,icon:!1,_disabled:function(b){return!a.jstree.reference(b.reference).can_paste()},separator_after:!1,label:"Paste",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.paste(d)}}}}}}},a.jstree.plugins.contextmenu=function(c,d){this.bind=function(){d.bind.call(this);var b=0,c=null,e,f;this.element.on("init.jstree loading.jstree ready.jstree",a.proxy(function(){this.get_container_ul().addClass("jstree-contextmenu")},this)).on("contextmenu.jstree",".jstree-anchor",a.proxy(function(a,d){"input"!==a.target.tagName.toLowerCase()&&(a.preventDefault(),b=a.ctrlKey?+new Date:0,(d||c)&&(b=+new Date+1e4),c&&clearTimeout(c),this.is_loading(a.currentTarget)||this.show_contextmenu(a.currentTarget,a.pageX,a.pageY,a))},this)).on("click.jstree",".jstree-anchor",a.proxy(function(c){this._data.contextmenu.visible&&(!b||+new Date-b>250)&&a.vakata.context.hide(),b=0},this)).on("touchstart.jstree",".jstree-anchor",function(b){b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(e=b.originalEvent.changedTouches[0].clientX,f=b.originalEvent.changedTouches[0].clientY,c=setTimeout(function(){a(b.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(b){c&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(Math.abs(e-b.originalEvent.changedTouches[0].clientX)>10||Math.abs(f-b.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(c),a.vakata.context.hide())}).on("touchend.vakata.jstree",function(a){c&&clearTimeout(c)}),a(i).on("context_hide.vakata.jstree",a.proxy(function(b,c){this._data.contextmenu.visible=!1,a(c.reference).removeClass("jstree-context")},this))},this.teardown=function(){this._data.contextmenu.visible&&a.vakata.context.hide(),d.teardown.call(this)},this.show_contextmenu=function(c,d,e,f){if(c=this.get_node(c),!c||c.id===a.jstree.root)return!1;var g=this.settings.contextmenu,h=this.get_node(c,!0),i=h.children(".jstree-anchor"),j=!1,k=!1;(g.show_at_node||d===b||e===b)&&(j=i.offset(),d=j.left,e=j.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(c)&&this.activate_node(c,f),k=g.items,a.isFunction(k)&&(k=k.call(this,c,a.proxy(function(a){this._show_contextmenu(c,d,e,a)},this))),a.isPlainObject(k)&&this._show_contextmenu(c,d,e,k)},this._show_contextmenu=function(b,c,d,e){var f=this.get_node(b,!0),g=f.children(".jstree-anchor");a(i).one("context_show.vakata.jstree",a.proxy(function(b,c){var d="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";a(c.element).addClass(d),g.addClass("jstree-context")},this)),this._data.contextmenu.visible=!0,a.vakata.context.show(g,{x:c,y:d},e),this.trigger("show_contextmenu",{node:b,x:c,y:d})}},function(a){var b=!1,c={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};a.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(b){a(i).triggerHandler("context_"+b+".vakata",{reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}})},_execute:function(b){return b=c.items[b],b&&(!b._disabled||a.isFunction(b._disabled)&&!b._disabled({item:b,reference:c.reference,element:c.element}))&&b.action?b.action.call(null,{item:b,reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}}):!1},_parse:function(b,d){if(!b)return!1;d||(c.html="",c.items=[]);var e="",f=!1,g;return d&&(e+="<ul>"),a.each(b,function(b,d){return d?(c.items.push(d),!f&&d.separator_before&&(e+="<li class='vakata-context-separator'><a href='#' "+(a.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>"),f=!1,e+="<li class='"+(d._class||"")+(d._disabled===!0||a.isFunction(d._disabled)&&d._disabled({item:d,reference:c.reference,element:c.element})?" vakata-contextmenu-disabled ":"")+"' "+(d.shortcut?" data-shortcut='"+d.shortcut+"' ":"")+">",e+="<a href='#' rel='"+(c.items.length-1)+"' "+(d.title?"title='"+d.title+"'":"")+">",a.vakata.context.settings.icons&&(e+="<i ",d.icon&&(e+=-1!==d.icon.indexOf("/")||-1!==d.icon.indexOf(".")?" style='background:url(\""+d.icon+"\") center center no-repeat' ":" class='"+d.icon+"' "),e+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),e+=(a.isFunction(d.label)?d.label({item:b,reference:c.reference,element:c.element}):d.label)+(d.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+d.shortcut+'">'+(d.shortcut_label||"")+"</span>":"")+"</a>",
d.submenu&&(g=a.vakata.context._parse(d.submenu,!0),g&&(e+=g)),e+="</li>",void(d.separator_after&&(e+="<li class='vakata-context-separator'><a href='#' "+(a.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>",f=!0))):!0}),e=e.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),d&&(e+="</ul>"),d||(c.html=e,a.vakata.context._trigger("parse")),e.length>10?e:!1},_show_submenu:function(c){if(c=a(c),c.length&&c.children("ul").length){var d=c.children("ul"),e=c.offset().left,f=e+c.outerWidth(),g=c.offset().top,h=d.width(),i=d.height(),j=a(window).width()+a(window).scrollLeft(),k=a(window).height()+a(window).scrollTop();b?c[f-(h+10+c.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):c[f+h>j&&e>j-f?"addClass":"removeClass"]("vakata-context-right"),g+i+10>k&&d.css("bottom","-1px"),c.hasClass("vakata-context-right")?h>e&&d.css("margin-right",e-h):h>j-f&&d.css("margin-left",j-f-h),d.show()}},show:function(d,e,f){var g,h,j,k,l,m,n,o,p=!0;switch(c.element&&c.element.length&&c.element.width(""),p){case!e&&!d:return!1;case!!e&&!!d:c.reference=d,c.position_x=e.x,c.position_y=e.y;break;case!e&&!!d:c.reference=d,g=d.offset(),c.position_x=g.left+d.outerHeight(),c.position_y=g.top;break;case!!e&&!d:c.position_x=e.x,c.position_y=e.y}d&&!f&&a(d).data("vakata_contextmenu")&&(f=a(d).data("vakata_contextmenu")),a.vakata.context._parse(f)&&c.element.html(c.html),c.items.length&&(c.element.appendTo(i.body),h=c.element,j=c.position_x,k=c.position_y,l=h.width(),m=h.height(),n=a(window).width()+a(window).scrollLeft(),o=a(window).height()+a(window).scrollTop(),b&&(j-=h.outerWidth()-a(d).outerWidth(),j<a(window).scrollLeft()+20&&(j=a(window).scrollLeft()+20)),j+l+20>n&&(j=n-(l+20)),k+m+20>o&&(k=o-(m+20)),c.element.css({left:j,top:k}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),c.is_visible=!0,a.vakata.context._trigger("show"))},hide:function(){c.is_visible&&(c.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),c.is_visible=!1,a.vakata.context._trigger("hide"))}},a(function(){b="rtl"===a(i.body).css("direction");var d=!1;c.element=a("<ul class='vakata-context'></ul>"),c.element.on("mouseenter","li",function(b){b.stopImmediatePropagation(),a.contains(this,b.relatedTarget)||(d&&clearTimeout(d),c.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),a(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),a.vakata.context._show_submenu(this))}).on("mouseleave","li",function(b){a.contains(this,b.relatedTarget)||a(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(b){a(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),a.vakata.context.settings.hide_onmouseleave&&(d=setTimeout(function(b){return function(){a.vakata.context.hide()}}(this),a.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(b){b.preventDefault(),a(this).blur().parent().hasClass("vakata-context-disabled")||a.vakata.context._execute(a(this).attr("rel"))===!1||a.vakata.context.hide()}).on("keydown","a",function(b){var d=null;switch(b.which){case 13:case 32:b.type="click",b.preventDefault(),a(b.currentTarget).trigger(b);break;case 37:c.is_visible&&(c.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 38:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 39:c.is_visible&&(c.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 40:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 27:a.vakata.context.hide(),b.preventDefault()}}).on("keydown",function(a){a.preventDefault();var b=c.element.find(".vakata-contextmenu-shortcut-"+a.which).parent();b.parent().not(".vakata-context-disabled")&&b.click()}),a(i).on("mousedown.vakata.jstree",function(b){c.is_visible&&c.element[0]!==b.target&&!a.contains(c.element[0],b.target)&&a.vakata.context.hide()}).on("context_show.vakata.jstree",function(a,d){c.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),b&&c.element.addClass("vakata-context-rtl").css("direction","rtl"),c.element.find("ul").hide().end()})})}(a),a.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1};var k,l;a.jstree.plugins.dnd=function(b,c){this.init=function(a,b){c.init.call(this,a,b),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in i.createElement("span")},this.bind=function(){c.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",a.proxy(function(b){if(this.settings.dnd.large_drag_target&&a(b.target).closest(".jstree-node")[0]!==b.currentTarget)return!0;if("touchstart"===b.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var c=this.get_node(b.target),d=this.is_selected(c)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,e=d>1?d+" "+this.get_string("nodes"):this.get_text(b.currentTarget);if(this.settings.core.force_text&&(e=a.vakata.html.escape(e)),c&&c.id&&c.id!==a.jstree.root&&(1===b.which||"touchstart"===b.type||"dragstart"===b.type)&&(this.settings.dnd.is_draggable===!0||a.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,d>1?this.get_top_selected(!0):[c],b))){if(k={jstree:!0,origin:this,obj:this.get_node(c,!0),nodes:d>1?this.get_top_selected():[c.id]},l=b.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),a.vakata.dnd.start(b,k,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+e+'<ins class="jstree-copy" style="display:none;">+</ins></div>');a.vakata.dnd._trigger("start",b,{helper:a(),element:l,data:k})}},this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(b){return b.preventDefault(),a.vakata.dnd._trigger("move",b,{helper:a(),element:l,data:k}),!1}).on("drop.jstree",a.proxy(function(b){return b.preventDefault(),a.vakata.dnd._trigger("stop",b,{helper:a(),element:l,data:k}),!1},this))},this.redraw_node=function(a,b,d,e){if(a=c.redraw_node.apply(this,arguments),a&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)a.setAttribute("draggable",!0);else{var f,g,h=null;for(f=0,g=a.childNodes.length;g>f;f++)if(a.childNodes[f]&&a.childNodes[f].className&&-1!==a.childNodes[f].className.indexOf("jstree-anchor")){h=a.childNodes[f];break}h&&h.setAttribute("draggable",!0)}return a}},a(function(){var c=!1,d=!1,e=!1,f=!1,g=a('<div id="jstree-marker">&#160;</div>').hide();a(i).on("dragover.vakata.jstree",function(b){l&&a.vakata.dnd._trigger("move",b,{helper:a(),element:l,data:k})}).on("drop.vakata.jstree",function(b){l&&(a.vakata.dnd._trigger("stop",b,{helper:a(),element:l,data:k}),l=null,k=null)}).on("dnd_start.vakata.jstree",function(a,b){c=!1,e=!1,b&&b.data&&b.data.jstree&&g.appendTo(i.body)}).on("dnd_move.vakata.jstree",function(h,i){var j=i.event.target!==e.target;if(f&&(!i.event||"dragover"!==i.event.type||j)&&clearTimeout(f),i&&i.data&&i.data.jstree&&(!i.event.target.id||"jstree-marker"!==i.event.target.id)){e=i.event;var k=a.jstree.reference(i.event.target),l=!1,m=!1,n=!1,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E;if(k&&k._data&&k._data.dnd)if(g.attr("class","jstree-"+k.get_theme()+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")),D=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey)),i.helper.children().attr("class","jstree-"+k.get_theme()+" jstree-"+k.get_theme()+"-"+k.get_theme_variant()+" "+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[D?"show":"hide"](),i.event.target!==k.element[0]&&i.event.target!==k.get_container_ul()[0]||0!==k.get_container_ul().children().length){if(l=k.settings.dnd.large_drop_target?a(i.event.target).closest(".jstree-node").children(".jstree-anchor"):a(i.event.target).closest(".jstree-anchor"),l&&l.length&&l.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(m=l.offset(),n=(i.event.pageY!==b?i.event.pageY:i.event.originalEvent.pageY)-m.top,r=l.outerHeight(),u=r/3>n?["b","i","a"]:n>r-r/3?["a","i","b"]:n>r/2?["i","a","b"]:["i","b","a"],a.each(u,function(b,e){switch(e){case"b":p=m.left-6,q=m.top,s=k.get_parent(l),t=l.parent().index();break;case"i":B=k.settings.dnd.inside_pos,C=k.get_node(l.parent()),p=m.left-2,q=m.top+r/2+1,s=C.id,t="first"===B?0:"last"===B?C.children.length:Math.min(B,C.children.length);break;case"a":p=m.left-6,q=m.top+r,s=k.get_parent(l),t=l.parent().index()+1}for(v=!0,w=0,x=i.data.nodes.length;x>w;w++)if(y=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",z=t,"move_node"===y&&"a"===e&&i.data.origin&&i.data.origin===k&&s===k.get_parent(i.data.nodes[w])&&(A=k.get_node(s),z>a.inArray(i.data.nodes[w],A.children)&&(z-=1)),v=v&&(k&&k.settings&&k.settings.dnd&&k.settings.dnd.check_while_dragging===!1||k.check(y,i.data.origin&&i.data.origin!==k?i.data.origin.get_node(i.data.nodes[w]):i.data.nodes[w],s,z,{dnd:!0,ref:k.get_node(l.parent()),pos:e,origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==k,is_foreign:!i.data.origin})),!v){k&&k.last_error&&(d=k.last_error());break}return"i"===e&&l.parent().is(".jstree-closed")&&k.settings.dnd.open_timeout&&(!i.event||"dragover"!==i.event.type||j)&&(f&&clearTimeout(f),f=setTimeout(function(a,b){return function(){a.open_node(b)}}(k,l),k.settings.dnd.open_timeout)),v?(E=k.get_node(s,!0),E.hasClass(".jstree-dnd-parent")||(a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),E.addClass("jstree-dnd-parent")),c={ins:k,par:s,pos:"i"!==e||"last"!==B||0!==t||k.is_loaded(C)?t:"last"},g.css({left:p+"px",top:q+"px"}).show(),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=D?"copy":"move"),d={},u=!0,!1):void 0}),u===!0))return}else{for(v=!0,w=0,x=i.data.nodes.length;x>w;w++)if(v=v&&k.check(i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",i.data.origin&&i.data.origin!==k?i.data.origin.get_node(i.data.nodes[w]):i.data.nodes[w],a.jstree.root,"last",{dnd:!0,ref:k.get_node(a.jstree.root),pos:"i",origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==k,is_foreign:!i.data.origin}),!v)break;if(v)return c={ins:k,par:a.jstree.root,pos:"last"},g.hide(),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=D?"copy":"move"))}a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),c=!1,i.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),i.event.originalEvent&&i.event.originalEvent.dataTransfer,g.hide()}}).on("dnd_scroll.vakata.jstree",function(a,b){b&&b.data&&b.data.jstree&&(g.hide(),c=!1,e=!1,b.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(b,h){if(a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),f&&clearTimeout(f),h&&h.data&&h.data.jstree){g.hide().detach();var i,j,k=[];if(c){for(i=0,j=h.data.nodes.length;j>i;i++)k[i]=h.data.origin?h.data.origin.get_node(h.data.nodes[i]):h.data.nodes[i];c.ins[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node"](k,c.par,c.pos,!1,!1,!1,h.data.origin)}else i=a(h.event.target).closest(".jstree"),i.length&&d&&d.error&&"check"===d.error&&(i=i.jstree(!0),i&&i.settings.core.error.call(this,d));e=!1,c=!1}}).on("keyup.jstree keydown.jstree",function(b,h){h=a.vakata.dnd._get(),h&&h.data&&h.data.jstree&&("keyup"===b.type&&27===b.which?(f&&clearTimeout(f),c=!1,d=!1,e=!1,f=!1,g.hide().detach(),a.vakata.dnd._clean()):(h.helper.find(".jstree-copy").first()[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(b.metaKey||b.ctrlKey))?"show":"hide"](),e&&(e.metaKey=b.metaKey,e.ctrlKey=b.ctrlKey,a.vakata.dnd._trigger("move",e))))})}),function(a){a.vakata.html={div:a("<div />"),escape:function(b){return a.vakata.html.div.text(b).html()},strip:function(b){return a.vakata.html.div.empty().append(a.parseHTML(b)).text()}};var c={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};a.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(c,d,e){e===b&&(e=a.vakata.dnd._get()),e.event=d,a(i).triggerHandler("dnd_"+c+".vakata",e)},_get:function(){return{data:c.data,element:c.element,helper:c.helper}},_clean:function(){c.helper&&c.helper.remove(),c.scroll_i&&(clearInterval(c.scroll_i),c.scroll_i=!1),c={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},a(i).off("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).off("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop)},_scroll:function(b){if(!c.scroll_e||!c.scroll_l&&!c.scroll_t)return c.scroll_i&&(clearInterval(c.scroll_i),c.scroll_i=!1),!1;if(!c.scroll_i)return c.scroll_i=setInterval(a.vakata.dnd._scroll,100),!1;if(b===!0)return!1;var d=c.scroll_e.scrollTop(),e=c.scroll_e.scrollLeft();c.scroll_e.scrollTop(d+c.scroll_t*a.vakata.dnd.settings.scroll_speed),c.scroll_e.scrollLeft(e+c.scroll_l*a.vakata.dnd.settings.scroll_speed),(d!==c.scroll_e.scrollTop()||e!==c.scroll_e.scrollLeft())&&a.vakata.dnd._trigger("scroll",c.scroll_e)},start:function(b,d,e){"touchstart"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_drag&&a.vakata.dnd.stop({});try{b.currentTarget.unselectable="on",b.currentTarget.onselectstart=function(){return!1},b.currentTarget.style&&(b.currentTarget.style.touchAction="none",b.currentTarget.style.msTouchAction="none",b.currentTarget.style.MozUserSelect="none")}catch(f){}return c.init_x=b.pageX,c.init_y=b.pageY,c.data=d,c.is_down=!0,c.element=b.currentTarget,c.target=b.target,c.is_touch="touchstart"===b.type,e!==!1&&(c.helper=a("<div id='vakata-dnd'></div>").html(e).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),a(i).on("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).on("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop),!1},drag:function(b){if("touchmove"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_down){if(!c.is_drag){if(!(Math.abs(b.pageX-c.init_x)>(c.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)||Math.abs(b.pageY-c.init_y)>(c.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)))return;c.helper&&(c.helper.appendTo(i.body),c.helper_w=c.helper.outerWidth()),c.is_drag=!0,a(c.target).one("click.vakata",!1),a.vakata.dnd._trigger("start",b)}var d=!1,e=!1,f=!1,g=!1,h=!1,j=!1,k=!1,l=!1,m=!1,n=!1;return c.scroll_t=0,c.scroll_l=0,c.scroll_e=!1,a(a(b.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(a(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var d=a(this),e=d.offset();return this.scrollHeight>this.offsetHeight&&(e.top+d.height()-b.pageY<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_t=1),b.pageY-e.top<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(e.left+d.width()-b.pageX<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_l=1),b.pageX-e.left<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_l=-1)),c.scroll_t||c.scroll_l?(c.scroll_e=a(this),!1):void 0}),c.scroll_e||(d=a(i),e=a(window),f=d.height(),g=e.height(),h=d.width(),j=e.width(),k=d.scrollTop(),l=d.scrollLeft(),f>g&&b.pageY-k<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_t=-1),f>g&&g-(b.pageY-k)<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_t=1),h>j&&b.pageX-l<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_l=-1),h>j&&j-(b.pageX-l)<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_l=1),(c.scroll_t||c.scroll_l)&&(c.scroll_e=d)),c.scroll_e&&a.vakata.dnd._scroll(!0),c.helper&&(m=parseInt(b.pageY+a.vakata.dnd.settings.helper_top,10),n=parseInt(b.pageX+a.vakata.dnd.settings.helper_left,10),f&&m+25>f&&(m=f-50),h&&n+c.helper_w>h&&(n=h-(c.helper_w+2)),c.helper.css({left:n+"px",top:m+"px"})),a.vakata.dnd._trigger("move",b),!1}},stop:function(b){if("touchend"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_drag)b.target!==c.target&&a(c.target).off("click.vakata"),a.vakata.dnd._trigger("stop",b);else if("touchend"===b.type&&b.target===c.target){var d=setTimeout(function(){a(b.target).click()},100);a(b.target).one("click",function(){d&&clearTimeout(d)})}return a.vakata.dnd._clean(),!1}}}(a),a.jstree.defaults.massload=null,a.jstree.plugins.massload=function(b,c){this.init=function(a,b){this._data.massload={},c.init.call(this,a,b)},this._load_nodes=function(b,d,e,f){var g=this.settings.massload,h=JSON.stringify(b),i=[],j=this._model.data,k,l,m;if(!e){for(k=0,l=b.length;l>k;k++)(!j[b[k]]||!j[b[k]].state.loaded&&!j[b[k]].state.failed||f)&&(i.push(b[k]),m=this.get_node(b[k],!0),m&&m.length&&m.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},i.length){if(a.isFunction(g))return g.call(this,i,a.proxy(function(a){var g,h;if(a)for(g in a)a.hasOwnProperty(g)&&(this._data.massload[g]=a[g]);for(g=0,h=b.length;h>g;g++)m=this.get_node(b[g],!0),m&&m.length&&m.removeClass("jstree-loading").attr("aria-busy",!1);c._load_nodes.call(this,b,d,e,f)},this));if("object"==typeof g&&g&&g.url)return g=a.extend(!0,{},g),a.isFunction(g.url)&&(g.url=g.url.call(this,i)),a.isFunction(g.data)&&(g.data=g.data.call(this,i)),a.ajax(g).done(a.proxy(function(a,g,h){var i,j;if(a)for(i in a)a.hasOwnProperty(i)&&(this._data.massload[i]=a[i]);for(i=0,j=b.length;j>i;i++)m=this.get_node(b[i],!0),m&&m.length&&m.removeClass("jstree-loading").attr("aria-busy",!1);c._load_nodes.call(this,b,d,e,f)},this)).fail(a.proxy(function(a){c._load_nodes.call(this,b,d,e,f)},this))}}return c._load_nodes.call(this,b,d,e,f)},this._load_node=function(b,d){var e=this._data.massload[b.id],f=null,g;return e?(f=this["string"==typeof e?"_append_html_data":"_append_json_data"](b,"string"==typeof e?a(a.parseHTML(e)).filter(function(){return 3!==this.nodeType}):e,function(a){d.call(this,a)}),g=this.get_node(b.id,!0),g&&g.length&&g.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[b.id],f):c._load_node.call(this,b,d)}},a.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},a.jstree.plugins.search=function(c,d){this.bind=function(){d.bind.call(this),this._data.search.str="",this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",a.proxy(function(b,c){if(this._data.search.som&&c.res.length){var d=this._model.data,e,f,g=[],h,i;for(e=0,f=c.res.length;f>e;e++)if(d[c.res[e]]&&!d[c.res[e]].state.hidden&&(g.push(c.res[e]),g=g.concat(d[c.res[e]].parents),this._data.search.smc))for(h=0,i=d[c.res[e]].children_d.length;i>h;h++)d[d[c.res[e]].children_d[h]]&&!d[d[c.res[e]].children_d[h]].state.hidden&&g.push(d[c.res[e]].children_d[h]);g=a.vakata.array_remove_item(a.vakata.array_unique(g),a.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(g,!0),this.redraw(!0)}},this)).on("clear_search.jstree",a.proxy(function(a,b){this._data.search.som&&b.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))},this))},this.search=function(c,d,e,f,g,h){if(c===!1||""===a.trim(c.toString()))return this.clear_search();f=this.get_node(f),f=f&&f.id?f.id:null,c=c.toString();var i=this.settings.search,j=i.ajax?i.ajax:!1,k=this._model.data,l=null,m=[],n=[],o,p;if(this._data.search.res.length&&!g&&this.clear_search(),e===b&&(e=i.show_only_matches),h===b&&(h=i.show_only_matches_children),!d&&j!==!1)return a.isFunction(j)?j.call(this,c,a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g,h)})},this),f):(j=a.extend({},j),j.data||(j.data={}),j.data.str=c,f&&(j.data.inside=f),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=a.ajax(j).fail(a.proxy(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(j)},this.settings.core.error.call(this,this._data.core.last_error)},this)).done(a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g,h)})},this)),this._data.search.lastRequest);if(g||(this._data.search.str=c,this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=e,this._data.search.smc=h),l=new a.vakata.search(c,!0,{caseSensitive:i.case_sensitive,fuzzy:i.fuzzy}),a.each(k[f?f:a.jstree.root].children_d,function(a,b){var d=k[b];d.text&&!d.state.hidden&&(!i.search_leaves_only||d.state.loaded&&0===d.children.length)&&(i.search_callback&&i.search_callback.call(this,c,d)||!i.search_callback&&l.search(d.text).isMatch)&&(m.push(b),n=n.concat(d.parents))}),m.length){for(n=a.vakata.array_unique(n),o=0,p=n.length;p>o;o++)n[o]!==a.jstree.root&&k[n[o]]&&this.open_node(n[o],null,0)===!0&&this._data.search.opn.push(n[o]);g?(this._data.search.dom=this._data.search.dom.add(a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=a.vakata.array_unique(this._data.search.res.concat(m))):(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=m),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:c,res:this._data.search.res,show_only_matches:e})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(this._data.search.res,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=a()},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments),b&&-1!==a.inArray(b.id,this._data.search.res)){var g,h,i=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(i.className+=" jstree-search")}return b}},function(a){a.vakata.search=function(b,c,d){d=d||{},d=a.extend({},a.vakata.search.defaults,d),d.fuzzy!==!1&&(d.fuzzy=!0),b=d.caseSensitive?b:b.toLowerCase();var e=d.location,f=d.distance,g=d.threshold,h=b.length,i,j,k,l;return h>32&&(d.fuzzy=!1),d.fuzzy&&(i=1<<h-1,j=function(){var a={},c=0;for(c=0;h>c;c++)a[b.charAt(c)]=0;for(c=0;h>c;c++)a[b.charAt(c)]|=1<<h-c-1;return a}(),k=function(a,b){var c=a/h,d=Math.abs(e-b);return f?c+d/f:d?1:c}),l=function(a){if(a=d.caseSensitive?a:a.toLowerCase(),b===a||-1!==a.indexOf(b))return{isMatch:!0,score:0};if(!d.fuzzy)return{isMatch:!1,score:1};var c,f,l=a.length,m=g,n=a.indexOf(b,e),o,p,q=h+l,r,s,t,u,v,w=1,x=[];for(-1!==n&&(m=Math.min(k(0,n),m),n=a.lastIndexOf(b,e+h),-1!==n&&(m=Math.min(k(0,n),m))),n=-1,c=0;h>c;c++){o=0,p=q;while(p>o)k(c,e+p)<=m?o=p:q=p,p=Math.floor((q-o)/2+o);for(q=p,s=Math.max(1,e-p+1),t=Math.min(e+p,l)+h,u=new Array(t+2),u[t+1]=(1<<c)-1,f=t;f>=s;f--)if(v=j[a.charAt(f-1)],0===c?u[f]=(u[f+1]<<1|1)&v:u[f]=(u[f+1]<<1|1)&v|((r[f+1]|r[f])<<1|1)|r[f+1],u[f]&i&&(w=k(c,f-1),m>=w)){if(m=w,n=f-1,x.push(n),!(n>e))break;s=Math.max(1,2*e-n)}if(k(c+1,e)>m)break;r=u}return{isMatch:n>=0,score:w}},c===!0?{search:l}:l(c)},a.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(a),a.jstree.defaults.sort=function(a,b){return this.get_text(a)>this.get_text(b)?1:-1},a.jstree.plugins.sort=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("model.jstree",a.proxy(function(a,b){this.sort(b.parent,!0)},this)).on("rename_node.jstree create_node.jstree",a.proxy(function(a,b){this.sort(b.parent||b.node.parent,!1),this.redraw_node(b.parent||b.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",a.proxy(function(a,b){this.sort(b.parent,!1),this.redraw_node(b.parent,!0)},this))},this.sort=function(b,c){var d,e;if(b=this.get_node(b),b&&b.children&&b.children.length&&(b.children.sort(a.proxy(this.settings.sort,this)),c))for(d=0,e=b.children_d.length;e>d;d++)this.sort(b.children_d[d],!1)}};var m=!1;a.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},a.jstree.plugins.state=function(b,c){this.bind=function(){c.bind.call(this);var b=a.proxy(function(){this.element.on(this.settings.state.events,a.proxy(function(){m&&clearTimeout(m),m=setTimeout(a.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this);this.element.on("ready.jstree",a.proxy(function(a,c){this.element.one("restore_state.jstree",b),this.restore_state()||b()},this))},this.save_state=function(){var b=this.get_state();this.settings.state.preserve_loaded||delete b.core.loaded;var c={state:b,ttl:this.settings.state.ttl,sec:+new Date};a.vakata.storage.set(this.settings.state.key,JSON.stringify(c))},this.restore_state=function(){var b=a.vakata.storage.get(this.settings.state.key);if(b)try{b=JSON.parse(b)}catch(c){return!1}return b&&b.ttl&&b.sec&&+new Date-b.sec>b.ttl?!1:(b&&b.state&&(b=b.state),b&&a.isFunction(this.settings.state.filter)&&(b=this.settings.state.filter.call(this,b)),b?(this.settings.state.preserve_loaded||delete b.core.loaded,this.element.one("set_state.jstree",function(c,d){d.instance.trigger("restore_state",{state:a.extend(!0,{},b)})}),this.set_state(b),!0):!1)},this.clear_state=function(){return a.vakata.storage.del(this.settings.state.key)}},function(a,b){a.vakata.storage={set:function(a,b){return window.localStorage.setItem(a,b)},get:function(a){return window.localStorage.getItem(a)},del:function(a){return window.localStorage.removeItem(a)}}}(a),a.jstree.defaults.types={"default":{}},a.jstree.defaults.types[a.jstree.root]={},a.jstree.plugins.types=function(c,d){this.init=function(c,e){var f,g;if(e&&e.types&&e.types["default"])for(f in e.types)if("default"!==f&&f!==a.jstree.root&&e.types.hasOwnProperty(f))for(g in e.types["default"])e.types["default"].hasOwnProperty(g)&&e.types[f][g]===b&&(e.types[f][g]=e.types["default"][g]);d.init.call(this,c,e),this._model.data[a.jstree.root].type=a.jstree.root},this.refresh=function(b,c){d.refresh.call(this,b,c),this._model.data[a.jstree.root].type=a.jstree.root},this.bind=function(){this.element.on("model.jstree",a.proxy(function(c,d){var e=this._model.data,f=d.nodes,g=this.settings.types,h,i,j="default",k;for(h=0,i=f.length;i>h;h++){if(j="default",e[f[h]].original&&e[f[h]].original.type&&g[e[f[h]].original.type]&&(j=e[f[h]].original.type),e[f[h]].data&&e[f[h]].data.jstree&&e[f[h]].data.jstree.type&&g[e[f[h]].data.jstree.type]&&(j=e[f[h]].data.jstree.type),e[f[h]].type=j,e[f[h]].icon===!0&&g[j].icon!==b&&(e[f[h]].icon=g[j].icon),g[j].li_attr!==b&&"object"==typeof g[j].li_attr)for(k in g[j].li_attr)if(g[j].li_attr.hasOwnProperty(k)){if("id"===k)continue;e[f[h]].li_attr[k]===b?e[f[h]].li_attr[k]=g[j].li_attr[k]:"class"===k&&(e[f[h]].li_attr["class"]=g[j].li_attr["class"]+" "+e[f[h]].li_attr["class"])}if(g[j].a_attr!==b&&"object"==typeof g[j].a_attr)for(k in g[j].a_attr)if(g[j].a_attr.hasOwnProperty(k)){if("id"===k)continue;e[f[h]].a_attr[k]===b?e[f[h]].a_attr[k]=g[j].a_attr[k]:"href"===k&&"#"===e[f[h]].a_attr[k]?e[f[h]].a_attr.href=g[j].a_attr.href:"class"===k&&(e[f[h]].a_attr["class"]=g[j].a_attr["class"]+" "+e[f[h]].a_attr["class"])}}e[a.jstree.root].type=a.jstree.root},this)),d.bind.call(this)},this.get_json=function(b,c,e){var f,g,h=this._model.data,i=c?a.extend(!0,{},c,{no_id:!1}):{},j=d.get_json.call(this,b,i,e);if(j===!1)return!1;if(a.isArray(j))for(f=0,g=j.length;g>f;f++)j[f].type=j[f].id&&h[j[f].id]&&h[j[f].id].type?h[j[f].id].type:"default",c&&c.no_id&&(delete j[f].id,j[f].li_attr&&j[f].li_attr.id&&delete j[f].li_attr.id,j[f].a_attr&&j[f].a_attr.id&&delete j[f].a_attr.id);else j.type=j.id&&h[j.id]&&h[j.id].type?h[j.id].type:"default",c&&c.no_id&&(j=this._delete_ids(j));return j},this._delete_ids=function(b){if(a.isArray(b)){for(var c=0,d=b.length;d>c;c++)b[c]=this._delete_ids(b[c]);return b}return delete b.id,
b.li_attr&&b.li_attr.id&&delete b.li_attr.id,b.a_attr&&b.a_attr.id&&delete b.a_attr.id,b.children&&a.isArray(b.children)&&(b.children=this._delete_ids(b.children)),b},this.check=function(c,e,f,g,h){if(d.check.call(this,c,e,f,g,h)===!1)return!1;e=e&&e.id?e:this.get_node(e),f=f&&f.id?f:this.get_node(f);var i=e&&e.id?h&&h.origin?h.origin:a.jstree.reference(e.id):null,j,k,l,m;switch(i=i&&i._model&&i._model.data?i._model.data:null,c){case"create_node":case"move_node":case"copy_node":if("move_node"!==c||-1===a.inArray(e.id,f.children)){if(j=this.get_rules(f),j.max_children!==b&&-1!==j.max_children&&j.max_children===f.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(j.valid_children!==b&&-1!==j.valid_children&&-1===a.inArray(e.type||"default",j.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(i&&e.children_d&&e.parents){for(k=0,l=0,m=e.children_d.length;m>l;l++)k=Math.max(k,i[e.children_d[l]].parents.length);k=k-e.parents.length+1}(0>=k||k===b)&&(k=1);do{if(j.max_depth!==b&&-1!==j.max_depth&&j.max_depth<k)return this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;f=this.get_node(f.parent),j=this.get_rules(f),k++}while(f)}}return!0},this.get_rules=function(a){if(a=this.get_node(a),!a)return!1;var c=this.get_type(a,!0);return c.max_depth===b&&(c.max_depth=-1),c.max_children===b&&(c.max_children=-1),c.valid_children===b&&(c.valid_children=-1),c},this.get_type=function(b,c){return b=this.get_node(b),b?c?a.extend({type:b.type},this.settings.types[b.type]):b.type:!1},this.set_type=function(c,d){var e=this._model.data,f,g,h,i,j,k,l,m;if(a.isArray(c)){for(c=c.slice(),g=0,h=c.length;h>g;g++)this.set_type(c[g],d);return!0}if(f=this.settings.types,c=this.get_node(c),!f[d]||!c)return!1;if(l=this.get_node(c,!0),l&&l.length&&(m=l.children(".jstree-anchor")),i=c.type,j=this.get_icon(c),c.type=d,(j===!0||!f[i]||f[i].icon!==b&&j===f[i].icon)&&this.set_icon(c,f[d].icon!==b?f[d].icon:!0),f[i]&&f[i].li_attr!==b&&"object"==typeof f[i].li_attr)for(k in f[i].li_attr)if(f[i].li_attr.hasOwnProperty(k)){if("id"===k)continue;"class"===k?(e[c.id].li_attr["class"]=(e[c.id].li_attr["class"]||"").replace(f[i].li_attr[k],""),l&&l.removeClass(f[i].li_attr[k])):e[c.id].li_attr[k]===f[i].li_attr[k]&&(e[c.id].li_attr[k]=null,l&&l.removeAttr(k))}if(f[i]&&f[i].a_attr!==b&&"object"==typeof f[i].a_attr)for(k in f[i].a_attr)if(f[i].a_attr.hasOwnProperty(k)){if("id"===k)continue;"class"===k?(e[c.id].a_attr["class"]=(e[c.id].a_attr["class"]||"").replace(f[i].a_attr[k],""),m&&m.removeClass(f[i].a_attr[k])):e[c.id].a_attr[k]===f[i].a_attr[k]&&("href"===k?(e[c.id].a_attr[k]="#",m&&m.attr("href","#")):(delete e[c.id].a_attr[k],m&&m.removeAttr(k)))}if(f[d].li_attr!==b&&"object"==typeof f[d].li_attr)for(k in f[d].li_attr)if(f[d].li_attr.hasOwnProperty(k)){if("id"===k)continue;e[c.id].li_attr[k]===b?(e[c.id].li_attr[k]=f[d].li_attr[k],l&&("class"===k?l.addClass(f[d].li_attr[k]):l.attr(k,f[d].li_attr[k]))):"class"===k&&(e[c.id].li_attr["class"]=f[d].li_attr[k]+" "+e[c.id].li_attr["class"],l&&l.addClass(f[d].li_attr[k]))}if(f[d].a_attr!==b&&"object"==typeof f[d].a_attr)for(k in f[d].a_attr)if(f[d].a_attr.hasOwnProperty(k)){if("id"===k)continue;e[c.id].a_attr[k]===b?(e[c.id].a_attr[k]=f[d].a_attr[k],m&&("class"===k?m.addClass(f[d].a_attr[k]):m.attr(k,f[d].a_attr[k]))):"href"===k&&"#"===e[c.id].a_attr[k]?(e[c.id].a_attr.href=f[d].a_attr.href,m&&m.attr("href",f[d].a_attr.href)):"class"===k&&(e[c.id].a_attr["class"]=f[d].a_attr["class"]+" "+e[c.id].a_attr["class"],m&&m.addClass(f[d].a_attr[k]))}return!0}},a.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(a,b){return a+" ("+b+")"}},a.jstree.plugins.unique=function(c,d){this.check=function(b,c,e,f,g){if(d.check.call(this,b,c,e,f,g)===!1)return!1;if(c=c&&c.id?c:this.get_node(c),e=e&&e.id?e:this.get_node(e),!e||!e.children)return!0;var h="rename_node"===b?f:c.text,i=[],j=this.settings.unique.case_sensitive,k=this.settings.unique.trim_whitespace,l=this._model.data,m,n,o;for(m=0,n=e.children.length;n>m;m++)o=l[e.children[m]].text,j||(o=o.toLowerCase()),k&&(o=o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),i.push(o);switch(j||(h=h.toLowerCase()),k&&(h=h.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),b){case"delete_node":return!0;case"rename_node":return o=c.text||"",j||(o=o.toLowerCase()),k&&(o=o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),m=-1===a.inArray(h,i)||c.text&&o===h,m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"create_node":return m=-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"copy_node":return m=-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"move_node":return m=c.parent===e.id&&(!g||!g.is_multi)||-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m}return!0},this.create_node=function(c,e,f,g,h){if(!e||e.text===b){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return d.create_node.call(this,c,e,f,g,h);if(f=f===b?"last":f,!f.toString().match(/^(before|after)$/)&&!h&&!this.is_loaded(c))return d.create_node.call(this,c,e,f,g,h);e||(e={});var i,j,k,l,m,n=this._model.data,o=this.settings.unique.case_sensitive,p=this.settings.unique.trim_whitespace,q=this.settings.unique.duplicate,r;for(j=i=this.get_string("New node"),k=[],l=0,m=c.children.length;m>l;l++)r=n[c.children[l]].text,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),k.push(r);l=1,r=j,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));while(-1!==a.inArray(r,k))j=q.call(this,i,++l).toString(),r=j,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));e.text=j}return d.create_node.call(this,c,e,f,g,h)}};var n=i.createElement("DIV");if(n.setAttribute("unselectable","on"),n.setAttribute("role","presentation"),n.className="jstree-wholerow",n.innerHTML="&#160;",a.jstree.plugins.wholerow=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("ready.jstree set_state.jstree",a.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",a.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var c=!1,d,e;for(d=0,e=b.selected.length;e>d;d++)c=this.get_node(b.selected[d],!0),c&&c.length&&c.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("open_node.jstree",a.proxy(function(a,b){this.get_node(b.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("hover_node.jstree dehover_node.jstree",a.proxy(function(a,b){"hover_node"===a.type&&this.is_disabled(b.node)||this.get_node(b.node,!0).children(".jstree-wholerow")["hover_node"===a.type?"addClass":"removeClass"]("jstree-wholerow-hovered")},this)).on("contextmenu.jstree",".jstree-wholerow",a.proxy(function(b){if(this._data.contextmenu){b.preventDefault();var c=a.Event("contextmenu",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey,pageX:b.pageX,pageY:b.pageY});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c)}},this)).on("click.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()}).on("dblclick.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("dblclick",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()}).on("click.jstree",".jstree-leaf > .jstree-ocl",a.proxy(function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",a.proxy(function(a){return a.stopImmediatePropagation(),this.is_disabled(a.currentTarget)||this.hover_node(a.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),c.teardown.call(this)},this.redraw_node=function(b,d,e,f){if(b=c.redraw_node.apply(this,arguments)){var g=n.cloneNode(!0);-1!==a.inArray(b.id,this._data.core.selected)&&(g.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===b.id&&(g.className+=" jstree-wholerow-hovered"),b.insertBefore(g,b.childNodes[0])}return b}},window.customElements&&Object&&Object.create){var o=Object.create(HTMLElement.prototype);o.createdCallback=function(){var b={core:{},plugins:[]},c;for(c in a.jstree.plugins)a.jstree.plugins.hasOwnProperty(c)&&this.attributes[c]&&(b.plugins.push(c),this.getAttribute(c)&&JSON.parse(this.getAttribute(c))&&(b[c]=JSON.parse(this.getAttribute(c))));for(c in a.jstree.defaults.core)a.jstree.defaults.core.hasOwnProperty(c)&&this.attributes[c]&&(b.core[c]=JSON.parse(this.getAttribute(c))||this.getAttribute(c));a(this).jstree(b)};try{window.customElements.define("vakata-jstree",function(){},{prototype:o})}catch(p){}}}});;
/*
 Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
 (c) 2010-2013, Vladimir Agafonkin
 (c) 2010-2011, CloudMade
*/
!function(t,e,i){var n=t.L,o={};o.version="0.7.7","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;i<o.length&&!n;i++)n=t[o[i]+e];return n}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,a,r){return e=o.bind(e,n),a&&s===i?void e():s.call(t,e,r)},o.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=o.extend({},n.options,t.options)),o.extend(n,t),n._initHooks=[];var a=this;return e.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&(m||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=o.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",n=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+n},getScaleString:function(t,e){var i=o.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),n=" scale("+t+") ";return i+n},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&o.Browser.any3d?t.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),o.DomUtil.TRANSITION_END="webkitTransition"===o.DomUtil.TRANSITION||"OTransition"===o.DomUtil.TRANSITION?o.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in e)o.extend(o.DomUtil,{disableTextSelection:function(){o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault)},enableTextSelection:function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault)}});else{var i=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);o.extend(o.DomUtil,{disableTextSelection:function(){if(i){var t=e.documentElement.style;this._userSelect=t[i],t[i]="none"}},enableTextSelection:function(){i&&(e.documentElement.style[i]=this._userSelect,delete this._userSelect)}})}o.extend(o.DomUtil,{disableImageDrag:function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},enableImageDrag:function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)}})}(),o.LatLng=function(t,e,n){if(t=parseFloat(t),e=parseFloat(e),isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=t,this.lng=e,n!==i&&(this.alt=parseFloat(n))},o.extend(o.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),o.LatLng.prototype={equals:function(t){if(!t)return!1;t=o.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=o.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=o.latLng(t);var e=6378137,i=o.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,s=(t.lng-this.lng)*i,a=this.lat*i,r=t.lat*i,h=Math.sin(n/2),l=Math.sin(s/2),u=h*h+l*l*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s=e.maxZoom?Math.min(e.maxZoom,s):s;var a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x<r.x||n.y<r.y:r.contains(n);while(u&&a>=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-(1/0),o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,
transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-(1/0));for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var s=o.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(s),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(s)}}},_addTilesFromCenterOut:function(t){var i,n,s,a=[],r=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)s=new o.Point(n,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,n=0;h>n;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=this._getTileSize(),o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;e.detectRetina&&o.Browser.retina?i.width=i.height=2*n:i.width=i.height=n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i="shadow"===e?o.point(n.shadowAnchor||n.iconAnchor):o.point(n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)o.DomEvent.on(t,e[i],this._fireMouseEvent,this);o.Handler.MarkerDrag&&(this.dragging=new o.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&o.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&o.DomEvent.preventDefault(t),"mousedown"!==t.type?o.DomEvent.stopPropagation(t):o.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){o.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&o.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;return n.html!==!1?i.innerHTML=n.html:i.innerHTML="",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Popup=o.Class.extend({includes:o.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){o.setOptions(this,t),this._source=e,this._animated=o.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout();var e=t.options.fadeAnimation;e&&o.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this.update(),e&&o.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),o.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&o.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var t={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=o.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=o.DomUtil.create("a",e+"-close-button",n),t.href="#close",t.innerHTML="&#215;",o.DomEvent.disableClickPropagation(t),o.DomEvent.on(t,"click",this._onCloseButtonClick,this));var s=this._wrapper=o.DomUtil.create("div",e+"-content-wrapper",n);o.DomEvent.disableClickPropagation(s),this._contentNode=o.DomUtil.create("div",e+"-content",s),o.DomEvent.disableScrollPropagation(this._contentNode),o.DomEvent.on(s,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",e+"-tip-container",n),this._tip=o.DomUtil.create("div",e+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,a="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),"off"in t&&t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)o.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this._map&&this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),s=e.layerPointToLatLng(n);this.fire(t.type,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&o.DomEvent.preventDefault(t),"mousemove"!==t.type&&o.DomEvent.stopPropagation(t)}}}),o.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=o.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&o.Browser.any3d?(o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),
this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;o.Browser.mobileWebkit&&r.removeChild(a),o.DomUtil.setPosition(a,e),a.setAttribute("width",n),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,n,s].join(" ")),o.Browser.mobileWebkit&&r.appendChild(a)}}}),o.Path.include({bindPopup:function(t,e){return t instanceof o.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color),t.lineCap&&(this._ctx.lineCap=t.lineCap),t.lineJoin&&(this._ctx.lineJoin=t.lineJoin)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill(e.fillRule||"evenodd")),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(t){this._containsPoint(t.layerPoint)&&this.fire(t.type,t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.CircleMarker=o.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){o.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){o.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){return o.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t),this},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Polyline.include(o.Path.CANVAS?{_containsPoint:function(t,e){var i,n,s,a,r,h,l,u=this.options.weight/2;for(o.Browser.touch&&(u+=10),i=0,a=this._parts.length;a>i;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(o.DomEvent.stopPropagation(t),!o.Draggable._disabled&&(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),!this._moving))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.Browser.touch&&Math.abs(s.x)+Math.abs(s.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=+new Date-this._lastTime,s=!i.inertia||n>i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],"function"==typeof n?s[a]=n.bind(h):s[a]=n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);
case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var a="_leaflet_",r=this._pointers,h=function(t){"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&o.DomEvent.preventDefault(t);for(var e=!1,i=0;i<r.length;i++)if(r[i].pointerId===t.pointerId){e=!0;break}e||r.push(t),t.touches=r.slice(),t.changedTouches=[t],n(t)};if(t[a+"touchstart"+s]=h,t.addEventListener(this.POINTER_DOWN,h,!1),!this._pointerDocumentListener){var l=function(t){for(var e=0;e<r.length;e++)if(r[e].pointerId===t.pointerId){r.splice(e,1);break}};e.documentElement.addEventListener(this.POINTER_UP,l,!1),e.documentElement.addEventListener(this.POINTER_CANCEL,l,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+n]=o,t.addEventListener(this.POINTER_MOVE,o,!1),this},addPointerListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,o,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,o,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,o,!1),t.removeEventListener(this.POINTER_CANCEL,o,!1)}return this}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(s)._divideBy(2),this._startDist=n.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';i&&(n+=' checked="checked"'),n+="/>";var o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var a=e.createElement("span");a.innerHTML=" "+t.name,n.appendChild(i),n.appendChild(a);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=n.length;for(this._handlingClick=!0,t=0;o>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),o.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)},this))}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i<this.options.minZoom)&&this._clearBgBuffer(),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[o.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document);;
/*! @vimeo/player v2.8.2 | (c) 2019 Vimeo | MIT License | https://github.com/vimeo/player.js */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e=e||self).Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var e="undefined"!=typeof global&&"[object global]"==={}.toString.call(global);function i(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function s(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function l(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=t.id,r=t.url,o=n||r;if(!o)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(e=o,!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e)return"https://vimeo.com/".concat(o);if(s(o))return o.replace("http:","https:");if(n)throw new TypeError("“".concat(n,"” is not a valid video id."));throw new TypeError("“".concat(o,"” is not a vimeo.com url."))}var t=void 0!==Array.prototype.indexOf,n="undefined"!=typeof window&&void 0!==window.postMessage;if(!(e||t&&n))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){if(!e.WeakMap){var n=Object.prototype.hasOwnProperty,o=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n};e.WeakMap=function(){function e(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(o(this,"_id","_WeakMap"+"_"+t()+"."+t()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported")}function r(e,t){if(!i(e)||!n.call(e,"_id"))throw new TypeError(t+" method called on incompatible receiver "+typeof e)}function t(){return Math.random().toString().substring(2)}return o(e.prototype,"delete",function(e){if(r(this,"delete"),!i(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)}),o(e.prototype,"get",function(e){if(r(this,"get"),i(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),o(e.prototype,"has",function(e){if(r(this,"has"),!i(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)}),o(e.prototype,"set",function(e,t){if(r(this,"set"),!i(e))throw new TypeError("Invalid value used as weak map key");var n=e[this._id];return n&&n[0]===e?n[1]=t:o(e,this._id,[e,t]),this}),o(e,"_polyfill",!0),e}()}function i(e){return Object(e)===e}}("undefined"!=typeof self?self:"undefined"!=typeof window?window:o);var a,f=(function(e){var t,n,r;r=function(){var t,a,n,e=Object.prototype.toString,r="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}function i(e,t){n.add(e,t),a||(a=r(n.drain))}function u(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function c(){for(var e=0;e<this.chain.length;e++)o(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function o(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=u(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function s(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,0<t.chain.length&&i(c,t))}function l(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function f(e){this.def=e,this.triggered=!1}function d(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function h(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new d(this);this.then=function(e,t){var n={success:"function"!=typeof e||e,failure:"function"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&i(c,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){(function e(n){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=u(n))?i(function(){var t=new f(o);try{r.call(n,function(){e.apply(t,arguments)},function(){s.apply(t,arguments)})}catch(e){s.call(t,e)}}):(o.msg=n,o.state=1,0<o.chain.length&&i(c,o))}catch(e){s.call(new f(o),e)}}}).call(r,e)},function(e){s.call(r,e)})}catch(e){s.call(r,e)}}n=function(){var n,r,o;function i(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(e,t){o=new i(e,t),r?r.next=o:n=o,r=o,o=void 0},drain:function(){var e=n;for(n=r=a=void 0;e;)e.fn.call(e.self),e=e.next}}}();var v=t({},"constructor",h,!1);return t(h.prototype=v,"__NPO__",0,!1),t(h,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");e(n)})}),t(h,"reject",function(n){return new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");t(n)})}),t(h,"all",function(t){var a=this;return"[object Array]"!=e.call(t)?a.reject(TypeError("Not an array")):0===t.length?a.resolve([]):new a(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");var r=t.length,o=Array(r),i=0;l(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(h,"race",function(t){var r=this;return"[object Array]"!=e.call(t)?r.reject(TypeError("Not an array")):new r(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");l(r,t,function(e,t){n(t)},e)})}),h},(n=o)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])}(a={exports:{}},a.exports),a.exports),d=new WeakMap;function u(e,t,n){var r=d.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),d.set(e.element,r)}function c(e,t){return(d.get(e.element)||{})[t]||[]}function h(e,t,n){var r=d.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],d.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),d.set(e.element,r),r[t]&&0===r[t].length}var v=["autopause","autoplay","background","byline","color","dnt","height","id","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","title","transparent","url","width"];function p(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return v.reduce(function(e,t){var n=r.getAttribute("data-vimeo-".concat(t));return(n||""===n)&&(e[t]=""===n?1:n),e},e)}function y(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function m(i){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},u=2<arguments.length?arguments[2]:void 0;return new Promise(function(t,n){if(!s(i))throw new TypeError("“".concat(i,"” is not a vimeo.com url."));var e="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(i),"&domain=").concat(window.location.hostname);for(var r in a)a.hasOwnProperty(r)&&(e+="&".concat(r,"=").concat(encodeURIComponent(a[r])));var o="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;o.open("GET",e,!0),o.onload=function(){if(404!==o.status)if(403!==o.status)try{var e=JSON.parse(o.responseText);if(403===e.domain_status_code)return y(e,u),void n(new Error("“".concat(i,"” is not embeddable.")));t(e)}catch(e){n(e)}else n(new Error("“".concat(i,"” is not embeddable.")));else n(new Error("“".concat(i,"” was not found.")))},o.onerror=function(){var e=o.status?" (".concat(o.status,")"):"";n(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},o.send()})}function g(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function w(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));8<=o&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}function b(n,r){var t,e=[];if((r=g(r)).event){if("error"===r.event)c(n,r.data.method).forEach(function(e){var t=new Error(r.data.message);t.name=r.data.name,e.reject(t),h(n,r.data.method,e)});e=c(n,"event:".concat(r.event)),t=r.data}else if(r.method){var o=function(e,t){var n=c(e,t);if(n.length<1)return!1;var r=n.shift();return h(e,t,r),r}(n,r.method);o&&(e.push(o),t=r.value)}e.forEach(function(e){try{if("function"==typeof e)return void e.call(n,t);e.resolve(t)}catch(e){}})}var k=new WeakMap,E=new WeakMap,Player=function(){function Player(u){var e,c=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Player),window.jQuery&&u instanceof jQuery&&(1<u.length&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),u=u[0]),"undefined"!=typeof document&&"string"==typeof u&&(u=document.getElementById(u)),e=u,!Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView))throw new TypeError("You must pass either a valid element or a valid id.");var r=u.ownerDocument.defaultView;if("IFRAME"!==u.nodeName){var t=u.querySelector("iframe");t&&(u=t)}if("IFRAME"===u.nodeName&&!s(u.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(k.has(u))return k.get(u);this.element=u,this.origin="*";var o=new f(function(i,a){var e=function(e){if(s(e.origin)&&c.element.contentWindow===e.source){"*"===c.origin&&(c.origin=e.origin);var t=g(e.data);if(t&&"error"===t.event&&t.data&&"ready"===t.data.method){var n=new Error(t.data.message);return n.name=t.data.name,void a(n)}var r=t&&"ready"===t.event,o=t&&"ping"===t.method;if(r||o)return c.element.setAttribute("data-ready","true"),void i();b(c,t)}};if(r.addEventListener?r.addEventListener("message",e,!1):r.attachEvent&&r.attachEvent("onmessage",e),"IFRAME"!==c.element.nodeName){var t=p(u,n);m(l(t),t,u).then(function(e){var t,n,r,o=y(e,u);return c.element=o,c._originalElement=u,t=u,n=o,r=d.get(t),d.set(n,r),d.delete(t),k.set(c.element,c),e}).catch(a)}});return E.set(this,o),k.set(this.element,this),"IFRAME"===this.element.nodeName&&w(this,"ping"),this}var e,t,n;return e=Player,(t=[{key:"callMethod",value:function(n){var r=this,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new f(function(e,t){return r.ready().then(function(){u(r,n,{resolve:e,reject:t}),w(r,n,o)}).catch(t)})}},{key:"get",value:function(n){var r=this;return new f(function(e,t){return n=i(n,"get"),r.ready().then(function(){u(r,n,{resolve:e,reject:t}),w(r,n)}).catch(t)})}},{key:"set",value:function(n,r){var o=this;return new f(function(e,t){if(n=i(n,"set"),null==r)throw new TypeError("There must be a value to set.");return o.ready().then(function(){u(o,n,{resolve:e,reject:t}),w(o,n,r)}).catch(t)})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===c(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch(function(){}),u(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");h(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=E.get(this)||new f(function(e,t){t(new Error("Unknown player. Probably unloaded."))});return f.resolve(e)}},{key:"addCuePoint",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var t=this;return new f(function(e){E.delete(t),k.delete(t.element),t._originalElement&&(k.delete(t._originalElement),t._originalElement.removeAttribute("data-vimeo-initialized")),t.element&&"IFRAME"===t.element.nodeName&&t.element.parentNode&&t.element.parentNode.removeChild(t.element),e()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}])&&r(e.prototype,t),n&&r(e,n),Player}();return e||(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))};t.forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=p(t);m(l(e),e,t).then(function(e){return y(e,t)}).catch(n)}catch(e){n(e)}})}(),function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;var e=function(e){if(s(e.origin)&&e.data&&"spacechange"===e.data.event)for(var t=r.querySelectorAll("iframe"),n=0;n<t.length;n++)if(t[n].contentWindow===e.source){t[n].parentElement.style.paddingBottom="".concat(e.data.data[0].bottom,"px");break}};window.addEventListener?window.addEventListener("message",e,!1):window.attachEvent&&window.attachEvent("onmessage",e)}}()),Player});
;
if (!window['YT']) { var YT = { loading: 0, loaded: 0 }; } if (!window['YTConfig']) { var YTConfig = { 'host': 'http://www.youtube.com' }; } if (!YT.loading) { YT.loading = 1; (function () { var l = []; YT.ready = function (f) { if (YT.loaded) { f(); } else { l.push(f); } }; window.onYTReady = function () { YT.loaded = 1; for (var i = 0; i < l.length; i++) { try { l[i](); } catch (e) { } } }; YT.setConfig = function (c) { for (var k in c) { if (c.hasOwnProperty(k)) { YTConfig[k] = c[k]; } } }; var a = document.createElement('script'); a.type = 'text/javascript'; a.id = 'www-widgetapi-script'; a.src = 'https:' + '//s.ytimg.com/yts/jsbin/www-widgetapi-vflWkc-3E/www-widgetapi.js'; a.async = true; var b = document.getElementsByTagName('script')[0]; b.parentNode.insertBefore(a, b); })(); };
"use strict"; var __extends = this && this.__extends || function () { var e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t } || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]) }; return function (t, n) { function i() { this.constructor = t } e(t, n), t.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i) } }(), Microsoft; !function (e) { e.ApplicationInsights || (e.ApplicationInsights = {}) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { return function () { } }(); e.Base = t }(e.Telemetry || (e.Telemetry = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { return function () { this.ver = 1, this.sampleRate = 100, this.tags = {} } }(); e.Envelope = t }(e.Telemetry || (e.Telemetry = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { e.Context || (e.Context = {}) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { e.Context || (e.Context = {}) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { e.Context || (e.Context = {}) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { e.Context || (e.Context = {}) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { e.Context || (e.Context = {}) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { e.Context || (e.Context = {}) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { e.Context || (e.Context = {}) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { e.Context || (e.Context = {}) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { e.ApplicationInsights || (e.ApplicationInsights = {}) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { e.ApplicationInsights || (e.ApplicationInsights = {}) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { e.ApplicationInsights || (e.ApplicationInsights = {}) }(Microsoft || (Microsoft = {})); var AI; !function (e) { !function (e) { e[e.Verbose = 0] = "Verbose", e[e.Information = 1] = "Information", e[e.Warning = 2] = "Warning", e[e.Error = 3] = "Error", e[e.Critical = 4] = "Critical" }(e.SeverityLevel || (e.SeverityLevel = {})) }(AI || (AI = {})); var Microsoft; !function (e) { e.ApplicationInsights || (e.ApplicationInsights = {}) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t; !function (e) { e[e.CRITICAL = 0] = "CRITICAL", e[e.WARNING = 1] = "WARNING" }(t = e.LoggingSeverity || (e.LoggingSeverity = {})); var n; !function (e) { e[e.BrowserDoesNotSupportLocalStorage = 0] = "BrowserDoesNotSupportLocalStorage", e[e.BrowserCannotReadLocalStorage = 1] = "BrowserCannotReadLocalStorage", e[e.BrowserCannotReadSessionStorage = 2] = "BrowserCannotReadSessionStorage", e[e.BrowserCannotWriteLocalStorage = 3] = "BrowserCannotWriteLocalStorage", e[e.BrowserCannotWriteSessionStorage = 4] = "BrowserCannotWriteSessionStorage", e[e.BrowserFailedRemovalFromLocalStorage = 5] = "BrowserFailedRemovalFromLocalStorage", e[e.BrowserFailedRemovalFromSessionStorage = 6] = "BrowserFailedRemovalFromSessionStorage", e[e.CannotSendEmptyTelemetry = 7] = "CannotSendEmptyTelemetry", e[e.ClientPerformanceMathError = 8] = "ClientPerformanceMathError", e[e.ErrorParsingAISessionCookie = 9] = "ErrorParsingAISessionCookie", e[e.ErrorPVCalc = 10] = "ErrorPVCalc", e[e.ExceptionWhileLoggingError = 11] = "ExceptionWhileLoggingError", e[e.FailedAddingTelemetryToBuffer = 12] = "FailedAddingTelemetryToBuffer", e[e.FailedMonitorAjaxAbort = 13] = "FailedMonitorAjaxAbort", e[e.FailedMonitorAjaxDur = 14] = "FailedMonitorAjaxDur", e[e.FailedMonitorAjaxOpen = 15] = "FailedMonitorAjaxOpen", e[e.FailedMonitorAjaxRSC = 16] = "FailedMonitorAjaxRSC", e[e.FailedMonitorAjaxSend = 17] = "FailedMonitorAjaxSend", e[e.FailedMonitorAjaxGetCorrelationHeader = 18] = "FailedMonitorAjaxGetCorrelationHeader", e[e.FailedToAddHandlerForOnBeforeUnload = 19] = "FailedToAddHandlerForOnBeforeUnload", e[e.FailedToSendQueuedTelemetry = 20] = "FailedToSendQueuedTelemetry", e[e.FailedToReportDataLoss = 21] = "FailedToReportDataLoss", e[e.FlushFailed = 22] = "FlushFailed", e[e.MessageLimitPerPVExceeded = 23] = "MessageLimitPerPVExceeded", e[e.MissingRequiredFieldSpecification = 24] = "MissingRequiredFieldSpecification", e[e.NavigationTimingNotSupported = 25] = "NavigationTimingNotSupported", e[e.OnError = 26] = "OnError", e[e.SessionRenewalDateIsZero = 27] = "SessionRenewalDateIsZero", e[e.SenderNotInitialized = 28] = "SenderNotInitialized", e[e.StartTrackEventFailed = 29] = "StartTrackEventFailed", e[e.StopTrackEventFailed = 30] = "StopTrackEventFailed", e[e.StartTrackFailed = 31] = "StartTrackFailed", e[e.StopTrackFailed = 32] = "StopTrackFailed", e[e.TelemetrySampledAndNotSent = 33] = "TelemetrySampledAndNotSent", e[e.TrackEventFailed = 34] = "TrackEventFailed", e[e.TrackExceptionFailed = 35] = "TrackExceptionFailed", e[e.TrackMetricFailed = 36] = "TrackMetricFailed", e[e.TrackPVFailed = 37] = "TrackPVFailed", e[e.TrackPVFailedCalc = 38] = "TrackPVFailedCalc", e[e.TrackTraceFailed = 39] = "TrackTraceFailed", e[e.TransmissionFailed = 40] = "TransmissionFailed", e[e.FailedToSetStorageBuffer = 41] = "FailedToSetStorageBuffer", e[e.FailedToRestoreStorageBuffer = 42] = "FailedToRestoreStorageBuffer", e[e.InvalidBackendResponse = 43] = "InvalidBackendResponse", e[e.FailedToFixDepricatedValues = 44] = "FailedToFixDepricatedValues", e[e.InvalidDurationValue = 45] = "InvalidDurationValue", e[e.CannotSerializeObject = 46] = "CannotSerializeObject", e[e.CannotSerializeObjectNonSerializable = 47] = "CannotSerializeObjectNonSerializable", e[e.CircularReferenceDetected = 48] = "CircularReferenceDetected", e[e.ClearAuthContextFailed = 49] = "ClearAuthContextFailed", e[e.ExceptionTruncated = 50] = "ExceptionTruncated", e[e.IllegalCharsInName = 51] = "IllegalCharsInName", e[e.ItemNotInArray = 52] = "ItemNotInArray", e[e.MaxAjaxPerPVExceeded = 53] = "MaxAjaxPerPVExceeded", e[e.MessageTruncated = 54] = "MessageTruncated", e[e.NameTooLong = 55] = "NameTooLong", e[e.SampleRateOutOfRange = 56] = "SampleRateOutOfRange", e[e.SetAuthContextFailed = 57] = "SetAuthContextFailed", e[e.SetAuthContextFailedAccountName = 58] = "SetAuthContextFailedAccountName", e[e.StringValueTooLong = 59] = "StringValueTooLong", e[e.StartCalledMoreThanOnce = 60] = "StartCalledMoreThanOnce", e[e.StopCalledWithoutStart = 61] = "StopCalledWithoutStart", e[e.TelemetryInitializerFailed = 62] = "TelemetryInitializerFailed", e[e.TrackArgumentsNotSpecified = 63] = "TrackArgumentsNotSpecified", e[e.UrlTooLong = 64] = "UrlTooLong", e[e.SessionStorageBufferFull = 65] = "SessionStorageBufferFull", e[e.CannotAccessCookie = 66] = "CannotAccessCookie", e[e.IdTooLong = 67] = "IdTooLong" }(n = e._InternalMessageId || (e._InternalMessageId = {})); var i = function () { function e(t, i, o, a) { void 0 === o && (o = !1), this.messageId = t, this.message = (o ? e.AiUserActionablePrefix : e.AiNonUserActionablePrefix) + n[t].toString(); var r = (i ? " message:" + e.sanitizeDiagnosticText(i) : "") + (a ? " props:" + e.sanitizeDiagnosticText(JSON.stringify(a)) : ""); this.message += r } return e.sanitizeDiagnosticText = function (e) { return '"' + e.replace(/\"/g, "") + '"' }, e.AiNonUserActionablePrefix = "AI (Internal): ", e.AiUserActionablePrefix = "AI: ", e }(); e._InternalLogMessage = i; var o = function () { function o() { } return o.throwInternal = function (e, t, o, a, r) { void 0 === r && (r = !1); var s = new i(t, o, r, a); if (this.enableDebugExceptions()) throw s; if (void 0 !== s && s && "undefined" != typeof s.message) { if (r) { var l = n[s.messageId]; this._messageLogged[l] && !this.verboseLogging() || (this.warnToConsole(s.message), this._messageLogged[l] = !0) } else this.verboseLogging() && this.warnToConsole(s.message); this.logInternalMessage(e, s) } }, o.warnToConsole = function (e) { "undefined" != typeof console && console && ("function" == typeof console.warn ? console.warn(e) : "function" == typeof console.log && console.log(e)) }, o.resetInternalMessageCount = function () { this._messageCount = 0, this._messageLogged = {} }, o.clearInternalMessageLoggedTypes = function () { if (e.Util.canUseSessionStorage()) for (var t = e.Util.getSessionStorageKeys(), n = 0; n < t.length; n++)0 === t[n].indexOf(o.AIInternalMessagePrefix) && e.Util.removeSessionStorage(t[n]) }, o.setMaxInternalMessageLimit = function (e) { if (!e) throw new Error("limit cannot be undefined."); this.MAX_INTERNAL_MESSAGE_LIMIT = e }, o.logInternalMessage = function (a, r) { if (!this._areInternalMessagesThrottled()) { var s = !0, l = o.AIInternalMessagePrefix + n[r.messageId]; if (e.Util.canUseSessionStorage() ? e.Util.getSessionStorage(l) ? s = !1 : e.Util.setSessionStorage(l, "1") : this._messageLogged[l] ? s = !1 : this._messageLogged[l] = !0, s && ((this.verboseLogging() || a === t.CRITICAL) && (this.queue.push(r), this._messageCount++), this._messageCount == this.MAX_INTERNAL_MESSAGE_LIMIT)) { var c = "Internal events throttle limit per PageView reached for this app.", u = new i(n.MessageLimitPerPVExceeded, c, !1); this.queue.push(u), this.warnToConsole(c) } } }, o._areInternalMessagesThrottled = function () { return this._messageCount >= this.MAX_INTERNAL_MESSAGE_LIMIT }, o.AIInternalMessagePrefix = "AITR_", o.enableDebugExceptions = function () { return !1 }, o.verboseLogging = function () { return !1 }, o.queue = [], o.MAX_INTERNAL_MESSAGE_LIMIT = 25, o._messageCount = 0, o._messageLogged = {}, o }(); e._InternalLogging = o }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { function e() { } return e.newId = function () { for (var e = "", t = 1073741824 * Math.random(); t > 0;)e += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t % 64), t = Math.floor(t / 64); return e }, e }(); e.UtilHelpers = t }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t; !function (e) { e[e.LocalStorage = 0] = "LocalStorage", e[e.SessionStorage = 1] = "SessionStorage" }(t || (t = {})); var n = function () { function n() { } return n.disableStorage = function () { n._canUseLocalStorage = !1, n._canUseSessionStorage = !1 }, n._getLocalStorageObject = function () { return n.canUseLocalStorage() ? n._getVerifiedStorageObject(t.LocalStorage) : null }, n._getVerifiedStorageObject = function (e) { var n, i, o = null; try { i = new Date, (o = e === t.LocalStorage ? window.localStorage : window.sessionStorage).setItem(i, i), n = o.getItem(i) != i, o.removeItem(i), n && (o = null) } catch (a) { o = null } return o }, n.isInternalApplicationInsightsEndpoint = function (e) { return -1 !== n._internalEndpoints.indexOf(e.toLowerCase()) }, n.canUseLocalStorage = function () { return n._canUseLocalStorage === undefined && (n._canUseLocalStorage = !!n._getVerifiedStorageObject(t.LocalStorage)), n._canUseLocalStorage }, n.getStorage = function (t) { var i = n._getLocalStorageObject(); if (null !== i) try { return i.getItem(t) } catch (o) { n._canUseLocalStorage = !1, e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.BrowserCannotReadLocalStorage, "Browser failed read of local storage. " + n.getExceptionName(o), { exception: n.dump(o) }) } return null }, n.setStorage = function (t, i) { var o = n._getLocalStorageObject(); if (null !== o) try { return o.setItem(t, i), !0 } catch (a) { n._canUseLocalStorage = !1, e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.BrowserCannotWriteLocalStorage, "Browser failed write to local storage. " + n.getExceptionName(a), { exception: n.dump(a) }) } return !1 }, n.removeStorage = function (t) { var i = n._getLocalStorageObject(); if (null !== i) try { return i.removeItem(t), !0 } catch (o) { n._canUseLocalStorage = !1, e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.BrowserFailedRemovalFromLocalStorage, "Browser failed removal of local storage item. " + n.getExceptionName(o), { exception: n.dump(o) }) } return !1 }, n._getSessionStorageObject = function () { return n.canUseSessionStorage() ? n._getVerifiedStorageObject(t.SessionStorage) : null }, n.canUseSessionStorage = function () { return n._canUseSessionStorage === undefined && (n._canUseSessionStorage = !!n._getVerifiedStorageObject(t.SessionStorage)), n._canUseSessionStorage }, n.getSessionStorageKeys = function () { var e = []; if (n.canUseSessionStorage()) for (var t in window.sessionStorage) e.push(t); return e }, n.getSessionStorage = function (t) { var i = n._getSessionStorageObject(); if (null !== i) try { return i.getItem(t) } catch (o) { n._canUseSessionStorage = !1, e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + n.getExceptionName(o), { exception: n.dump(o) }) } return null }, n.setSessionStorage = function (t, i) { var o = n._getSessionStorageObject(); if (null !== o) try { return o.setItem(t, i), !0 } catch (a) { n._canUseSessionStorage = !1, e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + n.getExceptionName(a), { exception: n.dump(a) }) } return !1 }, n.removeSessionStorage = function (t) { var i = n._getSessionStorageObject(); if (null !== i) try { return i.removeItem(t), !0 } catch (o) { n._canUseSessionStorage = !1, e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + n.getExceptionName(o), { exception: n.dump(o) }) } return !1 }, n.disableCookies = function () { n._canUseCookies = !1 }, n.canUseCookies = function () { if (n._canUseCookies === undefined) { n._canUseCookies = !1; try { n._canUseCookies = n.document.cookie !== undefined } catch (t) { e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.CannotAccessCookie, "Cannot access document.cookie - " + n.getExceptionName(t), { exception: n.dump(t) }) } } return n._canUseCookies }, n.setCookie = function (e, t, i) { var o = "", a = ""; i && (o = ";domain=" + i), n.document.location && "https:" === n.document.location.protocol && (a = ";secure"), n.canUseCookies() && (n.document.cookie = e + "=" + t + o + ";path=/" + a) }, n.stringToBoolOrDefault = function (e, t) { return void 0 === t && (t = !1), e === undefined || null === e ? t : "true" === e.toString().toLowerCase() }, n.getCookie = function (e) { if (n.canUseCookies()) { var t = ""; if (e && e.length) for (var i = e + "=", o = n.document.cookie.split(";"), a = 0; a < o.length; a++) { var r = o[a]; if ((r = n.trim(r)) && 0 === r.indexOf(i)) { t = r.substring(i.length, o[a].length); break } } return t } }, n.deleteCookie = function (e) { n.canUseCookies() && (n.document.cookie = e + "=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;") }, n.trim = function (e) { return "string" != typeof e ? e : e.replace(/^\s+|\s+$/g, "") }, n.newId = function () { return e.UtilHelpers.newId() }, n.isArray = function (e) { return "[object Array]" === Object.prototype.toString.call(e) }, n.isError = function (e) { return "[object Error]" === Object.prototype.toString.call(e) }, n.isDate = function (e) { return "[object Date]" === Object.prototype.toString.call(e) }, n.toISOStringForIE8 = function (e) { if (n.isDate(e)) { if (Date.prototype.toISOString) return e.toISOString(); var t = function (e) { var t = String(e); return 1 === t.length && (t = "0" + t), t }; return e.getUTCFullYear() + "-" + t(e.getUTCMonth() + 1) + "-" + t(e.getUTCDate()) + "T" + t(e.getUTCHours()) + ":" + t(e.getUTCMinutes()) + ":" + t(e.getUTCSeconds()) + "." + String((e.getUTCMilliseconds() / 1e3).toFixed(3)).slice(2, 5) + "Z" } }, n.getIEVersion = function (e) { void 0 === e && (e = null); var t = e ? e.toLowerCase() : navigator.userAgent.toLowerCase(); return -1 != t.indexOf("msie") ? parseInt(t.split("msie")[1]) : null }, n.msToTimeSpan = function (e) { (isNaN(e) || e < 0) && (e = 0); var t = "" + (e = Math.round(e)) % 1e3, n = "" + Math.floor(e / 1e3) % 60, i = "" + Math.floor(e / 6e4) % 60, o = "" + Math.floor(e / 36e5) % 24, a = Math.floor(e / 864e5); return t = 1 === t.length ? "00" + t : 2 === t.length ? "0" + t : t, n = n.length < 2 ? "0" + n : n, i = i.length < 2 ? "0" + i : i, o = o.length < 2 ? "0" + o : o, (a > 0 ? a + "." : "") + o + ":" + i + ":" + n + "." + t }, n.isCrossOriginError = function (e, t, n, i, o) { return ("Script error." === e || "Script error" === e) && !o }, n.dump = function (e) { var t = Object.prototype.toString.call(e), n = JSON.stringify(e); return "[object Error]" === t && (n = "{ stack: '" + e.stack + "', message: '" + e.message + "', name: '" + e.name + "'"), t + n }, n.getExceptionName = function (e) { return "[object Error]" === Object.prototype.toString.call(e) ? e.name : "" }, n.addEventHandler = function (e, t) { if (!window || "string" != typeof e || "function" != typeof t) return !1; var n = "on" + e; if (window.addEventListener) window.addEventListener(e, t, !1); else { if (!window.attachEvent) return !1; window.attachEvent(n, t) } return !0 }, n.IsBeaconApiSupported = function () { return "sendBeacon" in navigator && navigator.sendBeacon }, n.document = "undefined" != typeof document ? document : {}, n._canUseCookies = undefined, n._canUseLocalStorage = undefined, n._canUseSessionStorage = undefined, n._internalEndpoints = ["https://dc.services.visualstudio.com/v2/track", "https://breeze.aimon.applicationinsights.io/v2/track", "https://dc-int.services.visualstudio.com/v2/track"], n.NotSpecified = "not_specified", n }(); e.Util = n; var i = function () { function e() { } return e.parseUrl = function (t) { return e.htmlAnchorElement || (e.htmlAnchorElement = e.document.createElement ? e.document.createElement("a") : {}), e.htmlAnchorElement.href = t, e.htmlAnchorElement }, e.getAbsoluteUrl = function (t) { var n, i = e.parseUrl(t); return i && (n = i.href), n }, e.getPathName = function (t) { var n, i = e.parseUrl(t); return i && (n = i.pathname), n }, e.getCompleteUrl = function (e, t) { return e ? e.toUpperCase() + " " + t : t }, e.document = "undefined" != typeof document ? document : {}, e }(); e.UrlHelper = i; var o = function () { function t() { } return t.canIncludeCorrelationHeader = function (e, t, n) { if (e && e.disableCorrelationHeaders) return !1; if (!t) return !1; var o = i.parseUrl(t).host.toLowerCase(); if (!(e && e.enableCorsCorrelation || o === n)) return !1; var a = e && e.correlationHeaderExcludedDomains; if (!a || 0 == a.length) return !0; for (var r = 0; r < a.length; r++)if (new RegExp(a[r].toLowerCase().replace(/\./g, ".").replace(/\*/g, ".*")).test(o)) return !1; return !0 }, t.getCorrelationContext = function (n) { if (n) { var i = t.getCorrelationContextValue(n, e.RequestHeaders.requestContextTargetKey); if (i && i !== t.correlationIdPrefix) return i } }, t.getCorrelationContextValue = function (e, t) { if (e) for (var n = e.split(","), i = 0; i < n.length; ++i) { var o = n[i].split("="); if (2 == o.length && o[0] == t) return o[1] } }, t.correlationIdPrefix = "cid-v1:", t }(); e.CorrelationIdHelper = o }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t; !function (e) { e[e.Default = 0] = "Default", e[e.Required = 1] = "Required", e[e.Array = 2] = "Array", e[e.Hidden = 4] = "Hidden" }(t = e.FieldType || (e.FieldType = {})); var n = function () { function n() { } return n.serialize = function (e) { var t = n._serializeObject(e, "root"); return JSON.stringify(t) }, n._serializeObject = function (i, o) { var a = {}; if (!i) return e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.CannotSerializeObject, "cannot serialize object because it is null or undefined", { name: o }, !0), a; if (i.__aiCircularRefCheck) return e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.CircularReferenceDetected, "Circular reference detected while serializing object", { name: o }, !0), a; if (!i.aiDataContract) { if ("measurements" === o) a = n._serializeStringMap(i, "number", o); else if ("properties" === o) a = n._serializeStringMap(i, "string", o); else if ("tags" === o) a = n._serializeStringMap(i, "string", o); else if (e.Util.isArray(i)) a = n._serializeArray(i, o); else { e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.CannotSerializeObjectNonSerializable, "Attempting to serialize an object which does not implement ISerializable", { name: o }, !0); try { JSON.stringify(i), a = i } catch (f) { e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.CannotSerializeObject, f && "function" == typeof f.toString ? f.toString() : "Error serializing object", null, !0) } } return a } i.__aiCircularRefCheck = !0; for (var r in i.aiDataContract) { var s = i.aiDataContract[r], l = "function" == typeof s ? s() & t.Required : s & t.Required, c = "function" == typeof s ? s() & t.Hidden : s & t.Hidden, u = s & t.Array, g = i[r] !== undefined, p = "object" == typeof i[r] && null !== i[r]; if (!l || g || u) { if (!c) { var d; (d = p ? u ? n._serializeArray(i[r], r) : n._serializeObject(i[r], r) : i[r]) !== undefined && (a[r] = d) } } else e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.MissingRequiredFieldSpecification, "Missing required field specification. The field is required but not present on source", { field: r, name: o }) } return delete i.__aiCircularRefCheck, a }, n._serializeArray = function (t, i) { var o = undefined; if (t) if (e.Util.isArray(t)) { o = []; for (var a = 0; a < t.length; a++) { var r = t[a], s = n._serializeObject(r, i + "[" + a + "]"); o.push(s) } } else e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.ItemNotInArray, "This field was specified as an array in the contract but the item is not an array.\r\n", { name: i }, !0); return o }, n._serializeStringMap = function (t, n, i) { var o = undefined; if (t) { o = {}; for (var a in t) { var r = t[a]; if ("string" === n) r === undefined ? o[a] = "undefined" : null === r ? o[a] = "null" : r.toString ? o[a] = r.toString() : o[a] = "invalid field: toString() is not defined."; else if ("number" === n) if (r === undefined) o[a] = "undefined"; else if (null === r) o[a] = "null"; else { var s = parseFloat(r); isNaN(s) ? o[a] = "NaN" : o[a] = s } else o[a] = "invalid field: " + i + " is of unknown type.", e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, o[a], null, !0) } } return o }, n }(); e.Serializer = n }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { !function (n) { !function (n) { var i = function (e) { function i(i, o) { var a = e.call(this) || this; return a.name = n.DataSanitizer.sanitizeString(o) || t.Util.NotSpecified, a.data = i, a.time = t.Util.toISOStringForIE8(new Date), a.aiDataContract = { time: t.FieldType.Required, iKey: t.FieldType.Required, name: t.FieldType.Required, sampleRate: function () { return 100 == a.sampleRate ? t.FieldType.Hidden : t.FieldType.Required }, tags: t.FieldType.Required, data: t.FieldType.Required }, a } return __extends(i, e), i }(e.Telemetry.Envelope); n.Envelope = i }(n.Common || (n.Common = {})) }(t.Telemetry || (t.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { !function (t) { !function (t) { var n = function (e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.aiDataContract = {}, t } return __extends(t, e), t }(e.Telemetry.Base); t.Base = n }(t.Common || (t.Common = {})) }(t.Telemetry || (t.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var AI; !function (e) { var t = function () { return function () { this.applicationVersion = "ai.application.ver", this.applicationBuild = "ai.application.build", this.applicationTypeId = "ai.application.typeId", this.applicationId = "ai.application.applicationId", this.applicationLayer = "ai.application.layer", this.deviceId = "ai.device.id", this.deviceIp = "ai.device.ip", this.deviceLanguage = "ai.device.language", this.deviceLocale = "ai.device.locale", this.deviceModel = "ai.device.model", this.deviceFriendlyName = "ai.device.friendlyName", this.deviceNetwork = "ai.device.network", this.deviceNetworkName = "ai.device.networkName", this.deviceOEMName = "ai.device.oemName", this.deviceOS = "ai.device.os", this.deviceOSVersion = "ai.device.osVersion", this.deviceRoleInstance = "ai.device.roleInstance", this.deviceRoleName = "ai.device.roleName", this.deviceScreenResolution = "ai.device.screenResolution", this.deviceType = "ai.device.type", this.deviceMachineName = "ai.device.machineName", this.deviceVMName = "ai.device.vmName", this.deviceBrowser = "ai.device.browser", this.deviceBrowserVersion = "ai.device.browserVersion", this.locationIp = "ai.location.ip", this.locationCountry = "ai.location.country", this.locationProvince = "ai.location.province", this.locationCity = "ai.location.city", this.operationId = "ai.operation.id", this.operationName = "ai.operation.name", this.operationParentId = "ai.operation.parentId", this.operationRootId = "ai.operation.rootId", this.operationSyntheticSource = "ai.operation.syntheticSource", this.operationCorrelationVector = "ai.operation.correlationVector", this.sessionId = "ai.session.id", this.sessionIsFirst = "ai.session.isFirst", this.sessionIsNew = "ai.session.isNew", this.userAccountAcquisitionDate = "ai.user.accountAcquisitionDate", this.userAccountId = "ai.user.accountId", this.userAgent = "ai.user.userAgent", this.userId = "ai.user.id", this.userStoreRegion = "ai.user.storeRegion", this.userAuthUserId = "ai.user.authUserId", this.userAnonymousUserAcquisitionDate = "ai.user.anonUserAcquisitionDate", this.userAuthenticatedUserAcquisitionDate = "ai.user.authUserAcquisitionDate", this.cloudName = "ai.cloud.name", this.cloudRole = "ai.cloud.role", this.cloudRoleVer = "ai.cloud.roleVer", this.cloudRoleInstance = "ai.cloud.roleInstance", this.cloudEnvironment = "ai.cloud.environment", this.cloudLocation = "ai.cloud.location", this.cloudDeploymentUnit = "ai.cloud.deploymentUnit", this.internalSdkVersion = "ai.internal.sdkVersion", this.internalAgentVersion = "ai.internal.agentVersion", this.internalNodeName = "ai.internal.nodeName" } }(); e.ContextTagKeys = t }(AI || (AI = {})); var Microsoft; !function (e) { !function (e) { !function (e) { var t = function () { return function () { } }(); e.Application = t }(e.Context || (e.Context = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (e) { var t = function () { return function () { this.id = "browser", this.type = "Browser" } }(); e.Device = t }(e.Context || (e.Context = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function () { return function (t) { this.sdkVersion = (t.sdkExtension() ? t.sdkExtension() + "_" : "") + "javascript:" + e.Version } }(); t.Internal = n }(e.Context || (e.Context = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (e) { var t = function () { return function () { } }(); e.Location = t }(e.Context || (e.Context = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function () { return function () { this.id = e.Util.newId(), window && window.location && window.location.pathname && (this.name = window.location.pathname) } }(); t.Operation = n }(e.Context || (e.Context = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { function e() { } return e.prototype.getHashCodeScore = function (t) { return 100 * (this.getHashCode(t) / e.INT_MAX_VALUE) }, e.prototype.getHashCode = function (t) { if ("" == t) return 0; for (; t.length < e.MIN_INPUT_LENGTH;)t = t.concat(t); for (var n = 5381, i = 0; i < t.length; ++i)n = (n << 5) + n + t.charCodeAt(i), n &= n; return Math.abs(n) }, e.INT_MAX_VALUE = 2147483647, e.MIN_INPUT_LENGTH = 8, e }(); e.HashCodeScoreGenerator = t }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { function t() { this.hashCodeGeneragor = new e.HashCodeScoreGenerator } return t.prototype.getSamplingScore = function (e) { var t = new AI.ContextTagKeys; return e.tags[t.userId] ? this.hashCodeGeneragor.getHashCodeScore(e.tags[t.userId]) : e.tags[t.operationId] ? this.hashCodeGeneragor.getHashCodeScore(e.tags[t.operationId]) : Math.random() }, t }(); e.SamplingScoreGenerator = t }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function () { function t(t) { this.INT_MAX_VALUE = 2147483647, (t > 100 || t < 0) && (e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.SampleRateOutOfRange, "Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.", { samplingRate: t }, !0), this.sampleRate = 100), this.sampleRate = t, this.samplingScoreGenerator = new e.SamplingScoreGenerator } return t.prototype.isSampledIn = function (e) { return 100 == this.sampleRate || this.samplingScoreGenerator.getSamplingScore(e) < this.sampleRate }, t }(); t.Sample = n }(e.Context || (e.Context = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function () { return function () { } }(); t.Session = n; var i = function () { function t(e) { e || (e = {}), "function" != typeof e.sessionExpirationMs && (e.sessionExpirationMs = function () { return t.acquisitionSpan }), "function" != typeof e.sessionRenewalMs && (e.sessionRenewalMs = function () { return t.renewalSpan }), this.config = e, this.automaticSession = new n } return t.prototype.update = function () { this.automaticSession.id || this.initializeAutomaticSession(); var n = e.dateTime.Now(), i = n - this.automaticSession.acquisitionDate > this.config.sessionExpirationMs(), o = n - this.automaticSession.renewalDate > this.config.sessionRenewalMs(); i || o ? (this.automaticSession.isFirst = undefined, this.renew()) : (!this.cookieUpdatedTimestamp || n - this.cookieUpdatedTimestamp > t.cookieUpdateInterval) && (this.automaticSession.renewalDate = n, this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate)) }, t.prototype.backup = function () { this.setStorage(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate) }, t.prototype.initializeAutomaticSession = function () { var t = e.Util.getCookie("ai_session"); if (t && "function" == typeof t.split) this.initializeAutomaticSessionWithData(t); else { var n = e.Util.getStorage("ai_session"); n && this.initializeAutomaticSessionWithData(n) } this.automaticSession.id || (this.automaticSession.isFirst = !0, this.renew()) }, t.prototype.initializeAutomaticSessionWithData = function (t) { var n = t.split("|"); n.length > 0 && (this.automaticSession.id = n[0]); try { if (n.length > 1) { var i = +n[1]; this.automaticSession.acquisitionDate = +new Date(i), this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0 } if (n.length > 2) { var o = +n[2]; this.automaticSession.renewalDate = +new Date(o), this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0 } } catch (a) { e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.ErrorParsingAISessionCookie, "Error parsing ai_session cookie, session will be reset: " + e.Util.getExceptionName(a), { exception: e.Util.dump(a) }) } 0 == this.automaticSession.renewalDate && e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.SessionRenewalDateIsZero, "AI session renewal date is 0, session will be reset.") }, t.prototype.renew = function () { var t = e.dateTime.Now(); this.automaticSession.id = e.Util.newId(), this.automaticSession.acquisitionDate = t, this.automaticSession.renewalDate = t, this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate), e.Util.canUseLocalStorage() || e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.BrowserDoesNotSupportLocalStorage, "Browser does not support local storage. Session durations will be inaccurate.") }, t.prototype.setCookie = function (t, n, i) { var o = n + this.config.sessionExpirationMs(), a = i + this.config.sessionRenewalMs(), r = new Date, s = [t, n, i]; o < a ? r.setTime(o) : r.setTime(a); var l = this.config.cookieDomain ? this.config.cookieDomain() : null; e.Util.setCookie("ai_session", s.join("|") + ";expires=" + r.toUTCString(), l), this.cookieUpdatedTimestamp = e.dateTime.Now() }, t.prototype.setStorage = function (t, n, i) { e.Util.setStorage("ai_session", [t, n, i].join("|")) }, t.acquisitionSpan = 864e5, t.renewalSpan = 18e5, t.cookieUpdateInterval = 6e4, t }(); t._SessionManager = i }(e.Context || (e.Context = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function () { function t(n) { var i = e.Util.getCookie(t.userCookieName); if (i) { var o = i.split(t.cookieSeparator); o.length > 0 && (this.id = o[0]) } if (this.config = n, !this.id) { this.id = e.Util.newId(); var a = new Date, r = e.Util.toISOStringForIE8(a); this.accountAcquisitionDate = r, a.setTime(a.getTime() + 31536e6); var s = [this.id, r], l = this.config.cookieDomain ? this.config.cookieDomain() : undefined; e.Util.setCookie(t.userCookieName, s.join(t.cookieSeparator) + ";expires=" + a.toUTCString(), l), e.Util.removeStorage("ai_session") } this.accountId = n.accountId ? n.accountId() : undefined; var c = e.Util.getCookie(t.authUserCookieName); if (c) { var u = (c = decodeURI(c)).split(t.cookieSeparator); u[0] && (this.authenticatedId = u[0]), u.length > 1 && u[1] && (this.accountId = u[1]) } } return t.prototype.setAuthenticatedUserContext = function (n, i, o) { if (void 0 === o && (o = !1), !this.validateUserInput(n) || i && !this.validateUserInput(i)) e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.SetAuthContextFailedAccountName, "Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.", !0); else { this.authenticatedId = n; var a = this.authenticatedId; i && (this.accountId = i, a = [this.authenticatedId, this.accountId].join(t.cookieSeparator)), o && e.Util.setCookie(t.authUserCookieName, encodeURI(a), this.config.cookieDomain()) } }, t.prototype.clearAuthenticatedUserContext = function () { this.authenticatedId = null, this.accountId = null, e.Util.deleteCookie(t.authUserCookieName) }, t.prototype.validateUserInput = function (e) { return !("string" != typeof e || !e || e.match(/,|;|=| |\|/)) }, t.cookieSeparator = "|", t.userCookieName = "ai_user", t.authUserCookieName = "ai_authUser", t }(); t.User = n }(e.Context || (e.Context = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { function e() { } return e.IsNullOrUndefined = function (e) { return void 0 === e || null === e }, e }(); e.extensions = t; var n = function () { function e() { } return e.GetLength = function (e) { var n = 0; if (!t.IsNullOrUndefined(e)) { var i = ""; try { i = e.toString() } catch (o) { } n = i.length, n = isNaN(n) ? 0 : n } return n }, e }(); e.stringUtils = n; var i = function () { function e() { } return e.Now = window.performance && window.performance.now && window.performance.timing ? function () { return window.performance.now() + window.performance.timing.navigationStart } : function () { return (new Date).getTime() }, e.GetDuration = function (e, n) { var i = null; return 0 === e || 0 === n || t.IsNullOrUndefined(e) || t.IsNullOrUndefined(n) || (i = n - e), i }, e }(); e.dateTime = i; var o = function () { function e() { } return e.AttachEvent = function (e, n, i) { var o = !1; return t.IsNullOrUndefined(e) || (t.IsNullOrUndefined(e.attachEvent) ? t.IsNullOrUndefined(e.addEventListener) || (e.addEventListener(n, i, !1), o = !0) : (e.attachEvent("on" + n, i), o = !0)), o }, e.DetachEvent = function (e, n, i) { t.IsNullOrUndefined(e) || (t.IsNullOrUndefined(e.detachEvent) ? t.IsNullOrUndefined(e.removeEventListener) || e.removeEventListener(n, i, !1) : e.detachEvent("on" + n, i)) }, e }(); e.EventHelper = o; var a = function () { function t() { } return t.ParseDependencyPath = function (t, n, i) { var o, a; if (t && t.length > 0) { var r = e.UrlHelper.parseUrl(t); o = r.host, null != r.pathname ? ("/" !== (i = 0 === r.pathname.length ? "/" : r.pathname).charAt(0) && (i = "/" + i), a = e.Telemetry.Common.DataSanitizer.sanitizeString(n ? n + " " + i : i)) : a = e.Telemetry.Common.DataSanitizer.sanitizeString(t) } else o = i, a = i; return { target: o, name: a } }, t }(); e.AjaxHelper = a }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { return function () { this.openDone = !1, this.setRequestHeaderDone = !1, this.sendDone = !1, this.abortDone = !1, this.onreadystatechangeCallbackAttached = !1 } }(); e.XHRMonitoringState = t; var n = function () { function n(n) { this.completed = !1, this.requestHeadersSize = null, this.ttfb = null, this.responseReceivingDuration = null, this.callbackDuration = null, this.ajaxTotalDuration = null, this.aborted = null, this.pageUrl = null, this.requestUrl = null, this.requestSize = 0, this.method = null, this.status = null, this.requestSentTime = null, this.responseStartedTime = null, this.responseFinishedTime = null, this.callbackFinishedTime = null, this.endTime = null, this.originalOnreadystatechage = null, this.xhrMonitoringState = new t, this.clientFailure = 0, this.CalculateMetrics = function () { var t = this; t.ajaxTotalDuration = Math.round(1e3 * e.dateTime.GetDuration(t.requestSentTime, t.responseFinishedTime)) / 1e3 }, this.id = n } return n.prototype.getAbsoluteUrl = function () { return this.requestUrl ? e.UrlHelper.getAbsoluteUrl(this.requestUrl) : null }, n.prototype.getPathName = function () { return this.requestUrl ? e.Telemetry.Common.DataSanitizer.sanitizeUrl(e.UrlHelper.getCompleteUrl(this.method, this.requestUrl)) : null }, n }(); e.ajaxRecord = n }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { function e() { } return e.requestContextHeader = "Request-Context", e.requestContextTargetKey = "appId", e.requestContextAppIdFormat = "appId=cid-v1:", e.requestIdHeader = "Request-Id", e.sdkContextHeader = "Sdk-Context", e.sdkContextHeaderAppIdRequest = "appId", e.requestContextHeaderLowerCase = "request-context", e }(); e.RequestHeaders = t }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { return function () { } }(); e.Domain = t }(e.Telemetry || (e.Telemetry = {})) }(Microsoft || (Microsoft = {})); var AI; !function (e) { var t = function (e) { function t() { var t = e.call(this) || this; return t.ver = 2, t.properties = {}, t.measurements = {}, t } return __extends(t, e), t }(Microsoft.Telemetry.Domain); e.EventData = t }(AI || (AI = {})); var AI; !function (e) { var t = function (e) { function t() { var t = e.call(this) || this; return t.ver = 2, t.properties = {}, t.measurements = {}, t } return __extends(t, e), t }(e.EventData); e.PageViewData = t }(AI || (AI = {})); var AI; !function (e) { var t = function (e) { function t() { var t = e.call(this) || this; return t.ver = 2, t.success = !0, t.properties = {}, t.measurements = {}, t } return __extends(t, e), t }(Microsoft.Telemetry.Domain); e.RemoteDependencyData = t }(AI || (AI = {})); var Microsoft; !function (e) { !function (e) { !function (t) { !function (t) { var n = function () { function t() { } return t.sanitizeKeyAndAddUniqueness = function (e, n) { var i = e.length, o = t.sanitizeKey(e); if (o.length !== i) { for (var a = 0, r = o; n[r] !== undefined;)a++ , r = o.substring(0, t.MAX_NAME_LENGTH - 3) + t.padNumber(a); o = r } return o }, t.sanitizeKey = function (n) { return n && (n = e.Util.trim(n.toString())).length > t.MAX_NAME_LENGTH && (n = n.substring(0, t.MAX_NAME_LENGTH), e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.NameTooLong, "name is too long.  It has been truncated to " + t.MAX_NAME_LENGTH + " characters.", { name: n }, !0)), n }, t.sanitizeString = function (n, i) { return void 0 === i && (i = t.MAX_STRING_LENGTH), n && (i = i || t.MAX_STRING_LENGTH, (n = e.Util.trim(n)).toString().length > i && (n = n.toString().substring(0, i), e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + i + " characters.", { value: n }, !0))), n }, t.sanitizeUrl = function (n) { return t.sanitizeInput(n, t.MAX_URL_LENGTH, e._InternalMessageId.UrlTooLong) }, t.sanitizeMessage = function (n) { return n && n.length > t.MAX_MESSAGE_LENGTH && (n = n.substring(0, t.MAX_MESSAGE_LENGTH), e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + t.MAX_MESSAGE_LENGTH + " characters.", { message: n }, !0)), n }, t.sanitizeException = function (n) { return n && n.length > t.MAX_EXCEPTION_LENGTH && (n = n.substring(0, t.MAX_EXCEPTION_LENGTH), e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + t.MAX_EXCEPTION_LENGTH + " characters.", { exception: n }, !0)), n }, t.sanitizeProperties = function (e) { if (e) { var n = {}; for (var i in e) { var o = t.sanitizeString(e[i], t.MAX_PROPERTY_LENGTH); n[i = t.sanitizeKeyAndAddUniqueness(i, n)] = o } e = n } return e }, t.sanitizeMeasurements = function (e) { if (e) { var n = {}; for (var i in e) { var o = e[i]; n[i = t.sanitizeKeyAndAddUniqueness(i, n)] = o } e = n } return e }, t.sanitizeId = function (n) { return n ? t.sanitizeInput(n, t.MAX_ID_LENGTH, e._InternalMessageId.IdTooLong).toString() : n }, t.sanitizeInput = function (t, n, i) { return t && (t = e.Util.trim(t)).length > n && (t = t.substring(0, n), e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, i, "input is too long, it has been truncated to " + n + " characters.", { data: t }, !0)), t }, t.padNumber = function (e) { var t = "00" + e; return t.substr(t.length - 3) }, t.MAX_NAME_LENGTH = 150, t.MAX_ID_LENGTH = 128, t.MAX_PROPERTY_LENGTH = 8192, t.MAX_STRING_LENGTH = 1024, t.MAX_URL_LENGTH = 2048, t.MAX_MESSAGE_LENGTH = 32768, t.MAX_EXCEPTION_LENGTH = 32768, t }(); t.DataSanitizer = n }(t.Common || (t.Common = {})) }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function (n) { function i(i, o, a, r, s, l, c, u, g) { var p = n.call(this) || this; p.aiDataContract = { id: e.FieldType.Required, ver: e.FieldType.Required, name: e.FieldType.Default, resultCode: e.FieldType.Default, duration: e.FieldType.Default, success: e.FieldType.Default, data: e.FieldType.Default, target: e.FieldType.Default, type: e.FieldType.Default, properties: e.FieldType.Default, measurements: e.FieldType.Default, kind: e.FieldType.Default, value: e.FieldType.Default, count: e.FieldType.Default, min: e.FieldType.Default, max: e.FieldType.Default, stdDev: e.FieldType.Default, dependencyKind: e.FieldType.Default, dependencySource: e.FieldType.Default, commandName: e.FieldType.Default, dependencyTypeName: e.FieldType.Default }, p.id = i, p.duration = e.Util.msToTimeSpan(r), p.success = s, p.resultCode = l + "", p.type = "Ajax", p.data = t.Common.DataSanitizer.sanitizeUrl(a); var d = e.AjaxHelper.ParseDependencyPath(o, c, a); return p.target = d.target, p.name = d.name, p.properties = e.Telemetry.Common.DataSanitizer.sanitizeProperties(u), p.measurements = e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(g), p } return __extends(i, n), i.envelopeType = "Microsoft.ApplicationInsights.{0}.RemoteDependency", i.dataType = "RemoteDependencyData", i }(AI.RemoteDependencyData); t.RemoteDependencyData = n }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { var n = function () { function n(e) { this.currentWindowHost = window.location.host && window.location.host.toLowerCase(), this.appInsights = e, this.initialized = !1, this.Init() } return n.prototype.Init = function () { this.supportsMonitoring() && (this.instrumentOpen(), this.instrumentSend(), this.instrumentAbort(), this.initialized = !0) }, n.prototype.isMonitoredInstance = function (e, i) { return this.initialized && (!0 === i || !t.extensions.IsNullOrUndefined(e.ajaxData)) && !0 !== e[n.DisabledPropertyName] }, n.prototype.supportsMonitoring = function () { var e = !0; (t.extensions.IsNullOrUndefined(XMLHttpRequest) || t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype) || t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open) || t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send) || t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort)) && (e = !1); try { " a ".trim() } catch (n) { e = !1 } return e }, n.prototype.instrumentOpen = function () { var i = XMLHttpRequest.prototype.open, o = this; XMLHttpRequest.prototype.open = function (a, r, s) { try { !o.isMonitoredInstance(this, !0) || this.ajaxData && this.ajaxData.xhrMonitoringState.openDone || o.openHandler(this, a, r, s) } catch (l) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.FailedMonitorAjaxOpen, "Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.", { ajaxDiagnosticsMessage: n.getFailedAjaxDiagnosticsMessage(this), exception: e.ApplicationInsights.Util.dump(l) }) } return i.apply(this, arguments) } }, n.prototype.openHandler = function (e, n, i, o) { var a = "|" + this.appInsights.context.operation.id + "." + t.Util.newId(), r = new t.ajaxRecord(a); r.method = n, r.requestUrl = i, r.xhrMonitoringState.openDone = !0, e.ajaxData = r, this.attachToOnReadyStateChange(e) }, n.getFailedAjaxDiagnosticsMessage = function (e) { var n = ""; try { t.extensions.IsNullOrUndefined(e) || t.extensions.IsNullOrUndefined(e.ajaxData) || t.extensions.IsNullOrUndefined(e.ajaxData.requestUrl) || (n += "(url: '" + e.ajaxData.requestUrl + "')") } catch (i) { } return n }, n.prototype.instrumentSend = function () { var i = XMLHttpRequest.prototype.send, o = this; XMLHttpRequest.prototype.send = function (a) { try { o.isMonitoredInstance(this) && !this.ajaxData.xhrMonitoringState.sendDone && o.sendHandler(this, a) } catch (r) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.FailedMonitorAjaxSend, "Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.", { ajaxDiagnosticsMessage: n.getFailedAjaxDiagnosticsMessage(this), exception: e.ApplicationInsights.Util.dump(r) }) } return i.apply(this, arguments) } }, n.prototype.sendHandler = function (e, n) { if (e.ajaxData.requestSentTime = t.dateTime.Now(), t.CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config, e.ajaxData.getAbsoluteUrl(), this.currentWindowHost) && (e.setRequestHeader(t.RequestHeaders.requestIdHeader, e.ajaxData.id), this.appInsights.context)) { var i = this.appInsights.context.appId(); i && e.setRequestHeader(t.RequestHeaders.requestContextHeader, t.RequestHeaders.requestContextAppIdFormat + i) } e.ajaxData.xhrMonitoringState.sendDone = !0 }, n.prototype.instrumentAbort = function () { var i = XMLHttpRequest.prototype.abort, o = this; XMLHttpRequest.prototype.abort = function () { try { o.isMonitoredInstance(this) && !this.ajaxData.xhrMonitoringState.abortDone && (this.ajaxData.aborted = 1, this.ajaxData.xhrMonitoringState.abortDone = !0) } catch (a) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.FailedMonitorAjaxAbort, "Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.", { ajaxDiagnosticsMessage: n.getFailedAjaxDiagnosticsMessage(this), exception: e.ApplicationInsights.Util.dump(a) }) } return i.apply(this, arguments) } }, n.prototype.attachToOnReadyStateChange = function (i) { var o = this; i.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached = t.EventHelper.AttachEvent(i, "readystatechange", function () { try { o.isMonitoredInstance(i) && 4 === i.readyState && o.onAjaxComplete(i) } catch (r) { var a = e.ApplicationInsights.Util.dump(r); a && -1 != a.toLowerCase().indexOf("c00c023f") || t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.FailedMonitorAjaxRSC, "Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.", { ajaxDiagnosticsMessage: n.getFailedAjaxDiagnosticsMessage(i), exception: e.ApplicationInsights.Util.dump(r) }) } }) }, n.prototype.onAjaxComplete = function (e) { if (e.ajaxData.responseFinishedTime = t.dateTime.Now(), e.ajaxData.status = e.status, e.ajaxData.CalculateMetrics(), e.ajaxData.ajaxTotalDuration < 0) t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING, t._InternalMessageId.FailedMonitorAjaxDur, "Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.", { ajaxDiagnosticsMessage: n.getFailedAjaxDiagnosticsMessage(e), requestSentTime: e.ajaxData.requestSentTime, responseFinishedTime: e.ajaxData.responseFinishedTime }); else { var i = new t.Telemetry.RemoteDependencyData(e.ajaxData.id, e.ajaxData.getAbsoluteUrl(), e.ajaxData.getPathName(), e.ajaxData.ajaxTotalDuration, +e.ajaxData.status >= 200 && +e.ajaxData.status < 400, +e.ajaxData.status, e.ajaxData.method), o = this.getCorrelationContext(e); o && (i.target = i.target + " | " + o), this.appInsights.trackDependencyData(i), e.ajaxData = null } }, n.prototype.getCorrelationContext = function (i) { try { var o = i.getAllResponseHeaders(); if (null !== o && -1 !== o.toLowerCase().indexOf(t.RequestHeaders.requestContextHeaderLowerCase)) { var a = i.getResponseHeader(t.RequestHeaders.requestContextHeader); return t.CorrelationIdHelper.getCorrelationContext(a) } } catch (r) { t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING, t._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, "Failed to get Request-Context correlation header as it may be not included in the response or not accessible.", { ajaxDiagnosticsMessage: n.getFailedAjaxDiagnosticsMessage(i), exception: e.ApplicationInsights.Util.dump(r) }) } }, n.instrumentedByAppInsightsName = "InstrumentedByAppInsights", n.DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation", n }(); t.AjaxMonitor = n }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { function e(e) { this._config = e, this._buffer = [] } return e.prototype.enqueue = function (e) { this._buffer.push(e) }, e.prototype.count = function () { return this._buffer.length }, e.prototype.clear = function () { this._buffer.length = 0 }, e.prototype.getItems = function () { return this._buffer.slice(0) }, e.prototype.batchPayloads = function (e) { return e && e.length > 0 ? this._config.emitLineDelimitedJson() ? e.join("\n") : "[" + e.join(",") + "]" : null }, e.prototype.markAsSent = function (e) { this.clear() }, e.prototype.clearSent = function (e) { }, e }(); e.ArraySendBuffer = t; var n = function () { function t(e) { this._bufferFullMessageSent = !1, this._config = e; var n = this.getBuffer(t.BUFFER_KEY), i = this.getBuffer(t.SENT_BUFFER_KEY); this._buffer = n.concat(i), this._buffer.length > t.MAX_BUFFER_SIZE && (this._buffer.length = t.MAX_BUFFER_SIZE), this.setBuffer(t.SENT_BUFFER_KEY, []), this.setBuffer(t.BUFFER_KEY, this._buffer) } return t.prototype.enqueue = function (n) { this._buffer.length >= t.MAX_BUFFER_SIZE ? this._bufferFullMessageSent || (e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.SessionStorageBufferFull, "Maximum buffer size reached: " + this._buffer.length, !0), this._bufferFullMessageSent = !0) : (this._buffer.push(n), this.setBuffer(t.BUFFER_KEY, this._buffer)) }, t.prototype.count = function () { return this._buffer.length }, t.prototype.clear = function () { this._buffer.length = 0, this.setBuffer(t.BUFFER_KEY, []), this.setBuffer(t.SENT_BUFFER_KEY, []), this._bufferFullMessageSent = !1 }, t.prototype.getItems = function () { return this._buffer.slice(0) }, t.prototype.batchPayloads = function (e) { return e && e.length > 0 ? this._config.emitLineDelimitedJson() ? e.join("\n") : "[" + e.join(",") + "]" : null }, t.prototype.markAsSent = function (n) { this._buffer = this.removePayloadsFromBuffer(n, this._buffer), this.setBuffer(t.BUFFER_KEY, this._buffer); var i = this.getBuffer(t.SENT_BUFFER_KEY); i instanceof Array && n instanceof Array && ((i = i.concat(n)).length > t.MAX_BUFFER_SIZE && (e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.SessionStorageBufferFull, "Sent buffer reached its maximum size: " + i.length, !0), i.length = t.MAX_BUFFER_SIZE), this.setBuffer(t.SENT_BUFFER_KEY, i)) }, t.prototype.clearSent = function (e) { var n = this.getBuffer(t.SENT_BUFFER_KEY); n = this.removePayloadsFromBuffer(e, n), this.setBuffer(t.SENT_BUFFER_KEY, n) }, t.prototype.removePayloadsFromBuffer = function (e, t) { var n = []; for (var i in t) { var o = !1; for (var a in e) if (e[a] === t[i]) { o = !0; break } o || n.push(t[i]) } return n }, t.prototype.getBuffer = function (t) { try { var n = e.Util.getSessionStorage(t); if (n) { var i = JSON.parse(n); if (i) return i } } catch (o) { e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.FailedToRestoreStorageBuffer, " storage key: " + t + ", " + e.Util.getExceptionName(o), { exception: e.Util.dump(o) }) } return [] }, t.prototype.setBuffer = function (t, n) { try { var i = JSON.stringify(n); e.Util.setSessionStorage(t, i) } catch (o) { e.Util.setSessionStorage(t, JSON.stringify([])), e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.FailedToSetStorageBuffer, " storage key: " + t + ", " + e.Util.getExceptionName(o) + ". Buffer cleared", { exception: e.Util.dump(o) }) } }, t.BUFFER_KEY = "AI_buffer", t.SENT_BUFFER_KEY = "AI_sentBuffer", t.MAX_BUFFER_SIZE = 2e3, t }(); e.SessionStorageSendBuffer = n }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { function t(t) { this._XMLHttpRequestSupported = !1, this._consecutiveErrors = 0, this._retryAt = null, this._lastSend = 0, this._config = t, this._sender = null, this._buffer = e.Util.canUseSessionStorage() && this._config.enableSessionStorageBuffer() ? new e.SessionStorageSendBuffer(t) : new e.ArraySendBuffer(t), !this._config.isBeaconApiDisabled() && e.Util.IsBeaconApiSupported() ? this._sender = this._beaconSender : "undefined" != typeof XMLHttpRequest && ("withCredentials" in new XMLHttpRequest ? (this._sender = this._xhrSender, this._XMLHttpRequestSupported = !0) : "undefined" != typeof XDomainRequest && (this._sender = this._xdrSender)) } return t.prototype.send = function (t) { try { if (this._config.disableTelemetry()) return; if (!t) return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.CannotSendEmptyTelemetry, "Cannot send empty telemetry"); if (!this._sender) return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.SenderNotInitialized, "Sender was not initialized"); var n = e.Serializer.serialize(t), i = this._buffer.getItems(), o = this._buffer.batchPayloads(i); o && o.length + n.length > this._config.maxBatchSizeInBytes() && this.triggerSend(), this._buffer.enqueue(n), this._setupTimer() } catch (a) { e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.FailedAddingTelemetryToBuffer, "Failed adding telemetry to the sender's buffer, some telemetry will be lost: " + e.Util.getExceptionName(a), { exception: e.Util.dump(a) }) } }, t.prototype._setupTimer = function () { var e = this; if (!this._timeoutHandle) { var t = this._retryAt ? Math.max(0, this._retryAt - Date.now()) : 0, n = Math.max(this._config.maxBatchInterval(), t); this._timeoutHandle = setTimeout(function () { e.triggerSend() }, n) } }, t.prototype._getSizeInBytes = function (e) { var t = 0; if (e && e.length) for (var n = 0; n < e.length; n++) { var i = e[n]; i && i.length && (t += i.length) } return t }, t.prototype.triggerSend = function (t) { void 0 === t && (t = !0); try { if (this._config.disableTelemetry()) this._buffer.clear(); else { if (this._buffer.count() > 0) { var n = this._buffer.getItems(); this._sender(n, t) } this._lastSend = +new Date } clearTimeout(this._timeoutHandle), this._timeoutHandle = null, this._retryAt = null } catch (i) { (!e.Util.getIEVersion() || e.Util.getIEVersion() > 9) && e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.TransmissionFailed, "Telemetry transmission failed, some telemetry will be lost: " + e.Util.getExceptionName(i), { exception: e.Util.dump(i) }) } }, t.prototype._setRetryTime = function () { var e; if (this._consecutiveErrors <= 1) e = 10; else { var t = (Math.pow(2, this._consecutiveErrors) - 1) / 2, n = Math.floor(Math.random() * t * 10) + 1; e = Math.max(Math.min(n, 3600), 10) } var i = Date.now() + 1e3 * e; this._retryAt = i }, t.prototype._parseResponse = function (t) { try { if (t && "" !== t) { var n = JSON.parse(t); if (n && n.itemsReceived && n.itemsReceived >= n.itemsAccepted && n.itemsReceived - n.itemsAccepted == n.errors.length) return n } } catch (i) { e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.InvalidBackendResponse, "Cannot parse the response. " + e.Util.getExceptionName(i), { response: t }) } return null }, t.prototype._isRetriable = function (e) { return 408 == e || 429 == e || 500 == e || 503 == e }, t.prototype._resendPayload = function (e) { if (e && 0 !== e.length) { this._buffer.clearSent(e), this._consecutiveErrors++; for (var t = 0, n = e; t < n.length; t++) { var i = n[t]; this._buffer.enqueue(i) } this._setRetryTime(), this._setupTimer() } }, t.prototype._formatErrorMessageXhr = function (e, t) { return e ? "XMLHttpRequest,Status:" + e.status + ",Response:" + e.responseText || e.response || "" : t }, t.prototype._formatErrorMessageXdr = function (e, t) { return e ? "XDomainRequest,Response:" + e.responseText || "" : t }, t.prototype._xhrSender = function (t, n) { var i = this, o = new XMLHttpRequest; o[e.AjaxMonitor.DisabledPropertyName] = !0, o.open("POST", this._config.endpointUrl(), n), o.setRequestHeader("Content-type", "application/json"), e.Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl()) && o.setRequestHeader(e.RequestHeaders.sdkContextHeader, e.RequestHeaders.sdkContextHeaderAppIdRequest), o.onreadystatechange = function () { return i._xhrReadyStateChange(o, t, t.length) }, o.onerror = function (e) { return i._onError(t, i._formatErrorMessageXhr(o), e) }; var a = this._buffer.batchPayloads(t); o.send(a), this._buffer.markAsSent(t) }, t.prototype._xdrSender = function (t, n) { var i = this, o = new XDomainRequest; o.onload = function () { return i._xdrOnLoad(o, t) }, o.onerror = function (e) { return i._onError(t, i._formatErrorMessageXdr(o), e) }; var a = window.location.protocol; if (0 !== this._config.endpointUrl().lastIndexOf(a, 0)) return e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.TransmissionFailed, ". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."), void this._buffer.clear(); var r = this._config.endpointUrl().replace(/^(https?:)/, ""); o.open("POST", r); var s = this._buffer.batchPayloads(t); o.send(s), this._buffer.markAsSent(t) }, t.prototype._beaconSender = function (t, n) { var i = this._config.endpointUrl(), o = this._buffer.batchPayloads(t), a = new Blob([o], { type: "text/plain;charset=UTF-8" }); navigator.sendBeacon(i, a) ? this._buffer.markAsSent(t) : e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.TransmissionFailed, ". Failed to send telemetry with Beacon API.") }, t.prototype._xhrReadyStateChange = function (t, n, i) { if (4 === t.readyState) { var o = null; this._appId || (o = this._parseResponse(t.responseText || t.response)) && o.appId && (this._appId = o.appId), (t.status < 200 || t.status >= 300) && 0 !== t.status ? !this._config.isRetryDisabled() && this._isRetriable(t.status) ? (this._resendPayload(n), e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.TransmissionFailed, ". Response code " + t.status + ". Will retry to send " + n.length + " items.")) : this._onError(n, this._formatErrorMessageXhr(t)) : 206 === t.status ? (o || (o = this._parseResponse(t.responseText || t.response)), o && !this._config.isRetryDisabled() ? this._onPartialSuccess(n, o) : this._onError(n, this._formatErrorMessageXhr(t))) : (this._consecutiveErrors = 0, this._onSuccess(n, i)) } }, t.prototype._xdrOnLoad = function (e, t) { if (!e || e.responseText + "" != "200" && "" !== e.responseText) { var n = this._parseResponse(e.responseText); n && n.itemsReceived && n.itemsReceived > n.itemsAccepted && !this._config.isRetryDisabled() ? this._onPartialSuccess(t, n) : this._onError(t, this._formatErrorMessageXdr(e)) } else this._consecutiveErrors = 0, this._onSuccess(t, 0) }, t.prototype._onPartialSuccess = function (t, n) { for (var i = [], o = [], a = 0, r = n.errors.reverse(); a < r.length; a++) { var s = r[a], l = t.splice(s.index, 1)[0]; this._isRetriable(s.statusCode) ? o.push(l) : i.push(l) } t.length > 0 && this._onSuccess(t, n.itemsAccepted), i.length > 0 && this._onError(i, this._formatErrorMessageXhr(null, ["partial success", n.itemsAccepted, "of", n.itemsReceived].join(" "))), o.length > 0 && (this._resendPayload(o), e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.TransmissionFailed, "Partial success. Delivered: " + t.length + ", Failed: " + i.length + ". Will retry to send " + o.length + " our of " + n.itemsReceived + " items")) }, t.prototype._onError = function (t, n, i) { e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.OnError, "Failed to send telemetry.", { message: n }), this._buffer.clearSent(t) }, t.prototype._onSuccess = function (e, t) { this._buffer.clearSent(e) }, t.MaxBeaconPayloadSize = 65536, t }(); e.Sender = t }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var AI; !function (e) { var t = function (e) { function t() { var t = e.call(this) || this; return t.ver = 2, t.properties = {}, t } return __extends(t, e), t }(Microsoft.Telemetry.Domain); e.MessageData = t }(AI || (AI = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function (n) { function i(i, o, a) { var r = n.call(this) || this; return r.aiDataContract = { ver: e.FieldType.Required, message: e.FieldType.Required, severityLevel: e.FieldType.Default, properties: e.FieldType.Default }, i = i || e.Util.NotSpecified, r.message = t.Common.DataSanitizer.sanitizeMessage(i), r.properties = t.Common.DataSanitizer.sanitizeProperties(o), a && (r.severityLevel = a), r } return __extends(i, n), i.envelopeType = "Microsoft.ApplicationInsights.{0}.Message", i.dataType = "MessageData", i }(AI.MessageData); t.Trace = n }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function (t) { function n(n, i, o) { var a = t.call(this) || this; return a.aiDataContract = { ver: e.FieldType.Required, name: e.FieldType.Required, properties: e.FieldType.Default, measurements: e.FieldType.Default }, a.name = e.Telemetry.Common.DataSanitizer.sanitizeString(n) || e.Util.NotSpecified, a.properties = e.Telemetry.Common.DataSanitizer.sanitizeProperties(i), a.measurements = e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o), a } return __extends(n, t), n.envelopeType = "Microsoft.ApplicationInsights.{0}.Event", n.dataType = "EventData", n }(AI.EventData); t.Event = n }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var AI; !function (e) { var t = function () { return function () { this.hasFullStack = !0, this.parsedStack = [] } }(); e.ExceptionDetails = t }(AI || (AI = {})); var AI; !function (e) { var t = function (e) { function t() { var t = e.call(this) || this; return t.ver = 2, t.exceptions = [], t.properties = {}, t.measurements = {}, t } return __extends(t, e), t }(Microsoft.Telemetry.Domain); e.ExceptionData = t }(AI || (AI = {})); var AI; !function (e) { var t = function () { return function () { } }(); e.StackFrame = t }(AI || (AI = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function (t) { function n(n, o, a, r) { var s = t.call(this) || this; return s.aiDataContract = { ver: e.FieldType.Required, exceptions: e.FieldType.Required, severityLevel: e.FieldType.Default, properties: e.FieldType.Default, measurements: e.FieldType.Default }, s.properties = e.Telemetry.Common.DataSanitizer.sanitizeProperties(o), s.measurements = e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(a), s.exceptions = [new i(n)], r && (s.severityLevel = r), s } return __extends(n, t), n.CreateSimpleException = function (e, t, n, i, o, a) { return { exceptions: [{ hasFullStack: !0, message: e, stack: o, typeName: t }] } }, n.envelopeType = "Microsoft.ApplicationInsights.{0}.Exception", n.dataType = "ExceptionData", n }(AI.ExceptionData); t.Exception = n; var i = function (n) { function i(i) { var o = n.call(this) || this; o.aiDataContract = { id: e.FieldType.Default, outerId: e.FieldType.Default, typeName: e.FieldType.Required, message: e.FieldType.Required, hasFullStack: e.FieldType.Default, stack: e.FieldType.Default, parsedStack: e.FieldType.Array }, o.typeName = t.Common.DataSanitizer.sanitizeString(i.name) || e.Util.NotSpecified, o.message = t.Common.DataSanitizer.sanitizeMessage(i.message) || e.Util.NotSpecified; var a = i.stack; return o.parsedStack = o.parseStack(a), o.stack = t.Common.DataSanitizer.sanitizeException(a), o.hasFullStack = e.Util.isArray(o.parsedStack) && o.parsedStack.length > 0, o } return __extends(i, n), i.prototype.parseStack = function (e) { var t = undefined; if ("string" == typeof e) { var n = e.split("\n"); t = []; for (var i = 0, a = 0, r = 0; r <= n.length; r++) { var s = n[r]; if (o.regex.test(s)) { var l = new o(n[r], i++); a += l.sizeInBytes, t.push(l) } } if (a > 32768) for (var c = 0, u = t.length - 1, g = 0, p = c, d = u; c < u;) { if ((g += t[c].sizeInBytes + t[u].sizeInBytes) > 32768) { var f = d - p + 1; t.splice(p, f); break } p = c, d = u, c++ , u-- } } return t }, i }(AI.ExceptionDetails), o = function (t) { function n(i, o) { var a = t.call(this) || this; a.sizeInBytes = 0, a.aiDataContract = { level: e.FieldType.Required, method: e.FieldType.Required, assembly: e.FieldType.Default, fileName: e.FieldType.Default, line: e.FieldType.Default }, a.level = o, a.method = "<no_method>", a.assembly = e.Util.trim(i); var r = i.match(n.regex); return r && r.length >= 5 && (a.method = e.Util.trim(r[2]) || a.method, a.fileName = e.Util.trim(r[4]), a.line = parseInt(r[5]) || 0), a.sizeInBytes += a.method.length, a.sizeInBytes += a.fileName.length, a.sizeInBytes += a.assembly.length, a.sizeInBytes += n.baseSize, a.sizeInBytes += a.level.toString().length, a.sizeInBytes += a.line.toString().length, a } return __extends(n, t), n.regex = /^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/, n.baseSize = 58, n }(AI.StackFrame); t._StackFrame = o }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var AI; !function (e) { !function (e) { e[e.Measurement = 0] = "Measurement", e[e.Aggregation = 1] = "Aggregation" }(e.DataPointType || (e.DataPointType = {})) }(AI || (AI = {})); var AI; !function (e) { var t = function () { return function () { this.kind = e.DataPointType.Measurement } }(); e.DataPoint = t }(AI || (AI = {})); var AI; !function (e) { var t = function (e) { function t() { var t = e.call(this) || this; return t.ver = 2, t.metrics = [], t.properties = {}, t } return __extends(t, e), t }(Microsoft.Telemetry.Domain); e.MetricData = t }(AI || (AI = {})); var Microsoft; !function (e) { !function (e) { !function (t) { !function (t) { var n = function (t) { function n() { var n = null !== t && t.apply(this, arguments) || this; return n.aiDataContract = { name: e.FieldType.Required, kind: e.FieldType.Default, value: e.FieldType.Required, count: e.FieldType.Default, min: e.FieldType.Default, max: e.FieldType.Default, stdDev: e.FieldType.Default }, n } return __extends(n, t), n }(AI.DataPoint); t.DataPoint = n }(t.Common || (t.Common = {})) }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { !function (n) { var i = function (i) { function o(o, a, r, s, l, c) { var u = i.call(this) || this; u.aiDataContract = { ver: t.FieldType.Required, metrics: t.FieldType.Required, properties: t.FieldType.Default }; var g = new e.ApplicationInsights.Telemetry.Common.DataPoint; return g.count = r > 0 ? r : undefined, g.max = isNaN(l) || null === l ? undefined : l, g.min = isNaN(s) || null === s ? undefined : s, g.name = n.Common.DataSanitizer.sanitizeString(o) || t.Util.NotSpecified, g.value = a, u.metrics = [g], u.properties = t.Telemetry.Common.DataSanitizer.sanitizeProperties(c), u } return __extends(o, i), o.envelopeType = "Microsoft.ApplicationInsights.{0}.Metric", o.dataType = "MetricData", o }(AI.MetricData); n.Metric = i }(t.Telemetry || (t.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function (n) { function i(i, o, a, r, s, l) { var c = n.call(this) || this; return c.aiDataContract = { ver: e.FieldType.Required, name: e.FieldType.Default, url: e.FieldType.Default, duration: e.FieldType.Default, properties: e.FieldType.Default, measurements: e.FieldType.Default, id: e.FieldType.Default }, c.id = t.Common.DataSanitizer.sanitizeId(l), c.url = t.Common.DataSanitizer.sanitizeUrl(o), c.name = t.Common.DataSanitizer.sanitizeString(i) || e.Util.NotSpecified, isNaN(a) || (c.duration = e.Util.msToTimeSpan(a)), c.properties = e.Telemetry.Common.DataSanitizer.sanitizeProperties(r), c.measurements = e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(s), c } return __extends(i, n), i.envelopeType = "Microsoft.ApplicationInsights.{0}.Pageview", i.dataType = "PageviewData", i }(AI.PageViewData); t.PageView = n }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var AI; !function (e) { var t = function (e) { function t() { var t = e.call(this) || this; return t.ver = 2, t.properties = {}, t.measurements = {}, t } return __extends(t, e), t }(e.PageViewData); e.PageViewPerfData = t }(AI || (AI = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function (n) { function i(o, a, r, s, l) { var c = n.call(this) || this; c.aiDataContract = { ver: e.FieldType.Required, name: e.FieldType.Default, url: e.FieldType.Default, duration: e.FieldType.Default, perfTotal: e.FieldType.Default, networkConnect: e.FieldType.Default, sentRequest: e.FieldType.Default, receivedResponse: e.FieldType.Default, domProcessing: e.FieldType.Default, properties: e.FieldType.Default, measurements: e.FieldType.Default }, c.isValid = !1; var u = i.getPerformanceTiming(); if (u) { var g = i.getDuration(u.navigationStart, u.loadEventEnd), p = i.getDuration(u.navigationStart, u.connectEnd), d = i.getDuration(u.requestStart, u.responseStart), f = i.getDuration(u.responseStart, u.responseEnd), h = i.getDuration(u.responseEnd, u.loadEventEnd); 0 == g ? e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.ErrorPVCalc, "error calculating page view performance.", { total: g, network: p, request: d, response: f, dom: h }) : i.shouldCollectDuration(g, p, d, f, h) ? g < Math.floor(p) + Math.floor(d) + Math.floor(f) + Math.floor(h) ? e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.ClientPerformanceMathError, "client performance math error.", { total: g, network: p, request: d, response: f, dom: h }) : (c.durationMs = g, c.perfTotal = c.duration = e.Util.msToTimeSpan(g), c.networkConnect = e.Util.msToTimeSpan(p), c.sentRequest = e.Util.msToTimeSpan(d), c.receivedResponse = e.Util.msToTimeSpan(f), c.domProcessing = e.Util.msToTimeSpan(h), c.isValid = !0) : e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.InvalidDurationValue, "Invalid page load duration value. Browser perf data won't be sent.", { total: g, network: p, request: d, response: f, dom: h }) } return c.url = t.Common.DataSanitizer.sanitizeUrl(a), c.name = t.Common.DataSanitizer.sanitizeString(o) || e.Util.NotSpecified, c.properties = e.Telemetry.Common.DataSanitizer.sanitizeProperties(s), c.measurements = e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(l), c } return __extends(i, n), i.prototype.getIsValid = function () { return this.isValid }, i.prototype.getDurationMs = function () { return this.durationMs }, i.getPerformanceTiming = function () { return i.isPerformanceTimingSupported() ? window.performance.timing : null }, i.isPerformanceTimingSupported = function () { return "undefined" != typeof window && window.performance && window.performance.timing }, i.isPerformanceTimingDataReady = function () { var e = window.performance.timing; return e.domainLookupStart > 0 && e.navigationStart > 0 && e.responseStart > 0 && e.requestStart > 0 && e.loadEventEnd > 0 && e.responseEnd > 0 && e.connectEnd > 0 && e.domLoading > 0 }, i.getDuration = function (e, t) { var n = undefined; return isNaN(e) || isNaN(t) || (n = Math.max(t - e, 0)), n }, i.shouldCollectDuration = function () { for (var e = [], t = 0; t < arguments.length; t++)e[t] = arguments[t]; var n = ["googlebot", "adsbot-google", "apis-google", "mediapartners-google"], o = navigator.userAgent, a = !1; if (o) for (var r = 0; r < n.length; r++)a = a || -1 !== o.toLowerCase().indexOf(n[r]); if (a) return !1; for (var s = 0; s < e.length; s++)if (e[s] >= i.MAX_DURATION_ALLOWED) return !1; return !0 }, i.envelopeType = "Microsoft.ApplicationInsights.{0}.PageviewPerformance", i.dataType = "PageviewPerformanceData", i.MAX_DURATION_ALLOWED = 36e5, i }(AI.PageViewPerfData); t.PageViewPerformance = n }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { var n = function () { function n(e) { var n = this; this._config = e, this._sender = new t.Sender(e), this.appId = function () { return n._sender._appId }, e.appId() && (this._sender._appId = e.appId()), this.telemetryInitializers = [], "undefined" != typeof window && (this._sessionManager = new t.Context._SessionManager(e), this.application = new t.Context.Application, this.device = new t.Context.Device, this.internal = new t.Context.Internal(e), this.location = new t.Context.Location, this.user = new t.Context.User(e), this.operation = new t.Context.Operation, this.session = new t.Context.Session, this.sample = new t.Context.Sample(e.sampleRate())), this._addDefaultTelemetryInitializers() } return n.prototype.addTelemetryInitializer = function (e) { this.telemetryInitializers.push(e) }, n.prototype.track = function (e) { return e ? (e.name === t.Telemetry.PageView.envelopeType && t._InternalLogging.resetInternalMessageCount(), this.session && "string" != typeof this.session.id && this._sessionManager.update(), this._track(e)) : t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.TrackArgumentsNotSpecified, "cannot call .track() with a null or undefined argument", null, !0), e }, n.prototype._addDefaultTelemetryInitializers = function () { if (!this._config.isBrowserLinkTrackingEnabled()) { var t = ["/browserLinkSignalR/", "/__browserLink/"]; this.addTelemetryInitializer(function (n) { if (n.name === e.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType) { var i = n.data; if (i && i.baseData) for (var o = 0; o < t.length; o++)if (i.baseData.name.indexOf(t[o]) >= 0) return !1 } return !0 }) } }, n.prototype._track = function (e) { this.session && ("string" == typeof this.session.id ? this._applySessionContext(e, this.session) : this._applySessionContext(e, this._sessionManager.automaticSession)), this._applyApplicationContext(e, this.application), this._applyDeviceContext(e, this.device), this._applyInternalContext(e, this.internal), this._applyLocationContext(e, this.location), this._applySampleContext(e, this.sample), this._applyUserContext(e, this.user), this._applyOperationContext(e, this.operation), e.iKey = this._config.instrumentationKey(); var n = !1; try { for (var i = this.telemetryInitializers.length, o = 0; o < i; ++o) { var a = this.telemetryInitializers[o]; if (a && !1 === a.apply(null, [e])) { n = !0; break } } } catch (s) { n = !0, t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.TelemetryInitializerFailed, "One of telemetry initializers failed, telemetry item will not be sent: " + t.Util.getExceptionName(s), { exception: t.Util.dump(s) }, !0) } if (!n) if (e.name === t.Telemetry.Metric.envelopeType || this.sample.isSampledIn(e)) { var r = this._config.instrumentationKey().replace(/-/g, ""); e.name = e.name.replace("{0}", r), this._sender.send(e) } else t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING, t._InternalMessageId.TelemetrySampledAndNotSent, "Telemetry is sampled and not sent to the AI service.", { SampleRate: this.sample.sampleRate }, !0); return e }, n.prototype._applyApplicationContext = function (e, t) { if (t) { var n = new AI.ContextTagKeys; "string" == typeof t.ver && (e.tags[n.applicationVersion] = t.ver), "string" == typeof t.build && (e.tags[n.applicationBuild] = t.build) } }, n.prototype._applyDeviceContext = function (e, t) { var n = new AI.ContextTagKeys; t && ("string" == typeof t.id && (e.tags[n.deviceId] = t.id), "string" == typeof t.ip && (e.tags[n.deviceIp] = t.ip), "string" == typeof t.language && (e.tags[n.deviceLanguage] = t.language), "string" == typeof t.locale && (e.tags[n.deviceLocale] = t.locale), "string" == typeof t.model && (e.tags[n.deviceModel] = t.model), "undefined" != typeof t.network && (e.tags[n.deviceNetwork] = t.network), "string" == typeof t.oemName && (e.tags[n.deviceOEMName] = t.oemName), "string" == typeof t.os && (e.tags[n.deviceOS] = t.os), "string" == typeof t.osversion && (e.tags[n.deviceOSVersion] = t.osversion), "string" == typeof t.resolution && (e.tags[n.deviceScreenResolution] = t.resolution), "string" == typeof t.type && (e.tags[n.deviceType] = t.type)) }, n.prototype._applyInternalContext = function (e, t) { if (t) { var n = new AI.ContextTagKeys; "string" == typeof t.agentVersion && (e.tags[n.internalAgentVersion] = t.agentVersion), "string" == typeof t.sdkVersion && (e.tags[n.internalSdkVersion] = t.sdkVersion) } }, n.prototype._applyLocationContext = function (e, t) { if (t) { var n = new AI.ContextTagKeys; "string" == typeof t.ip && (e.tags[n.locationIp] = t.ip) } }, n.prototype._applyOperationContext = function (e, t) { if (t) { var n = new AI.ContextTagKeys; "string" == typeof t.id && (e.tags[n.operationId] = t.id), "string" == typeof t.name && (e.tags[n.operationName] = t.name), "string" == typeof t.parentId && (e.tags[n.operationParentId] = t.parentId), "string" == typeof t.rootId && (e.tags[n.operationRootId] = t.rootId), "string" == typeof t.syntheticSource && (e.tags[n.operationSyntheticSource] = t.syntheticSource) } }, n.prototype._applySampleContext = function (e, t) { t && (e.sampleRate = t.sampleRate) }, n.prototype._applySessionContext = function (e, t) { if (t) { var n = new AI.ContextTagKeys; "string" == typeof t.id && (e.tags[n.sessionId] = t.id), "undefined" != typeof t.isFirst && (e.tags[n.sessionIsFirst] = t.isFirst) } }, n.prototype._applyUserContext = function (e, t) { if (t) { var n = new AI.ContextTagKeys; "string" == typeof t.accountId && (e.tags[n.userAccountId] = t.accountId), "string" == typeof t.agent && (e.tags[n.userAgent] = t.agent), "string" == typeof t.id && (e.tags[n.userId] = t.id), "string" == typeof t.authenticatedId && (e.tags[n.userAuthUserId] = t.authenticatedId), "string" == typeof t.storeRegion && (e.tags[n.userStoreRegion] = t.storeRegion) } }, n }(); t.TelemetryContext = n }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { var n = function (e) { function t() { return e.call(this) || this } return __extends(t, e), t }(e.Telemetry.Base); t.Data = n }(e.Telemetry || (e.Telemetry = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { !function (n) { !function (n) { var i = function (e) { function n(n, i) { var o = e.call(this) || this; return o.aiDataContract = { baseType: t.FieldType.Required, baseData: t.FieldType.Required }, o.baseType = n, o.baseData = i, o } return __extends(n, e), n }(e.Telemetry.Data); n.Data = i }(n.Common || (n.Common = {})) }(t.Telemetry || (t.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function () { function n(e, t) { this.pageViewPerformanceSent = !1, this.overridePageViewDuration = !1, this.overridePageViewDuration = t, this.appInsights = e } return n.prototype.trackPageView = function (n, i, o, a, r) { var s = this; "string" != typeof n && (n = window.document && window.document.title || ""), "string" != typeof i && (i = window.location && window.location.href || ""); var l = !1, c = undefined; if (t.PageViewPerformance.isPerformanceTimingSupported()) { var u = t.PageViewPerformance.getPerformanceTiming().navigationStart; c = t.PageViewPerformance.getDuration(u, +new Date), t.PageViewPerformance.shouldCollectDuration(c) || (c = undefined) } else this.appInsights.sendPageViewInternal(n, i, isNaN(r) ? undefined : r, o, a), this.appInsights.flush(), l = !0; l || !this.overridePageViewDuration && isNaN(r) || (this.appInsights.sendPageViewInternal(n, i, isNaN(r) ? c : r, o, a), this.appInsights.flush(), l = !0); if (t.PageViewPerformance.isPerformanceTimingSupported()) var g = setInterval(function () { try { if (t.PageViewPerformance.isPerformanceTimingDataReady()) { clearInterval(g); var r = new t.PageViewPerformance(n, i, null, o, a); r.getIsValid() || l ? (l || s.appInsights.sendPageViewInternal(n, i, r.getDurationMs(), o, a), s.pageViewPerformanceSent || (s.appInsights.sendPageViewPerformanceInternal(r), s.pageViewPerformanceSent = !0), s.appInsights.flush()) : (s.appInsights.sendPageViewInternal(n, i, c, o, a), s.appInsights.flush()) } else t.PageViewPerformance.getDuration(u, +new Date) > 6e4 && (clearInterval(g), l || (s.appInsights.sendPageViewInternal(n, i, 6e4, o, a), s.appInsights.flush())) } catch (p) { e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.TrackPVFailedCalc, "trackPageView failed on page load calculation: " + e.Util.getExceptionName(p), { exception: e.Util.dump(p) }) } }, 100); else e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING, e._InternalMessageId.NavigationTimingNotSupported, "trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.") }, n }(); t.PageViewManager = n }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { !function (t) { var n = function () { function t(e) { this.prevPageVisitDataKeyName = "prevPageVisitData", this.pageVisitTimeTrackingHandler = e } return t.prototype.trackPreviousPageVisit = function (t, n) { try { var i = this.restartPageVisitTimer(t, n); i && this.pageVisitTimeTrackingHandler(i.pageName, i.pageUrl, i.pageVisitTime) } catch (o) { e._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: " + e.Util.dump(o)) } }, t.prototype.restartPageVisitTimer = function (t, n) { try { var i = this.stopPageVisitTimer(); return this.startPageVisitTimer(t, n), i } catch (o) { return e._InternalLogging.warnToConsole("Call to restart failed: " + e.Util.dump(o)), null } }, t.prototype.startPageVisitTimer = function (t, n) { try { if (e.Util.canUseSessionStorage()) { if (null != e.Util.getSessionStorage(this.prevPageVisitDataKeyName)) throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit"); var o = new i(t, n), a = JSON.stringify(o); e.Util.setSessionStorage(this.prevPageVisitDataKeyName, a) } } catch (r) { e._InternalLogging.warnToConsole("Call to start failed: " + e.Util.dump(r)) } }, t.prototype.stopPageVisitTimer = function () { try { if (e.Util.canUseSessionStorage()) { var t = Date.now(), n = e.Util.getSessionStorage(this.prevPageVisitDataKeyName); if (n) { var i = JSON.parse(n); return i.pageVisitTime = t - i.pageVisitStartTime, e.Util.removeSessionStorage(this.prevPageVisitDataKeyName), i } return null } return null } catch (o) { return e._InternalLogging.warnToConsole("Stop page visit timer failed: " + e.Util.dump(o)), null } }, t }(); t.PageVisitTimeManager = n; var i = function () { return function (e, t) { this.pageVisitStartTime = Date.now(), this.pageName = e, this.pageUrl = t } }(); t.PageVisitData = i }(e.Telemetry || (e.Telemetry = {})) }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { function t() { this.hashCodeGeneragor = new e.HashCodeScoreGenerator } return t.prototype.isEnabled = function (e, t) { return this.hashCodeGeneragor.getHashCodeScore(e) < t }, t }(); e.SplitTest = t }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { t.Version = "1.0.20"; var n = function () { function n(o) { var a = this; this._trackAjaxAttempts = 0, this.config = o || {}; var r = n.defaultConfig; if (r !== undefined) for (var s in r) this.config[s] === undefined && (this.config[s] = r[s]); t._InternalLogging.verboseLogging = function () { return a.config.verboseLogging }, t._InternalLogging.enableDebugExceptions = function () { return a.config.enableDebug }; var l = { instrumentationKey: function () { return a.config.instrumentationKey }, accountId: function () { return a.config.accountId }, sessionRenewalMs: function () { return a.config.sessionRenewalMs }, sessionExpirationMs: function () { return a.config.sessionExpirationMs }, endpointUrl: function () { return a.config.endpointUrl }, emitLineDelimitedJson: function () { return a.config.emitLineDelimitedJson }, maxBatchSizeInBytes: function () { return !a.config.isBeaconApiDisabled && t.Util.IsBeaconApiSupported() ? Math.min(a.config.maxBatchSizeInBytes, t.Sender.MaxBeaconPayloadSize) : a.config.maxBatchSizeInBytes }, maxBatchInterval: function () { return a.config.maxBatchInterval }, disableTelemetry: function () { return a.config.disableTelemetry }, sampleRate: function () { return a.config.samplingPercentage }, cookieDomain: function () { return a.config.cookieDomain }, enableSessionStorageBuffer: function () { return (a.config.isBeaconApiDisabled || !t.Util.IsBeaconApiSupported()) && a.config.enableSessionStorageBuffer }, isRetryDisabled: function () { return a.config.isRetryDisabled }, isBeaconApiDisabled: function () { return a.config.isBeaconApiDisabled }, sdkExtension: function () { return a.config.sdkExtension }, isBrowserLinkTrackingEnabled: function () { return a.config.isBrowserLinkTrackingEnabled }, appId: function () { return a.config.appId } }; this.config.isCookieUseDisabled && t.Util.disableCookies(), this.config.isStorageUseDisabled && t.Util.disableStorage(), this.context = new t.TelemetryContext(l), this._pageViewManager = new e.ApplicationInsights.Telemetry.PageViewManager(this, this.config.overridePageViewDuration), this._eventTracking = new i("trackEvent"), this._eventTracking.action = function (e, n, i, o, r) { r ? isNaN(r.duration) && (r.duration = i) : r = { duration: i }; var s = new t.Telemetry.Event(e, o, r), l = new t.Telemetry.Common.Data(t.Telemetry.Event.dataType, s), c = new t.Telemetry.Common.Envelope(l, t.Telemetry.Event.envelopeType); a.context.track(c) }, this._pageTracking = new i("trackPageView"), this._pageTracking.action = function (e, t, n, i, o) { a.sendPageViewInternal(e, t, n, i, o) }, this._pageVisitTimeManager = new t.Telemetry.PageVisitTimeManager(function (e, t, n) { return a.trackPageVisitTime(e, t, n) }), this.config.disableAjaxTracking || (this._ajaxMonitor = new e.ApplicationInsights.AjaxMonitor(this)) } return n.prototype.sendPageViewInternal = function (e, n, i, o, a) { var r = new t.Telemetry.PageView(e, n, i, o, a, this.context.operation.id), s = new t.Telemetry.Common.Data(t.Telemetry.PageView.dataType, r), l = new t.Telemetry.Common.Envelope(s, t.Telemetry.PageView.envelopeType); this.context.track(l), this._trackAjaxAttempts = 0 }, n.prototype.sendPageViewPerformanceInternal = function (e) { var n = new t.Telemetry.Common.Data(t.Telemetry.PageViewPerformance.dataType, e), i = new t.Telemetry.Common.Envelope(n, t.Telemetry.PageViewPerformance.envelopeType); this.context.track(i) }, n.prototype.startTrackPage = function (e) { try { "string" != typeof e && (e = window.document && window.document.title || ""), this._pageTracking.start(e) } catch (n) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.StartTrackFailed, "startTrackPage failed, page view may not be collected: " + t.Util.getExceptionName(n), { exception: t.Util.dump(n) }) } }, n.prototype.stopTrackPage = function (e, n, i, o) { try { "string" != typeof e && (e = window.document && window.document.title || ""), "string" != typeof n && (n = window.location && window.location.href || ""), this._pageTracking.stop(e, n, i, o), this.config.autoTrackPageVisitTime && this._pageVisitTimeManager.trackPreviousPageVisit(e, n) } catch (a) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.StopTrackFailed, "stopTrackPage failed, page view will not be collected: " + t.Util.getExceptionName(a), { exception: t.Util.dump(a) }) } }, n.prototype.trackPageView = function (e, n, i, o, a) { try { this._pageViewManager.trackPageView(e, n, i, o, a), this.config.autoTrackPageVisitTime && this._pageVisitTimeManager.trackPreviousPageVisit(e, n) } catch (r) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.TrackPVFailed, "trackPageView failed, page view will not be collected: " + t.Util.getExceptionName(r), { exception: t.Util.dump(r) }) } }, n.prototype.startTrackEvent = function (e) { try { this._eventTracking.start(e) } catch (n) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.StartTrackEventFailed, "startTrackEvent failed, event will not be collected: " + t.Util.getExceptionName(n), { exception: t.Util.dump(n) }) } }, n.prototype.stopTrackEvent = function (e, n, i) { try { this._eventTracking.stop(e, undefined, n, i) } catch (o) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.StopTrackEventFailed, "stopTrackEvent failed, event will not be collected: " + t.Util.getExceptionName(o), { exception: t.Util.dump(o) }) } }, n.prototype.trackEvent = function (e, n, i) { try { var o = new t.Telemetry.Event(e, n, i), a = new t.Telemetry.Common.Data(t.Telemetry.Event.dataType, o), r = new t.Telemetry.Common.Envelope(a, t.Telemetry.Event.envelopeType); this.context.track(r) } catch (s) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.TrackEventFailed, "trackEvent failed, event will not be collected: " + t.Util.getExceptionName(s), { exception: t.Util.dump(s) }) } }, n.prototype.trackDependency = function (e, n, i, o, a, r, s, l, c) { if (-1 === this.config.maxAjaxCallsPerView || this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) { var u = new t.Telemetry.RemoteDependencyData(e, i, o, a, r, s, n, l, c), g = new t.Telemetry.Common.Data(t.Telemetry.RemoteDependencyData.dataType, u), p = new t.Telemetry.Common.Envelope(g, t.Telemetry.RemoteDependencyData.envelopeType); this.context.track(p) } else this._trackAjaxAttempts === this.config.maxAjaxCallsPerView && t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.MaxAjaxPerPVExceeded, "Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.", !0); ++this._trackAjaxAttempts }, n.prototype.trackDependencyData = function (e) { if (-1 === this.config.maxAjaxCallsPerView || this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) { var n = new t.Telemetry.Common.Data(t.Telemetry.RemoteDependencyData.dataType, e), i = new t.Telemetry.Common.Envelope(n, t.Telemetry.RemoteDependencyData.envelopeType); this.context.track(i) } else this._trackAjaxAttempts === this.config.maxAjaxCallsPerView && t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.MaxAjaxPerPVExceeded, "Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.", !0); ++this._trackAjaxAttempts }, n.prototype.trackAjax = function (e, t, n, i, o, a, r) { this.trackDependency(e, null, t, n, i, o, a) }, n.prototype.trackException = function (e, n, i, o, a) { try { if (!t.Util.isError(e)) try { throw new Error(e) } catch (c) { e = c } var r = new t.Telemetry.Exception(e, i, o, a), s = new t.Telemetry.Common.Data(t.Telemetry.Exception.dataType, r), l = new t.Telemetry.Common.Envelope(s, t.Telemetry.Exception.envelopeType); this.context.track(l) } catch (u) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.TrackExceptionFailed, "trackException failed, exception will not be collected: " + t.Util.getExceptionName(u), { exception: t.Util.dump(u) }) } }, n.prototype.trackMetric = function (e, n, i, o, a, r) { try { var s = new t.Telemetry.Metric(e, n, i, o, a, r), l = new t.Telemetry.Common.Data(t.Telemetry.Metric.dataType, s), c = new t.Telemetry.Common.Envelope(l, t.Telemetry.Metric.envelopeType); this.context.track(c) } catch (u) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.TrackMetricFailed, "trackMetric failed, metric will not be collected: " + t.Util.getExceptionName(u), { exception: t.Util.dump(u) }) } }, n.prototype.trackTrace = function (e, n, i) { try { var o = new t.Telemetry.Trace(e, n, i), a = new t.Telemetry.Common.Data(t.Telemetry.Trace.dataType, o), r = new t.Telemetry.Common.Envelope(a, t.Telemetry.Trace.envelopeType); this.context.track(r) } catch (s) { t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING, t._InternalMessageId.TrackTraceFailed, "trackTrace failed, trace will not be collected: " + t.Util.getExceptionName(s), { exception: t.Util.dump(s) }) } }, n.prototype.trackPageVisitTime = function (e, t, n) { var i = { PageName: e, PageUrl: t }; this.trackMetric("PageVisitTime", n, 1, n, n, i) }, n.prototype.flush = function (e) { void 0 === e && (e = !0); try { this.context._sender.triggerSend(e) } catch (n) { t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.FlushFailed, "flush failed, telemetry will not be collected: " + t.Util.getExceptionName(n), { exception: t.Util.dump(n) }) } }, n.prototype.setAuthenticatedUserContext = function (e, n, i) { void 0 === i && (i = !1); try { this.context.user.setAuthenticatedUserContext(e, n, i) } catch (o) { t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING, t._InternalMessageId.SetAuthContextFailed, "Setting auth user context failed. " + t.Util.getExceptionName(o), { exception: t.Util.dump(o) }, !0) } }, n.prototype.clearAuthenticatedUserContext = function () { try { this.context.user.clearAuthenticatedUserContext() } catch (e) { t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING, t._InternalMessageId.SetAuthContextFailed, "Clearing auth user context failed. " + t.Util.getExceptionName(e), { exception: t.Util.dump(e) }, !0) } }, n.prototype.SendCORSException = function (n) { var i = e.ApplicationInsights.Telemetry.Exception.CreateSimpleException("Script error.", "Error", "unknown", "unknown", "The browser's same-origin policy prevents us from getting the details of this exception. Consider using 'crossorigin' attribute.", 0); i.properties = n; var o = new t.Telemetry.Common.Data(t.Telemetry.Exception.dataType, i), a = new t.Telemetry.Common.Envelope(o, t.Telemetry.Exception.envelopeType); this.context.track(a) }, n.prototype._onerror = function (e, n, i, o, a) { try { var r = { url: n || document.URL }; if (t.Util.isCrossOriginError(e, n, i, o, a)) this.SendCORSException(r); else { if (!t.Util.isError(a)) { var s = "window.onerror@" + r.url + ":" + i + ":" + (o || 0); (a = new Error(e)).stack = s } this.trackException(a, null, r) } } catch (u) { var l = a ? a.name + ", " + a.message : "null", c = t.Util.dump(u); t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL, t._InternalMessageId.ExceptionWhileLoggingError, "_onerror threw exception while logging error, error will not be collected: " + t.Util.getExceptionName(u), { exception: c, errorString: l }) } }, n }(); t.AppInsights = n; var i = function () { function e(e) { this._name = e, this._events = {} } return e.prototype.start = function (e) { "undefined" != typeof this._events[e] && t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING, t._InternalMessageId.StartCalledMoreThanOnce, "start was called more than once for this event without calling stop.", { name: this._name, key: e }, !0), this._events[e] = +new Date }, e.prototype.stop = function (e, n, i, o) { var a = this._events[e]; if (isNaN(a)) t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING, t._InternalMessageId.StopCalledWithoutStart, "stop was called without a corresponding start.", { name: this._name, key: e }, !0); else { var r = +new Date, s = t.Telemetry.PageViewPerformance.getDuration(a, r); this.action(e, n, s, i, o) } delete this._events[e], this._events[e] = undefined }, e }() }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (e) { var t = function () { function t() { } return t.reset = function () { t.isEnabled() && (e.Util.setSessionStorage(t.ITEMS_QUEUED_KEY, "0"), e.Util.setSessionStorage(t.ISSUES_REPORTED_KEY, "0"), t.itemsRestoredFromSessionBuffer = 0) }, t.isEnabled = function () { return t.enabled && null != t.appInsights && t.appInsights.context._sender._XMLHttpRequestSupported && e.Util.canUseSessionStorage() }, t.getIssuesReported = function () { return !t.isEnabled() || isNaN(+e.Util.getSessionStorage(t.ISSUES_REPORTED_KEY)) ? 0 : +e.Util.getSessionStorage(t.ISSUES_REPORTED_KEY) }, t.incrementItemsQueued = function () { try { if (t.isEnabled()) { var n = t.getNumberOfLostItems(); ++n, e.Util.setSessionStorage(t.ITEMS_QUEUED_KEY, n.toString()) } } catch (i) { } }, t.decrementItemsQueued = function (n) { try { if (t.isEnabled()) { var i = t.getNumberOfLostItems(); (i -= n) < 0 && (i = 0), e.Util.setSessionStorage(t.ITEMS_QUEUED_KEY, i.toString()) } } catch (o) { } }, t.getNumberOfLostItems = function () { var n = 0; try { t.isEnabled() && (n = isNaN(+e.Util.getSessionStorage(t.ITEMS_QUEUED_KEY)) ? 0 : +e.Util.getSessionStorage(t.ITEMS_QUEUED_KEY)) } catch (i) { n = 0 } return n }, t.reportLostItems = function () { try { if (t.isEnabled() && t.getIssuesReported() < t.LIMIT_PER_SESSION && t.getNumberOfLostItems() > 0) { var n = t.getNumberOfLostItems() - t.itemsRestoredFromSessionBuffer; t.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"' + n + '"', null), t.appInsights.flush(); var i = t.getIssuesReported(); ++i, e.Util.setSessionStorage(t.ISSUES_REPORTED_KEY, i.toString()) } } catch (o) { e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL, e._InternalMessageId.FailedToReportDataLoss, "Failed to report data loss: " + e.Util.getExceptionName(o), { exception: e.Util.dump(o) }) } finally { try { t.reset() } catch (o) { } } }, t.enabled = !1, t.itemsRestoredFromSessionBuffer = 0, t.LIMIT_PER_SESSION = 10, t.ITEMS_QUEUED_KEY = "AI_itemsQueued", t.ISSUES_REPORTED_KEY = "AI_lossIssuesReported", t }(); e.DataLossAnalyzer = t }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { var n = function () { function n(t) { t.queue = t.queue || []; var i = t.config || {}; if (i && !i.instrumentationKey) if ((i = t).iKey) e.ApplicationInsights.Version = "0.10.0.0", i.instrumentationKey = i.iKey; else { if (!i.applicationInsightsId) throw new Error("Cannot load Application Insights SDK, no instrumentationKey was provided."); e.ApplicationInsights.Version = "0.7.2.0", i.instrumentationKey = i.applicationInsightsId } i = n.getDefaultConfig(i), this.snippet = t, this.config = i } return n.prototype.loadAppInsights = function () { var t = new e.ApplicationInsights.AppInsights(this.config); if (this.config.iKey) { var n = t.trackPageView; t.trackPageView = function (e, i, o) { n.apply(t, [null, e, i, o]) } } "function" == typeof this.snippet.logPageView && (t.logPageView = function (e, n, i) { t.trackPageView(null, e, n, i) }); return "function" == typeof this.snippet.logEvent && (t.logEvent = function (e, n, i) { t.trackEvent(e, n, i) }), t }, n.prototype.emptyQueue = function () { try { if (e.ApplicationInsights.Util.isArray(this.snippet.queue)) { for (var n = this.snippet.queue.length, i = 0; i < n; i++)(0, this.snippet.queue[i])(); this.snippet.queue = undefined, delete this.snippet.queue } } catch (a) { var o = {}; a && "function" == typeof a.toString && (o.exception = a.toString()), e.ApplicationInsights._InternalLogging.throwInternal(t.LoggingSeverity.WARNING, t._InternalMessageId.FailedToSendQueuedTelemetry, "Failed to send queued telemetry", o) } }, n.prototype.pollInteralLogs = function (t) { return setInterval(function () { for (var n = e.ApplicationInsights._InternalLogging.queue, i = n.length, o = 0; o < i; o++)t.trackTrace(n[o].message); n.length = 0 }, this.config.diagnosticLogInterval) }, n.prototype.addHousekeepingBeforeUnload = function (t) { if (!t.config.disableFlushOnBeforeUnload && "onbeforeunload" in window) { e.ApplicationInsights.Util.addEventHandler("beforeunload", function () { t.context._sender.triggerSend(), t.context._sessionManager.backup() }) || e.ApplicationInsights._InternalLogging.throwInternal(e.ApplicationInsights.LoggingSeverity.CRITICAL, e.ApplicationInsights._InternalMessageId.FailedToAddHandlerForOnBeforeUnload, "Could not add handler for beforeunload") } }, n.getDefaultConfig = function (e) { return e || (e = {}), e.endpointUrl = e.endpointUrl || "https://dc.services.visualstudio.com/v2/track", e.sessionRenewalMs = 18e5, e.sessionExpirationMs = 864e5, e.maxBatchSizeInBytes = e.maxBatchSizeInBytes > 0 ? e.maxBatchSizeInBytes : 102400, e.maxBatchInterval = isNaN(e.maxBatchInterval) ? 15e3 : e.maxBatchInterval, e.enableDebug = t.Util.stringToBoolOrDefault(e.enableDebug), e.disableExceptionTracking = t.Util.stringToBoolOrDefault(e.disableExceptionTracking), e.disableTelemetry = t.Util.stringToBoolOrDefault(e.disableTelemetry), e.verboseLogging = t.Util.stringToBoolOrDefault(e.verboseLogging), e.emitLineDelimitedJson = t.Util.stringToBoolOrDefault(e.emitLineDelimitedJson), e.diagnosticLogInterval = e.diagnosticLogInterval || 1e4, e.autoTrackPageVisitTime = t.Util.stringToBoolOrDefault(e.autoTrackPageVisitTime), (isNaN(e.samplingPercentage) || e.samplingPercentage <= 0 || e.samplingPercentage >= 100) && (e.samplingPercentage = 100), e.disableAjaxTracking = t.Util.stringToBoolOrDefault(e.disableAjaxTracking), e.maxAjaxCallsPerView = isNaN(e.maxAjaxCallsPerView) ? 500 : e.maxAjaxCallsPerView, e.isBeaconApiDisabled = t.Util.stringToBoolOrDefault(e.isBeaconApiDisabled, !0), e.disableCorrelationHeaders = t.Util.stringToBoolOrDefault(e.disableCorrelationHeaders), e.correlationHeaderExcludedDomains = e.correlationHeaderExcludedDomains || ["*.blob.core.windows.net", "*.blob.core.chinacloudapi.cn", "*.blob.core.cloudapi.de", "*.blob.core.usgovcloudapi.net"], e.disableFlushOnBeforeUnload = t.Util.stringToBoolOrDefault(e.disableFlushOnBeforeUnload), e.enableSessionStorageBuffer = t.Util.stringToBoolOrDefault(e.enableSessionStorageBuffer, !0), e.isRetryDisabled = t.Util.stringToBoolOrDefault(e.isRetryDisabled), e.isCookieUseDisabled = t.Util.stringToBoolOrDefault(e.isCookieUseDisabled), e.isStorageUseDisabled = t.Util.stringToBoolOrDefault(e.isStorageUseDisabled), e.isBrowserLinkTrackingEnabled = t.Util.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled), e.enableCorsCorrelation = t.Util.stringToBoolOrDefault(e.enableCorsCorrelation), e }, n }(); t.Initialization = n }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {})); var Microsoft; !function (e) { !function (t) { try { if ("undefined" != typeof window && "undefined" != typeof JSON) { if (window.appInsights === undefined) e.ApplicationInsights.AppInsights.defaultConfig = e.ApplicationInsights.Initialization.getDefaultConfig(); else { var n = window.appInsights || {}, i = new e.ApplicationInsights.Initialization(n), o = i.loadAppInsights(); for (var a in o) n[a] = o[a]; i.emptyQueue(), i.pollInteralLogs(o), i.addHousekeepingBeforeUnload(o) } } } catch (r) { e.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: " + r.message) } }(e.ApplicationInsights || (e.ApplicationInsights = {})) }(Microsoft || (Microsoft = {}));;
!function(e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);this.CodeMirror=e()}}(function(){"use strict";function e(r,n){if(!(this instanceof e))return new e(r,n);this.options=n=n?Io(n):{},Io(_l,n,!1),d(n);var i=n.value;"string"==typeof i&&(i=new ms(i,n.mode)),this.doc=i;var o=new e.inputStyles[n.inputStyle](this),l=this.display=new t(r,i,o);l.wrapper.CodeMirror=this,u(this),s(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),n.autofocus&&!Sl&&l.input.focus(),m(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new To,keySeq:null,specialChars:null};var a=this;dl&&11>pl&&setTimeout(function(){a.display.input.reset(!0)},20),Br(this),Xo(),yr(this),this.curOp.forceUpdate=!0,Xi(this,i),n.autofocus&&!Sl||a.hasFocus()?setTimeout(Po(dn,this),20):pn(this);for(var c in Yl)Yl.hasOwnProperty(c)&&Yl[c](this,n[c],$l);C(this),n.finishInit&&n.finishInit(this);for(var f=0;f<Jl.length;++f)Jl[f](this);wr(this),gl&&n.lineWrapping&&"optimizelegibility"==getComputedStyle(l.lineDiv).textRendering&&(l.lineDiv.style.textRendering="auto")}function t(e,t,r){var n=this;this.input=r,n.scrollbarFiller=Ro("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=Ro("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=Ro("div",null,"CodeMirror-code"),n.selectionDiv=Ro("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=Ro("div",null,"CodeMirror-cursors"),n.measure=Ro("div",null,"CodeMirror-measure"),n.lineMeasure=Ro("div",null,"CodeMirror-measure"),n.lineSpace=Ro("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none"),n.mover=Ro("div",[Ro("div",[n.lineSpace],"CodeMirror-lines")],null,"position: relative"),n.sizer=Ro("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=Ro("div",null,null,"position: absolute; height: "+Ms+"px; width: 1px;"),n.gutters=Ro("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=Ro("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=Ro("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),dl&&8>pl&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),gl||cl&&Sl||(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,r.init(n)}function r(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),n(t)}function n(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,zt(e,100),e.state.modeGen++,e.curOp&&Hr(e)}function i(e){e.options.lineWrapping?(Vs(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Us(e.display.wrapper,"CodeMirror-wrap"),h(e)),l(e),Hr(e),or(e),setTimeout(function(){y(e)},100)}function o(e){var t=vr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/mr(e.display)-3);return function(i){if(yi(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function l(e){var t=e.doc,r=o(e);t.iter(function(e){var t=r(e);t!=e.height&&qi(e,t)})}function s(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),or(e)}function a(e){u(e),Hr(e),setTimeout(function(){x(e)},20)}function u(e){var t=e.display.gutters,r=e.options.gutters;Bo(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(Ro("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",c(e)}function c(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function f(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=fi(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=hi(n);){var i=t.find(0,!0);r-=n.text.length-i.from.ch,n=i.to.line,r+=n.text.length-i.to.ch}return r}function h(e){var t=e.display,r=e.doc;t.maxLine=_i(r,r.first),t.maxLineLength=f(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=f(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function d(e){var t=Wo(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Ut(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Kt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function g(e,t,r){this.cm=r;var n=this.vert=Ro("div",[Ro("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Ro("div",[Ro("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(n),e(i),Ss(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Ss(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedOverlay=!1,dl&&8>pl&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function m(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Us(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ss(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,r){"horizontal"==r?en(t,e):Jr(t,e)},t),t.display.scrollbars.addClass&&Vs(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=p(e));var r=e.display.barWidth,n=e.display.barHeight;b(e,t);for(var i=0;4>i&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&O(e),b(e,p(e)),r=e.display.barWidth,n=e.display.barHeight}function b(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function w(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Gt(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=Qi(t,n),l=Qi(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;o>s?(o=s,l=Qi(t,Ji(_i(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=Qi(t,Ji(_i(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function x(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=L(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&r[l].gutter&&(r[l].gutter.style.left=o);var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function C(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=S(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(Ro("div",[Ro("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",c(e),!0}return!1}function S(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function L(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function k(e,t,r){var n=e.display;this.viewport=t,this.visible=w(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=jt(e),this.force=r,this.dims=H(e),this.events=[]}function T(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Kt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Kt(e)+"px",t.scrollbarsClipped=!0)}function M(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Pr(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Rr(e))return!1;C(e)&&(Pr(e),t.dims=H(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Wl&&(o=vi(e.doc,o),l=mi(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Fr(e,o,l),r.viewOffset=Ji(_i(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var a=Rr(e);if(!s&&0==a&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Uo();return a>4&&(r.lineDiv.style.display="none"),I(e,r.updateLineNumbers,t.dims),a>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,u&&Uo()!=u&&u.offsetHeight&&u.focus(),Bo(r.cursorDiv),Bo(r.selectionDiv),r.gutters.style.height=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,zt(e,400)),r.updateLineNumbers=null,!0}function A(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=jt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Ut(e.display)-Xt(e),r.top)}),t.visible=w(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&M(e,t);n=!1){O(e);var i=p(e);Dt(e),W(e,i),y(e,i)}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function N(e,t){var r=new k(e,t);if(M(e,r)){O(e),A(e,r);var n=p(e);Dt(e),W(e,n),y(e,n),r.finish()}}function W(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var r=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=r+"px",e.display.gutters.style.height=Math.max(r+Kt(e),t.clientHeight)+"px"}function O(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i,o=t.view[n];if(!o.hidden){if(dl&&8>pl){var l=o.node.offsetTop+o.node.offsetHeight;i=l-r,r=l}else{var s=o.node.getBoundingClientRect();i=s.bottom-s.top}var a=o.line.height-i;if(2>i&&(i=vr(t)),(a>.001||-.001>a)&&(qi(o.line,i),D(o.line),o.rest))for(var u=0;u<o.rest.length;u++)D(o.rest[u])}}}function D(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.offsetHeight}function H(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:L(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function I(e,t,r){function n(t){var r=t.nextSibling;return gl&&Ll&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var i=e.display,o=e.options.lineNumbers,l=i.lineDiv,s=l.firstChild,a=i.view,u=i.viewFrom,c=0;c<a.length;c++){var f=a[c];if(f.hidden);else if(f.node&&f.node.parentNode==l){for(;s!=f.node;)s=n(s);var h=o&&null!=t&&u>=t&&f.lineNumber;f.changes&&(Wo(f.changes,"gutter")>-1&&(h=!1),P(e,f,u,r)),h&&(Bo(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(S(e.options,u)))),s=f.node.nextSibling}else{var d=V(e,f,u,r);l.insertBefore(d,s)}u+=f.size}for(;s;)s=n(s)}function P(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?R(e,t):"gutter"==o?G(e,t,r,n):"class"==o?B(t):"widget"==o&&U(e,t,n)}t.changes=null}function E(e){return e.node==e.text&&(e.node=Ro("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),dl&&8>pl&&(e.node.style.zIndex=2)),e.node}function z(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var r=E(e);e.background=r.insertBefore(Ro("div",null,t),r.firstChild)}}function F(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Ii(e,t)}function R(e,t){var r=t.text.className,n=F(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,B(t)):r&&(t.text.className=r)}function B(e){z(e),e.line.wrapClass?E(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function G(e,t,r,n){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=E(t),l=t.gutter=Ro("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px");if(e.display.input.setUneditable(l),o.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(Ro("div",S(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s<e.options.gutters.length;++s){var a=e.options.gutters[s],u=i.hasOwnProperty(a)&&i[a];u&&l.appendChild(Ro("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[a]+"px; width: "+n.gutterWidth[a]+"px"))}}}function U(e,t,r){t.alignable&&(t.alignable=null);for(var n,i=t.node.firstChild;i;i=n){var n=i.nextSibling;"CodeMirror-linewidget"==i.className&&t.node.removeChild(i)}K(e,t,r)}function V(e,t,r,n){var i=F(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),B(t),G(e,t,r,n),K(e,t,n),t.node}function K(e,t,r){if(j(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)j(e,t.rest[n],t,r,!1)}function j(e,t,r,n,i){if(t.widgets)for(var o=E(r),l=0,s=t.widgets;l<s.length;++l){var a=s[l],u=Ro("div",[a.node],"CodeMirror-linewidget");a.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),X(a,u,r,n),e.display.input.setUneditable(u),i&&a.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),wo(a,"redraw")}}function X(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function _(e){return Ol(e.line,e.ch)}function Y(e,t){return Dl(e,t)<0?t:e}function $(e,t){return Dl(e,t)<0?e:t}function q(e){e.state.focused||(e.display.input.focus(),dn(e))}function Z(e){return e.options.readOnly||e.doc.cantEdit}function Q(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l=Xs(t),s=null;e.state.pasteIncoming&&n.ranges.length>1&&(Hl&&Hl.join("\n")==t?s=n.ranges.length%Hl.length==0&&Oo(Hl,Xs):l.length==n.ranges.length&&(s=Oo(l,function(e){return[e]})));for(var a=n.ranges.length-1;a>=0;a--){var u=n.ranges[a],c=u.from(),f=u.to();u.empty()&&(r&&r>0?c=Ol(c.line,c.ch-r):e.state.overwrite&&!e.state.pasteIncoming&&(f=Ol(f.line,Math.min(_i(o,f.line).text.length,f.ch+No(l).length))));var h=e.curOp.updateInput,d={from:c,to:f,text:s?s[a%s.length]:l,origin:i||(e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input")};Cn(e.doc,d),wo(e,"inputRead",e,d)}t&&!e.state.pasteIncoming&&J(e,t),In(e),e.curOp.updateInput=h,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function J(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=En(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(_i(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=En(e,i.head.line,"smart"));l&&wo(e,"electricInput",e,i.head.line)}}}function et(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:Ol(i,0),head:Ol(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function tt(e){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false")}function rt(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new To,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function nt(){var e=Ro("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),t=Ro("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return gl?e.style.width="1000px":e.setAttribute("wrap","off"),Cl&&(e.style.border="1px solid black"),tt(e),t}function it(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new To,this.gracePeriod=!1}function ot(e,t){var r=Zt(e,t.line);if(!r||r.hidden)return null;var n=_i(e.doc,t.line),i=Yt(r,n,t.line),o=eo(n),l="left";if(o){var s=ll(o,t.ch);l=s%2?"right":"left"}var a=er(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function lt(e,t){return t&&(e.bad=!0),e}function st(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return lt(e.clipPos(Ol(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return at(o,t,r)}}function at(e,t,r){function n(t,r,n){for(var i=-1;i<(c?c.length:0);i++)for(var o=0>i?u.map:c[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var a=Zi(0>i?e.line:e.rest[i]),f=o[l]+n;return(0>n||s!=t)&&(f=o[l+(n?1:0)]),Ol(a,f)}}}var i=e.text.firstChild,o=!1;if(!t||!Rs(i,t))return lt(Ol(Zi(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[r],r=0,!t)){var l=e.rest?No(e.rest):e.line;return lt(Ol(Zi(l),l.text.length),o)}var s=3==t.nodeType?t:null,a=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,r&&(r=s.nodeValue.length));a.parentNode!=i;)a=a.parentNode;var u=e.measure,c=u.maps,f=n(s,a,r);if(f)return lt(f,o);for(var h=a.nextSibling,d=s?s.nodeValue.length-r:0;h;h=h.nextSibling){if(f=n(h,h.firstChild,0))return lt(Ol(f.line,f.ch-d),o);d+=h.textContent.length}for(var p=a.previousSibling,d=r;p;p=p.previousSibling){if(f=n(p,p.firstChild,-1))return lt(Ol(f.line,f.ch+d),o);d+=h.textContent.length}}function ut(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function l(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return""==r&&(r=t.textContent.replace(/\u200b/g,"")),void(s+=r);var u,c=t.getAttribute("cm-marker");if(c){var f=e.findMarks(Ol(n,0),Ol(i+1,0),o(+c));return void(f.length&&(u=f[0].find())&&(s+=Yi(e.doc,u.from,u.to).join("\n")))}if("false"==t.getAttribute("contenteditable"))return;for(var h=0;h<t.childNodes.length;h++)l(t.childNodes[h]);/^(pre|div|p)$/i.test(t.nodeName)&&(a=!0)}else if(3==t.nodeType){var d=t.nodeValue;if(!d)return;a&&(s+="\n",a=!1),s+=d}}for(var s="",a=!1;l(t),t!=r;)t=t.nextSibling;return s}function ct(e,t){this.ranges=e,this.primIndex=t}function ft(e,t){this.anchor=e,this.head=t}function ht(e,t){var r=e[t];e.sort(function(e,t){return Dl(e.from(),t.from())}),t=Wo(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(Dl(o.to(),i.from())>=0){var l=$(o.from(),i.from()),s=Y(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;t>=n&&--t,e.splice(--n,2,new ft(a?s:l,a?l:s))}}return new ct(e,t)}function dt(e,t){return new ct([new ft(e,t||e)],0)}function pt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function gt(e,t){if(t.line<e.first)return Ol(e.first,0);var r=e.first+e.size-1;return t.line>r?Ol(r,_i(e,r).text.length):vt(t,_i(e,t.line).text.length)}function vt(e,t){var r=e.ch;return null==r||r>t?Ol(e.line,t):0>r?Ol(e.line,0):e}function mt(e,t){return t>=e.first&&t<e.first+e.size}function yt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=gt(e,t[n]);return r}function bt(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=Dl(r,i)<0;o!=Dl(n,i)<0?(i=r,r=n):o!=Dl(r,n)<0&&(r=n)}return new ft(i,r)}return new ft(n||r,r)}function wt(e,t,r,n){Tt(e,new ct([bt(e,e.sel.primary(),t,r)],0),n)}function xt(e,t,r){for(var n=[],i=0;i<e.sel.ranges.length;i++)n[i]=bt(e,e.sel.ranges[i],t[i],null);var o=ht(n,e.sel.primIndex);Tt(e,o,r)}function Ct(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Tt(e,ht(i,e.sel.primIndex),n)}function St(e,t,r,n){Tt(e,dt(t,r),n)}function Lt(e,t){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new ft(gt(e,t[r].anchor),gt(e,t[r].head))}};return ks(e,"beforeSelectionChange",e,r),e.cm&&ks(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?ht(r.ranges,r.ranges.length-1):t}function kt(e,t,r){var n=e.history.done,i=No(n);i&&i.ranges?(n[n.length-1]=t,Mt(e,t,r)):Tt(e,t,r)}function Tt(e,t,r){Mt(e,t,r),so(e,e.sel,e.cm?e.cm.curOp.id:0/0,r)}function Mt(e,t,r){(Lo(e,"beforeSelectionChange")||e.cm&&Lo(e.cm,"beforeSelectionChange"))&&(t=Lt(e,t));var n=r&&r.bias||(Dl(t.primary().head,e.sel.primary().head)<0?-1:1);At(e,Wt(e,t,n,!0)),r&&r.scroll===!1||!e.cm||In(e.cm)}function At(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,So(e.cm)),wo(e,"cursorActivity",e))}function Nt(e){At(e,Wt(e,e.sel,null,!1),Ns)}function Wt(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=Ot(e,l.anchor,r,n),a=Ot(e,l.head,r,n);(i||s!=l.anchor||a!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new ft(s,a))}return i?ht(i,t.primIndex):t}function Ot(e,t,r,n){var i=!1,o=t,l=r||1;e.cantEdit=!1;e:for(;;){var s=_i(e,o.line);if(s.markedSpans)for(var a=0;a<s.markedSpans.length;++a){var u=s.markedSpans[a],c=u.marker;if((null==u.from||(c.inclusiveLeft?u.from<=o.ch:u.from<o.ch))&&(null==u.to||(c.inclusiveRight?u.to>=o.ch:u.to>o.ch))){if(n&&(ks(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--a;continue}break}if(!c.atomic)continue;var f=c.find(0>l?-1:1);if(0==Dl(f,o)&&(f.ch+=l,f.ch<0?f=f.line>e.first?gt(e,Ol(f.line-1)):null:f.ch>s.text.length&&(f=f.line<e.first+e.size-1?Ol(f.line+1,0):null),!f)){if(i)return n?(e.cantEdit=!0,Ol(e.first,0)):Ot(e,t,r,!0);i=!0,f=t,l=-l}o=f;continue e}}return o}}function Dt(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ht(e,t){for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t!==!1||l!=r.sel.primIndex){var s=r.sel.ranges[l],a=s.empty();(a||e.options.showCursorWhenSelecting)&&It(e,s,i),a||Pt(e,s,o)}return n}function It(e,t,r){var n=fr(e,t.head,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(Ro("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(Ro("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Pt(e,t,r){function n(e,t,r,n){0>t&&(t=0),t=Math.round(t),n=Math.round(n),s.appendChild(Ro("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==r?c-e:r)+"px; height: "+(n-t)+"px"))}function i(t,r,i){function o(r,n){return cr(e,Ol(t,r),"div",f,n)}var s,a,f=_i(l,t),h=f.text.length;return Zo(eo(f),r||0,null==i?h:i,function(e,t,l){var f,d,p,g=o(e,"left");if(e==t)f=g,d=p=g.left;else{if(f=o(t-1,"right"),"rtl"==l){var v=g;g=f,f=v}d=g.left,p=f.right}null==r&&0==e&&(d=u),f.top-g.top>3&&(n(d,g.top,null,g.bottom),d=u,g.bottom<f.top&&n(d,g.bottom,null,f.top)),null==i&&t==h&&(p=c),(!s||g.top<s.top||g.top==s.top&&g.left<s.left)&&(s=g),(!a||f.bottom>a.bottom||f.bottom==a.bottom&&f.right>a.right)&&(a=f),u+1>d&&(d=u),n(d,f.top,p-d,f.bottom)}),{start:s,end:a}}var o=e.display,l=e.doc,s=document.createDocumentFragment(),a=Vt(e.display),u=a.left,c=Math.max(o.sizerWidth,jt(e)-o.sizer.offsetLeft)-a.right,f=t.from(),h=t.to();if(f.line==h.line)i(f.line,f.ch,h.ch);else{var d=_i(l,f.line),p=_i(l,h.line),g=pi(d)==pi(p),v=i(f.line,f.ch,g?d.text.length+1:null).end,m=i(h.line,g?0:null,h.ch).start;g&&(v.top<m.top-2?(n(v.right,v.top,null,v.bottom),n(u,m.top,m.left,m.bottom)):n(v.right,v.top,m.left-v.right,v.bottom)),v.bottom<m.top&&n(u,v.bottom,null,m.top)}r.appendChild(s)}function Et(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function zt(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,Po(Ft,e))}function Ft(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=ts(t.mode,Bt(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var l=o.styles,s=Wi(e,o,n,!0);o.styles=s.styles;var a=o.styleClasses,u=s.classes;u?o.styleClasses=u:a&&(o.styleClasses=null);for(var c=!l||l.length!=o.styles.length||a!=u&&(!a||!u||a.bgClass!=u.bgClass||a.textClass!=u.textClass),f=0;!c&&f<l.length;++f)c=l[f]!=o.styles[f];c&&i.push(t.frontier),o.stateAfter=ts(t.mode,n)}else Di(e,o.text,n),o.stateAfter=t.frontier%5==0?ts(t.mode,n):null;return++t.frontier,+new Date>r?(zt(e,e.options.workDelay),!0):void 0}),i.length&&Mr(e,function(){for(var t=0;t<i.length;t++)Ir(e,i[t],"text")})}}function Rt(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=_i(o,s-1);if(a.stateAfter&&(!r||s<=o.frontier))return s;var u=Ds(a.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}function Bt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=Rt(e,t,r),l=o>n.first&&_i(n,o-1).stateAfter;return l=l?ts(n.mode,l):rs(n.mode),n.iter(o,t,function(r){Di(e,r.text,l);var s=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;r.stateAfter=s?ts(n.mode,l):null,++o}),r&&(n.frontier=o),l}function Gt(e){return e.lineSpace.offsetTop}function Ut(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Vt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Go(e.measure,Ro("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Kt(e){return Ms-e.display.nativeBarWidth}function jt(e){return e.display.scroller.clientWidth-Kt(e)-e.display.barWidth}function Xt(e){return e.display.scroller.clientHeight-Kt(e)-e.display.barHeight}function _t(e,t,r){var n=e.options.lineWrapping,i=n&&jt(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Yt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var n=0;n<e.rest.length;n++)if(Zi(e.rest[n])>r)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}function $t(e,t){t=pi(t);var r=Zi(t),n=e.display.externalMeasured=new Or(e.doc,t,r);n.lineN=r;var i=n.built=Ii(e,n);return n.text=i.pre,Go(e.display.lineMeasure,i.pre),n}function qt(e,t,r,n){return Jt(e,Qt(e,t),r,n)}function Zt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Er(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Qt(e,t){var r=Zi(t),n=Zt(e,r);n&&!n.text?n=null:n&&n.changes&&P(e,n,r,H(e)),n||(n=$t(e,t));var i=Yt(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Jt(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(_t(e,t.view,t.rect),t.hasHeights=!0),o=tr(e,t,r,n),o.bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function er(e,t,r){for(var n,i,o,l,s=0;s<e.length;s+=3){var a=e[s],u=e[s+1];if(a>t?(i=0,o=1,l="left"):u>t?(i=t-a,o=i+1):(s==e.length-3||t==u&&e[s+3]>t)&&(o=u-a,i=o-1,t>=u&&(l="right")),null!=i){if(n=e[s+2],a==u&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)n=e[(s-=3)+2],l="left";if("right"==r&&i==u-a)for(;s<e.length-3&&e[s+3]==e[s+4]&&!e[s+5].insertLeft;)n=e[(s+=3)+2],l="right";break}}return{node:n,start:i,end:o,collapse:l,coverStart:a,coverEnd:u}}function tr(e,t,r,n){var i,o=er(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;4>c;c++){for(;s&&Fo(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a<o.coverEnd&&Fo(t.line.text.charAt(o.coverStart+a));)++a;if(dl&&9>pl&&0==s&&a==o.coverEnd-o.coverStart)i=l.parentNode.getBoundingClientRect();else if(dl&&e.options.lineWrapping){var f=Ps(l,s,a).getClientRects();i=f.length?f["right"==n?f.length-1:0]:zl}else i=Ps(l,s,a).getBoundingClientRect()||zl;if(i.left||i.right||0==s)break;a=s,s-=1,u="right"}dl&&11>pl&&(i=rr(e.display.measure,i))}else{s>0&&(u=n="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==n?f.length-1:0]:l.getBoundingClientRect()}if(dl&&9>pl&&!s&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+mr(e.display),top:h.top,bottom:h.bottom}:zl}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,c=0;c<v.length-1&&!(g<v[c]);c++);var m=c?v[c-1]:0,y=v[c],b={left:("right"==u?i.right:i.left)-t.rect.left,right:("left"==u?i.left:i.right)-t.rect.left,top:m,bottom:y};
return i.left||i.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=d,b.rbottom=p),b}function rr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!qo(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function nr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ir(e){e.display.externalMeasure=null,Bo(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)nr(e.display.view[t])}function or(e){ir(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function lr(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function sr(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function ar(e,t,r,n){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=xi(t.widgets[i]);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=Ji(t);if("local"==n?l+=Gt(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:sr());var a=s.left+("window"==n?0:lr());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function ur(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=lr(),i-=sr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function cr(e,t,r,n,i){return n||(n=_i(e.doc,t.line)),ar(e,n,qt(e,n,t.ch,i),r)}function fr(e,t,r,n,i,o){function l(t,l){var s=Jt(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,ar(e,n,s,r)}function s(e,t){var r=a[t],n=r.level%2;return e==Qo(r)&&t&&r.level<a[t-1].level?(r=a[--t],e=Jo(r)-(r.level%2?0:1),n=!0):e==Jo(r)&&t<a.length-1&&r.level<a[t+1].level&&(r=a[++t],e=Qo(r)-r.level%2,n=!1),n&&e==r.to&&e>r.from?l(e-1):l(e,n)}n=n||_i(e.doc,t.line),i||(i=Qt(e,n));var a=eo(n),u=t.ch;if(!a)return l(u);var c=ll(a,u),f=s(u,c);return null!=Zs&&(f.other=s(u,Zs)),f}function hr(e,t){var r=0,t=gt(e.doc,t);e.options.lineWrapping||(r=mr(e.display)*t.ch);var n=_i(e.doc,t.line),i=Ji(n)+Gt(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function dr(e,t,r,n){var i=Ol(e,t);return i.xRel=n,r&&(i.outside=!0),i}function pr(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,0>r)return dr(n.first,0,!0,-1);var i=Qi(n,r),o=n.first+n.size-1;if(i>o)return dr(n.first+n.size-1,_i(n,o).text.length,!0,1);0>t&&(t=0);for(var l=_i(n,i);;){var s=gr(e,l,i,t,r),a=hi(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=Zi(l=u.to.line)}}function gr(e,t,r,n,i){function o(n){var i=fr(e,Ol(r,n),"line",t,u);return s=!0,l>i.bottom?i.left-a:l<i.top?i.left+a:(s=!1,i.left)}var l=i-Ji(t),s=!1,a=2*e.display.wrapper.clientWidth,u=Qt(e,t),c=eo(t),f=t.text.length,h=el(t),d=tl(t),p=o(h),g=s,v=o(d),m=s;if(n>v)return dr(r,d,m,1);for(;;){if(c?d==h||d==al(t,h,1):1>=d-h){for(var y=p>n||v-n>=n-p?h:d,b=n-(y==h?p:v);Fo(t.text.charAt(y));)++y;var w=dr(r,y,y==h?g:m,-1>b?-1:b>1?1:0);return w}var x=Math.ceil(f/2),C=h+x;if(c){C=h;for(var S=0;x>S;++S)C=al(t,C,1)}var L=o(C);L>n?(d=C,v=L,(m=s)&&(v+=1e3),f=x):(h=C,p=L,g=s,f-=x)}}function vr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Il){Il=Ro("pre");for(var t=0;49>t;++t)Il.appendChild(document.createTextNode("x")),Il.appendChild(Ro("br"));Il.appendChild(document.createTextNode("x"))}Go(e.measure,Il);var r=Il.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Bo(e.measure),r||1}function mr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Ro("span","xxxxxxxxxx"),r=Ro("pre",[t]);Go(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function yr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Rl},Fl?Fl.ops.push(e.curOp):e.curOp.ownsGroup=Fl={ops:[e.curOp],delayedCallbacks:[]}}function br(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r]();for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++](i.cm)}}while(r<t.length)}function wr(e){var t=e.curOp,r=t.ownsGroup;if(r)try{br(r)}finally{Fl=null;for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;xr(r)}}function xr(e){for(var t=e.ops,r=0;r<t.length;r++)Cr(t[r]);for(var r=0;r<t.length;r++)Sr(t[r]);for(var r=0;r<t.length;r++)Lr(t[r]);for(var r=0;r<t.length;r++)kr(t[r]);for(var r=0;r<t.length;r++)Tr(t[r])}function Cr(e){var t=e.cm,r=t.display;T(t),e.updateMaxLine&&h(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new k(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Sr(e){e.updatedDisplay=e.mustUpdate&&M(e.cm,e.update)}function Lr(e){var t=e.cm,r=t.display;e.updatedDisplay&&O(t),e.barMeasure=p(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=qt(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Kt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-jt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function kr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&en(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1),e.preparedSelection&&t.display.input.showSelection(e.preparedSelection),e.updatedDisplay&&W(t,e.barMeasure),(e.updatedDisplay||e.startHeight!=t.doc.height)&&y(t,e.barMeasure),e.selectionChanged&&Et(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),e.focus&&e.focus==Uo()&&q(e.cm)}function Tr(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&A(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null==e.scrollTop||r.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(n.scrollTop=Math.max(0,Math.min(r.scroller.scrollHeight-r.scroller.clientHeight,e.scrollTop)),r.scrollbars.setScrollTop(n.scrollTop),r.scroller.scrollTop=n.scrollTop),null==e.scrollLeft||r.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(n.scrollLeft=Math.max(0,Math.min(r.scroller.scrollWidth-jt(t),e.scrollLeft)),r.scrollbars.setScrollLeft(n.scrollLeft),r.scroller.scrollLeft=n.scrollLeft,x(t)),e.scrollToPos){var i=Wn(t,gt(n,e.scrollToPos.from),gt(n,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&Nn(t,i)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||ks(o[s],"hide");if(l)for(var s=0;s<l.length;++s)l[s].lines.length&&ks(l[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ks(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Mr(e,t){if(e.curOp)return t();yr(e);try{return t()}finally{wr(e)}}function Ar(e,t){return function(){if(e.curOp)return t.apply(e,arguments);yr(e);try{return t.apply(e,arguments)}finally{wr(e)}}}function Nr(e){return function(){if(this.curOp)return e.apply(this,arguments);yr(this);try{return e.apply(this,arguments)}finally{wr(this)}}}function Wr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);yr(t);try{return e.apply(this,arguments)}finally{wr(t)}}}function Or(e,t,r){this.line=t,this.rest=gi(t),this.size=this.rest?Zi(No(this.rest))-r+1:1,this.node=this.text=null,this.hidden=yi(e,t)}function Dr(e,t,r){for(var n,i=[],o=t;r>o;o=n){var l=new Or(e.doc,_i(e.doc,o),o);n=o+l.size,i.push(l)}return i}function Hr(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Wl&&vi(e.doc,t)<i.viewTo&&Pr(e);else if(r<=i.viewFrom)Wl&&mi(e.doc,r+n)>i.viewFrom?Pr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Pr(e);else if(t<=i.viewFrom){var o=zr(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Pr(e)}else if(r>=i.viewTo){var o=zr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Pr(e)}else{var l=zr(e,t,t,-1),s=zr(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Dr(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Pr(e)}var a=i.externalMeasured;a&&(r<a.lineN?a.lineN+=n:t<a.lineN+a.size&&(i.externalMeasured=null))}function Ir(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[Er(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==Wo(l,r)&&l.push(r)}}}function Pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Er(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,0>t)return n}function zr(e,t,r,n){var i,o=Er(e,t),l=e.display.view;if(!Wl||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=0,a=e.display.viewFrom;o>s;s++)a+=l[s].size;if(a!=t){if(n>0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,r+=i}for(;vi(e.doc,r)!=r;){if(o==(0>n?0:l.length-1))return null;r+=n*l[o-(0>n?1:0)].size,o+=n}return{index:o,lineN:r}}function Fr(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Dr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Dr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Er(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Dr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Er(e,r)))),n.viewTo=r}function Rr(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function Br(e){function t(){i.activeTouch&&(o=setTimeout(function(){i.activeTouch=null},1e3),l=i.activeTouch,l.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var i=e.display;Ss(i.scroller,"mousedown",Ar(e,jr)),dl&&11>pl?Ss(i.scroller,"dblclick",Ar(e,function(t){if(!Co(e,t)){var r=Kr(e,t);if(r&&!qr(e,t)&&!Vr(e.display,t)){ws(t);var n=e.findWordAt(r);wt(e.doc,n.anchor,n.head)}}})):Ss(i.scroller,"dblclick",function(t){Co(e,t)||ws(t)}),Al||Ss(i.scroller,"contextmenu",function(t){gn(e,t)});var o,l={end:0};Ss(i.scroller,"touchstart",function(e){if(!r(e)){clearTimeout(o);var t=+new Date;i.activeTouch={start:t,moved:!1,prev:t-l.end<=300?l:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),Ss(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ss(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!Vr(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,s=e.coordsChar(i.activeTouch,"page");l=!o.prev||n(o,o.prev)?new ft(s,s):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(s):new ft(Ol(s.line,0),gt(e.doc,Ol(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),ws(r)}t()}),Ss(i.scroller,"touchcancel",t),Ss(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Jr(e,i.scroller.scrollTop),en(e,i.scroller.scrollLeft,!0),ks(e,"scroll",e))}),Ss(i.scroller,"mousewheel",function(t){tn(e,t)}),Ss(i.scroller,"DOMMouseScroll",function(t){tn(e,t)}),Ss(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={simple:function(t){Co(e,t)||Cs(t)},start:function(t){Qr(e,t)},drop:Ar(e,Zr)};var s=i.input.getField();Ss(s,"keyup",function(t){cn.call(e,t)}),Ss(s,"keydown",Ar(e,an)),Ss(s,"keypress",Ar(e,fn)),Ss(s,"focus",Po(dn,e)),Ss(s,"blur",Po(pn,e))}function Gr(t,r,n){var i=n&&n!=e.Init;if(!r!=!i){var o=t.display.dragFunctions,l=r?Ss:Ls;l(t.display.scroller,"dragstart",o.start),l(t.display.scroller,"dragenter",o.simple),l(t.display.scroller,"dragover",o.simple),l(t.display.scroller,"drop",o.drop)}}function Ur(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Vr(e,t){for(var r=yo(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Kr(e,t,r,n){var i=e.display;if(!r&&"true"==yo(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(t){return null}var a,u=pr(e,o,l);if(n&&1==u.xRel&&(a=_i(e.doc,u.line).text).length==u.ch){var c=Ds(a,a.length,e.options.tabSize)-a.length;u=Ol(u.line,Math.max(0,Math.round((o-Vt(e.display).left)/mr(e.display))-c))}return u}function jr(e){var t=this,r=t.display;if(!(r.activeTouch&&r.input.supportsTouch()||Co(t,e))){if(r.shift=e.shiftKey,Vr(r,e))return void(gl||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100)));if(!qr(t,e)){var n=Kr(t,e);switch(window.focus(),bo(e)){case 1:n?Xr(t,e,n):yo(e)==r.scroller&&ws(e);break;case 2:gl&&(t.state.lastMiddleDown=+new Date),n&&wt(t.doc,n),setTimeout(function(){r.input.focus()},20),ws(e);break;case 3:Al?gn(t,e):hn(t)}}}}function Xr(e,t,r){dl?setTimeout(Po(q,e),0):e.curOp.focus=Uo();var n,i=+new Date;El&&El.time>i-400&&0==Dl(El.pos,r)?n="triple":Pl&&Pl.time>i-400&&0==Dl(Pl.pos,r)?(n="double",El={time:i,pos:r}):(n="single",Pl={time:i,pos:r});var o,l=e.doc.sel,s=Ll?t.metaKey:t.ctrlKey;e.options.dragDrop&&js&&!Z(e)&&"single"==n&&(o=l.contains(r))>-1&&!l.ranges[o].empty()?_r(e,t,r,s):Yr(e,t,r,n,s)}function _r(e,t,r,n){var i=e.display,o=+new Date,l=Ar(e,function(s){gl&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ls(document,"mouseup",l),Ls(i.scroller,"drop",l),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(ws(s),!n&&+new Date-200<o&&wt(e.doc,r),gl||dl&&9==pl?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});gl&&(i.scroller.draggable=!0),e.state.draggingText=l,i.scroller.dragDrop&&i.scroller.dragDrop(),Ss(document,"mouseup",l),Ss(i.scroller,"drop",l)}function Yr(e,t,r,n,i){function o(t){if(0!=Dl(v,t))if(v=t,"rect"==n){for(var i=[],o=e.options.tabSize,l=Ds(_i(u,r.line).text,r.ch,o),s=Ds(_i(u,t.line).text,t.ch,o),a=Math.min(l,s),d=Math.max(l,s),p=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));g>=p;p++){var m=_i(u,p).text,y=Mo(m,a,o);a==d?i.push(new ft(Ol(p,y),Ol(p,y))):m.length>y&&i.push(new ft(Ol(p,y),Ol(p,Mo(m,d,o))))}i.length||i.push(new ft(r,r)),Tt(u,ht(h.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,w=b.anchor,x=t;if("single"!=n){if("double"==n)var C=e.findWordAt(t);else var C=new ft(Ol(t.line,0),gt(u,Ol(t.line+1,0)));Dl(C.anchor,w)>0?(x=C.head,w=$(b.from(),C.anchor)):(x=C.anchor,w=Y(b.to(),C.head))}var i=h.ranges.slice(0);i[f]=new ft(gt(u,w),x),Tt(u,ht(i,f),Ws)}}function l(t){var r=++y,i=Kr(e,t,!0,"rect"==n);if(i)if(0!=Dl(i,v)){e.curOp.focus=Uo(),o(i);var s=w(a,u);(i.line>=s.to||i.line<s.from)&&setTimeout(Ar(e,function(){y==r&&l(t)}),150)}else{var c=t.clientY<m.top?-20:t.clientY>m.bottom?20:0;c&&setTimeout(Ar(e,function(){y==r&&(a.scroller.scrollTop+=c,l(t))}),50)}}function s(e){y=1/0,ws(e),a.input.focus(),Ls(document,"mousemove",b),Ls(document,"mouseup",x),u.history.lastSelOrigin=null}var a=e.display,u=e.doc;ws(t);var c,f,h=u.sel,d=h.ranges;if(i&&!t.shiftKey?(f=u.sel.contains(r),c=f>-1?d[f]:new ft(r,r)):(c=u.sel.primary(),f=u.sel.primIndex),t.altKey)n="rect",i||(c=new ft(r,r)),r=Kr(e,t,!0,!0),f=-1;else if("double"==n){var p=e.findWordAt(r);c=e.display.shift||u.extend?bt(u,c,p.anchor,p.head):p}else if("triple"==n){var g=new ft(Ol(r.line,0),gt(u,Ol(r.line+1,0)));c=e.display.shift||u.extend?bt(u,c,g.anchor,g.head):g}else c=bt(u,c,r);i?-1==f?(f=d.length,Tt(u,ht(d.concat([c]),f),{scroll:!1,origin:"*mouse"})):d.length>1&&d[f].empty()&&"single"==n&&!t.shiftKey?(Tt(u,ht(d.slice(0,f).concat(d.slice(f+1)),0)),h=u.sel):Ct(u,f,c,Ws):(f=0,Tt(u,new ct([c],0),Ws),h=u.sel);var v=r,m=a.wrapper.getBoundingClientRect(),y=0,b=Ar(e,function(e){bo(e)?l(e):s(e)}),x=Ar(e,s);Ss(document,"mousemove",b),Ss(document,"mouseup",x)}function $r(e,t,r,n,i){try{var o=t.clientX,l=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ws(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(l>a.bottom||!Lo(e,r))return mo(t);l-=a.top-s.viewOffset;for(var u=0;u<e.options.gutters.length;++u){var c=s.gutters.childNodes[u];if(c&&c.getBoundingClientRect().right>=o){var f=Qi(e.doc,l),h=e.options.gutters[u];return i(e,r,e,f,h,t),mo(t)}}}function qr(e,t){return $r(e,t,"gutterClick",!0,wo)}function Zr(e){var t=this;if(!Co(t,e)&&!Vr(t.display,e)){ws(e),dl&&(Bl=+new Date);var r=Kr(t,e,!0),n=e.dataTransfer.files;if(r&&!Z(t))if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),l=0,s=function(e,n){var s=new FileReader;s.onload=Ar(t,function(){if(o[n]=s.result,++l==i){r=gt(t.doc,r);var e={from:r,to:r,text:Xs(o.join("\n")),origin:"paste"};Cn(t.doc,e),kt(t.doc,dt(r,Xl(e)))}}),s.readAsText(e)},a=0;i>a;++a)s(n[a],a);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Ll?e.altKey:e.ctrlKey))var u=t.listSelections();if(Mt(t.doc,dt(r,r)),u)for(var a=0;a<u.length;++a)An(t.doc,"",u[a].anchor,u[a].head,"drag");t.replaceSelection(o,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Qr(e,t){if(dl&&(!e.state.draggingText||+new Date-Bl<100))return void Cs(t);if(!Co(e,t)&&!Vr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.setDragImage&&!bl)){var r=Ro("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",yl&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),yl&&r.parentNode.removeChild(r)}}function Jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,cl||N(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),cl&&N(e),zt(e,100))}function en(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,x(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function tn(e,t){var r=Vl(t),n=r.x,i=r.y,o=e.display,l=o.scroller;if(n&&l.scrollWidth>l.clientWidth||i&&l.scrollHeight>l.clientHeight){if(i&&Ll&&gl)e:for(var s=t.target,a=o.view;s!=l;s=s.parentNode)for(var u=0;u<a.length;u++)if(a[u].node==s){e.display.currentWheelTarget=s;break e}if(n&&!cl&&!yl&&null!=Ul)return i&&Jr(e,Math.max(0,Math.min(l.scrollTop+i*Ul,l.scrollHeight-l.clientHeight))),en(e,Math.max(0,Math.min(l.scrollLeft+n*Ul,l.scrollWidth-l.clientWidth))),ws(t),void(o.wheelStartX=null);if(i&&null!=Ul){var c=i*Ul,f=e.doc.scrollTop,h=f+o.wrapper.clientHeight;0>c?f=Math.max(0,f+c-50):h=Math.min(e.doc.height,h+c+50),N(e,{top:f,bottom:h})}20>Gl&&(null==o.wheelStartX?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=l.scrollLeft-o.wheelStartX,t=l.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(Ul=(Ul*Gl+r)/(Gl+1),++Gl)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function rn(e,t,r){if("string"==typeof t&&(t=ns[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{Z(e)&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=As}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function nn(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=os(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&os(t,e.options.extraKeys,r,e)||os(t,e.options.keyMap,r,e)}function on(e,t,r,n){var i=e.state.keySeq;if(i){if(ls(t))return"handled";Kl.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=nn(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&wo(e,"keyHandled",e,t,r),("handled"==o||"multi"==o)&&(ws(r),Et(e)),i&&!o&&/\'$/.test(t)?(ws(r),!0):!!o}function ln(e,t){var r=ss(t,!0);return r?t.shiftKey&&!e.state.keySeq?on(e,"Shift-"+r,t,function(t){return rn(e,t,!0)})||on(e,r,t,function(t){return("string"==typeof t?/^go[A-Z]/.test(t):t.motion)?rn(e,t):void 0}):on(e,r,t,function(t){return rn(e,t)}):!1}function sn(e,t,r){return on(e,"'"+r+"'",t,function(t){return rn(e,t,!0)})}function an(e){var t=this;if(t.curOp.focus=Uo(),!Co(t,e)){dl&&11>pl&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=ln(t,e);yl&&(jl=n?r:null,!n&&88==r&&!Ys&&(Ll?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||un(t)}}function un(e){function t(e){18!=e.keyCode&&e.altKey||(Us(r,"CodeMirror-crosshair"),Ls(document,"keyup",t),Ls(document,"mouseover",t))}var r=e.display.lineDiv;Vs(r,"CodeMirror-crosshair"),Ss(document,"keyup",t),Ss(document,"mouseover",t)}function cn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Co(this,e)}function fn(e){var t=this;if(!(Vr(t.display,e)||Co(t,e)||e.ctrlKey&&!e.altKey||Ll&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(yl&&r==jl)return jl=null,void ws(e);if(!yl||e.which&&!(e.which<10)||!ln(t,e)){var i=String.fromCharCode(null==n?r:n);sn(t,e,i)||t.display.input.onKeyPress(e)}}}function hn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,pn(e))},100)}function dn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ks(e,"focus",e),e.state.focused=!0,Vs(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),gl&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Et(e))}function pn(e){e.state.delayingBlurEvent||(e.state.focused&&(ks(e,"blur",e),e.state.focused=!1,Us(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function gn(e,t){Vr(e.display,t)||vn(e,t)||e.display.input.onContextMenu(t)}function vn(e,t){return Lo(e,"gutterContextMenu")?$r(e,t,"gutterContextMenu",!1,ks):!1}function mn(e,t){if(Dl(e,t.from)<0)return e;if(Dl(e,t.to)<=0)return Xl(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Xl(t).ch-t.to.ch),Ol(r,n)}function yn(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new ft(mn(i.anchor,t),mn(i.head,t)))}return ht(r,e.sel.primIndex)}function bn(e,t,r){return e.line==t.line?Ol(r.line,e.ch-t.ch+r.ch):Ol(r.line+(e.line-t.line),e.ch)}function wn(e,t,r){for(var n=[],i=Ol(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=bn(s.from,i,o),u=bn(Xl(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],f=Dl(c.head,c.anchor)<0;n[l]=new ft(f?u:a,f?a:u)}else n[l]=new ft(a,a)}return new ct(n,e.sel.primIndex)}function xn(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return r&&(n.update=function(t,r,n,i){t&&(this.from=gt(e,t)),r&&(this.to=gt(e,r)),n&&(this.text=n),void 0!==i&&(this.origin=i)}),ks(e,"beforeChange",e,n),e.cm&&ks(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Cn(e,t,r){if(e.cm){if(!e.cm.curOp)return Ar(e.cm,Cn)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(Lo(e,"beforeChange")||e.cm&&Lo(e.cm,"beforeChange"))||(t=xn(e,t,!0))){var n=Nl&&!r&&ii(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Sn(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Sn(e,t)}}function Sn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Dl(t.from,t.to)){var r=yn(e,t);oo(e,t,r,e.cm?e.cm.curOp.id:0/0),Tn(e,t,r,ti(e,t));var n=[];ji(e,function(e,r){r||-1!=Wo(n,e.history)||(vo(e.history,t),n.push(e.history)),Tn(e,t,null,ti(e,t))})}}function Ln(e,t,r){if(!e.cm||!e.cm.state.suppressEdits){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a<l.length&&(n=l[a],r?!n.ranges||n.equals(e.sel):n.ranges);a++);if(a!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;n=l.pop(),n.ranges;){if(ao(n,s),r&&!n.equals(e.sel))return void Tt(e,n,{clearRedo:!1});o=n}var u=[];ao(o,s),s.push({changes:u,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var c=Lo(e,"beforeChange")||e.cm&&Lo(e.cm,"beforeChange"),a=n.changes.length-1;a>=0;--a){var f=n.changes[a];if(f.origin=t,c&&!xn(e,f,!1))return void(l.length=0);u.push(ro(e,f));var h=a?yn(e,f):No(l);Tn(e,f,h,ni(e,f)),!a&&e.cm&&e.cm.scrollIntoView({from:f.from,to:Xl(f)});var d=[];ji(e,function(e,t){t||-1!=Wo(d,e.history)||(vo(e.history,f),d.push(e.history)),Tn(e,f,null,ni(e,f))})}}}}function kn(e,t){if(0!=t&&(e.first+=t,e.sel=new ct(Oo(e.sel.ranges,function(e){return new ft(Ol(e.anchor.line+t,e.anchor.ch),Ol(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Hr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Ir(e.cm,n,"gutter")}}function Tn(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ar(e.cm,Tn)(e,t,r,n);if(t.to.line<e.first)return void kn(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);kn(e,i),t={from:Ol(e.first,0),to:Ol(t.to.line+i,t.to.ch),text:[No(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:Ol(o,_i(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Yi(e,t.from,t.to),r||(r=yn(e,t)),e.cm?Mn(e.cm,t,n):Ui(e,t,n),Mt(e,r,Ns)}}function Mn(e,t,r){var n=e.doc,i=e.display,l=t.from,s=t.to,a=!1,u=l.line;e.options.lineWrapping||(u=Zi(pi(_i(n,l.line))),n.iter(u,s.line+1,function(e){return e==i.maxLine?(a=!0,!0):void 0})),n.sel.contains(t.from,t.to)>-1&&So(e),Ui(n,t,r,o(e)),e.options.lineWrapping||(n.iter(u,l.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,l.line),zt(e,400);var c=t.text.length-(s.line-l.line)-1;t.full?Hr(e):l.line!=s.line||1!=t.text.length||Gi(e.doc,t)?Hr(e,l.line,s.line+1,c):Ir(e,l.line,"text");var h=Lo(e,"changes"),d=Lo(e,"change");if(d||h){var p={from:l,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&wo(e,"change",e,p),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function An(e,t,r,n,i){if(n||(n=r),Dl(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=Xs(t)),Cn(e,{from:r,to:n,text:t,origin:i})}function Nn(e,t){if(!Co(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!xl){var o=Ro("div","​",null,"position: absolute; top: "+(t.top-r.viewOffset-Gt(e.display))+"px; height: "+(t.bottom-t.top+Kt(e)+r.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Wn(e,t,r,n){null==n&&(n=0);for(var i=0;5>i;i++){var o=!1,l=fr(e,t),s=r&&r!=t?fr(e,r):l,a=Dn(e,Math.min(l.left,s.left),Math.min(l.top,s.top)-n,Math.max(l.left,s.left),Math.max(l.bottom,s.bottom)+n),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=a.scrollTop&&(Jr(e,a.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=a.scrollLeft&&(en(e,a.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return l}function On(e,t,r,n,i){var o=Dn(e,t,r,n,i);null!=o.scrollTop&&Jr(e,o.scrollTop),null!=o.scrollLeft&&en(e,o.scrollLeft)}function Dn(e,t,r,n,i){var o=e.display,l=vr(e.display);0>r&&(r=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,a=Xt(e),u={};i-r>a&&(i=r+a);var c=e.doc.height+Ut(o),f=l>r,h=i>c-l;if(s>r)u.scrollTop=f?0:r;else if(i>s+a){var d=Math.min(r,(h?c:i)-a);d!=s&&(u.scrollTop=d)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=jt(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=n-t>g;return v&&(n=t+g),10>t?u.scrollLeft=0:p>t?u.scrollLeft=Math.max(0,t-(v?0:10)):n>g+p-3&&(u.scrollLeft=n+(v?0:10)-g),u}function Hn(e,t,r){(null!=t||null!=r)&&Pn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function In(e){Pn(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?Ol(t.line,t.ch-1):t,n=Ol(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin,isCursor:!0}}function Pn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=hr(e,t.from),n=hr(e,t.to),i=Dn(e,Math.min(r.left,n.left),Math.min(r.top,n.top)-t.margin,Math.max(r.right,n.right),Math.max(r.bottom,n.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function En(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Bt(e,t):r="prev");var l=e.options.tabSize,s=_i(o,t),a=Ds(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==As||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?Ds(_i(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var f="",h=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)h+=l,f+="	";if(u>h&&(f+=Ao(u-h)),f!=c)return An(o,f,Ol(t,0),Ol(t,c.length),"+input"),s.stateAfter=null,!0;for(var d=0;d<o.sel.ranges.length;d++){var p=o.sel.ranges[d];if(p.head.line==t&&p.head.ch<c.length){var h=Ol(t,c.length);Ct(o,d,new ft(h,h));break}}}function zn(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=_i(e,pt(e,t)):i=Zi(t),null==i?null:(n(o,i)&&e.cm&&Ir(e.cm,i,r),o)}function Fn(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&Dl(o.from,No(n).to)<=0;){var l=n.pop();if(Dl(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}Mr(e,function(){for(var t=n.length-1;t>=0;t--)An(e.doc,"",n[t].from,n[t].to,"+delete");In(e)})}function Rn(e,t,r,n,i){function o(){var t=s+r;return t<e.first||t>=e.first+e.size?f=!1:(s=t,c=_i(e,t))}function l(e){var t=(i?al:ul)(c,a,r,!0);if(null==t){if(e||!o())return f=!1;a=i?(0>r?tl:el)(c):0>r?c.text.length:0}else a=t;return!0}var s=t.line,a=t.ch,u=r,c=_i(e,s),f=!0;if("char"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var h=null,d="group"==n,p=e.cm&&e.cm.getHelper(t,"wordChars"),g=!0;!(0>r)||l(!g);g=!1){var v=c.text.charAt(a)||"\n",m=Eo(v,p)?"w":d&&"\n"==v?"n":!d||/\s/.test(v)?null:"p";if(!d||g||m||(m="s"),h&&h!=m){0>r&&(r=1,l());break}if(m&&(h=m),r>0&&!l(!g))break}var y=Ot(e,Ol(s,a),u,!0);return f||(y.hitSide=!0),y}function Bn(e,t,r,n){var i,o=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+r*(s-(0>r?1.5:.5)*vr(e.display))
}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;;){var a=pr(e,l,i);if(!a.outside)break;if(0>r?0>=i:i>=o.height){a.hitSide=!0;break}i+=5*r}return a}function Gn(t,r,n,i){e.defaults[t]=r,n&&(Yl[t]=i?function(e,t,r){r!=$l&&n(e,t,r)}:n)}function Un(e){for(var t,r,n,i,o=e.split(/-(?!$)/),e=o[o.length-1],l=0;l<o.length-1;l++){var s=o[l];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Vn(e){return"string"==typeof e?is[e]:e}function Kn(e,t,r,n,i){if(n&&n.shared)return jn(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ar(e.cm,Kn)(e,t,r,n,i);var o=new cs(e,i),l=Dl(t,r);if(n&&Io(n,o,!1),l>0||0==l&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Ro("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(di(e,t.line,t,r,o)||t.line!=r.line&&di(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Wl=!0}o.addToHistory&&oo(e,{from:t,to:r,origin:"markText"},e.sel,0/0);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&pi(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&qi(e,0),Qn(e,new $n(o,a==t.line?t.ch:null,a==r.line?r.ch:null)),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){yi(e,t)&&qi(t,0)}),o.clearOnEnter&&Ss(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Nl=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++us,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Hr(u,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=r.line;c++)Ir(u,c,"text");o.atomic&&Nt(u.doc),wo(u,"markerAdded",u,o)}return o}function jn(e,t,r,n,i){n=Io(n),n.shared=!1;var o=[Kn(e,t,r,n,i)],l=o[0],s=n.widgetNode;return ji(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(Kn(e,gt(e,t),gt(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=No(o)}),new fs(o,l)}function Xn(e){return e.findMarks(Ol(e.first,0),e.clipPos(Ol(e.lastLine())),function(e){return e.parent})}function _n(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(Dl(o,l)){var s=Kn(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function Yn(e){for(var t=0;t<e.length;t++){var r=e[t],n=[r.primary.doc];ji(r.primary.doc,function(e){n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==Wo(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}}}function $n(e,t,r){this.marker=e,this.from=t,this.to=r}function qn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Zn(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Qn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Jn(e,t,r){if(e)for(var n,i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var a=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new $n(l,o.from,a?null:o.to))}}return n}function ei(e,t,r){if(e)for(var n,i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new $n(l,a?null:o.from-t,null==o.to?null:o.to-t))}}return n}function ti(e,t){if(t.full)return null;var r=mt(e,t.from.line)&&_i(e,t.from.line).markedSpans,n=mt(e,t.to.line)&&_i(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==Dl(t.from,t.to),s=Jn(r,i,l),a=ei(n,o,l),u=1==t.text.length,c=No(t.text).length+(u?i:0);if(s)for(var f=0;f<s.length;++f){var h=s[f];if(null==h.to){var d=qn(a,h.marker);d?u&&(h.to=null==d.to?null:d.to+c):h.to=i}}if(a)for(var f=0;f<a.length;++f){var h=a[f];if(null!=h.to&&(h.to+=c),null==h.from){var d=qn(s,h.marker);d||(h.from=c,u&&(s||(s=[])).push(h))}else h.from+=c,u&&(s||(s=[])).push(h)}s&&(s=ri(s)),a&&a!=s&&(a=ri(a));var p=[s];if(!u){var g,v=t.text.length-2;if(v>0&&s)for(var f=0;f<s.length;++f)null==s[f].to&&(g||(g=[])).push(new $n(s[f].marker,null,null));for(var f=0;v>f;++f)p.push(g);p.push(a)}return p}function ri(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ni(e,t){var r=fo(e,t),n=ti(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function ii(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=Wo(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(Dl(u.to,s.from)<0||Dl(u.from,s.to)>0)){var c=[a,1],f=Dl(u.from,s.from),h=Dl(u.to,s.to);(0>f||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(h>0||!l.inclusiveRight&&!h)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-1}}return i}function oi(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function li(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function si(e){return e.inclusiveLeft?-1:0}function ai(e){return e.inclusiveRight?1:0}function ui(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=Dl(n.from,i.from)||si(e)-si(t);if(o)return-o;var l=Dl(n.to,i.to)||ai(e)-ai(t);return l?l:t.id-e.id}function ci(e,t){var r,n=Wl&&e.markedSpans;if(n)for(var i,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||ui(r,i.marker)<0)&&(r=i.marker);return r}function fi(e){return ci(e,!0)}function hi(e){return ci(e,!1)}function di(e,t,r,n,i){var o=_i(e,t),l=Wl&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=Dl(u.from,r)||si(a.marker)-si(i),f=Dl(u.to,n)||ai(a.marker)-ai(i);if(!(c>=0&&0>=f||0>=c&&f>=0)&&(0>=c&&(Dl(u.to,r)>0||a.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Dl(u.from,n)<0||a.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function pi(e){for(var t;t=fi(e);)e=t.find(-1,!0).line;return e}function gi(e){for(var t,r;t=hi(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function vi(e,t){var r=_i(e,t),n=pi(r);return r==n?t:Zi(n)}function mi(e,t){if(t>e.lastLine())return t;var r,n=_i(e,t);if(!yi(e,n))return t;for(;r=hi(n);)n=r.find(1,!0).line;return Zi(n)+1}function yi(e,t){var r=Wl&&t.markedSpans;if(r)for(var n,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&bi(e,t,n))return!0}}function bi(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return bi(e,n.line,qn(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&bi(e,t,i))return!0}function wi(e,t,r){Ji(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Hn(e,null,r)}function xi(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Rs(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),Go(t.display.measure,Ro("div",[e.node],null,r))}return e.height=e.node.offsetHeight}function Ci(e,t,r,n){var i=new hs(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),zn(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!yi(e,t)){var n=Ji(t)<e.scrollTop;qi(t,t.height+xi(i)),n&&Hn(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),i}function Si(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),oi(e),li(e,r);var i=n?n(e):1;i!=e.height&&qi(e,i)}function Li(e){e.parent=null,oi(e)}function ki(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Ti(t,r){if(t.blankLine)return t.blankLine(r);if(t.innerMode){var n=e.innerMode(t,r);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Mi(t,r,n,i){for(var o=0;10>o;o++){i&&(i[0]=e.innerMode(t,n).mode);var l=t.token(r,n);if(r.pos>r.start)return l}throw new Error("Mode "+t.name+" failed to advance stream.")}function Ai(e,t,r,n){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?ts(l.mode,c):c}}var o,l=e.doc,s=l.mode;t=gt(l,t);var a,u=_i(l,t.line),c=Bt(e,t.line,r),f=new as(u.text,e.options.tabSize);for(n&&(a=[]);(n||f.pos<t.ch)&&!f.eol();)f.start=f.pos,o=Mi(s,f,c),n&&a.push(i(!0));return n?a:i()}function Ni(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,f=new as(t,e.options.tabSize),h=e.options.addModeClass&&[null];for(""==t&&ki(Ti(r,n),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,l&&Di(e,t,n,f.pos),f.pos=t.length,a=null):a=ki(Mi(r,f,n,h),o),h){var d=h[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u<f.start;)u=Math.min(f.start,u+5e4),i(u,c);c=a}f.start=f.pos}for(;u<f.pos;){var p=Math.min(f.pos,u+5e4);i(p,c),u=p}}function Wi(e,t,r,n){var i=[e.state.modeGen],o={};Ni(e,t.text,e.doc.mode,r,function(e,t){i.push(e,t)},o,n);for(var l=0;l<e.state.overlays.length;++l){var s=e.state.overlays[l],a=1,u=0;Ni(e,t.text,s.mode,!0,function(e,t){for(var r=a;e>u;){var n=i[a];n>e&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"cm-overlay "+t),a=r+2;else for(;a>r;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Oi(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Wi(e,t,t.stateAfter=Bt(e,Zi(t)));t.styles=n.styles,n.classes?t.styleClasses=n.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function Di(e,t,r,n){var i=e.doc.mode,o=new as(t,e.options.tabSize);for(o.start=o.pos=n||0,""==t&&Ti(i,r);!o.eol()&&o.pos<=e.options.maxHighlightLength;)Mi(i,o,r),o.start=o.pos}function Hi(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?gs:ps;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Ii(e,t){var r=Ro("span",null,null,gl?"padding-right: .1px":null),n={pre:Ro("pre",[r]),content:r,col:0,pos:0,cm:e,splitSpaces:(dl||gl)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,l=i?t.rest[i-1]:t.line;n.pos=0,n.addToken=Ei,$o(e.display.measure)&&(o=eo(l))&&(n.addToken=Fi(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&Zi(l);Bi(l,n,Oi(e,l,s)),l.styleClasses&&(l.styleClasses.bgClass&&(n.bgClass=Ko(l.styleClasses.bgClass,n.bgClass||"")),l.styleClasses.textClass&&(n.textClass=Ko(l.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Yo(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return gl&&/\bcm-tab\b/.test(n.content.lastChild.className)&&(n.content.className="cm-tab-wrap-hack"),ks(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ko(n.pre.className,n.textClass||"")),n}function Pi(e){var t=Ro("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ei(e,t,r,n,i,o,l){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,zi):t,a=e.cm.state.specialChars,u=!1;if(a.test(t))for(var c=document.createDocumentFragment(),f=0;;){a.lastIndex=f;var h=a.exec(t),d=h?h.index-f:t.length-f;if(d){var p=document.createTextNode(s.slice(f,f+d));c.appendChild(dl&&9>pl?Ro("span",[p]):p),e.map.push(e.pos,e.pos+d,p),e.col+=d,e.pos+=d}if(!h)break;if(f+=d+1,"	"==h[0]){var g=e.cm.options.tabSize,v=g-e.col%g,p=c.appendChild(Ro("span",Ao(v),"cm-tab"));p.setAttribute("role","presentation"),p.setAttribute("cm-text","	"),e.col+=v}else{var p=e.cm.options.specialCharPlaceholder(h[0]);p.setAttribute("cm-text",h[0]),c.appendChild(dl&&9>pl?Ro("span",[p]):p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),dl&&9>pl&&(u=!0),e.pos+=t.length}if(r||n||i||u||l){var m=r||"";n&&(m+=n),i&&(m+=i);var y=Ro("span",[c],m,l);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function zi(e){for(var t=" ",r=0;r<e.length-2;++r)t+=r%2?" ":" ";return t+=" "}function Fi(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var f=0;f<t.length;f++){var h=t[f];if(h.to>u&&h.from<=u)break}if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function Ri(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Bi(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,f,h,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=f=s="",h=null,m=1/0;for(var y=[],b=0;b<n.length;++b){var w=n[b],x=w.marker;"bookmark"==x.type&&w.from==p&&x.widgetNode?y.push(x):w.from<=p&&(null==w.to||w.to>p||x.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&m>w.to&&(m=w.to,u=""),x.className&&(a+=" "+x.className),x.css&&(s=x.css),x.startStyle&&w.from==p&&(c+=" "+x.startStyle),x.endStyle&&w.to==m&&(u+=" "+x.endStyle),x.title&&!f&&(f=x.title),x.collapsed&&(!h||ui(h.marker,x)<0)&&(h=w)):w.from>p&&m>w.from&&(m=w.from)}if(h&&(h.from||0)==p){if(Ri(t,(null==h.to?d+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}if(!h&&y.length)for(var b=0;b<y.length;++b)Ri(t,0,y[b])}if(p>=d)break;for(var C=Math.min(d,m);;){if(v){var S=p+v.length;if(!h){var L=S>C?v.slice(0,C-p):v;t.addToken(t,L,l?l+a:a,c,p+L.length==m?u:"",f,s)}if(S>=C){v=v.slice(C-p),p=C;break}p=S,c=""}v=i.slice(o,o=r[g++]),l=Hi(r[g++],t.cm.options)}}else for(var g=1;g<r.length;g+=2)t.addToken(t,i.slice(o,o=r[g]),Hi(r[g+1],t.cm.options))}function Gi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==No(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ui(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){Si(e,r,i,n),wo(e,"change",e,t)}function l(e,t){for(var r=e,o=[];t>r;++r)o.push(new ds(u[r],i(r),n));return o}var s=t.from,a=t.to,u=t.text,c=_i(e,s.line),f=_i(e,a.line),h=No(u),d=i(u.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(Gi(e,t)){var g=l(0,u.length-1);o(f,f.text,d),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+h+c.text.slice(a.ch),d);else{var g=l(1,u.length-1);g.push(new ds(h+c.text.slice(a.ch),d,n)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,g)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,h+f.text.slice(a.ch),d);var g=l(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,g)}wo(e,"change",e,t)}function Vi(e){this.lines=e,this.parent=null;for(var t=0,r=0;t<e.length;++t)e[t].parent=this,r+=e[t].height;this.height=r}function Ki(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}function ji(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l<e.linked.length;++l){var s=e.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;(!r||a)&&(t(s.doc,a),n(s.doc,e,a))}}}n(e,null,!0)}function Xi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,l(e),r(e),e.options.lineWrapping||h(e),e.options.mode=t.modeOption,Hr(e)}function _i(e,t){if(t-=e.first,0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(o>t){r=i;break}t-=o}return r.lines[t]}function Yi(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function $i(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function qi(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Zi(e){if(null==e.parent)return null;for(var t=e.parent,r=Wo(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function Qi(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(o>t){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var n=0;n<e.lines.length;++n){var l=e.lines[n],s=l.height;if(s>t)break;t-=s}return r+n}function Ji(e){e=pi(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var n=0;n<o.children.length;++n){var l=o.children[n];if(l==r)break;t+=l.height}return t}function eo(e){var t=e.order;return null==t&&(t=e.order=Qs(e.text)),t}function to(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ro(e,t){var r={from:_(t.from),to:Xl(t),text:Yi(e,t.from,t.to)};return uo(e,r,t.from.line,t.to.line+1),ji(e,function(e){uo(e,r,t.from.line,t.to.line+1)},!0),r}function no(e){for(;e.length;){var t=No(e);if(!t.ranges)break;e.pop()}}function io(e,t){return t?(no(e.done),No(e.done)):e.done.length&&!No(e.done).ranges?No(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),No(e.done)):void 0}function oo(e,t,r,n){var i=e.history;i.undone.length=0;var o,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=io(i,i.lastOp==n))){var s=No(o.changes);0==Dl(t.from,t.to)&&0==Dl(t.from,s.to)?s.to=Xl(t):o.changes.push(ro(e,t))}else{var a=No(i.done);for(a&&a.ranges||ao(e.sel,i.done),o={changes:[ro(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,s||ks(e,"historyAdded")}function lo(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function so(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||lo(e,o,No(i.done),t))?i.done[i.done.length-1]=t:ao(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&no(i.undone)}function ao(e,t){var r=No(t);r&&r.ranges&&r.equals(e)||t.push(e)}function uo(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function co(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function fo(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=0,i=[];n<t.text.length;++n)i.push(co(r[n]));return i}function ho(e,t,r){for(var n=0,i=[];n<e.length;++n){var o=e[n];if(o.ranges)i.push(r?ct.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];i.push({changes:s});for(var a=0;a<l.length;++a){var u,c=l[a];if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&Wo(t,Number(u[1]))>-1&&(No(s)[f]=c[f],delete c[f])}}}return i}function po(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function go(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var s=0;s<o.ranges.length;s++)po(o.ranges[s].anchor,t,r,n),po(o.ranges[s].head,t,r,n)}else{for(var s=0;s<o.changes.length;++s){var a=o.changes[s];if(r<a.from.line)a.from=Ol(a.from.line+n,a.from.ch),a.to=Ol(a.to.line+n,a.to.ch);else if(t<=a.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function vo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;go(e.done,r,n,i),go(e.undone,r,n,i)}function mo(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function yo(e){return e.target||e.srcElement}function bo(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Ll&&e.ctrlKey&&1==t&&(t=3),t}function wo(e,t){function r(e){return function(){e.apply(null,o)}}var n=e._handlers&&e._handlers[t];if(n){var i,o=Array.prototype.slice.call(arguments,2);Fl?i=Fl.delayedCallbacks:Ts?i=Ts:(i=Ts=[],setTimeout(xo,0));for(var l=0;l<n.length;++l)i.push(r(n[l]))}}function xo(){var e=Ts;Ts=null;for(var t=0;t<e.length;++t)e[t]()}function Co(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ks(e,r||t.type,e,t),mo(t)||t.codemirrorIgnore}function So(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==Wo(r,t[n])&&r.push(t[n])}function Lo(e,t){var r=e._handlers&&e._handlers[t];return r&&r.length>0}function ko(e){e.prototype.on=function(e,t){Ss(this,e,t)},e.prototype.off=function(e,t){Ls(this,e,t)}}function To(){this.id=null}function Mo(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("	",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function Ao(e){for(;Hs.length<=e;)Hs.push(No(Hs)+" ");return Hs[e]}function No(e){return e[e.length-1]}function Wo(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function Oo(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Do(){}function Ho(e,t){var r;return Object.create?r=Object.create(e):(Do.prototype=e,r=new Do),t&&Io(t,r),r}function Io(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||r===!1&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function Po(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Eo(e,t){return t?t.source.indexOf("\\w")>-1&&zs(e)?!0:t.test(e):zs(e)}function zo(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Fo(e){return e.charCodeAt(0)>=768&&Fs.test(e)}function Ro(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Bo(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Go(e,t){return Bo(e).appendChild(t)}function Uo(){return document.activeElement}function Vo(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Ko(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!Vo(r[n]).test(t)&&(t+=" "+r[n]);return t}function jo(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function Xo(){Ks||(_o(),Ks=!0)}function _o(){var e;Ss(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,jo(Ur)},100))}),Ss(window,"blur",function(){jo(pn)})}function Yo(e){if(null==Bs){var t=Ro("span","​");Go(e,Ro("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Bs=t.offsetWidth<=1&&t.offsetHeight>2&&!(dl&&8>pl))}var r=Bs?Ro("span","​"):Ro("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function $o(e){if(null!=Gs)return Gs;var t=Go(e,document.createTextNode("AخA")),r=Ps(t,0,1).getBoundingClientRect();if(!r||r.left==r.right)return!1;var n=Ps(t,1,2).getBoundingClientRect();return Gs=n.right-r.right<3}function qo(e){if(null!=$s)return $s;var t=Go(e,Ro("span","x")),r=t.getBoundingClientRect(),n=Ps(t,0,1).getBoundingClientRect();return $s=Math.abs(r.left-n.left)>1}function Zo(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function Qo(e){return e.level%2?e.to:e.from}function Jo(e){return e.level%2?e.from:e.to}function el(e){var t=eo(e);return t?Qo(t[0]):0}function tl(e){var t=eo(e);return t?Jo(No(t)):e.text.length}function rl(e,t){var r=_i(e.doc,t),n=pi(r);n!=r&&(t=Zi(n));var i=eo(n),o=i?i[0].level%2?tl(n):el(n):0;return Ol(t,o)}function nl(e,t){for(var r,n=_i(e.doc,t);r=hi(n);)n=r.find(1,!0).line,t=null;var i=eo(n),o=i?i[0].level%2?el(n):tl(n):n.text.length;return Ol(null==t?Zi(n):t,o)}function il(e,t){var r=rl(e,t.line),n=_i(e.doc,r.line),i=eo(n);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return Ol(r.line,l?0:o)}return r}function ol(e,t,r){var n=e[0].level;return t==n?!0:r==n?!1:r>t}function ll(e,t){Zs=null;for(var r,n=0;n<e.length;++n){var i=e[n];if(i.from<t&&i.to>t)return n;if(i.from==t||i.to==t){if(null!=r)return ol(e,i.level,e[r].level)?(i.from!=i.to&&(Zs=r),n):(i.from!=i.to&&(Zs=n),r);r=n}}return r}function sl(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&Fo(e.text.charAt(t)));return t}function al(e,t,r,n){var i=eo(e);if(!i)return ul(e,t,r,n);for(var o=ll(i,t),l=i[o],s=sl(e,t,l.level%2?-r:r,n);;){if(s>l.from&&s<l.to)return s;if(s==l.from||s==l.to)return ll(i,s)==o?s:(l=i[o+=r],r>0==l.level%2?l.to:l.from);if(l=i[o+=r],!l)return null;s=r>0==l.level%2?sl(e,l.to,-1,n):sl(e,l.from,1,n)}}function ul(e,t,r,n){var i=t+r;if(n)for(;i>0&&Fo(e.text.charAt(i));)i+=r;return 0>i||i>e.text.length?null:i}var cl=/gecko\/\d/i.test(navigator.userAgent),fl=/MSIE \d/.test(navigator.userAgent),hl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),dl=fl||hl,pl=dl&&(fl?document.documentMode||6:hl[1]),gl=/WebKit\//.test(navigator.userAgent),vl=gl&&/Qt\/\d+\.\d+/.test(navigator.userAgent),ml=/Chrome\//.test(navigator.userAgent),yl=/Opera\//.test(navigator.userAgent),bl=/Apple Computer/.test(navigator.vendor),wl=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),xl=/PhantomJS/.test(navigator.userAgent),Cl=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),Sl=Cl||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),Ll=Cl||/Mac/.test(navigator.platform),kl=/win/i.test(navigator.platform),Tl=yl&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Tl&&(Tl=Number(Tl[1])),Tl&&Tl>=15&&(yl=!1,gl=!0);var Ml=Ll&&(vl||yl&&(null==Tl||12.11>Tl)),Al=cl||dl&&pl>=9,Nl=!1,Wl=!1;g.prototype=Io({update:function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==n&&this.overlayHack(),this.checkedOverlay=!0),{right:r?n:0,bottom:t?n:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=Ll&&!wl?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,r=function(e){yo(e)!=t.vert&&yo(e)!=t.horiz&&Ar(t.cm,jr)(e)};Ss(this.vert,"mousedown",r),Ss(this.horiz,"mousedown",r)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),v.prototype=Io({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={"native":g,"null":v},k.prototype.signal=function(e,t){Lo(e,t)&&this.events.push(arguments)},k.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ks.apply(null,this.events[e])};var Ol=e.Pos=function(e,t){return this instanceof Ol?(this.line=e,void(this.ch=t)):new Ol(e,t)},Dl=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch},Hl=null;rt.prototype=Io({init:function(e){function t(e){if(n.somethingSelected())Hl=n.getSelections(),r.inaccurateSelection&&(r.prevInput="",r.inaccurateSelection=!1,o.value=Hl.join("\n"),Is(o));else{if(!n.options.lineWiseCopyCut)return;var t=et(n);Hl=t.text,"cut"==e.type?n.setSelections(t.ranges,null,Ns):(r.prevInput="",o.value=t.text.join("\n"),Is(o))}"cut"==e.type&&(n.state.cutIncoming=!0)}var r=this,n=this.cm,i=this.wrapper=nt(),o=this.textarea=i.firstChild;e.wrapper.insertBefore(i,e.wrapper.firstChild),Cl&&(o.style.width="0px"),Ss(o,"input",function(){dl&&pl>=9&&r.hasSelection&&(r.hasSelection=null),r.poll()}),Ss(o,"paste",function(){if(gl&&!n.state.fakedLastChar&&!(new Date-n.state.lastMiddleDown<200)){var e=o.selectionStart,t=o.selectionEnd;o.value+="$",o.selectionEnd=t,o.selectionStart=e,n.state.fakedLastChar=!0}n.state.pasteIncoming=!0,r.fastPoll()}),Ss(o,"cut",t),Ss(o,"copy",t),Ss(e.scroller,"paste",function(t){Vr(e,t)||(n.state.pasteIncoming=!0,r.focus())}),Ss(e.lineSpace,"selectstart",function(t){Vr(e,t)||ws(t)}),Ss(o,"compositionstart",function(){var e=n.getCursor("from");r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Ss(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,r=e.doc,n=Ht(e);if(e.options.moveInputWithCursor){var i=fr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},showSelection:function(e){var t=this.cm,r=t.display;Go(r.cursorDiv,e.cursors),Go(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Ys&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var l=t?"-":r||n.getSelection();this.textarea.value=l,n.state.focused&&Is(this.textarea),dl&&pl>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",dl&&pl>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Sl||Uo()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0
},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var n=r.poll();n||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,r=this.prevInput;if(!e.state.focused||_s(t)&&!r||Z(e)||e.options.disableInput||e.state.keySeq)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var n=t.value;if(n==r&&!e.somethingSelected())return!1;if(dl&&pl>=9&&this.hasSelection===n||Ll&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=n.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(r.length,n.length);l>o&&r.charCodeAt(o)==n.charCodeAt(o);)++o;var s=this;return Mr(e,function(){Q(e,n.slice(o),r.length-o,null,s.composing?"*compose":null),n.length>1e3||n.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=n,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){dl&&pl>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t="​"+(e?l.value:"");l.value="⇚",l.value=t,n.prevInput=e?"":"​",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.position="relative",l.style.cssText=c,dl&&9>pl&&o.scrollbars.setScrollTop(o.scroller.scrollTop=a),null!=l.selectionStart){(!dl||dl&&9>pl)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&"​"==n.prevInput?Ar(i,ns.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):o.input.reset()};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,l=n.textarea,s=Kr(i,e),a=o.scroller.scrollTop;if(s&&!yl){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(s)&&Ar(i,Tt)(i.doc,dt(s),Ns);var c=l.style.cssText;if(n.wrapper.style.position="absolute",l.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(dl?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",gl)var f=window.scrollY;if(o.input.focus(),gl&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(l.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),dl&&pl>=9&&t(),Al){Cs(e);var h=function(){Ls(window,"mouseup",h),setTimeout(r,20)};Ss(window,"mouseup",h)}else setTimeout(r,50)}},setUneditable:Do,needsContentAttribute:!1},rt.prototype),it.prototype=Io({init:function(e){function t(e){if(n.somethingSelected())Hl=n.getSelections(),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=et(n);Hl=t.text,"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,Ns),n.replaceSelection("",null,"cut")})}if(e.clipboardData&&!Cl)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Hl.join("\n"));else{var r=nt(),i=r.firstChild;n.display.lineSpace.insertBefore(r,n.display.lineSpace.firstChild),i.value=Hl.join("\n");var o=document.activeElement;Is(i),setTimeout(function(){n.display.lineSpace.removeChild(r),o.focus()},50)}}var r=this,n=r.cm,i=r.div=e.lineDiv;i.contentEditable="true",tt(i),Ss(i,"paste",function(e){var t=e.clipboardData&&e.clipboardData.getData("text/plain");t&&(e.preventDefault(),n.replaceSelection(t,null,"paste"))}),Ss(i,"compositionstart",function(e){var t=e.data;if(r.composing={sel:n.doc.sel,data:t,startData:t},t){var i=n.doc.sel.primary(),o=n.getLine(i.head.line),l=o.indexOf(t,Math.max(0,i.head.ch-t.length));l>-1&&l<=i.head.ch&&(r.composing.sel=dt(Ol(i.head.line,l),Ol(i.head.line,l+t.length)))}}),Ss(i,"compositionupdate",function(e){r.composing.data=e.data}),Ss(i,"compositionend",function(e){var t=r.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||r.applyComposition(t),r.composing==t&&(r.composing=null)},50))}),Ss(i,"touchstart",function(){r.forceCompositionEnd()}),Ss(i,"input",function(){r.composing||r.pollContent()||Mr(r.cm,function(){Hr(n)})}),Ss(i,"copy",t),Ss(i,"cut",t)},prepareSelection:function(){var e=Ht(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=st(this.cm,e.anchorNode,e.anchorOffset),n=st(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!n||n.bad||0!=Dl($(r,n),t.from())||0!=Dl(Y(r,n),t.to())){var i=ot(this.cm,t.from()),o=ot(this.cm,t.to());if(i||o){var l=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var a=l[l.length-1].measure,u=a.maps?a.maps[a.maps.length-1]:a.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:l[0].measure.map[2],offset:0};try{var c=Ps(i.node,i.offset,o.offset,o.node)}catch(f){}c&&(e.removeAllRanges(),e.addRange(c),s&&null==e.anchorNode?e.addRange(s):cl&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Go(this.cm.display.cursorDiv,e.cursors),Go(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Rs(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():Mr(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var r=st(t,e.anchorNode,e.anchorOffset),n=st(t,e.focusNode,e.focusOffset);r&&n&&Mr(t,function(){Tt(t.doc,dt(r,n),Ns),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o;if(n.line==t.viewFrom||0==(o=Er(e,n.line)))var l=Zi(t.view[0].line),s=t.view[0].node;else var l=Zi(t.view[o].line),s=t.view[o-1].node.nextSibling;var a=Er(e,i.line);if(a==t.view.length-1)var u=t.viewTo-1,c=t.view[a].node;else var u=Zi(t.view[a+1].line)-1,c=t.view[a+1].node.previousSibling;for(var f=Xs(ut(e,s,c,l,u)),h=Yi(e.doc,Ol(l,0),Ol(u,_i(e.doc,u).text.length));f.length>1&&h.length>1;)if(No(f)==No(h))f.pop(),h.pop(),u--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),l++}for(var d=0,p=0,g=f[0],v=h[0],m=Math.min(g.length,v.length);m>d&&g.charCodeAt(d)==v.charCodeAt(d);)++d;for(var y=No(f),b=No(h),w=Math.min(y.length-(1==f.length?d:0),b.length-(1==h.length?d:0));w>p&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;f[f.length-1]=y.slice(0,y.length-p),f[0]=f[0].slice(d);var x=Ol(l,d),C=Ol(u,h.length?No(h).length-p:0);return f.length>1||f[0]||Dl(x,C)?(An(e.doc,f,x,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){e.data&&e.data!=e.startData&&Ar(this.cm,Q)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.setAttribute("contenteditable","false")},onKeyPress:function(e){e.preventDefault(),Ar(this.cm,Q)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},onContextMenu:Do,resetPosition:Do,needsContentAttribute:!0},it.prototype),e.inputStyles={textarea:rt,contenteditable:it},ct.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(0!=Dl(r.anchor,n.anchor)||0!=Dl(r.head,n.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ft(_(this.ranges[t].anchor),_(this.ranges[t].head));return new ct(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Dl(t,n.from())>=0&&Dl(e,n.to())<=0)return r}return-1}},ft.prototype={from:function(){return $(this.anchor,this.head)},to:function(){return Y(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Il,Pl,El,zl={left:0,right:0,top:0,bottom:0},Fl=null,Rl=0,Bl=0,Gl=0,Ul=null;dl?Ul=-.53:cl?Ul=15:ml?Ul=-.7:bl&&(Ul=-1/3);var Vl=function(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}};e.wheelEventPixels=function(e){var t=Vl(e);return t.x*=Ul,t.y*=Ul,t};var Kl=new To,jl=null,Xl=e.changeEnd=function(e){return e.text?Ol(e.from.line+e.text.length-1,No(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,n=r[e];(r[e]!=t||"mode"==e)&&(r[e]=t,Yl.hasOwnProperty(e)&&Ar(this,Yl[e])(this,t,n))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Vn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Nr(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:n,modeSpec:t,opaque:r&&r.opaque}),this.state.modeGen++,Hr(this)}),removeOverlay:Nr(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Hr(this)}}),indentLine:Nr(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),mt(this.doc,e)&&En(this,e,t,r)}),indentSelection:Nr(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(En(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&In(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;r>a;++a)En(this,a,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[n].from().ch>0&&Ct(this.doc,n,new ft(o,u[n].to()),Ns)}}}),getTokenAt:function(e,t){return Ai(this,e,t)},getLineTokens:function(e,t){return Ai(this,Ol(e),t,!0)},getTokenTypeAt:function(e){e=gt(this.doc,e);var t,r=Oi(this,_i(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("cm-overlay "):-1;return 0>s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!es.hasOwnProperty(t))return r;var n=es[t],i=this.getModeAt(e);if("string"==typeof i[t])n[i[t]]&&r.push(n[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var l=n[i[t][o]];l&&r.push(l)}else i.helperType&&n[i.helperType]?r.push(n[i.helperType]):n[i.name]&&r.push(n[i.name]);for(var o=0;o<n._global.length;o++){var s=n._global[o];s.pred(i,this)&&-1==Wo(r,s.val)&&r.push(s.val)}return r},getStateAfter:function(e,t){var r=this.doc;return e=pt(r,null==e?r.first+r.size-1:e),Bt(this,e+1,t)},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?gt(this.doc,e):e?n.from():n.to(),fr(this,r,t||"page")},charCoords:function(e,t){return cr(this,gt(this.doc,e),t||"page")},coordsChar:function(e,t){return e=ur(this,e,t||"page"),pr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=ur(this,{top:e,left:0},t||"page").top,Qi(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var r,n=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,n=!0),r=_i(this.doc,e)}else r=e;return ar(this,r,{top:0,left:0},t||"page").top+(n?this.doc.height-Ji(r):0)},defaultTextHeight:function(){return vr(this.display)},defaultCharWidth:function(){return mr(this.display)},setGutterMarker:Nr(function(e,t,r){return zn(this.doc,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&zo(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Nr(function(e){var t=this,r=t.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,Ir(t,n,"gutter"),zo(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),lineInfo:function(e){if("number"==typeof e){if(!mt(this.doc,e))return null;var t=e;if(e=_i(this.doc,e),!e)return null}else{var t=Zi(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=fr(this,gt(this.doc,e));var l=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&On(this,s,l,s+t.offsetWidth,l+t.offsetHeight)},triggerOnKeyDown:Nr(an),triggerOnKeyPress:Nr(fn),triggerOnKeyUp:cn,execCommand:function(e){return ns.hasOwnProperty(e)?ns[e](this):void 0},triggerElectric:Nr(function(e){J(this,e)}),findPosH:function(e,t,r,n){var i=1;0>t&&(i=-1,t=-t);for(var o=0,l=gt(this.doc,e);t>o&&(l=Rn(this.doc,l,i,r,n),!l.hitSide);++o);return l},moveH:Nr(function(e,t){var r=this;r.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Rn(r.doc,n.head,e,t,r.options.rtlMoveVisually):0>e?n.from():n.to()},Os)}),deleteH:Nr(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Fn(this,function(r){var i=Rn(n,r.head,e,t,!1);return 0>e?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;0>t&&(i=-1,t=-t);for(var l=0,s=gt(this.doc,e);t>l;++l){var a=fr(this,s,"div");if(null==o?o=a.left:a.left=o,s=Bn(this,a,i,r),s.hitSide)break}return s},moveV:Nr(function(e,t){var r=this,n=this.doc,i=[],o=!r.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(l){if(o)return 0>e?l.from():l.to();var s=fr(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=Bn(r,s,e,t);return"page"==t&&l==n.sel.primary()&&Hn(r,null,cr(r,a,"div").top-s.top),a},Os),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=this.doc,r=_i(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==r.length)&&n?--n:++i;for(var l=r.charAt(n),s=Eo(l,o)?function(e){return Eo(e,o)}:/\s/.test(l)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!Eo(e)};n>0&&s(r.charAt(n-1));)--n;for(;i<r.length&&s(r.charAt(i));)++i}return new ft(Ol(e.line,n),Ol(e.line,i))},toggleOverwrite:function(e){(null==e||e!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?Vs(this.display.cursorDiv,"CodeMirror-overwrite"):Us(this.display.cursorDiv,"CodeMirror-overwrite"),ks(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Uo()},scrollTo:Nr(function(e,t){(null!=e||null!=t)&&Pn(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Kt(this)-this.display.barHeight,width:e.scrollWidth-Kt(this)-this.display.barWidth,clientHeight:Xt(this),clientWidth:jt(this)}},scrollIntoView:Nr(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:Ol(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)Pn(this),this.curOp.scrollToPos=e;else{var r=Dn(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(r.scrollLeft,r.scrollTop)}}),setSize:Nr(function(e,t){function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var n=this;null!=e&&(n.display.wrapper.style.width=r(e)),null!=t&&(n.display.wrapper.style.height=r(t)),n.options.lineWrapping&&ir(this);var i=n.display.viewFrom;n.doc.iter(i,n.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Ir(n,i,"widget");break}++i}),n.curOp.forceUpdate=!0,ks(n,"refresh",this)}),operation:function(e){return Mr(this,e)},refresh:Nr(function(){var e=this.display.cachedTextHeight;Hr(this),this.curOp.forceUpdate=!0,or(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),c(this),(null==e||Math.abs(e-vr(this.display))>.5)&&l(this),ks(this,"refresh",this)}),swapDoc:Nr(function(e){var t=this.doc;return t.cm=null,Xi(this,e),or(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,wo(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ko(e);var _l=e.defaults={},Yl=e.optionHandlers={},$l=e.Init={toString:function(){return"CodeMirror.Init"}};Gn("value","",function(e,t){e.setValue(t)},!0),Gn("mode",null,function(e,t){e.doc.modeOption=t,r(e)},!0),Gn("indentUnit",2,r,!0),Gn("indentWithTabs",!1),Gn("smartIndent",!0),Gn("tabSize",4,function(e){n(e),or(e),Hr(e)},!0),Gn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,r,n){t.state.specialChars=new RegExp(r.source+(r.test("	")?"":"|	"),"g"),n!=e.Init&&t.refresh()}),Gn("specialCharPlaceholder",Pi,function(e){e.refresh()},!0),Gn("electricChars",!0),Gn("inputStyle",Sl?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Gn("rtlMoveVisually",!kl),Gn("wholeLineUpdateBefore",!0),Gn("theme","default",function(e){s(e),a(e)},!0),Gn("keyMap","default",function(t,r,n){var i=Vn(r),o=n!=e.Init&&Vn(n);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Gn("extraKeys",null),Gn("lineWrapping",!1,i,!0),Gn("gutters",[],function(e){d(e.options),a(e)},!0),Gn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?L(e.display)+"px":"0",e.refresh()},!0),Gn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Gn("scrollbarStyle","native",function(e){m(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Gn("lineNumbers",!1,function(e){d(e.options),a(e)},!0),Gn("firstLineNumber",1,a,!0),Gn("lineNumberFormatter",function(e){return e},a,!0),Gn("showCursorWhenSelecting",!1,Dt,!0),Gn("resetSelectionOnContextMenu",!0),Gn("lineWiseCopyCut",!0),Gn("readOnly",!1,function(e,t){"nocursor"==t?(pn(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||e.display.input.reset())}),Gn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Gn("dragDrop",!0,Gr),Gn("cursorBlinkRate",530),Gn("cursorScrollMargin",0),Gn("cursorHeight",1,Dt,!0),Gn("singleCursorHeightPerLine",!0,Dt,!0),Gn("workTime",100),Gn("workDelay",100),Gn("flattenSpans",!0,n,!0),Gn("addModeClass",!1,n,!0),Gn("pollInterval",100),Gn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Gn("historyEventDelay",1250),Gn("viewportMargin",10,function(e){e.refresh()},!0),Gn("maxHighlightLength",1e4,n,!0),Gn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Gn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Gn("autofocus",null);var ql=e.modes={},Zl=e.mimeModes={};e.defineMode=function(t,r){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ql[t]=r},e.defineMIME=function(e,t){Zl[e]=t},e.resolveMode=function(t){if("string"==typeof t&&Zl.hasOwnProperty(t))t=Zl[t];else if(t&&"string"==typeof t.name&&Zl.hasOwnProperty(t.name)){var r=Zl[t.name];"string"==typeof r&&(r={name:r}),t=Ho(r,t),t.name=r.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,r){var r=e.resolveMode(r),n=ql[r.name];if(!n)return e.getMode(t,"text/plain");var i=n(t,r);if(Ql.hasOwnProperty(r.name)){var o=Ql[r.name];for(var l in o)o.hasOwnProperty(l)&&(i.hasOwnProperty(l)&&(i["_"+l]=i[l]),i[l]=o[l])}if(i.name=r.name,r.helperType&&(i.helperType=r.helperType),r.modeProps)for(var l in r.modeProps)i[l]=r.modeProps[l];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var Ql=e.modeExtensions={};e.extendMode=function(e,t){var r=Ql.hasOwnProperty(e)?Ql[e]:Ql[e]={};Io(t,r)},e.defineExtension=function(t,r){e.prototype[t]=r},e.defineDocExtension=function(e,t){ms.prototype[e]=t},e.defineOption=Gn;var Jl=[];e.defineInitHook=function(e){Jl.push(e)};var es=e.helpers={};e.registerHelper=function(t,r,n){es.hasOwnProperty(t)||(es[t]=e[t]={_global:[]}),es[t][r]=n},e.registerGlobalHelper=function(t,r,n,i){e.registerHelper(t,r,i),es[t]._global.push({pred:n,val:i})};var ts=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r},rs=e.startState=function(e,t,r){return e.startState?e.startState(t,r):!0};e.innerMode=function(e,t){for(;e.innerMode;){var r=e.innerMode(t);if(!r||r.mode==e)break;t=r.state,e=r.mode}return r||{mode:e,state:t}};var ns=e.commands={selectAll:function(e){e.setSelection(Ol(e.firstLine(),0),Ol(e.lastLine()),Ns)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ns)},killLine:function(e){Fn(e,function(t){if(t.empty()){var r=_i(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Ol(t.head.line+1,0)}:{from:t.head,to:Ol(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){Fn(e,function(t){return{from:Ol(t.from().line,0),to:gt(e.doc,Ol(t.to().line+1,0))}})},delLineLeft:function(e){Fn(e,function(e){return{from:Ol(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){Fn(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){Fn(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(Ol(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(Ol(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return rl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){return il(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy(function(t){return nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Os)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Os)},goLineLeftSmart:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?il(e,t.head):n},Os)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection("	")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=Ds(e.getLine(o.line),o.ch,n);t.push(new Array(n-l%n+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){Mr(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var i=t[n].head,o=_i(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new Ol(i.line,i.ch-1)),i.ch>0)i=new Ol(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Ol(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=_i(e.doc,i.line-1).text;l&&e.replaceRange(o.charAt(0)+"\n"+l.charAt(l.length-1),Ol(i.line-1,l.length-1),Ol(i.line,1),"+transpose")}r.push(new ft(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){Mr(e,function(){for(var t=e.listSelections().length,r=0;t>r;r++){var n=e.listSelections()[r];e.replaceRange("\n",n.anchor,n.head,"+input"),e.indentLine(n.from().line+1,null,!0),In(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},is=e.keyMap={};is.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},is.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},is.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},is.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},is["default"]=Ll?is.macDefault:is.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=Oo(r.split(" "),Un),o=0;o<i.length;o++){var l,s;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e};var os=e.lookupKey=function(e,t,r,n){t=Vn(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return os(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=os(e,t.fallthrough[o],r,n);if(l)return l}}},ls=e.isModifierKey=function(e){var t="string"==typeof e?e:qs[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},ss=e.keyName=function(e,t){if(yl&&34==e.keyCode&&e["char"])return!1;var r=qs[e.keyCode],n=r;return null==n||e.altGraphKey?!1:(e.altKey&&"Alt"!=r&&(n="Alt-"+n),(Ml?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(n="Ctrl-"+n),(Ml?e.ctrlKey:e.metaKey)&&"Cmd"!=r&&(n="Cmd-"+n),!t&&e.shiftKey&&"Shift"!=r&&(n="Shift-"+n),n)};e.fromTextArea=function(t,r){function n(){t.value=u.getValue()}if(r=r?Io(r):{},r.value=t.value,!r.tabindex&&t.tabIndex&&(r.tabindex=t.tabIndex),!r.placeholder&&t.placeholder&&(r.placeholder=t.placeholder),null==r.autofocus){var i=Uo();r.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body
}if(t.form&&(Ss(t.form,"submit",n),!r.leaveSubmitMethodAlone)){var o=t.form,l=o.submit;try{var s=o.submit=function(){n(),o.submit=l,o.submit(),o.submit=s}}catch(a){}}r.finishInit=function(e){e.save=n,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,n(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(Ls(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=l))}},t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},r);return u};var as=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};as.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var r=t==e;else var r=t&&(e.test?e.test(t):e(t));return r?(++this.pos,t):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ds(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ds(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Ds(this.string,null,this.tabSize)-(this.lineStart?Ds(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var us=0,cs=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++us};ko(cs),cs.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&yr(e),Lo(this,"clear")){var r=this.find();r&&wo(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],s=qn(l.markedSpans,this);e&&!this.collapsed?Ir(e,Zi(l),"text"):e&&(null!=s.to&&(i=Zi(l)),null!=s.from&&(n=Zi(l))),l.markedSpans=Zn(l.markedSpans,s),null==s.from&&this.collapsed&&!yi(this.doc,l)&&e&&qi(l,vr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var a=pi(this.lines[o]),u=f(a);u>e.display.maxLineLength&&(e.display.maxLine=a,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Hr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Nt(e.doc)),e&&wo(e,"markerCleared",e,this),t&&wr(e),this.parent&&this.parent.clear()}},cs.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],l=qn(o.markedSpans,this);if(null!=l.from&&(r=Ol(t?o:Zi(o),l.from),-1==e))return r;if(null!=l.to&&(n=Ol(t?o:Zi(o),l.to),1==e))return n}return r&&{from:r,to:n}},cs.prototype.changed=function(){var e=this.find(-1,!0),t=this,r=this.doc.cm;e&&r&&Mr(r,function(){var n=e.line,i=Zi(e.line),o=Zt(r,i);if(o&&(nr(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!yi(t.doc,n)&&null!=t.height){var l=t.height;t.height=null;var s=xi(t)-l;s&&qi(n,n.height+s)}})},cs.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=Wo(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},cs.prototype.detachLine=function(e){if(this.lines.splice(Wo(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var us=0,fs=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};ko(fs),fs.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();wo(this,"clear")}},fs.prototype.find=function(e,t){return this.primary.find(e,t)};var hs=e.LineWidget=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};ko(hs),hs.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=Zi(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=xi(this);qi(r,Math.max(0,r.height-o)),e&&Mr(e,function(){wi(e,r,-o),Ir(e,n,"widget")})}},hs.prototype.changed=function(){var e=this.height,t=this.doc.cm,r=this.line;this.height=null;var n=xi(this)-e;n&&(qi(r,r.height+n),t&&Mr(t,function(){t.curOp.forceUpdate=!0,wi(t,r,n)}))};var ds=e.Line=function(e,t,r){this.text=e,li(this,t),this.height=r?r(this):1};ko(ds),ds.prototype.lineNo=function(){return Zi(this)};var ps={},gs={};Vi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;n>r;++r){var i=this.lines[r];this.height-=i.height,Li(i),wo(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;n>e;++e)if(r(this.lines[e]))return!0}},Ki.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(i>e){var o=Math.min(t,i-e),l=n.height;if(n.removeInner(e,o),this.height-=l-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Vi))){var s=[];this.collapse(s),this.children=[new Vi(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(o>=e){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var l=i.lines.splice(i.lines.length-25,25),s=new Vi(l);i.height-=s.height,this.children.splice(n+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new Ki(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=Wo(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new Ki(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(o>e){var l=Math.min(t,o-e);if(i.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var vs=0,ms=e.Doc=function(e,t,r){if(!(this instanceof ms))return new ms(e,t,r);null==r&&(r=0),Ki.call(this,[new Vi([new ds("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=r;var n=Ol(r,0);this.sel=dt(n),this.history=new to(null),this.id=++vs,this.modeOption=t,"string"==typeof e&&(e=Xs(e)),Ui(this,{from:n,to:n,text:e}),Tt(this,dt(n),Ns)};ms.prototype=Ho(Ki.prototype,{constructor:ms,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=$i(this,this.first,this.first+this.size);return e===!1?t:t.join(e||"\n")},setValue:Wr(function(e){var t=Ol(this.first,0),r=this.first+this.size-1;Cn(this,{from:t,to:Ol(r,_i(this,r).text.length),text:Xs(e),origin:"setValue",full:!0},!0),Tt(this,dt(t))}),replaceRange:function(e,t,r,n){t=gt(this,t),r=r?gt(this,r):t,An(this,e,t,r,n)},getRange:function(e,t,r){var n=Yi(this,gt(this,e),gt(this,t));return r===!1?n:n.join(r||"\n")},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){return mt(this,e)?_i(this,e):void 0},getLineNumber:function(e){return Zi(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=_i(this,e)),pi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return gt(this,e)},getCursor:function(e){var t,r=this.sel.primary();return t=null==e||"head"==e?r.head:"anchor"==e?r.anchor:"end"==e||"to"==e||e===!1?r.to():r.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Wr(function(e,t,r){St(this,gt(this,"number"==typeof e?Ol(e,t||0):e),null,r)}),setSelection:Wr(function(e,t,r){St(this,gt(this,e),gt(this,t||e),r)}),extendSelection:Wr(function(e,t,r){wt(this,gt(this,e),t&&gt(this,t),r)}),extendSelections:Wr(function(e,t){xt(this,yt(this,e,t))}),extendSelectionsBy:Wr(function(e,t){xt(this,Oo(this.sel.ranges,e),t)}),setSelections:Wr(function(e,t,r){if(e.length){for(var n=0,i=[];n<e.length;n++)i[n]=new ft(gt(this,e[n].anchor),gt(this,e[n].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Tt(this,ht(i,t),r)}}),addSelection:Wr(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new ft(gt(this,e),gt(this,t||e))),Tt(this,ht(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=Yi(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return e===!1?t:t.join(e||"\n")},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Yi(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||"\n")),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Wr(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];n[o]={from:l.from(),to:l.to(),text:Xs(e[o]),origin:r}}for(var s=t&&"end"!=t&&wn(this,n,t),o=n.length-1;o>=0;o--)Cn(this,n[o]);s?kt(this,s):this.cm&&In(this.cm)}),undo:Wr(function(){Ln(this,"undo")}),redo:Wr(function(){Ln(this,"redo")}),undoSelection:Wr(function(){Ln(this,"undo",!0)}),redoSelection:Wr(function(){Ln(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var n=0;n<e.undone.length;n++)e.undone[n].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new to(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ho(this.history.done),undone:ho(this.history.undone)}},setHistory:function(e){var t=this.history=new to(this.history.maxGeneration);t.done=ho(e.done.slice(0),null,!0),t.undone=ho(e.undone.slice(0),null,!0)},addLineClass:Wr(function(e,t,r){return zn(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(Vo(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:Wr(function(e,t,r){return zn(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(Vo(r));if(!o)return!1;var l=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:Wr(function(e,t,r){return Ci(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Kn(this,gt(this,e),gt(this,t),r,"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=gt(this,e),Kn(this,e,e,r,"bookmark")},findMarksAt:function(e){e=gt(this,e);var t=[],r=_i(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=gt(this,e),t=gt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];i==e.line&&e.ch>a.to||null==a.from&&i!=e.line||i==t.line&&a.from>t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first;return this.iter(function(n){var i=n.text.length+1;return i>e?(t=e,!0):(e-=i,void++r)}),gt(this,Ol(r,t))},indexFromPos:function(e){e=gt(this,e);var t=e.ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,function(e){t+=e.text.length+1}),t)},copy:function(e){var t=new ms($i(this,this.first,this.first+this.size),this.modeOption,this.first);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new ms($i(this,t,r),e.mode||this.modeOption,t);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],_n(n,Xn(this)),n},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=this.linked[r];if(n.doc==t){this.linked.splice(r,1),t.unlinkDoc(this),Yn(Xn(this));break}}if(t.history==this.history){var i=[t.id];ji(t,function(e){i.push(e.id)},!0),t.history=new to(null),t.history.done=ho(this.history.done,i),t.history.undone=ho(this.history.undone,i)}},iterLinkedDocs:function(e){ji(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),ms.prototype.eachLine=ms.prototype.iter;var ys="iter insert remove copy getEditor".split(" ");for(var bs in ms.prototype)ms.prototype.hasOwnProperty(bs)&&Wo(ys,bs)<0&&(e.prototype[bs]=function(e){return function(){return e.apply(this.doc,arguments)}}(ms.prototype[bs]));ko(ms);var ws=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},xs=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},Cs=e.e_stop=function(e){ws(e),xs(e)},Ss=e.on=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={}),i=n[t]||(n[t]=[]);i.push(r)}},Ls=e.off=function(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers&&e._handlers[t];if(!n)return;for(var i=0;i<n.length;++i)if(n[i]==r){n.splice(i,1);break}}},ks=e.signal=function(e,t){var r=e._handlers&&e._handlers[t];if(r)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)},Ts=null,Ms=30,As=e.Pass={toString:function(){return"CodeMirror.Pass"}},Ns={scroll:!1},Ws={origin:"*mouse"},Os={origin:"+move"};To.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Ds=e.countColumn=function(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=n||0,l=i||0;;){var s=e.indexOf("	",o);if(0>s||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}},Hs=[""],Is=function(e){e.select()};Cl?Is=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:dl&&(Is=function(e){try{e.select()}catch(t){}});var Ps,Es=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,zs=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Es.test(e))},Fs=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Ps=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var Rs=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};dl&&11>pl&&(Uo=function(){try{return document.activeElement}catch(e){return document.body}});var Bs,Gs,Us=e.rmClass=function(e,t){var r=e.className,n=Vo(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}},Vs=e.addClass=function(e,t){var r=e.className;Vo(t).test(r)||(e.className+=(r?" ":"")+t)},Ks=!1,js=function(){if(dl&&9>pl)return!1;var e=Ro("div");return"draggable"in e||"dragDrop"in e}(),Xs=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;n>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},_s=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(r){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Ys=function(){var e=Ro("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),$s=null,qs={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=qs,function(){for(var e=0;10>e;e++)qs[e+48]=qs[e+96]=String(e);for(var e=65;90>=e;e++)qs[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)qs[e+111]=qs[e+63235]="F"+e}();var Zs,Qs=function(){function e(e){return 247>=e?r.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?n.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,s=/[Lb1n]/,a=/[1n]/,u="L";return function(r){if(!i.test(r))return!1;for(var n,c=r.length,f=[],h=0;c>h;++h)f.push(n=e(r.charCodeAt(h)));for(var h=0,d=u;c>h;++h){var n=f[h];"m"==n?f[h]=d:d=n}for(var h=0,p=u;c>h;++h){var n=f[h];"1"==n&&"r"==p?f[h]="n":l.test(n)&&(p=n,"r"==n&&(f[h]="R"))}for(var h=1,d=f[0];c-1>h;++h){var n=f[h];"+"==n&&"1"==d&&"1"==f[h+1]?f[h]="1":","!=n||d!=f[h+1]||"1"!=d&&"n"!=d||(f[h]=d),d=n}for(var h=0;c>h;++h){var n=f[h];if(","==n)f[h]="N";else if("%"==n){for(var g=h+1;c>g&&"%"==f[g];++g);for(var v=h&&"!"==f[h-1]||c>g&&"1"==f[g]?"1":"N",m=h;g>m;++m)f[m]=v;h=g-1}}for(var h=0,p=u;c>h;++h){var n=f[h];"L"==p&&"1"==n?f[h]="L":l.test(n)&&(p=n)}for(var h=0;c>h;++h)if(o.test(f[h])){for(var g=h+1;c>g&&o.test(f[g]);++g);for(var y="L"==(h?f[h-1]:u),b="L"==(c>g?f[g]:u),v=y||b?"L":"R",m=h;g>m;++m)f[m]=v;h=g-1}for(var w,x=[],h=0;c>h;)if(s.test(f[h])){var C=h;for(++h;c>h&&s.test(f[h]);++h);x.push(new t(0,C,h))}else{var S=h,L=x.length;for(++h;c>h&&"L"!=f[h];++h);for(var m=S;h>m;)if(a.test(f[m])){m>S&&x.splice(L,0,new t(1,S,m));var k=m;for(++m;h>m&&a.test(f[m]);++m);x.splice(L,0,new t(2,k,m)),S=m}else++m;h>S&&x.splice(L,0,new t(1,S,h))}return 1==x[0].level&&(w=r.match(/^\s+/))&&(x[0].from=w[0].length,x.unshift(new t(0,0,w[0].length))),1==No(x).level&&(w=r.match(/\s+$/))&&(No(x).to-=w[0].length,x.push(new t(0,c-w[0].length,c))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=No(x).level&&x.push(new t(x[0].level,c,c)),x}}();return e.version="5.3.0",e});;
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("xml",function(e,n){function r(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();if("<"==r)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(i("atom","]]>")):null:t.match("--")?n(i("comment","-->")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(l(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=i("meta","?>"),"meta"):(z=t.eat("/")?"closeTag":"openTag",e.tokenize=o,"tag bracket");if("&"==r){var a;return a=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),a?"atom":"error"}return t.eatWhile(/[^&<]/),null}function o(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=r,z=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return z="equals",null;if("<"==n){e.tokenize=r,e.state=f,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=o;break}return"string"};return e.isInAttribute=!0,e}function i(t,e){return function(n,o){for(;!n.eol();){if(n.match(e)){o.tokenize=r;break}n.next()}return t}}function l(t){return function(e,n){for(var o;null!=(o=e.next());){if("<"==o)return n.tokenize=l(t+1),n.tokenize(e,n);if(">"==o){if(1==t){n.tokenize=r;break}return n.tokenize=l(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(T.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function d(t){t.context&&(t.context=t.context.prev)}function c(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!T.contextGrabbers.hasOwnProperty(n)||!T.contextGrabbers[n].hasOwnProperty(e))return;d(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),s):"closeTag"==t?m:f}function s(t,e,n){return"word"==t?(n.tagName=e.current(),N="tag",h):(N="error",s)}function m(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&T.implicitlyClosed.hasOwnProperty(n.context.tagName)&&d(n),n.context&&n.context.tagName==r?(N="tag",g):(N="tag error",p)}return N="error",p}function g(t,e,n){return"endTag"!=t?(N="error",g):(d(n),f)}function p(t,e,n){return N="error",g(t,e,n)}function h(t,e,n){if("word"==t)return N="attribute",x;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||T.autoSelfClosers.hasOwnProperty(r)?c(n,r):(c(n,r),n.context=new u(n,r,o==n.indented)),f}return N="error",h}function x(t,e,n){return"equals"==t?b:(T.allowMissing||(N="error"),h(t,e,n))}function b(t,e,n){return"string"==t?k:"word"==t&&T.allowUnquoted?(N="string",h):(N="error",h(t,e,n))}function k(t,e,n){return"string"==t?k:h(t,e,n)}var w=e.indentUnit,v=n.multilineTagIndentFactor||1,y=n.multilineTagIndentPastTag;null==y&&(y=!0);var z,N,T=n.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},C=n.alignCDATA;return{startState:function(){return{tokenize:r,state:f,indented:0,tagName:null,tagStart:null,context:null}},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;z=null;var n=e.tokenize(t,e);return(n||z)&&"comment"!=n&&(N=null,e.state=e.state(z||n,t,e),N&&(n="error"==N?n+" error":N)),n},indent:function(e,n,a){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+w;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=o&&e.tokenize!=r)return a?a.match(/^(\s*)/)[0].length:0;if(e.tagName)return y?e.tagStart+e.tagName.length+2:e.tagStart+w*v;if(C&&/<!\[CDATA\[/.test(n))return 0;var l=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!T.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var u=T.contextGrabbers[i.tagName];if(!u||!u.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&!i.startOfLine;)i=i.prev;return i?i.indent+w:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:n.htmlMode?"html":"xml",helperType:n.htmlMode?"html":"xml"}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})});;
//
// jQuery MiniColors: A tiny color picker built on jQuery
//
// Developed by Cory LaViska for A Beautiful Site, LLC
//
// Licensed under the MIT license: http://opensource.org/licenses/MIT
//
!function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";function t(t,o){var s,a,n,e,r,l,h=i('<div class="minicolors" />'),d=i.minicolors.defaults;if(!t.data("minicolors-initialized")){if(o=i.extend(!0,{},d,o),h.addClass("minicolors-theme-"+o.theme).toggleClass("minicolors-with-opacity",o.opacity),void 0!==o.position&&i.each(o.position.split(" "),function(){h.addClass("minicolors-position-"+this)}),a="rgb"===o.format?o.opacity?"25":"20":o.keywords?"11":"7",t.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",o).prop("size",a).wrap(h).after('<div class="minicolors-panel minicolors-slider-'+o.control+'"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>'),o.inline||(t.after('<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch"><span class="minicolors-swatch-color"></span></span>'),t.next(".minicolors-input-swatch").on("click",function(i){i.preventDefault(),t.focus()})),r=t.parent().find(".minicolors-panel"),r.on("selectstart",function(){return!1}).end(),o.swatches&&0!==o.swatches.length)for(r.addClass("minicolors-with-swatches"),n=i('<ul class="minicolors-swatches"></ul>').appendTo(r),l=0;l<o.swatches.length;++l)"object"===i.type(o.swatches[l])?(s=o.swatches[l].name,e=o.swatches[l].color):(s="",e=o.swatches[l]),e=v(e)?g(e,!0):I(u(e,!0)),i('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" title="'+s+'"></span></li>').appendTo(n).data("swatch-color",o.swatches[l]).find(".minicolors-swatch-color").css({backgroundColor:C(e),opacity:e.a}),o.swatches[l]=e;o.inline&&t.parent().addClass("minicolors-inline"),c(t,!1),t.data("minicolors-initialized",!0)}}function o(i){var t=i.parent();i.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),t.before(i).remove()}function s(i){var t=i.parent(),o=t.find(".minicolors-panel"),s=i.data("minicolors-settings");!i.data("minicolors-initialized")||i.prop("disabled")||t.hasClass("minicolors-inline")||t.hasClass("minicolors-focus")||(a(),t.addClass("minicolors-focus"),o.stop(!0,!0).fadeIn(s.showSpeed,function(){s.show&&s.show.call(i.get(0))}))}function a(){i(".minicolors-focus").each(function(){var t=i(this),o=t.find(".minicolors-input"),s=t.find(".minicolors-panel"),a=o.data("minicolors-settings");s.fadeOut(a.hideSpeed,function(){a.hide&&a.hide.call(o.get(0)),t.removeClass("minicolors-focus")})})}function n(i,t,o){var s,a,n,r,c=i.parents(".minicolors").find(".minicolors-input"),l=c.data("minicolors-settings"),h=i.find("[class$=-picker]"),d=i.offset().left,p=i.offset().top,u=Math.round(t.pageX-d),g=Math.round(t.pageY-p),m=o?l.animationSpeed:0;t.originalEvent.changedTouches&&(u=t.originalEvent.changedTouches[0].pageX-d,g=t.originalEvent.changedTouches[0].pageY-p),u<0&&(u=0),g<0&&(g=0),u>i.width()&&(u=i.width()),g>i.height()&&(g=i.height()),i.parent().is(".minicolors-slider-wheel")&&h.parent().is(".minicolors-grid")&&(s=75-u,a=75-g,n=Math.sqrt(s*s+a*a),r=Math.atan2(a,s),r<0&&(r+=2*Math.PI),n>75&&(n=75,u=75-75*Math.cos(r),g=75-75*Math.sin(r)),u=Math.round(u),g=Math.round(g)),i.is(".minicolors-grid")?h.stop(!0).animate({top:g+"px",left:u+"px"},m,l.animationEasing,function(){e(c,i)}):h.stop(!0).animate({top:g+"px"},m,l.animationEasing,function(){e(c,i)})}function e(i,t){function o(i,t){var o,s;return i.length&&t?(o=i.offset().left,s=i.offset().top,{x:o-t.offset().left+i.outerWidth()/2,y:s-t.offset().top+i.outerHeight()/2}):null}var s,a,n,e,c,h,d,p=i.val(),u=i.attr("data-opacity"),g=i.parent(),m=i.data("minicolors-settings"),v=g.find(".minicolors-input-swatch"),b=g.find(".minicolors-grid"),w=g.find(".minicolors-slider"),y=g.find(".minicolors-opacity-slider"),C=b.find("[class$=-picker]"),M=w.find("[class$=-picker]"),x=y.find("[class$=-picker]"),I=o(C,b),S=o(M,w),z=o(x,y);if(t.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")){switch(m.control){case"wheel":e=b.width()/2-I.x,c=b.height()/2-I.y,h=Math.sqrt(e*e+c*c),d=Math.atan2(c,e),d<0&&(d+=2*Math.PI),h>75&&(h=75,I.x=69-75*Math.cos(d),I.y=69-75*Math.sin(d)),a=f(h/.75,0,100),s=f(180*d/Math.PI,0,360),n=f(100-Math.floor(S.y*(100/w.height())),0,100),p=k({h:s,s:a,b:n}),w.css("backgroundColor",k({h:s,s:a,b:100}));break;case"saturation":s=f(parseInt(I.x*(360/b.width()),10),0,360),a=f(100-Math.floor(S.y*(100/w.height())),0,100),n=f(100-Math.floor(I.y*(100/b.height())),0,100),p=k({h:s,s:a,b:n}),w.css("backgroundColor",k({h:s,s:100,b:n})),g.find(".minicolors-grid-inner").css("opacity",a/100);break;case"brightness":s=f(parseInt(I.x*(360/b.width()),10),0,360),a=f(100-Math.floor(I.y*(100/b.height())),0,100),n=f(100-Math.floor(S.y*(100/w.height())),0,100),p=k({h:s,s:a,b:n}),w.css("backgroundColor",k({h:s,s:a,b:100})),g.find(".minicolors-grid-inner").css("opacity",1-n/100);break;default:s=f(360-parseInt(S.y*(360/w.height()),10),0,360),a=f(Math.floor(I.x*(100/b.width())),0,100),n=f(100-Math.floor(I.y*(100/b.height())),0,100),p=k({h:s,s:a,b:n}),b.css("backgroundColor",k({h:s,s:100,b:100}))}u=m.opacity?parseFloat(1-z.y/y.height()).toFixed(2):1,r(i,p,u)}else v.find("span").css({backgroundColor:p,opacity:u}),l(i,p,u)}function r(i,t,o){var s,a=i.parent(),n=i.data("minicolors-settings"),e=a.find(".minicolors-input-swatch");n.opacity&&i.attr("data-opacity",o),"rgb"===n.format?(s=v(t)?g(t,!0):I(u(t,!0)),o=""===i.attr("data-opacity")?1:f(parseFloat(i.attr("data-opacity")).toFixed(2),0,1),!isNaN(o)&&n.opacity||(o=1),t=i.minicolors("rgbObject").a<=1&&s&&n.opacity?"rgba("+s.r+", "+s.g+", "+s.b+", "+parseFloat(o)+")":"rgb("+s.r+", "+s.g+", "+s.b+")"):(v(t)&&(t=y(t)),t=p(t,n.letterCase)),i.val(t),e.find("span").css({backgroundColor:t,opacity:o}),l(i,t,o)}function c(t,o){var s,a,n,e,r,c,h,d,w,C,x=t.parent(),I=t.data("minicolors-settings"),S=x.find(".minicolors-input-swatch"),z=x.find(".minicolors-grid"),F=x.find(".minicolors-slider"),T=x.find(".minicolors-opacity-slider"),j=z.find("[class$=-picker]"),D=F.find("[class$=-picker]"),q=T.find("[class$=-picker]");switch(v(t.val())?(s=y(t.val()),r=f(parseFloat(b(t.val())).toFixed(2),0,1),r&&t.attr("data-opacity",r)):s=p(u(t.val(),!0),I.letterCase),s||(s=p(m(I.defaultValue,!0),I.letterCase)),a=M(s),e=I.keywords?i.map(I.keywords.split(","),function(t){return i.trim(t.toLowerCase())}):[],c=""!==t.val()&&i.inArray(t.val().toLowerCase(),e)>-1?p(t.val()):v(t.val())?g(t.val()):s,o||t.val(c),I.opacity&&(n=""===t.attr("data-opacity")?1:f(parseFloat(t.attr("data-opacity")).toFixed(2),0,1),isNaN(n)&&(n=1),t.attr("data-opacity",n),S.find("span").css("opacity",n),d=f(T.height()-T.height()*n,0,T.height()),q.css("top",d+"px")),"transparent"===t.val().toLowerCase()&&S.find("span").css("opacity",0),S.find("span").css("backgroundColor",s),I.control){case"wheel":w=f(Math.ceil(.75*a.s),0,z.height()/2),C=a.h*Math.PI/180,h=f(75-Math.cos(C)*w,0,z.width()),d=f(75-Math.sin(C)*w,0,z.height()),j.css({top:d+"px",left:h+"px"}),d=150-a.b/(100/z.height()),""===s&&(d=0),D.css("top",d+"px"),F.css("backgroundColor",k({h:a.h,s:a.s,b:100}));break;case"saturation":h=f(5*a.h/12,0,150),d=f(z.height()-Math.ceil(a.b/(100/z.height())),0,z.height()),j.css({top:d+"px",left:h+"px"}),d=f(F.height()-a.s*(F.height()/100),0,F.height()),D.css("top",d+"px"),F.css("backgroundColor",k({h:a.h,s:100,b:a.b})),x.find(".minicolors-grid-inner").css("opacity",a.s/100);break;case"brightness":h=f(5*a.h/12,0,150),d=f(z.height()-Math.ceil(a.s/(100/z.height())),0,z.height()),j.css({top:d+"px",left:h+"px"}),d=f(F.height()-a.b*(F.height()/100),0,F.height()),D.css("top",d+"px"),F.css("backgroundColor",k({h:a.h,s:a.s,b:100})),x.find(".minicolors-grid-inner").css("opacity",1-a.b/100);break;default:h=f(Math.ceil(a.s/(100/z.width())),0,z.width()),d=f(z.height()-Math.ceil(a.b/(100/z.height())),0,z.height()),j.css({top:d+"px",left:h+"px"}),d=f(F.height()-a.h/(360/F.height()),0,F.height()),D.css("top",d+"px"),z.css("backgroundColor",k({h:a.h,s:100,b:100}))}t.data("minicolors-initialized")&&l(t,c,n)}function l(i,t,o){var s,a,n,e=i.data("minicolors-settings"),r=i.data("minicolors-lastChange");if(!r||r.value!==t||r.opacity!==o){if(i.data("minicolors-lastChange",{value:t,opacity:o}),e.swatches&&0!==e.swatches.length){for(s=v(t)?g(t,!0):I(t),a=-1,n=0;n<e.swatches.length;++n)if(s.r===e.swatches[n].r&&s.g===e.swatches[n].g&&s.b===e.swatches[n].b&&s.a===e.swatches[n].a){a=n;break}i.parent().find(".minicolors-swatches .minicolors-swatch").removeClass("selected"),a!==-1&&i.parent().find(".minicolors-swatches .minicolors-swatch").eq(n).addClass("selected")}e.change&&(e.changeDelay?(clearTimeout(i.data("minicolors-changeTimeout")),i.data("minicolors-changeTimeout",setTimeout(function(){e.change.call(i.get(0),t,o)},e.changeDelay))):e.change.call(i.get(0),t,o)),i.trigger("change").trigger("input")}}function h(t){var o,s=i(t).attr("data-opacity");if(v(i(t).val()))o=g(i(t).val(),!0);else{var a=u(i(t).val(),!0);o=I(a)}return o?(void 0!==s&&i.extend(o,{a:parseFloat(s)}),o):null}function d(t,o){var s,a=i(t).attr("data-opacity");if(v(i(t).val()))s=g(i(t).val(),!0);else{var n=u(i(t).val(),!0);s=I(n)}return s?(void 0===a&&(a=1),o?"rgba("+s.r+", "+s.g+", "+s.b+", "+parseFloat(a)+")":"rgb("+s.r+", "+s.g+", "+s.b+")"):null}function p(i,t){return"uppercase"===t?i.toUpperCase():i.toLowerCase()}function u(i,t){return i=i.replace(/^#/g,""),i.match(/^[A-F0-9]{3,6}/gi)?3!==i.length&&6!==i.length?"":(3===i.length&&t&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]),"#"+i):""}function g(i,t){var o=i.replace(/[^\d,.]/g,""),s=o.split(",");return s[0]=f(parseInt(s[0],10),0,255),s[1]=f(parseInt(s[1],10),0,255),s[2]=f(parseInt(s[2],10),0,255),s[3]&&(s[3]=f(parseFloat(s[3],10),0,1)),t?s[3]?{r:s[0],g:s[1],b:s[2],a:s[3]}:{r:s[0],g:s[1],b:s[2]}:"undefined"!=typeof s[3]&&s[3]<=1?"rgba("+s[0]+", "+s[1]+", "+s[2]+", "+s[3]+")":"rgb("+s[0]+", "+s[1]+", "+s[2]+")"}function m(i,t){return v(i)?g(i):u(i,t)}function f(i,t,o){return i<t&&(i=t),i>o&&(i=o),i}function v(i){var t=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return!(!t||4!==t.length)}function b(i){return i=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i),i&&6===i.length?i[4]:"1"}function w(i){var t={},o=Math.round(i.h),s=Math.round(255*i.s/100),a=Math.round(255*i.b/100);if(0===s)t.r=t.g=t.b=a;else{var n=a,e=(255-s)*a/255,r=(n-e)*(o%60)/60;360===o&&(o=0),o<60?(t.r=n,t.b=e,t.g=e+r):o<120?(t.g=n,t.b=e,t.r=n-r):o<180?(t.g=n,t.r=e,t.b=e+r):o<240?(t.b=n,t.r=e,t.g=n-r):o<300?(t.b=n,t.g=e,t.r=e+r):o<360?(t.r=n,t.g=e,t.b=n-r):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}function y(i){return i=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),i&&4===i.length?"#"+("0"+parseInt(i[1],10).toString(16)).slice(-2)+("0"+parseInt(i[2],10).toString(16)).slice(-2)+("0"+parseInt(i[3],10).toString(16)).slice(-2):""}function C(t){var o=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return i.each(o,function(i,t){1===t.length&&(o[i]="0"+t)}),"#"+o.join("")}function k(i){return C(w(i))}function M(i){var t=x(I(i));return 0===t.s&&(t.h=360),t}function x(i){var t={h:0,s:0,b:0},o=Math.min(i.r,i.g,i.b),s=Math.max(i.r,i.g,i.b),a=s-o;return t.b=s,t.s=0!==s?255*a/s:0,0!==t.s?i.r===s?t.h=(i.g-i.b)/a:i.g===s?t.h=2+(i.b-i.r)/a:t.h=4+(i.r-i.g)/a:t.h=-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}function I(i){return i=parseInt(i.indexOf("#")>-1?i.substring(1):i,16),{r:i>>16,g:(65280&i)>>8,b:255&i}}i.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",defaultValue:"",format:"hex",hide:null,hideSpeed:100,inline:!1,keywords:"",letterCase:"lowercase",opacity:!1,position:"bottom",show:null,showSpeed:100,theme:"default",swatches:[]}},i.extend(i.fn,{minicolors:function(n,e){switch(n){case"destroy":return i(this).each(function(){o(i(this))}),i(this);case"hide":return a(),i(this);case"opacity":return void 0===e?i(this).attr("data-opacity"):(i(this).each(function(){c(i(this).attr("data-opacity",e))}),i(this));case"rgbObject":return h(i(this),"rgbaObject"===n);case"rgbString":case"rgbaString":return d(i(this),"rgbaString"===n);case"settings":return void 0===e?i(this).data("minicolors-settings"):(i(this).each(function(){var t=i(this).data("minicolors-settings")||{};o(i(this)),i(this).minicolors(i.extend(!0,t,e))}),i(this));case"show":return s(i(this).eq(0)),i(this);case"value":return void 0===e?i(this).val():(i(this).each(function(){"object"==typeof e&&null!==e?(void 0!==e.opacity&&i(this).attr("data-opacity",f(e.opacity,0,1)),e.color&&i(this).val(e.color)):i(this).val(e),c(i(this))}),i(this));default:return"create"!==n&&(e=n),i(this).each(function(){t(i(this),e)}),i(this)}}}),i([document]).on("mousedown.minicolors touchstart.minicolors",function(t){i(t.target).parents().add(t.target).hasClass("minicolors")||a()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(t){var o=i(this);t.preventDefault(),i(t.delegateTarget).data("minicolors-target",o),n(o,t,!0)}).on("mousemove.minicolors touchmove.minicolors",function(t){var o=i(t.delegateTarget).data("minicolors-target");o&&n(o,t)}).on("mouseup.minicolors touchend.minicolors",function(){i(this).removeData("minicolors-target")}).on("click.minicolors",".minicolors-swatches li",function(t){t.preventDefault();var o=i(this),s=o.parents(".minicolors").find(".minicolors-input"),a=o.data("swatch-color");r(s,a,b(a)),c(s)}).on("mousedown.minicolors touchstart.minicolors",".minicolors-input-swatch",function(t){var o=i(this).parent().find(".minicolors-input");t.preventDefault(),s(o)}).on("focus.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&s(t)}).on("blur.minicolors",".minicolors-input",function(){var t,o,s,a,n,e=i(this),r=e.data("minicolors-settings");e.data("minicolors-initialized")&&(t=r.keywords?i.map(r.keywords.split(","),function(t){return i.trim(t.toLowerCase())}):[],""!==e.val()&&i.inArray(e.val().toLowerCase(),t)>-1?n=e.val():(v(e.val())?s=g(e.val(),!0):(o=u(e.val(),!0),s=o?I(o):null),n=null===s?r.defaultValue:"rgb"===r.format?g(r.opacity?"rgba("+s.r+","+s.g+","+s.b+","+e.attr("data-opacity")+")":"rgb("+s.r+","+s.g+","+s.b+")"):C(s)),a=r.opacity?e.attr("data-opacity"):1,"transparent"===n.toLowerCase()&&(a=0),e.closest(".minicolors").find(".minicolors-input-swatch > span").css("opacity",a),e.val(n),""===e.val()&&e.val(m(r.defaultValue,!0)),e.val(p(e.val(),r.letterCase)))}).on("keydown.minicolors",".minicolors-input",function(t){var o=i(this);if(o.data("minicolors-initialized"))switch(t.which){case 9:a();break;case 13:case 27:a(),o.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&c(t,!0)}).on("paste.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&setTimeout(function(){c(t,!0)},1)})});
;
'format cjs';
'use strict';

(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    define(['angular', 'jquery-minicolors'], factory);
  } else if (typeof exports === 'object') {
    module.exports = factory(require('angular'), require('jquery-minicolors'));
    module.exports = 'minicolors';
  } else {
    root.angularMinicolors = factory(root.angular, root.jqueryMinicolors);
  }
})(this, function(angular) {

  angular.module('minicolors', []);

  angular.module('minicolors').provider('minicolors', function() {
    this.defaults = {
      theme: 'bootstrap',
      position: 'top left',
      defaultValue: '',
      animationSpeed: 50,
      animationEasing: 'swing',
      change: null,
      changeDelay: 0,
      control: 'hue',
      hide: null,
      hideSpeed: 100,
      inline: false,
      letterCase: 'lowercase',
      opacity: false,
      show: null,
      showSpeed: 100
    };

    this.$get = function() {
      return this;
    };

  });

  angular.module('minicolors').directive('minicolors', ['minicolors', '$timeout', function(minicolors, $timeout) {
    return {
      require: '?ngModel',
      restrict: 'A',
      priority: 1, //since we bind on an input element, we have to set a higher priority than angular-default input
      link: function(scope, element, attrs, ngModel) {

        var inititalized = false;

        //gets the settings object
        var getSettings = function() {
          var config = angular.extend({}, minicolors.defaults, scope.$eval(attrs.minicolors));
          return config;
        };

        /**
         * check if value is valid color value
         * e.g.#fff000 or #fff
         * @param color
         */
        function isValidColor(color) {
          return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color);
        }

        function canSetValue() {
          return (element.data('minicolors-settings') != null)
        }

        /**
         * set color value as minicolors internal color value
         * @param color
         */
        function setMinicolorsValue(color) {
          if (isValidColor(color) && canSetValue()) {
            element.minicolors('value', color);
          }
        }

        //what to do if the value changed
        ngModel.$render = function() {


          //we are in digest or apply, and therefore call a timeout function
          $timeout(function() {
            var color = ngModel.$viewValue;
            setMinicolorsValue(color);
          }, 0, false);
        };

        //init method
        var initMinicolors = function() {

          if (!ngModel) {
            return;
          }
          var settings = getSettings();
          settings.change = function(hex) {
            scope.$apply(function() {
              if (isValidColor(hex))
                ngModel.$setViewValue(hex);
            });
          };

          //destroy the old colorpicker if one already exists
          if (element.hasClass('minicolors-input')) {
            element.minicolors('destroy');
            element.off('blur', onBlur);
          }

          // Create the new minicolors widget
          element.minicolors(settings);

          // hook up into the jquery-minicolors onBlur event.
          element.on('blur', onBlur);

          // are we inititalized yet ?
          //needs to be wrapped in $timeout, to prevent $apply / $digest errors
          //$scope.$apply will be called by $timeout, so we don't have to handle that case
          if (!inititalized) {
            $timeout(function() {
              var color = ngModel.$viewValue;
              setMinicolorsValue(color);
            }, 0);
            inititalized = true;
            return;
          }

          function onBlur(e) {
            scope.$apply(function() {
                var color = element.minicolors('value');
                if (isValidColor(color))
                  ngModel.$setViewValue(color);
            });              
          }
        };

        initMinicolors();
        //initital call

        // Watch for changes to the directives options and then call init method again
        var unbindWatch = scope.$watch(getSettings, initMinicolors, true);

        scope.$on('$destroy', function () {
          if (element.hasClass('minicolors-input')) {
              element.minicolors('destroy');
              element.remove();
          }
          if (unbindWatch) unbindWatch();
        });

      }
    };
  }]);
});;
// TinyColor v1.3.0
// https://github.com/bgrins/TinyColor
// Brian Grinstead, MIT License

(function(Math) {

var trimLeft = /^\s+/,
    trimRight = /\s+$/,
    tinyCounter = 0,
    mathRound = Math.round,
    mathMin = Math.min,
    mathMax = Math.max,
    mathRandom = Math.random;

function tinycolor (color, opts) {

    color = (color) ? color : '';
    opts = opts || { };

    // If input is already a tinycolor, return itself
    if (color instanceof tinycolor) {
       return color;
    }
    // If we are called as a function, call using new instead
    if (!(this instanceof tinycolor)) {
        return new tinycolor(color, opts);
    }

    var rgb = inputToRGB(color);
    this._originalInput = color,
    this._r = rgb.r,
    this._g = rgb.g,
    this._b = rgb.b,
    this._a = rgb.a,
    this._roundA = mathRound(100*this._a) / 100,
    this._format = opts.format || rgb.format;
    this._gradientType = opts.gradientType;

    // Don't let the range of [0,255] come back in [0,1].
    // Potentially lose a little bit of precision here, but will fix issues where
    // .5 gets interpreted as half of the total, instead of half of 1
    // If it was supposed to be 128, this was already taken care of by `inputToRgb`
    if (this._r < 1) { this._r = mathRound(this._r); }
    if (this._g < 1) { this._g = mathRound(this._g); }
    if (this._b < 1) { this._b = mathRound(this._b); }

    this._ok = rgb.ok;
    this._tc_id = tinyCounter++;
}

tinycolor.prototype = {
    isDark: function() {
        return this.getBrightness() < 128;
    },
    isLight: function() {
        return !this.isDark();
    },
    isValid: function() {
        return this._ok;
    },
    getOriginalInput: function() {
      return this._originalInput;
    },
    getFormat: function() {
        return this._format;
    },
    getAlpha: function() {
        return this._a;
    },
    getBrightness: function() {
        //http://www.w3.org/TR/AERT#color-contrast
        var rgb = this.toRgb();
        return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
    },
    getLuminance: function() {
        //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
        var rgb = this.toRgb();
        var RsRGB, GsRGB, BsRGB, R, G, B;
        RsRGB = rgb.r/255;
        GsRGB = rgb.g/255;
        BsRGB = rgb.b/255;

        if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
        if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
        if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
        return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
    },
    setAlpha: function(value) {
        this._a = boundAlpha(value);
        this._roundA = mathRound(100*this._a) / 100;
        return this;
    },
    toHsv: function() {
        var hsv = rgbToHsv(this._r, this._g, this._b);
        return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
    },
    toHsvString: function() {
        var hsv = rgbToHsv(this._r, this._g, this._b);
        var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
        return (this._a == 1) ?
          "hsv("  + h + ", " + s + "%, " + v + "%)" :
          "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
    },
    toHsl: function() {
        var hsl = rgbToHsl(this._r, this._g, this._b);
        return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
    },
    toHslString: function() {
        var hsl = rgbToHsl(this._r, this._g, this._b);
        var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
        return (this._a == 1) ?
          "hsl("  + h + ", " + s + "%, " + l + "%)" :
          "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
    },
    toHex: function(allow3Char) {
        return rgbToHex(this._r, this._g, this._b, allow3Char);
    },
    toHexString: function(allow3Char) {
        return '#' + this.toHex(allow3Char);
    },
    toHex8: function() {
        return rgbaToHex(this._r, this._g, this._b, this._a);
    },
    toHex8String: function() {
        return '#' + this.toHex8();
    },
    toRgb: function() {
        return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
    },
    toRgbString: function() {
        return (this._a == 1) ?
          "rgb("  + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
          "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
    },
    toPercentageRgb: function() {
        return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
    },
    toPercentageRgbString: function() {
        return (this._a == 1) ?
          "rgb("  + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
          "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
    },
    toName: function() {
        if (this._a === 0) {
            return "transparent";
        }

        if (this._a < 1) {
            return false;
        }

        return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
    },
    toFilter: function(secondColor) {
        var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);
        var secondHex8String = hex8String;
        var gradientType = this._gradientType ? "GradientType = 1, " : "";

        if (secondColor) {
            var s = tinycolor(secondColor);
            secondHex8String = s.toHex8String();
        }

        return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
    },
    toString: function(format) {
        var formatSet = !!format;
        format = format || this._format;

        var formattedString = false;
        var hasAlpha = this._a < 1 && this._a >= 0;
        var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "name");

        if (needsAlphaFormat) {
            // Special case for "transparent", all other non-alpha formats
            // will return rgba when there is transparency.
            if (format === "name" && this._a === 0) {
                return this.toName();
            }
            return this.toRgbString();
        }
        if (format === "rgb") {
            formattedString = this.toRgbString();
        }
        if (format === "prgb") {
            formattedString = this.toPercentageRgbString();
        }
        if (format === "hex" || format === "hex6") {
            formattedString = this.toHexString();
        }
        if (format === "hex3") {
            formattedString = this.toHexString(true);
        }
        if (format === "hex8") {
            formattedString = this.toHex8String();
        }
        if (format === "name") {
            formattedString = this.toName();
        }
        if (format === "hsl") {
            formattedString = this.toHslString();
        }
        if (format === "hsv") {
            formattedString = this.toHsvString();
        }

        return formattedString || this.toHexString();
    },
    clone: function() {
        return tinycolor(this.toString());
    },

    _applyModification: function(fn, args) {
        var color = fn.apply(null, [this].concat([].slice.call(args)));
        this._r = color._r;
        this._g = color._g;
        this._b = color._b;
        this.setAlpha(color._a);
        return this;
    },
    lighten: function() {
        return this._applyModification(lighten, arguments);
    },
    brighten: function() {
        return this._applyModification(brighten, arguments);
    },
    darken: function() {
        return this._applyModification(darken, arguments);
    },
    desaturate: function() {
        return this._applyModification(desaturate, arguments);
    },
    saturate: function() {
        return this._applyModification(saturate, arguments);
    },
    greyscale: function() {
        return this._applyModification(greyscale, arguments);
    },
    spin: function() {
        return this._applyModification(spin, arguments);
    },

    _applyCombination: function(fn, args) {
        return fn.apply(null, [this].concat([].slice.call(args)));
    },
    analogous: function() {
        return this._applyCombination(analogous, arguments);
    },
    complement: function() {
        return this._applyCombination(complement, arguments);
    },
    monochromatic: function() {
        return this._applyCombination(monochromatic, arguments);
    },
    splitcomplement: function() {
        return this._applyCombination(splitcomplement, arguments);
    },
    triad: function() {
        return this._applyCombination(triad, arguments);
    },
    tetrad: function() {
        return this._applyCombination(tetrad, arguments);
    }
};

// If input is an object, force 1 into "1.0" to handle ratios properly
// String input requires "1.0" as input, so 1 will be treated as 1
tinycolor.fromRatio = function(color, opts) {
    if (typeof color == "object") {
        var newColor = {};
        for (var i in color) {
            if (color.hasOwnProperty(i)) {
                if (i === "a") {
                    newColor[i] = color[i];
                }
                else {
                    newColor[i] = convertToPercentage(color[i]);
                }
            }
        }
        color = newColor;
    }

    return tinycolor(color, opts);
};

// Given a string or object, convert that input to RGB
// Possible string inputs:
//
//     "red"
//     "#f00" or "f00"
//     "#ff0000" or "ff0000"
//     "#ff000000" or "ff000000"
//     "rgb 255 0 0" or "rgb (255, 0, 0)"
//     "rgb 1.0 0 0" or "rgb (1, 0, 0)"
//     "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
//     "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
//     "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
//     "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
//     "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
//
function inputToRGB(color) {

    var rgb = { r: 0, g: 0, b: 0 };
    var a = 1;
    var ok = false;
    var format = false;

    if (typeof color == "string") {
        color = stringInputToObject(color);
    }

    if (typeof color == "object") {
        if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
            rgb = rgbToRgb(color.r, color.g, color.b);
            ok = true;
            format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
        }
        else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
            color.s = convertToPercentage(color.s);
            color.v = convertToPercentage(color.v);
            rgb = hsvToRgb(color.h, color.s, color.v);
            ok = true;
            format = "hsv";
        }
        else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
            color.s = convertToPercentage(color.s);
            color.l = convertToPercentage(color.l);
            rgb = hslToRgb(color.h, color.s, color.l);
            ok = true;
            format = "hsl";
        }

        if (color.hasOwnProperty("a")) {
            a = color.a;
        }
    }

    a = boundAlpha(a);

    return {
        ok: ok,
        format: color.format || format,
        r: mathMin(255, mathMax(rgb.r, 0)),
        g: mathMin(255, mathMax(rgb.g, 0)),
        b: mathMin(255, mathMax(rgb.b, 0)),
        a: a
    };
}


// Conversion Functions
// --------------------

// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>

// `rgbToRgb`
// Handle bounds / percentage checking to conform to CSS color spec
// <http://www.w3.org/TR/css3-color/>
// *Assumes:* r, g, b in [0, 255] or [0, 1]
// *Returns:* { r, g, b } in [0, 255]
function rgbToRgb(r, g, b){
    return {
        r: bound01(r, 255) * 255,
        g: bound01(g, 255) * 255,
        b: bound01(b, 255) * 255
    };
}

// `rgbToHsl`
// Converts an RGB color value to HSL.
// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
// *Returns:* { h, s, l } in [0,1]
function rgbToHsl(r, g, b) {

    r = bound01(r, 255);
    g = bound01(g, 255);
    b = bound01(b, 255);

    var max = mathMax(r, g, b), min = mathMin(r, g, b);
    var h, s, l = (max + min) / 2;

    if(max == min) {
        h = s = 0; // achromatic
    }
    else {
        var d = max - min;
        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
        switch(max) {
            case r: h = (g - b) / d + (g < b ? 6 : 0); break;
            case g: h = (b - r) / d + 2; break;
            case b: h = (r - g) / d + 4; break;
        }

        h /= 6;
    }

    return { h: h, s: s, l: l };
}

// `hslToRgb`
// Converts an HSL color value to RGB.
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
// *Returns:* { r, g, b } in the set [0, 255]
function hslToRgb(h, s, l) {
    var r, g, b;

    h = bound01(h, 360);
    s = bound01(s, 100);
    l = bound01(l, 100);

    function hue2rgb(p, q, t) {
        if(t < 0) t += 1;
        if(t > 1) t -= 1;
        if(t < 1/6) return p + (q - p) * 6 * t;
        if(t < 1/2) return q;
        if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
        return p;
    }

    if(s === 0) {
        r = g = b = l; // achromatic
    }
    else {
        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
        var p = 2 * l - q;
        r = hue2rgb(p, q, h + 1/3);
        g = hue2rgb(p, q, h);
        b = hue2rgb(p, q, h - 1/3);
    }

    return { r: r * 255, g: g * 255, b: b * 255 };
}

// `rgbToHsv`
// Converts an RGB color value to HSV
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
// *Returns:* { h, s, v } in [0,1]
function rgbToHsv(r, g, b) {

    r = bound01(r, 255);
    g = bound01(g, 255);
    b = bound01(b, 255);

    var max = mathMax(r, g, b), min = mathMin(r, g, b);
    var h, s, v = max;

    var d = max - min;
    s = max === 0 ? 0 : d / max;

    if(max == min) {
        h = 0; // achromatic
    }
    else {
        switch(max) {
            case r: h = (g - b) / d + (g < b ? 6 : 0); break;
            case g: h = (b - r) / d + 2; break;
            case b: h = (r - g) / d + 4; break;
        }
        h /= 6;
    }
    return { h: h, s: s, v: v };
}

// `hsvToRgb`
// Converts an HSV color value to RGB.
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
// *Returns:* { r, g, b } in the set [0, 255]
 function hsvToRgb(h, s, v) {

    h = bound01(h, 360) * 6;
    s = bound01(s, 100);
    v = bound01(v, 100);

    var i = Math.floor(h),
        f = h - i,
        p = v * (1 - s),
        q = v * (1 - f * s),
        t = v * (1 - (1 - f) * s),
        mod = i % 6,
        r = [v, q, p, p, t, v][mod],
        g = [t, v, v, q, p, p][mod],
        b = [p, p, t, v, v, q][mod];

    return { r: r * 255, g: g * 255, b: b * 255 };
}

// `rgbToHex`
// Converts an RGB color to hex
// Assumes r, g, and b are contained in the set [0, 255]
// Returns a 3 or 6 character hex
function rgbToHex(r, g, b, allow3Char) {

    var hex = [
        pad2(mathRound(r).toString(16)),
        pad2(mathRound(g).toString(16)),
        pad2(mathRound(b).toString(16))
    ];

    // Return a 3 character hex if possible
    if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
        return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
    }

    return hex.join("");
}

// `rgbaToHex`
// Converts an RGBA color plus alpha transparency to hex
// Assumes r, g, b and a are contained in the set [0, 255]
// Returns an 8 character hex
function rgbaToHex(r, g, b, a) {

    var hex = [
        pad2(convertDecimalToHex(a)),
        pad2(mathRound(r).toString(16)),
        pad2(mathRound(g).toString(16)),
        pad2(mathRound(b).toString(16))
    ];

    return hex.join("");
}

// `equals`
// Can be called with any tinycolor input
tinycolor.equals = function (color1, color2) {
    if (!color1 || !color2) { return false; }
    return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
};

tinycolor.random = function() {
    return tinycolor.fromRatio({
        r: mathRandom(),
        g: mathRandom(),
        b: mathRandom()
    });
};


// Modification Functions
// ----------------------
// Thanks to less.js for some of the basics here
// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>

function desaturate(color, amount) {
    amount = (amount === 0) ? 0 : (amount || 10);
    var hsl = tinycolor(color).toHsl();
    hsl.s -= amount / 100;
    hsl.s = clamp01(hsl.s);
    return tinycolor(hsl);
}

function saturate(color, amount) {
    amount = (amount === 0) ? 0 : (amount || 10);
    var hsl = tinycolor(color).toHsl();
    hsl.s += amount / 100;
    hsl.s = clamp01(hsl.s);
    return tinycolor(hsl);
}

function greyscale(color) {
    return tinycolor(color).desaturate(100);
}

function lighten (color, amount) {
    amount = (amount === 0) ? 0 : (amount || 10);
    var hsl = tinycolor(color).toHsl();
    hsl.l += amount / 100;
    hsl.l = clamp01(hsl.l);
    return tinycolor(hsl);
}

function brighten(color, amount) {
    amount = (amount === 0) ? 0 : (amount || 10);
    var rgb = tinycolor(color).toRgb();
    rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
    rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
    rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
    return tinycolor(rgb);
}

function darken (color, amount) {
    amount = (amount === 0) ? 0 : (amount || 10);
    var hsl = tinycolor(color).toHsl();
    hsl.l -= amount / 100;
    hsl.l = clamp01(hsl.l);
    return tinycolor(hsl);
}

// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
// Values outside of this range will be wrapped into this range.
function spin(color, amount) {
    var hsl = tinycolor(color).toHsl();
    var hue = (hsl.h + amount) % 360;
    hsl.h = hue < 0 ? 360 + hue : hue;
    return tinycolor(hsl);
}

// Combination Functions
// ---------------------
// Thanks to jQuery xColor for some of the ideas behind these
// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>

function complement(color) {
    var hsl = tinycolor(color).toHsl();
    hsl.h = (hsl.h + 180) % 360;
    return tinycolor(hsl);
}

function triad(color) {
    var hsl = tinycolor(color).toHsl();
    var h = hsl.h;
    return [
        tinycolor(color),
        tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
        tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
    ];
}

function tetrad(color) {
    var hsl = tinycolor(color).toHsl();
    var h = hsl.h;
    return [
        tinycolor(color),
        tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
        tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
        tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
    ];
}

function splitcomplement(color) {
    var hsl = tinycolor(color).toHsl();
    var h = hsl.h;
    return [
        tinycolor(color),
        tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
        tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
    ];
}

function analogous(color, results, slices) {
    results = results || 6;
    slices = slices || 30;

    var hsl = tinycolor(color).toHsl();
    var part = 360 / slices;
    var ret = [tinycolor(color)];

    for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
        hsl.h = (hsl.h + part) % 360;
        ret.push(tinycolor(hsl));
    }
    return ret;
}

function monochromatic(color, results) {
    results = results || 6;
    var hsv = tinycolor(color).toHsv();
    var h = hsv.h, s = hsv.s, v = hsv.v;
    var ret = [];
    var modification = 1 / results;

    while (results--) {
        ret.push(tinycolor({ h: h, s: s, v: v}));
        v = (v + modification) % 1;
    }

    return ret;
}

// Utility Functions
// ---------------------

tinycolor.mix = function(color1, color2, amount) {
    amount = (amount === 0) ? 0 : (amount || 50);

    var rgb1 = tinycolor(color1).toRgb();
    var rgb2 = tinycolor(color2).toRgb();

    var p = amount / 100;
    var w = p * 2 - 1;
    var a = rgb2.a - rgb1.a;

    var w1;

    if (w * a == -1) {
        w1 = w;
    } else {
        w1 = (w + a) / (1 + w * a);
    }

    w1 = (w1 + 1) / 2;

    var w2 = 1 - w1;

    var rgba = {
        r: rgb2.r * w1 + rgb1.r * w2,
        g: rgb2.g * w1 + rgb1.g * w2,
        b: rgb2.b * w1 + rgb1.b * w2,
        a: rgb2.a * p  + rgb1.a * (1 - p)
    };

    return tinycolor(rgba);
};


// Readability Functions
// ---------------------
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)

// `contrast`
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
tinycolor.readability = function(color1, color2) {
    var c1 = tinycolor(color1);
    var c2 = tinycolor(color2);
    return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
};

// `isReadable`
// Ensure that foreground and background color combinations meet WCAG2 guidelines.
// The third argument is an optional Object.
//      the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
//      the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
// If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.

// *Example*
//    tinycolor.isReadable("#000", "#111") => false
//    tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
tinycolor.isReadable = function(color1, color2, wcag2) {
    var readability = tinycolor.readability(color1, color2);
    var wcag2Parms, out;

    out = false;

    wcag2Parms = validateWCAG2Parms(wcag2);
    switch (wcag2Parms.level + wcag2Parms.size) {
        case "AAsmall":
        case "AAAlarge":
            out = readability >= 4.5;
            break;
        case "AAlarge":
            out = readability >= 3;
            break;
        case "AAAsmall":
            out = readability >= 7;
            break;
    }
    return out;

};

// `mostReadable`
// Given a base color and a list of possible foreground or background
// colors for that base, returns the most readable color.
// Optionally returns Black or White if the most readable color is unreadable.
// *Example*
//    tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
//    tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString();  // "#ffffff"
//    tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
//    tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
tinycolor.mostReadable = function(baseColor, colorList, args) {
    var bestColor = null;
    var bestScore = 0;
    var readability;
    var includeFallbackColors, level, size ;
    args = args || {};
    includeFallbackColors = args.includeFallbackColors ;
    level = args.level;
    size = args.size;

    for (var i= 0; i < colorList.length ; i++) {
        readability = tinycolor.readability(baseColor, colorList[i]);
        if (readability > bestScore) {
            bestScore = readability;
            bestColor = tinycolor(colorList[i]);
        }
    }

    if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
        return bestColor;
    }
    else {
        args.includeFallbackColors=false;
        return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
    }
};


// Big List of Colors
// ------------------
// <http://www.w3.org/TR/css3-color/#svg-color>
var names = tinycolor.names = {
    aliceblue: "f0f8ff",
    antiquewhite: "faebd7",
    aqua: "0ff",
    aquamarine: "7fffd4",
    azure: "f0ffff",
    beige: "f5f5dc",
    bisque: "ffe4c4",
    black: "000",
    blanchedalmond: "ffebcd",
    blue: "00f",
    blueviolet: "8a2be2",
    brown: "a52a2a",
    burlywood: "deb887",
    burntsienna: "ea7e5d",
    cadetblue: "5f9ea0",
    chartreuse: "7fff00",
    chocolate: "d2691e",
    coral: "ff7f50",
    cornflowerblue: "6495ed",
    cornsilk: "fff8dc",
    crimson: "dc143c",
    cyan: "0ff",
    darkblue: "00008b",
    darkcyan: "008b8b",
    darkgoldenrod: "b8860b",
    darkgray: "a9a9a9",
    darkgreen: "006400",
    darkgrey: "a9a9a9",
    darkkhaki: "bdb76b",
    darkmagenta: "8b008b",
    darkolivegreen: "556b2f",
    darkorange: "ff8c00",
    darkorchid: "9932cc",
    darkred: "8b0000",
    darksalmon: "e9967a",
    darkseagreen: "8fbc8f",
    darkslateblue: "483d8b",
    darkslategray: "2f4f4f",
    darkslategrey: "2f4f4f",
    darkturquoise: "00ced1",
    darkviolet: "9400d3",
    deeppink: "ff1493",
    deepskyblue: "00bfff",
    dimgray: "696969",
    dimgrey: "696969",
    dodgerblue: "1e90ff",
    firebrick: "b22222",
    floralwhite: "fffaf0",
    forestgreen: "228b22",
    fuchsia: "f0f",
    gainsboro: "dcdcdc",
    ghostwhite: "f8f8ff",
    gold: "ffd700",
    goldenrod: "daa520",
    gray: "808080",
    green: "008000",
    greenyellow: "adff2f",
    grey: "808080",
    honeydew: "f0fff0",
    hotpink: "ff69b4",
    indianred: "cd5c5c",
    indigo: "4b0082",
    ivory: "fffff0",
    khaki: "f0e68c",
    lavender: "e6e6fa",
    lavenderblush: "fff0f5",
    lawngreen: "7cfc00",
    lemonchiffon: "fffacd",
    lightblue: "add8e6",
    lightcoral: "f08080",
    lightcyan: "e0ffff",
    lightgoldenrodyellow: "fafad2",
    lightgray: "d3d3d3",
    lightgreen: "90ee90",
    lightgrey: "d3d3d3",
    lightpink: "ffb6c1",
    lightsalmon: "ffa07a",
    lightseagreen: "20b2aa",
    lightskyblue: "87cefa",
    lightslategray: "789",
    lightslategrey: "789",
    lightsteelblue: "b0c4de",
    lightyellow: "ffffe0",
    lime: "0f0",
    limegreen: "32cd32",
    linen: "faf0e6",
    magenta: "f0f",
    maroon: "800000",
    mediumaquamarine: "66cdaa",
    mediumblue: "0000cd",
    mediumorchid: "ba55d3",
    mediumpurple: "9370db",
    mediumseagreen: "3cb371",
    mediumslateblue: "7b68ee",
    mediumspringgreen: "00fa9a",
    mediumturquoise: "48d1cc",
    mediumvioletred: "c71585",
    midnightblue: "191970",
    mintcream: "f5fffa",
    mistyrose: "ffe4e1",
    moccasin: "ffe4b5",
    navajowhite: "ffdead",
    navy: "000080",
    oldlace: "fdf5e6",
    olive: "808000",
    olivedrab: "6b8e23",
    orange: "ffa500",
    orangered: "ff4500",
    orchid: "da70d6",
    palegoldenrod: "eee8aa",
    palegreen: "98fb98",
    paleturquoise: "afeeee",
    palevioletred: "db7093",
    papayawhip: "ffefd5",
    peachpuff: "ffdab9",
    peru: "cd853f",
    pink: "ffc0cb",
    plum: "dda0dd",
    powderblue: "b0e0e6",
    purple: "800080",
    rebeccapurple: "663399",
    red: "f00",
    rosybrown: "bc8f8f",
    royalblue: "4169e1",
    saddlebrown: "8b4513",
    salmon: "fa8072",
    sandybrown: "f4a460",
    seagreen: "2e8b57",
    seashell: "fff5ee",
    sienna: "a0522d",
    silver: "c0c0c0",
    skyblue: "87ceeb",
    slateblue: "6a5acd",
    slategray: "708090",
    slategrey: "708090",
    snow: "fffafa",
    springgreen: "00ff7f",
    steelblue: "4682b4",
    tan: "d2b48c",
    teal: "008080",
    thistle: "d8bfd8",
    tomato: "ff6347",
    turquoise: "40e0d0",
    violet: "ee82ee",
    wheat: "f5deb3",
    white: "fff",
    whitesmoke: "f5f5f5",
    yellow: "ff0",
    yellowgreen: "9acd32"
};

// Make it easy to access colors via `hexNames[hex]`
var hexNames = tinycolor.hexNames = flip(names);


// Utilities
// ---------

// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
function flip(o) {
    var flipped = { };
    for (var i in o) {
        if (o.hasOwnProperty(i)) {
            flipped[o[i]] = i;
        }
    }
    return flipped;
}

// Return a valid alpha value [0,1] with all invalid values being set to 1
function boundAlpha(a) {
    a = parseFloat(a);

    if (isNaN(a) || a < 0 || a > 1) {
        a = 1;
    }

    return a;
}

// Take input from [0, n] and return it as [0, 1]
function bound01(n, max) {
    if (isOnePointZero(n)) { n = "100%"; }

    var processPercent = isPercentage(n);
    n = mathMin(max, mathMax(0, parseFloat(n)));

    // Automatically convert percentage into number
    if (processPercent) {
        n = parseInt(n * max, 10) / 100;
    }

    // Handle floating point rounding errors
    if ((Math.abs(n - max) < 0.000001)) {
        return 1;
    }

    // Convert into [0, 1] range if it isn't already
    return (n % max) / parseFloat(max);
}

// Force a number between 0 and 1
function clamp01(val) {
    return mathMin(1, mathMax(0, val));
}

// Parse a base-16 hex value into a base-10 integer
function parseIntFromHex(val) {
    return parseInt(val, 16);
}

// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
function isOnePointZero(n) {
    return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
}

// Check to see if string passed in is a percentage
function isPercentage(n) {
    return typeof n === "string" && n.indexOf('%') != -1;
}

// Force a hex value to have 2 characters
function pad2(c) {
    return c.length == 1 ? '0' + c : '' + c;
}

// Replace a decimal with it's percentage value
function convertToPercentage(n) {
    if (n <= 1) {
        n = (n * 100) + "%";
    }

    return n;
}

// Converts a decimal to a hex value
function convertDecimalToHex(d) {
    return Math.round(parseFloat(d) * 255).toString(16);
}
// Converts a hex value to a decimal
function convertHexToDecimal(h) {
    return (parseIntFromHex(h) / 255);
}

var matchers = (function() {

    // <http://www.w3.org/TR/css3-values/#integers>
    var CSS_INTEGER = "[-\\+]?\\d+%?";

    // <http://www.w3.org/TR/css3-values/#number-value>
    var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";

    // Allow positive/negative integer/number.  Don't capture the either/or, just the entire outcome.
    var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";

    // Actual matching.
    // Parentheses and commas are optional, but not required.
    // Whitespace can take the place of commas or opening paren
    var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
    var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";

    return {
        CSS_UNIT: new RegExp(CSS_UNIT),
        rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
        rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
        hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
        hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
        hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
        hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
        hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
        hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
        hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
    };
})();

// `isValidCSSUnit`
// Take in a single string / number and check to see if it looks like a CSS unit
// (see `matchers` above for definition).
function isValidCSSUnit(color) {
    return !!matchers.CSS_UNIT.exec(color);
}

// `stringInputToObject`
// Permissive string parsing.  Take in a number of formats, and output an object
// based on detected format.  Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
function stringInputToObject(color) {

    color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
    var named = false;
    if (names[color]) {
        color = names[color];
        named = true;
    }
    else if (color == 'transparent') {
        return { r: 0, g: 0, b: 0, a: 0, format: "name" };
    }

    // Try to match string input using regular expressions.
    // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
    // Just return an object and let the conversion functions handle that.
    // This way the result will be the same whether the tinycolor is initialized with string or object.
    var match;
    if ((match = matchers.rgb.exec(color))) {
        return { r: match[1], g: match[2], b: match[3] };
    }
    if ((match = matchers.rgba.exec(color))) {
        return { r: match[1], g: match[2], b: match[3], a: match[4] };
    }
    if ((match = matchers.hsl.exec(color))) {
        return { h: match[1], s: match[2], l: match[3] };
    }
    if ((match = matchers.hsla.exec(color))) {
        return { h: match[1], s: match[2], l: match[3], a: match[4] };
    }
    if ((match = matchers.hsv.exec(color))) {
        return { h: match[1], s: match[2], v: match[3] };
    }
    if ((match = matchers.hsva.exec(color))) {
        return { h: match[1], s: match[2], v: match[3], a: match[4] };
    }
    if ((match = matchers.hex8.exec(color))) {
        return {
            a: convertHexToDecimal(match[1]),
            r: parseIntFromHex(match[2]),
            g: parseIntFromHex(match[3]),
            b: parseIntFromHex(match[4]),
            format: named ? "name" : "hex8"
        };
    }
    if ((match = matchers.hex6.exec(color))) {
        return {
            r: parseIntFromHex(match[1]),
            g: parseIntFromHex(match[2]),
            b: parseIntFromHex(match[3]),
            format: named ? "name" : "hex"
        };
    }
    if ((match = matchers.hex3.exec(color))) {
        return {
            r: parseIntFromHex(match[1] + '' + match[1]),
            g: parseIntFromHex(match[2] + '' + match[2]),
            b: parseIntFromHex(match[3] + '' + match[3]),
            format: named ? "name" : "hex"
        };
    }

    return false;
}

function validateWCAG2Parms(parms) {
    // return valid WCAG2 parms for isReadable.
    // If input parms are invalid, return {"level":"AA", "size":"small"}
    var level, size;
    parms = parms || {"level":"AA", "size":"small"};
    level = (parms.level || "AA").toUpperCase();
    size = (parms.size || "small").toLowerCase();
    if (level !== "AA" && level !== "AAA") {
        level = "AA";
    }
    if (size !== "small" && size !== "large") {
        size = "small";
    }
    return {"level":level, "size":size};
}

// Node: Export function
if (typeof module !== "undefined" && module.exports) {
    module.exports = tinycolor;
}
// AMD/requirejs: Define the module
else if (typeof define === 'function' && define.amd) {
    define(function () {return tinycolor;});
}
// Browser: Expose to window
else {
    window.tinycolor = tinycolor;
}

})(Math);
;
/*! 
 * angular-loading-bar v0.9.0
 * https://chieffancypants.github.io/angular-loading-bar
 * Copyright (c) 2016 Wes Cruver
 * License: MIT
 */
!function () { "use strict"; angular.module("angular-loading-bar", ["cfp.loadingBarInterceptor"]), angular.module("chieffancypants.loadingBar", ["cfp.loadingBarInterceptor"]), angular.module("cfp.loadingBarInterceptor", ["cfp.loadingBar"]).config(["$httpProvider", function (a) { var b = ["$q", "$cacheFactory", "$timeout", "$rootScope", "$log", "cfpLoadingBar", function (b, c, d, e, f, g) { function h() { d.cancel(j), g.complete(), l = 0, k = 0 } function i(b) { var d, e = c.get("$http"), f = a.defaults; !b.cache && !f.cache || b.cache === !1 || "GET" !== b.method && "JSONP" !== b.method || (d = angular.isObject(b.cache) ? b.cache : angular.isObject(f.cache) ? f.cache : e); var g = void 0 !== d ? void 0 !== d.get(b.url) : !1; return void 0 !== b.cached && g !== b.cached ? b.cached : (b.cached = g, g) } var j, k = 0, l = 0, m = g.latencyThreshold; return { request: function (a) { return a.ignoreLoadingBar || i(a) || (e.$broadcast("cfpLoadingBar:loading", { url: a.url }), 0 === k && (j = d(function () { g.start() }, m)), k++, g.set(l / k)), a }, response: function (a) { return a && a.config ? (a.config.ignoreLoadingBar || i(a.config) || (l++, e.$broadcast("cfpLoadingBar:loaded", { url: a.config.url, result: a }), l >= k ? h() : g.set(l / k)), a) : (f.error("Broken interceptor detected: Config object not supplied in response:\n https://github.com/chieffancypants/angular-loading-bar/pull/50"), a) }, responseError: function (a) { return a && a.config ? (a.config.ignoreLoadingBar || i(a.config) || (l++, e.$broadcast("cfpLoadingBar:loaded", { url: a.config.url, result: a }), l >= k ? h() : g.set(l / k)), b.reject(a)) : (f.error("Broken interceptor detected: Config object not supplied in rejection:\n https://github.com/chieffancypants/angular-loading-bar/pull/50"), b.reject(a)) } } }]; a.interceptors.push(b) }]), angular.module("cfp.loadingBar", []).provider("cfpLoadingBar", function () { this.autoIncrement = !0, this.includeSpinner = !0, this.includeBar = !0, this.latencyThreshold = 100, this.startSize = .02, this.parentSelector = "body", this.spinnerTemplate = '<div id="loading-bar-spinner"><div class="spinner-icon"></div></div>', this.loadingBarTemplate = '<div id="loading-bar"><div class="bar"><div class="peg"></div></div></div>', this.$get = ["$injector", "$document", "$timeout", "$rootScope", function (a, b, c, d) { function e() { if (k || (k = a.get("$animate")), c.cancel(m), !r) { var e = b[0], g = e.querySelector ? e.querySelector(n) : b.find(n)[0]; g || (g = e.getElementsByTagName("body")[0]); var h = angular.element(g), i = g.lastChild && angular.element(g.lastChild); d.$broadcast("cfpLoadingBar:started"), r = !0, v && k.enter(o, h, i), u && k.enter(q, h, o), f(w) } } function f(a) { if (r) { var b = 100 * a + "%"; p.css("width", b), s = a, t && (c.cancel(l), l = c(function () { g() }, 250)) } } function g() { if (!(h() >= 1)) { var a = 0, b = h(); a = b >= 0 && .25 > b ? (3 * Math.random() + 3) / 100 : b >= .25 && .65 > b ? 3 * Math.random() / 100 : b >= .65 && .9 > b ? 2 * Math.random() / 100 : b >= .9 && .99 > b ? .005 : 0; var c = h() + a; f(c) } } function h() { return s } function i() { s = 0, r = !1 } function j() { k || (k = a.get("$animate")), d.$broadcast("cfpLoadingBar:completed"), f(1), c.cancel(m), m = c(function () { var a = k.leave(o, i); a && a.then && a.then(i), k.leave(q) }, 500) } var k, l, m, n = this.parentSelector, o = angular.element(this.loadingBarTemplate), p = o.find("div").eq(0), q = angular.element(this.spinnerTemplate), r = !1, s = 0, t = this.autoIncrement, u = this.includeSpinner, v = this.includeBar, w = this.startSize; return { start: e, set: f, status: h, inc: g, complete: j, autoIncrement: this.autoIncrement, includeSpinner: this.includeSpinner, latencyThreshold: this.latencyThreshold, parentSelector: this.parentSelector, startSize: this.startSize } }] }) }();;
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.colorConvert = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
/* MIT license */
var cssKeywords = require('color-name');

// NOTE: conversions should only return primitive values (i.e. arrays, or
//       values that give correct `typeof` results).
//       do not use box values types (i.e. Number(), String(), etc.)

var reverseKeywords = {};
for (var key in cssKeywords) {
	if (cssKeywords.hasOwnProperty(key)) {
		reverseKeywords[cssKeywords[key]] = key;
	}
}

var convert = module.exports = {
	rgb: {channels: 3, labels: 'rgb'},
	hsl: {channels: 3, labels: 'hsl'},
	hsv: {channels: 3, labels: 'hsv'},
	hwb: {channels: 3, labels: 'hwb'},
	cmyk: {channels: 4, labels: 'cmyk'},
	xyz: {channels: 3, labels: 'xyz'},
	lab: {channels: 3, labels: 'lab'},
	lch: {channels: 3, labels: 'lch'},
	hex: {channels: 1, labels: ['hex']},
	keyword: {channels: 1, labels: ['keyword']},
	ansi16: {channels: 1, labels: ['ansi16']},
	ansi256: {channels: 1, labels: ['ansi256']},
	hcg: {channels: 3, labels: ['h', 'c', 'g']},
	apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
	gray: {channels: 1, labels: ['gray']}
};

// hide .channels and .labels properties
for (var model in convert) {
	if (convert.hasOwnProperty(model)) {
		if (!('channels' in convert[model])) {
			throw new Error('missing channels property: ' + model);
		}

		if (!('labels' in convert[model])) {
			throw new Error('missing channel labels property: ' + model);
		}

		if (convert[model].labels.length !== convert[model].channels) {
			throw new Error('channel and label counts mismatch: ' + model);
		}

		var channels = convert[model].channels;
		var labels = convert[model].labels;
		delete convert[model].channels;
		delete convert[model].labels;
		Object.defineProperty(convert[model], 'channels', {value: channels});
		Object.defineProperty(convert[model], 'labels', {value: labels});
	}
}

convert.rgb.hsl = function (rgb) {
	var r = rgb[0] / 255;
	var g = rgb[1] / 255;
	var b = rgb[2] / 255;
	var min = Math.min(r, g, b);
	var max = Math.max(r, g, b);
	var delta = max - min;
	var h;
	var s;
	var l;

	if (max === min) {
		h = 0;
	} else if (r === max) {
		h = (g - b) / delta;
	} else if (g === max) {
		h = 2 + (b - r) / delta;
	} else if (b === max) {
		h = 4 + (r - g) / delta;
	}

	h = Math.min(h * 60, 360);

	if (h < 0) {
		h += 360;
	}

	l = (min + max) / 2;

	if (max === min) {
		s = 0;
	} else if (l <= 0.5) {
		s = delta / (max + min);
	} else {
		s = delta / (2 - max - min);
	}

	return [h, s * 100, l * 100];
};

convert.rgb.hsv = function (rgb) {
	var rdif;
	var gdif;
	var bdif;
	var h;
	var s;

	var r = rgb[0] / 255;
	var g = rgb[1] / 255;
	var b = rgb[2] / 255;
	var v = Math.max(r, g, b);
	var diff = v - Math.min(r, g, b);
	var diffc = function (c) {
		return (v - c) / 6 / diff + 1 / 2;
	};

	if (diff === 0) {
		h = s = 0;
	} else {
		s = diff / v;
		rdif = diffc(r);
		gdif = diffc(g);
		bdif = diffc(b);

		if (r === v) {
			h = bdif - gdif;
		} else if (g === v) {
			h = (1 / 3) + rdif - bdif;
		} else if (b === v) {
			h = (2 / 3) + gdif - rdif;
		}
		if (h < 0) {
			h += 1;
		} else if (h > 1) {
			h -= 1;
		}
	}

	return [
		h * 360,
		s * 100,
		v * 100
	];
};

convert.rgb.hwb = function (rgb) {
	var r = rgb[0];
	var g = rgb[1];
	var b = rgb[2];
	var h = convert.rgb.hsl(rgb)[0];
	var w = 1 / 255 * Math.min(r, Math.min(g, b));

	b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));

	return [h, w * 100, b * 100];
};

convert.rgb.cmyk = function (rgb) {
	var r = rgb[0] / 255;
	var g = rgb[1] / 255;
	var b = rgb[2] / 255;
	var c;
	var m;
	var y;
	var k;

	k = Math.min(1 - r, 1 - g, 1 - b);
	c = (1 - r - k) / (1 - k) || 0;
	m = (1 - g - k) / (1 - k) || 0;
	y = (1 - b - k) / (1 - k) || 0;

	return [c * 100, m * 100, y * 100, k * 100];
};

/**
 * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
 * */
function comparativeDistance(x, y) {
	return (
		Math.pow(x[0] - y[0], 2) +
		Math.pow(x[1] - y[1], 2) +
		Math.pow(x[2] - y[2], 2)
	);
}

convert.rgb.keyword = function (rgb) {
	var reversed = reverseKeywords[rgb];
	if (reversed) {
		return reversed;
	}

	var currentClosestDistance = Infinity;
	var currentClosestKeyword;

	for (var keyword in cssKeywords) {
		if (cssKeywords.hasOwnProperty(keyword)) {
			var value = cssKeywords[keyword];

			// Compute comparative distance
			var distance = comparativeDistance(rgb, value);

			// Check if its less, if so set as closest
			if (distance < currentClosestDistance) {
				currentClosestDistance = distance;
				currentClosestKeyword = keyword;
			}
		}
	}

	return currentClosestKeyword;
};

convert.keyword.rgb = function (keyword) {
	return cssKeywords[keyword];
};

convert.rgb.xyz = function (rgb) {
	var r = rgb[0] / 255;
	var g = rgb[1] / 255;
	var b = rgb[2] / 255;

	// assume sRGB
	r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
	g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
	b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);

	var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
	var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
	var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);

	return [x * 100, y * 100, z * 100];
};

convert.rgb.lab = function (rgb) {
	var xyz = convert.rgb.xyz(rgb);
	var x = xyz[0];
	var y = xyz[1];
	var z = xyz[2];
	var l;
	var a;
	var b;

	x /= 95.047;
	y /= 100;
	z /= 108.883;

	x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
	y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
	z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);

	l = (116 * y) - 16;
	a = 500 * (x - y);
	b = 200 * (y - z);

	return [l, a, b];
};

convert.hsl.rgb = function (hsl) {
	var h = hsl[0] / 360;
	var s = hsl[1] / 100;
	var l = hsl[2] / 100;
	var t1;
	var t2;
	var t3;
	var rgb;
	var val;

	if (s === 0) {
		val = l * 255;
		return [val, val, val];
	}

	if (l < 0.5) {
		t2 = l * (1 + s);
	} else {
		t2 = l + s - l * s;
	}

	t1 = 2 * l - t2;

	rgb = [0, 0, 0];
	for (var i = 0; i < 3; i++) {
		t3 = h + 1 / 3 * -(i - 1);
		if (t3 < 0) {
			t3++;
		}
		if (t3 > 1) {
			t3--;
		}

		if (6 * t3 < 1) {
			val = t1 + (t2 - t1) * 6 * t3;
		} else if (2 * t3 < 1) {
			val = t2;
		} else if (3 * t3 < 2) {
			val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
		} else {
			val = t1;
		}

		rgb[i] = val * 255;
	}

	return rgb;
};

convert.hsl.hsv = function (hsl) {
	var h = hsl[0];
	var s = hsl[1] / 100;
	var l = hsl[2] / 100;
	var smin = s;
	var lmin = Math.max(l, 0.01);
	var sv;
	var v;

	l *= 2;
	s *= (l <= 1) ? l : 2 - l;
	smin *= lmin <= 1 ? lmin : 2 - lmin;
	v = (l + s) / 2;
	sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);

	return [h, sv * 100, v * 100];
};

convert.hsv.rgb = function (hsv) {
	var h = hsv[0] / 60;
	var s = hsv[1] / 100;
	var v = hsv[2] / 100;
	var hi = Math.floor(h) % 6;

	var f = h - Math.floor(h);
	var p = 255 * v * (1 - s);
	var q = 255 * v * (1 - (s * f));
	var t = 255 * v * (1 - (s * (1 - f)));
	v *= 255;

	switch (hi) {
		case 0:
			return [v, t, p];
		case 1:
			return [q, v, p];
		case 2:
			return [p, v, t];
		case 3:
			return [p, q, v];
		case 4:
			return [t, p, v];
		case 5:
			return [v, p, q];
	}
};

convert.hsv.hsl = function (hsv) {
	var h = hsv[0];
	var s = hsv[1] / 100;
	var v = hsv[2] / 100;
	var vmin = Math.max(v, 0.01);
	var lmin;
	var sl;
	var l;

	l = (2 - s) * v;
	lmin = (2 - s) * vmin;
	sl = s * vmin;
	sl /= (lmin <= 1) ? lmin : 2 - lmin;
	sl = sl || 0;
	l /= 2;

	return [h, sl * 100, l * 100];
};

// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
convert.hwb.rgb = function (hwb) {
	var h = hwb[0] / 360;
	var wh = hwb[1] / 100;
	var bl = hwb[2] / 100;
	var ratio = wh + bl;
	var i;
	var v;
	var f;
	var n;

	// wh + bl cant be > 1
	if (ratio > 1) {
		wh /= ratio;
		bl /= ratio;
	}

	i = Math.floor(6 * h);
	v = 1 - bl;
	f = 6 * h - i;

	if ((i & 0x01) !== 0) {
		f = 1 - f;
	}

	n = wh + f * (v - wh); // linear interpolation

	var r;
	var g;
	var b;
	switch (i) {
		default:
		case 6:
		case 0: r = v; g = n; b = wh; break;
		case 1: r = n; g = v; b = wh; break;
		case 2: r = wh; g = v; b = n; break;
		case 3: r = wh; g = n; b = v; break;
		case 4: r = n; g = wh; b = v; break;
		case 5: r = v; g = wh; b = n; break;
	}

	return [r * 255, g * 255, b * 255];
};

convert.cmyk.rgb = function (cmyk) {
	var c = cmyk[0] / 100;
	var m = cmyk[1] / 100;
	var y = cmyk[2] / 100;
	var k = cmyk[3] / 100;
	var r;
	var g;
	var b;

	r = 1 - Math.min(1, c * (1 - k) + k);
	g = 1 - Math.min(1, m * (1 - k) + k);
	b = 1 - Math.min(1, y * (1 - k) + k);

	return [r * 255, g * 255, b * 255];
};

convert.xyz.rgb = function (xyz) {
	var x = xyz[0] / 100;
	var y = xyz[1] / 100;
	var z = xyz[2] / 100;
	var r;
	var g;
	var b;

	r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
	g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
	b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);

	// assume sRGB
	r = r > 0.0031308
		? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
		: r * 12.92;

	g = g > 0.0031308
		? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
		: g * 12.92;

	b = b > 0.0031308
		? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
		: b * 12.92;

	r = Math.min(Math.max(0, r), 1);
	g = Math.min(Math.max(0, g), 1);
	b = Math.min(Math.max(0, b), 1);

	return [r * 255, g * 255, b * 255];
};

convert.xyz.lab = function (xyz) {
	var x = xyz[0];
	var y = xyz[1];
	var z = xyz[2];
	var l;
	var a;
	var b;

	x /= 95.047;
	y /= 100;
	z /= 108.883;

	x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
	y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
	z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);

	l = (116 * y) - 16;
	a = 500 * (x - y);
	b = 200 * (y - z);

	return [l, a, b];
};

convert.lab.xyz = function (lab) {
	var l = lab[0];
	var a = lab[1];
	var b = lab[2];
	var x;
	var y;
	var z;

	y = (l + 16) / 116;
	x = a / 500 + y;
	z = y - b / 200;

	var y2 = Math.pow(y, 3);
	var x2 = Math.pow(x, 3);
	var z2 = Math.pow(z, 3);
	y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
	x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
	z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;

	x *= 95.047;
	y *= 100;
	z *= 108.883;

	return [x, y, z];
};

convert.lab.lch = function (lab) {
	var l = lab[0];
	var a = lab[1];
	var b = lab[2];
	var hr;
	var h;
	var c;

	hr = Math.atan2(b, a);
	h = hr * 360 / 2 / Math.PI;

	if (h < 0) {
		h += 360;
	}

	c = Math.sqrt(a * a + b * b);

	return [l, c, h];
};

convert.lch.lab = function (lch) {
	var l = lch[0];
	var c = lch[1];
	var h = lch[2];
	var a;
	var b;
	var hr;

	hr = h / 360 * 2 * Math.PI;
	a = c * Math.cos(hr);
	b = c * Math.sin(hr);

	return [l, a, b];
};

convert.rgb.ansi16 = function (args) {
	var r = args[0];
	var g = args[1];
	var b = args[2];
	var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization

	value = Math.round(value / 50);

	if (value === 0) {
		return 30;
	}

	var ansi = 30
		+ ((Math.round(b / 255) << 2)
		| (Math.round(g / 255) << 1)
		| Math.round(r / 255));

	if (value === 2) {
		ansi += 60;
	}

	return ansi;
};

convert.hsv.ansi16 = function (args) {
	// optimization here; we already know the value and don't need to get
	// it converted for us.
	return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
};

convert.rgb.ansi256 = function (args) {
	var r = args[0];
	var g = args[1];
	var b = args[2];

	// we use the extended greyscale palette here, with the exception of
	// black and white. normal palette only has 4 greyscale shades.
	if (r === g && g === b) {
		if (r < 8) {
			return 16;
		}

		if (r > 248) {
			return 231;
		}

		return Math.round(((r - 8) / 247) * 24) + 232;
	}

	var ansi = 16
		+ (36 * Math.round(r / 255 * 5))
		+ (6 * Math.round(g / 255 * 5))
		+ Math.round(b / 255 * 5);

	return ansi;
};

convert.ansi16.rgb = function (args) {
	var color = args % 10;

	// handle greyscale
	if (color === 0 || color === 7) {
		if (args > 50) {
			color += 3.5;
		}

		color = color / 10.5 * 255;

		return [color, color, color];
	}

	var mult = (~~(args > 50) + 1) * 0.5;
	var r = ((color & 1) * mult) * 255;
	var g = (((color >> 1) & 1) * mult) * 255;
	var b = (((color >> 2) & 1) * mult) * 255;

	return [r, g, b];
};

convert.ansi256.rgb = function (args) {
	// handle greyscale
	if (args >= 232) {
		var c = (args - 232) * 10 + 8;
		return [c, c, c];
	}

	args -= 16;

	var rem;
	var r = Math.floor(args / 36) / 5 * 255;
	var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
	var b = (rem % 6) / 5 * 255;

	return [r, g, b];
};

convert.rgb.hex = function (args) {
	var integer = ((Math.round(args[0]) & 0xFF) << 16)
		+ ((Math.round(args[1]) & 0xFF) << 8)
		+ (Math.round(args[2]) & 0xFF);

	var string = integer.toString(16).toUpperCase();
	return '000000'.substring(string.length) + string;
};

convert.hex.rgb = function (args) {
	var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
	if (!match) {
		return [0, 0, 0];
	}

	var colorString = match[0];

	if (match[0].length === 3) {
		colorString = colorString.split('').map(function (char) {
			return char + char;
		}).join('');
	}

	var integer = parseInt(colorString, 16);
	var r = (integer >> 16) & 0xFF;
	var g = (integer >> 8) & 0xFF;
	var b = integer & 0xFF;

	return [r, g, b];
};

convert.rgb.hcg = function (rgb) {
	var r = rgb[0] / 255;
	var g = rgb[1] / 255;
	var b = rgb[2] / 255;
	var max = Math.max(Math.max(r, g), b);
	var min = Math.min(Math.min(r, g), b);
	var chroma = (max - min);
	var grayscale;
	var hue;

	if (chroma < 1) {
		grayscale = min / (1 - chroma);
	} else {
		grayscale = 0;
	}

	if (chroma <= 0) {
		hue = 0;
	} else
	if (max === r) {
		hue = ((g - b) / chroma) % 6;
	} else
	if (max === g) {
		hue = 2 + (b - r) / chroma;
	} else {
		hue = 4 + (r - g) / chroma + 4;
	}

	hue /= 6;
	hue %= 1;

	return [hue * 360, chroma * 100, grayscale * 100];
};

convert.hsl.hcg = function (hsl) {
	var s = hsl[1] / 100;
	var l = hsl[2] / 100;
	var c = 1;
	var f = 0;

	if (l < 0.5) {
		c = 2.0 * s * l;
	} else {
		c = 2.0 * s * (1.0 - l);
	}

	if (c < 1.0) {
		f = (l - 0.5 * c) / (1.0 - c);
	}

	return [hsl[0], c * 100, f * 100];
};

convert.hsv.hcg = function (hsv) {
	var s = hsv[1] / 100;
	var v = hsv[2] / 100;

	var c = s * v;
	var f = 0;

	if (c < 1.0) {
		f = (v - c) / (1 - c);
	}

	return [hsv[0], c * 100, f * 100];
};

convert.hcg.rgb = function (hcg) {
	var h = hcg[0] / 360;
	var c = hcg[1] / 100;
	var g = hcg[2] / 100;

	if (c === 0.0) {
		return [g * 255, g * 255, g * 255];
	}

	var pure = [0, 0, 0];
	var hi = (h % 1) * 6;
	var v = hi % 1;
	var w = 1 - v;
	var mg = 0;

	switch (Math.floor(hi)) {
		case 0:
			pure[0] = 1; pure[1] = v; pure[2] = 0; break;
		case 1:
			pure[0] = w; pure[1] = 1; pure[2] = 0; break;
		case 2:
			pure[0] = 0; pure[1] = 1; pure[2] = v; break;
		case 3:
			pure[0] = 0; pure[1] = w; pure[2] = 1; break;
		case 4:
			pure[0] = v; pure[1] = 0; pure[2] = 1; break;
		default:
			pure[0] = 1; pure[1] = 0; pure[2] = w;
	}

	mg = (1.0 - c) * g;

	return [
		(c * pure[0] + mg) * 255,
		(c * pure[1] + mg) * 255,
		(c * pure[2] + mg) * 255
	];
};

convert.hcg.hsv = function (hcg) {
	var c = hcg[1] / 100;
	var g = hcg[2] / 100;

	var v = c + g * (1.0 - c);
	var f = 0;

	if (v > 0.0) {
		f = c / v;
	}

	return [hcg[0], f * 100, v * 100];
};

convert.hcg.hsl = function (hcg) {
	var c = hcg[1] / 100;
	var g = hcg[2] / 100;

	var l = g * (1.0 - c) + 0.5 * c;
	var s = 0;

	if (l > 0.0 && l < 0.5) {
		s = c / (2 * l);
	} else
	if (l >= 0.5 && l < 1.0) {
		s = c / (2 * (1 - l));
	}

	return [hcg[0], s * 100, l * 100];
};

convert.hcg.hwb = function (hcg) {
	var c = hcg[1] / 100;
	var g = hcg[2] / 100;
	var v = c + g * (1.0 - c);
	return [hcg[0], (v - c) * 100, (1 - v) * 100];
};

convert.hwb.hcg = function (hwb) {
	var w = hwb[1] / 100;
	var b = hwb[2] / 100;
	var v = 1 - b;
	var c = v - w;
	var g = 0;

	if (c < 1) {
		g = (v - c) / (1 - c);
	}

	return [hwb[0], c * 100, g * 100];
};

convert.apple.rgb = function (apple) {
	return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
};

convert.rgb.apple = function (rgb) {
	return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
};

convert.gray.rgb = function (args) {
	return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
};

convert.gray.hsl = convert.gray.hsv = function (args) {
	return [0, 0, args[0]];
};

convert.gray.hwb = function (gray) {
	return [0, 100, gray[0]];
};

convert.gray.cmyk = function (gray) {
	return [0, 0, 0, gray[0]];
};

convert.gray.lab = function (gray) {
	return [gray[0], 0, 0];
};

convert.gray.hex = function (gray) {
	var val = Math.round(gray[0] / 100 * 255) & 0xFF;
	var integer = (val << 16) + (val << 8) + val;

	var string = integer.toString(16).toUpperCase();
	return '000000'.substring(string.length) + string;
};

convert.rgb.gray = function (rgb) {
	var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
	return [val / 255 * 100];
};

},{"color-name":4}],2:[function(require,module,exports){
var conversions = require('./conversions');
var route = require('./route');

var convert = {};

var models = Object.keys(conversions);

function wrapRaw(fn) {
	var wrappedFn = function (args) {
		if (args === undefined || args === null) {
			return args;
		}

		if (arguments.length > 1) {
			args = Array.prototype.slice.call(arguments);
		}

		return fn(args);
	};

	// preserve .conversion property if there is one
	if ('conversion' in fn) {
		wrappedFn.conversion = fn.conversion;
	}

	return wrappedFn;
}

function wrapRounded(fn) {
	var wrappedFn = function (args) {
		if (args === undefined || args === null) {
			return args;
		}

		if (arguments.length > 1) {
			args = Array.prototype.slice.call(arguments);
		}

		var result = fn(args);

		// we're assuming the result is an array here.
		// see notice in conversions.js; don't use box types
		// in conversion functions.
		if (typeof result === 'object') {
			for (var len = result.length, i = 0; i < len; i++) {
				result[i] = Math.round(result[i]);
			}
		}

		return result;
	};

	// preserve .conversion property if there is one
	if ('conversion' in fn) {
		wrappedFn.conversion = fn.conversion;
	}

	return wrappedFn;
}

models.forEach(function (fromModel) {
	convert[fromModel] = {};

	Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
	Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});

	var routes = route(fromModel);
	var routeModels = Object.keys(routes);

	routeModels.forEach(function (toModel) {
		var fn = routes[toModel];

		convert[fromModel][toModel] = wrapRounded(fn);
		convert[fromModel][toModel].raw = wrapRaw(fn);
	});
});

module.exports = convert;

},{"./conversions":1,"./route":3}],3:[function(require,module,exports){
var conversions = require('./conversions');

/*
	this function routes a model to all other models.

	all functions that are routed have a property `.conversion` attached
	to the returned synthetic function. This property is an array
	of strings, each with the steps in between the 'from' and 'to'
	color models (inclusive).

	conversions that are not possible simply are not included.
*/

function buildGraph() {
	var graph = {};
	// https://jsperf.com/object-keys-vs-for-in-with-closure/3
	var models = Object.keys(conversions);

	for (var len = models.length, i = 0; i < len; i++) {
		graph[models[i]] = {
			// http://jsperf.com/1-vs-infinity
			// micro-opt, but this is simple.
			distance: -1,
			parent: null
		};
	}

	return graph;
}

// https://en.wikipedia.org/wiki/Breadth-first_search
function deriveBFS(fromModel) {
	var graph = buildGraph();
	var queue = [fromModel]; // unshift -> queue -> pop

	graph[fromModel].distance = 0;

	while (queue.length) {
		var current = queue.pop();
		var adjacents = Object.keys(conversions[current]);

		for (var len = adjacents.length, i = 0; i < len; i++) {
			var adjacent = adjacents[i];
			var node = graph[adjacent];

			if (node.distance === -1) {
				node.distance = graph[current].distance + 1;
				node.parent = current;
				queue.unshift(adjacent);
			}
		}
	}

	return graph;
}

function link(from, to) {
	return function (args) {
		return to(from(args));
	};
}

function wrapConversion(toModel, graph) {
	var path = [graph[toModel].parent, toModel];
	var fn = conversions[graph[toModel].parent][toModel];

	var cur = graph[toModel].parent;
	while (graph[cur].parent) {
		path.unshift(graph[cur].parent);
		fn = link(conversions[graph[cur].parent][cur], fn);
		cur = graph[cur].parent;
	}

	fn.conversion = path;
	return fn;
}

module.exports = function (fromModel) {
	var graph = deriveBFS(fromModel);
	var conversion = {};

	var models = Object.keys(graph);
	for (var len = models.length, i = 0; i < len; i++) {
		var toModel = models[i];
		var node = graph[toModel];

		if (node.parent === null) {
			// no possible conversion, or this node is the source model.
			continue;
		}

		conversion[toModel] = wrapConversion(toModel, graph);
	}

	return conversion;
};


},{"./conversions":1}],4:[function(require,module,exports){
'use strict'

module.exports = {
	"aliceblue": [240, 248, 255],
	"antiquewhite": [250, 235, 215],
	"aqua": [0, 255, 255],
	"aquamarine": [127, 255, 212],
	"azure": [240, 255, 255],
	"beige": [245, 245, 220],
	"bisque": [255, 228, 196],
	"black": [0, 0, 0],
	"blanchedalmond": [255, 235, 205],
	"blue": [0, 0, 255],
	"blueviolet": [138, 43, 226],
	"brown": [165, 42, 42],
	"burlywood": [222, 184, 135],
	"cadetblue": [95, 158, 160],
	"chartreuse": [127, 255, 0],
	"chocolate": [210, 105, 30],
	"coral": [255, 127, 80],
	"cornflowerblue": [100, 149, 237],
	"cornsilk": [255, 248, 220],
	"crimson": [220, 20, 60],
	"cyan": [0, 255, 255],
	"darkblue": [0, 0, 139],
	"darkcyan": [0, 139, 139],
	"darkgoldenrod": [184, 134, 11],
	"darkgray": [169, 169, 169],
	"darkgreen": [0, 100, 0],
	"darkgrey": [169, 169, 169],
	"darkkhaki": [189, 183, 107],
	"darkmagenta": [139, 0, 139],
	"darkolivegreen": [85, 107, 47],
	"darkorange": [255, 140, 0],
	"darkorchid": [153, 50, 204],
	"darkred": [139, 0, 0],
	"darksalmon": [233, 150, 122],
	"darkseagreen": [143, 188, 143],
	"darkslateblue": [72, 61, 139],
	"darkslategray": [47, 79, 79],
	"darkslategrey": [47, 79, 79],
	"darkturquoise": [0, 206, 209],
	"darkviolet": [148, 0, 211],
	"deeppink": [255, 20, 147],
	"deepskyblue": [0, 191, 255],
	"dimgray": [105, 105, 105],
	"dimgrey": [105, 105, 105],
	"dodgerblue": [30, 144, 255],
	"firebrick": [178, 34, 34],
	"floralwhite": [255, 250, 240],
	"forestgreen": [34, 139, 34],
	"fuchsia": [255, 0, 255],
	"gainsboro": [220, 220, 220],
	"ghostwhite": [248, 248, 255],
	"gold": [255, 215, 0],
	"goldenrod": [218, 165, 32],
	"gray": [128, 128, 128],
	"green": [0, 128, 0],
	"greenyellow": [173, 255, 47],
	"grey": [128, 128, 128],
	"honeydew": [240, 255, 240],
	"hotpink": [255, 105, 180],
	"indianred": [205, 92, 92],
	"indigo": [75, 0, 130],
	"ivory": [255, 255, 240],
	"khaki": [240, 230, 140],
	"lavender": [230, 230, 250],
	"lavenderblush": [255, 240, 245],
	"lawngreen": [124, 252, 0],
	"lemonchiffon": [255, 250, 205],
	"lightblue": [173, 216, 230],
	"lightcoral": [240, 128, 128],
	"lightcyan": [224, 255, 255],
	"lightgoldenrodyellow": [250, 250, 210],
	"lightgray": [211, 211, 211],
	"lightgreen": [144, 238, 144],
	"lightgrey": [211, 211, 211],
	"lightpink": [255, 182, 193],
	"lightsalmon": [255, 160, 122],
	"lightseagreen": [32, 178, 170],
	"lightskyblue": [135, 206, 250],
	"lightslategray": [119, 136, 153],
	"lightslategrey": [119, 136, 153],
	"lightsteelblue": [176, 196, 222],
	"lightyellow": [255, 255, 224],
	"lime": [0, 255, 0],
	"limegreen": [50, 205, 50],
	"linen": [250, 240, 230],
	"magenta": [255, 0, 255],
	"maroon": [128, 0, 0],
	"mediumaquamarine": [102, 205, 170],
	"mediumblue": [0, 0, 205],
	"mediumorchid": [186, 85, 211],
	"mediumpurple": [147, 112, 219],
	"mediumseagreen": [60, 179, 113],
	"mediumslateblue": [123, 104, 238],
	"mediumspringgreen": [0, 250, 154],
	"mediumturquoise": [72, 209, 204],
	"mediumvioletred": [199, 21, 133],
	"midnightblue": [25, 25, 112],
	"mintcream": [245, 255, 250],
	"mistyrose": [255, 228, 225],
	"moccasin": [255, 228, 181],
	"navajowhite": [255, 222, 173],
	"navy": [0, 0, 128],
	"oldlace": [253, 245, 230],
	"olive": [128, 128, 0],
	"olivedrab": [107, 142, 35],
	"orange": [255, 165, 0],
	"orangered": [255, 69, 0],
	"orchid": [218, 112, 214],
	"palegoldenrod": [238, 232, 170],
	"palegreen": [152, 251, 152],
	"paleturquoise": [175, 238, 238],
	"palevioletred": [219, 112, 147],
	"papayawhip": [255, 239, 213],
	"peachpuff": [255, 218, 185],
	"peru": [205, 133, 63],
	"pink": [255, 192, 203],
	"plum": [221, 160, 221],
	"powderblue": [176, 224, 230],
	"purple": [128, 0, 128],
	"rebeccapurple": [102, 51, 153],
	"red": [255, 0, 0],
	"rosybrown": [188, 143, 143],
	"royalblue": [65, 105, 225],
	"saddlebrown": [139, 69, 19],
	"salmon": [250, 128, 114],
	"sandybrown": [244, 164, 96],
	"seagreen": [46, 139, 87],
	"seashell": [255, 245, 238],
	"sienna": [160, 82, 45],
	"silver": [192, 192, 192],
	"skyblue": [135, 206, 235],
	"slateblue": [106, 90, 205],
	"slategray": [112, 128, 144],
	"slategrey": [112, 128, 144],
	"snow": [255, 250, 250],
	"springgreen": [0, 255, 127],
	"steelblue": [70, 130, 180],
	"tan": [210, 180, 140],
	"teal": [0, 128, 128],
	"thistle": [216, 191, 216],
	"tomato": [255, 99, 71],
	"turquoise": [64, 224, 208],
	"violet": [238, 130, 238],
	"wheat": [245, 222, 179],
	"white": [255, 255, 255],
	"whitesmoke": [245, 245, 245],
	"yellow": [255, 255, 0],
	"yellowgreen": [154, 205, 50]
};

},{}]},{},[2])(2)
});
;
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i;i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,i.DeltaE=t()}}(function(){return function t(i,e,s){function h(a,n){if(!e[a]){if(!i[a]){var o="function"==typeof require&&require;if(!n&&o)return o(a,!0);if(r)return r(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var m=e[a]={exports:{}};i[a][0].call(m.exports,function(t){var e=i[a][1][t];return h(e?e:t)},m,m.exports,t,i,e,s)}return e[a].exports}for(var r="function"==typeof require&&require,a=0;a<s.length;a++)h(s[a]);return h}({1:[function(t,i){"use strict";function e(){}var s=t("./dE76"),h=t("./dE94"),r=t("./dE00");e.prototype.getDeltaE76=function(t,i){var e=new s(t,i);return e.getDeltaE()},e.prototype.getDeltaE94=function(t,i){var e=new h(t,i);return e.getDeltaE()},e.prototype.getDeltaE00=function(t,i){var e=new r(t,i);return e.getDeltaE()},i.exports=new e},{"./dE00":2,"./dE76":3,"./dE94":4}],2:[function(t,i){"use strict";function e(t,i,e){var s=Math.sqrt,h=Math.pow;this.x1=t,this.x2=i,this.weights=e||{},this.ksubL=this.weights.lightness||1,this.ksubC=this.weights.chroma||1,this.ksubH=this.weights.hue||1,this.deltaLPrime=i.L-t.L,this.LBar=(t.L+i.L)/2,this.C1=s(h(t.A,2)+h(t.B,2)),this.C2=s(h(i.A,2)+h(i.B,2)),this.CBar=(this.C1+this.C2)/2,this.aPrime1=t.A+t.A/2*(1-s(h(this.CBar,7)/(h(this.CBar,7)+h(25,7)))),this.aPrime2=i.A+i.A/2*(1-s(h(this.CBar,7)/(h(this.CBar,7)+h(25,7)))),this.CPrime1=s(h(this.aPrime1,2)+h(t.B,2)),this.CPrime2=s(h(this.aPrime2,2)+h(i.B,2)),this.CBarPrime=(this.CPrime1+this.CPrime2)/2,this.deltaCPrime=this.CPrime2-this.CPrime1,this.SsubL=1+.015*h(this.LBar-50,2)/s(20+h(this.LBar-50,2)),this.SsubC=1+.045*this.CBarPrime,this.hPrime1=0,this.hPrime2=0,this.deltahPrime=0,this.deltaHPrime=0,this.HBarPrime=0,this.T=0,this.SsubH=0,this.RsubT=0}e.prototype.getDeltaE=function(){var t=Math.sqrt,i=Math.sin,e=Math.pow;this.hPrime1=this.gethPrime1(),this.hPrime2=this.gethPrime2(),this.deltahPrime=this.getDeltahPrime(),this.deltaHPrime=2*t(this.CPrime1*this.CPrime2)*i(this.degreesToRadians(this.deltahPrime)/2),this.HBarPrime=this.getHBarPrime(),this.T=this.getT(),this.SsubH=1+.015*this.CBarPrime*this.T,this.RsubT=this.getRsubT();var s=this.deltaLPrime/(this.ksubL*this.SsubL),h=this.deltaCPrime/(this.ksubC*this.SsubC),r=this.deltaHPrime/(this.ksubH*this.SsubH);return t(e(s,2)+e(h,2)+e(r,2)+this.RsubT*h*r)},e.prototype.getRsubT=function(){var t=Math.sin,i=Math.sqrt,e=Math.pow,s=Math.exp;return-2*i(e(this.CBarPrime,7)/(e(this.CBarPrime,7)+e(25,7)))*t(this.degreesToRadians(60*s(-e((this.HBarPrime-275)/25,2))))},e.prototype.getT=function(){var t=Math.cos;return 1-.17*t(this.degreesToRadians(this.HBarPrime-30))+.24*t(this.degreesToRadians(2*this.HBarPrime))+.32*t(this.degreesToRadians(3*this.HBarPrime+6))-.2*t(this.degreesToRadians(4*this.HBarPrime-63))},e.prototype.getHBarPrime=function(){var t=Math.abs;return t(this.hPrime1-this.hPrime2)>180?(this.hPrime1+this.hPrime2+360)/2:(this.hPrime1+this.hPrime2)/2},e.prototype.getDeltahPrime=function(){var t=Math.abs;return 0===this.C1||0===this.C2?0:t(this.hPrime1-this.hPrime2)<=180?this.hPrime2-this.hPrime1:this.hPrime2<=this.hPrime1?this.hPrime2-this.hPrime1+360:this.hPrime2-this.hPrime1-360},e.prototype.gethPrime1=function(){return this._gethPrimeFn(this.x1.B,this.aPrime1)},e.prototype.gethPrime2=function(){return this._gethPrimeFn(this.x2.B,this.aPrime2)},e.prototype._gethPrimeFn=function(t,i){var e;return 0===t&&0===i?0:(e=this.radiansToDegrees(Math.atan2(t,i)),e>=0?e:e+360)},e.prototype.radiansToDegrees=function(t){return t*(180/Math.PI)},e.prototype.degreesToRadians=function(t){return t*(Math.PI/180)},i.exports=e},{}],3:[function(t,i){"use strict";function e(t,i){this.x1=t,this.x2=i}e.prototype.getDeltaE=function(){var t=this.x1,i=this.x2;return Math.sqrt(Math.pow(i.L-t.L,2)+Math.pow(i.A-t.A,2)+Math.pow(i.B-t.B,2))},i.exports=e},{}],4:[function(t,i){"use strict";function e(t,i,e){this.x1=t,this.x2=i,this.weights=e||{},this.weights.lightness=this.weights.lightness||1,this.weights.chroma=this.weights.chroma||1,this.weights.hue=this.weights.hue||1,1===this.weights.lightness?(this.weights.K1=.045,this.weights.K2=.015):(this.weights.K1=.048,this.weights.K2=.014)}e.prototype.getDeltaE=function(){var t=this.x1,i=this.x2,e=Math.sqrt,s=Math.pow;return e(s(this.calculateL(t,i),2)+s(this.calculateA(t,i),2)+s(this.calculateB(t,i),2))},e.prototype.calculateL=function(t,i){return(t.L-i.L)/this.weights.lightness},e.prototype.calculateA=function(t,i){var e=Math.sqrt,s=Math.pow,h=e(s(t.A,2)+s(t.B,2)),r=e(s(i.A,2)+s(i.B,2)),a=h-r,n=1+this.weights.K1*h;return a/(this.weights.chroma*n)},e.prototype.calculateB=function(t,i){var e=Math.sqrt,s=Math.pow,h=e(s(t.A,2)+s(t.B,2)),r=e(s(i.A,2)+s(i.B,2)),a=h-r,n=t.A-i.A,o=t.B-i.B,u=e(s(n,2)+s(o,2)-s(a,2)),h=e(s(t.A,2)+s(t.B,2)),m=1+this.weights.K2*h;return u/m},i.exports=e},{}]},{},[1])(1)});;
/*!
 * jsonformatter
 * 
 * Version: 0.6.0 - 2016-04-28T02:57:03.650Z
 * License: Apache-2.0
 */


'use strict';

angular.module('jsonFormatter', ['RecursionHelper'])

.provider('JSONFormatterConfig', function JSONFormatterConfigProvider() {

  // Default values for hover preview config
  var hoverPreviewEnabled = false;
  var hoverPreviewArrayCount = 100;
  var hoverPreviewFieldCount = 5;

  return {
    get hoverPreviewEnabled() {
      return hoverPreviewEnabled;
    },
    set hoverPreviewEnabled(value) {
     hoverPreviewEnabled = !!value;
    },

    get hoverPreviewArrayCount() {
      return hoverPreviewArrayCount;
    },
    set hoverPreviewArrayCount(value) {
      hoverPreviewArrayCount = parseInt(value, 10);
    },

    get hoverPreviewFieldCount() {
      return hoverPreviewFieldCount;
    },
    set hoverPreviewFieldCount(value) {
      hoverPreviewFieldCount = parseInt(value, 10);
    },

    $get: function () {
      return {
        hoverPreviewEnabled: hoverPreviewEnabled,
        hoverPreviewArrayCount: hoverPreviewArrayCount,
        hoverPreviewFieldCount: hoverPreviewFieldCount
      };
    }
  };
})

.directive('jsonFormatter', ['RecursionHelper', 'JSONFormatterConfig', function jsonFormatterDirective(RecursionHelper, JSONFormatterConfig) {
  function escapeString(str) {
    return str.replace('"', '\"');
  }

  // From http://stackoverflow.com/a/332429
  function getObjectName(object) {
    if (object === undefined) {
      return '';
    }
    if (object === null) {
      return 'Object';
    }
    if (typeof object === 'object' && !object.constructor) {
        return 'Object';
    }
    var funcNameRegex = /function (.{1,})\(/;
    var results = (funcNameRegex).exec((object).constructor.toString());
    if (results && results.length > 1) {
      return results[1];
    } else {
      return '';
    }
  }

  function getType(object) {
    if (object === null) { return 'null'; }
    return typeof object;
  }

  function getValuePreview (object, value) {
    var type = getType(object);

    if (type === 'null' || type === 'undefined') { return type; }

    if (type === 'string') {
      value = '"' + escapeString(value) + '"';
    }
    if (type === 'function'){

      // Remove content of the function
      return object.toString()
          .replace(/[\r\n]/g, '')
          .replace(/\{.*\}/, '') + '{…}';

    }
    return value;
  }

  function getPreview(object) {
    var value = '';
    if (angular.isObject(object)) {
      value = getObjectName(object);
      if (angular.isArray(object))
        value += '[' + object.length + ']';
    } else {
      value = getValuePreview(object, object);
    }
    return value;
  }

  function link(scope) {
    scope.isArray = function () {
      return angular.isArray(scope.json);
    };

    scope.isObject = function() {
      return angular.isObject(scope.json);
    };

    scope.getKeys = function (){
      if (scope.isObject()) {
        return Object.keys(scope.json).map(function(key) {
          if (key === '') { return '""'; }
          return key;
        });
      }
    };
    scope.type = getType(scope.json);
    scope.hasKey = typeof scope.key !== 'undefined';
    scope.getConstructorName = function(){
      return getObjectName(scope.json);
    };

    if (scope.type === 'string'){

      // Add custom type for date
      if((new Date(scope.json)).toString() !== 'Invalid Date') {
        scope.isDate = true;
      }

      // Add custom type for URLs
      if (scope.json.indexOf('http') === 0) {
        scope.isUrl = true;
      }
    }

    scope.isEmptyObject = function () {
      return scope.getKeys() && !scope.getKeys().length &&
        scope.isOpen && !scope.isArray();
    };


    // If 'open' attribute is present
    scope.isOpen = !!scope.open;
    scope.toggleOpen = function () {
      scope.isOpen = !scope.isOpen;
    };
    scope.childrenOpen = function () {
      if (scope.open > 1){
        return scope.open - 1;
      }
      return 0;
    };

    scope.openLink = function (isUrl) {
      if(isUrl) {
        window.location.href = scope.json;
      }
    };

    scope.parseValue = function (value){
      return getValuePreview(scope.json, value);
    };

    scope.showThumbnail = function () {
      return !!JSONFormatterConfig.hoverPreviewEnabled && scope.isObject() && !scope.isOpen;
    };

    scope.getThumbnail = function () {
      if (scope.isArray()) {

        // if array length is greater then 100 it shows "Array[101]"
        if (scope.json.length > JSONFormatterConfig.hoverPreviewArrayCount) {
          return 'Array[' + scope.json.length + ']';
        } else {
          return '[' + scope.json.map(getPreview).join(', ') + ']';
        }
      } else {

        var keys = scope.getKeys();

        // the first five keys (like Chrome Developer Tool)
        var narrowKeys = keys.slice(0, JSONFormatterConfig.hoverPreviewFieldCount);

        // json value schematic information
        var kvs = narrowKeys
          .map(function (key) { return key + ':' + getPreview(scope.json[key]); });

        // if keys count greater then 5 then show ellipsis
        var ellipsis = keys.length >= 5 ? '…' : '';

        return '{' + kvs.join(', ') + ellipsis + '}';
      }
    };
  }

  return {
    templateUrl: 'json-formatter.html',
    restrict: 'E',
    replace: true,
    scope: {
      json: '=',
      key: '=',
      open: '='
    },
    compile: function(element) {

      // Use the compile function from the RecursionHelper,
      // And return the linking function(s) which it returns
      return RecursionHelper.compile(element, link);
    }
  };
}]);

// Export to CommonJS style imports. Exporting this string makes this valid:
// angular.module('myApp', [require('jsonformatter')]);
if (typeof module === 'object') {
  module.exports = 'jsonFormatter';
}
'use strict';

// from http://stackoverflow.com/a/18609594
angular.module('RecursionHelper', []).factory('RecursionHelper', ['$compile', function($compile){
  return {
    /**
     * Manually compiles the element, fixing the recursion loop.
     * @param element
     * @param [link] A post-link function, or an object with function(s)
     * registered via pre and post properties.
     * @returns An object containing the linking functions.
     */
    compile: function(element, link){
      // Normalize the link parameter
      if(angular.isFunction(link)){
        link = { post: link };
      }

      // Break the recursion loop by removing the contents
      var contents = element.contents().remove();
      var compiledContents;
      return {
        pre: (link && link.pre) ? link.pre : null,
        /**
         * Compiles and re-adds the contents
         */
        post: function(scope, element){
          // Compile the contents
          if(!compiledContents){
            compiledContents = $compile(contents);
          }
          // Re-add the compiled contents to the element
          compiledContents(scope, function(clone){
            element.append(clone);
          });

          // Call the post-linking function, if any
          if(link && link.post){
            link.post.apply(null, arguments);
          }
        }
      };
    }
  };
}]);

angular.module("jsonFormatter").run(["$templateCache", function($templateCache) {$templateCache.put("json-formatter.html","<div ng-init=\"isOpen = open && open > 0\" class=\"json-formatter-row\"><a ng-click=\"toggleOpen()\"><span class=\"toggler {{isOpen ? \'open\' : \'\'}}\" ng-if=\"isObject()\"></span> <span class=\"key\" ng-if=\"hasKey\"><span class=\"key-text\">{{key}}</span><span class=\"colon\">:</span></span> <span class=\"value\"><span ng-if=\"isObject()\"><span class=\"constructor-name\">{{getConstructorName(json)}}</span> <span ng-if=\"isArray()\"><span class=\"bracket\">[</span><span class=\"number\">{{json.length}}</span><span class=\"bracket\">]</span></span></span> <span ng-if=\"!isObject()\" ng-click=\"openLink(isUrl)\" class=\"{{type}}\" ng-class=\"{date: isDate, url: isUrl}\">{{parseValue(json)}}</span></span> <span ng-if=\"showThumbnail()\" class=\"thumbnail-text\">{{getThumbnail()}}</span></a><div class=\"children\" ng-if=\"getKeys().length && isOpen\"><json-formatter ng-repeat=\"key in getKeys() track by $index\" json=\"json[key]\" key=\"key\" open=\"childrenOpen()\"></json-formatter></div><div class=\"children empty object\" ng-if=\"isEmptyObject()\"></div><div class=\"children empty array\" ng-if=\"getKeys() && !getKeys().length && isOpen && isArray()\"></div></div>");}]);;
/* Azure Media Player v2.3.9 | (c) 2016 Microsoft Corporation */
function ObjectIron(a){var b;for(b=[],i=0,len=a.length;i<len;i+=1)b.push(a[i].isRoot?"root":a[i].name);var c=function(a,b){var c;if(null!==a&&null!==b)for(c in a)a.hasOwnProperty(c)&&(b.hasOwnProperty(c)||(b[c]=a[c]))},d=function(a,b,d){var e,f,g,h,i;if(null!==a&&0!==a.length)for(e=0,f=a.length;f>e;e+=1)g=a[e],b.hasOwnProperty(g.name)&&(d.hasOwnProperty(g.name)?g.merge&&(h=b[g.name],i=d[g.name],"object"==typeof h&&"object"==typeof i?c(h,i):d[g.name]=null!=g.mergeFunction?g.mergeFunction(h,i):h+i):d[g.name]=b[g.name])},e=function(a,b){var c,f,g,h,i,j,k,l=a;if(null!==l.children&&0!==l.children.length)for(c=0,f=l.children.length;f>c;c+=1)if(j=l.children[c],b.hasOwnProperty(j.name))if(j.isArray)for(i=b[j.name+"_asArray"],g=0,h=i.length;h>g;g+=1)k=i[g],d(l.properties,b,k),e(j,k);else k=b[j.name],d(l.properties,b,k),e(j,k)},f=function(c){var d,g,h,i,j,k,l;if(null===c)return c;if("object"!=typeof c)return c;for(d=0,g=b.length;g>d;d+=1)"root"===b[d]&&(j=a[d],k=c,e(j,k));for(i in c)if(c.hasOwnProperty(i)){if(h=b.indexOf(i),-1!==h)if(j=a[h],j.isArray)for(l=c[i+"_asArray"],d=0,g=l.length;g>d;d+=1)k=l[d],e(j,k);else k=c[i],e(j,k);f(c[i])}return c};return{run:f}}function X2JS(a,b,c){function d(a){var b=a.localName;return null==b&&(b=a.baseName),(null==b||""==b)&&(b=a.nodeName),b}function e(a){return a.prefix}function f(a){return"string"==typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):a}function g(a){return a.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/")}function h(f){if(f.nodeType==u.DOCUMENT_NODE){var i,j,k,l=f.firstChild;for(j=0,k=f.childNodes.length;k>j;j+=1)if(f.childNodes[j].nodeType!==u.COMMENT_NODE){l=f.childNodes[j];break}if(c)i=h(l);else{i={};var m=d(l);i[m]=h(l)}return i}if(f.nodeType==u.ELEMENT_NODE){var i=new Object;i.__cnt=0;for(var n=f.childNodes,o=0;o<n.length;o++){var l=n.item(o),m=d(l);if(i.__cnt++,null==i[m])i[m]=h(l),i[m+"_asArray"]=new Array(1),i[m+"_asArray"][0]=i[m];else{if(null!=i[m]&&!(i[m]instanceof Array)){var p=i[m];i[m]=new Array,i[m][0]=p,i[m+"_asArray"]=i[m]}for(var q=0;null!=i[m][q];)q++;i[m][q]=h(l)}}for(var r=0;r<f.attributes.length;r++){var s=f.attributes.item(r);i.__cnt++;for(var v=s.value,w=0,x=a.length;x>w;w++){var y=a[w];y.test.call(this,s.value)&&(v=y.converter.call(this,s.value),i[b+s.name+y.suffix()]=v,v=null)}v&&(i[b+s.name]=v)}var z=e(f);return null!=z&&""!=z&&(i.__cnt++,i.__prefix=z),1==i.__cnt&&null!=i["#text"]&&(i=i["#text"]),null!=i["#text"]&&(i.__text=i["#text"],t&&(i.__text=g(i.__text)),delete i["#text"],delete i["#text_asArray"]),null!=i["#cdata-section"]&&(i.__cdata=i["#cdata-section"],delete i["#cdata-section"],delete i["#cdata-section_asArray"]),(null!=i.__text||null!=i.__cdata)&&(i.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),i}return f.nodeType==u.TEXT_NODE||f.nodeType==u.CDATA_SECTION_NODE?f.nodeValue:f.nodeType==u.COMMENT_NODE?null:void 0}function i(a,b,c,d){var e="<"+(null!=a&&null!=a.__prefix?a.__prefix+":":"")+b;if(null!=c)for(var f=0;f<c.length;f++){var g=c[f],h=a[g];e+=" "+g.substr(1)+"='"+h+"'"}return e+=d?"/>":">"}function j(a,b){return"</"+(null!=a.__prefix?a.__prefix+":":"")+b+">"}function k(a,b){return-1!==a.indexOf(b,a.length-b.length)}function l(a,b){return k(b.toString(),"_asArray")||0==b.toString().indexOf("_")||a[b]instanceof Function?!0:!1}function m(a){var b=0;if(a instanceof Object)for(var c in a)l(a,c)||b++;return b}function n(a){var b=[];if(a instanceof Object)for(var c in a)-1==c.toString().indexOf("__")&&0==c.toString().indexOf("_")&&b.push(c);return b}function o(a){var b="";return null!=a.__cdata&&(b+="<![CDATA["+a.__cdata+"]]>"),null!=a.__text&&(b+=t?f(a.__text):a.__text),b}function p(a){var b="";return a instanceof Object?b+=o(a):null!=a&&(b+=t?f(a):a),b}function q(a,b,c){var d="";if(0==a.length)d+=i(a,b,c,!0);else for(var e=0;e<a.length;e++)d+=i(a[e],b,n(a[e]),!1),d+=r(a[e]),d+=j(a[e],b);return d}function r(a){var b="",c=m(a);if(c>0)for(var d in a)if(!l(a,d)){var e=a[d],f=n(e);if(null==e||void 0==e)b+=i(e,d,f,!0);else if(e instanceof Object)if(e instanceof Array)b+=q(e,d,f);else{var g=m(e);g>0||null!=e.__text||null!=e.__cdata?(b+=i(e,d,f,!1),b+=r(e),b+=j(e,d)):b+=i(e,d,f,!0)}else b+=i(e,d,f,!1),b+=p(e),b+=j(e,d)}return b+=p(a)}(null===b||void 0===b)&&(b="_"),(null===c||void 0===c)&&(c=!1);var s="1.0.11",t=!1,u={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(a){var b;if(window.DOMParser){var c=new window.DOMParser;b=c.parseFromString(a,"text/xml")}else 0==a.indexOf("<?")&&(a=a.substr(a.indexOf("?>")+2)),b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a);return b},this.xml2json=function(a){return h(a)},this.xml_str2json=function(a){var b=this.parseXmlString(a);return this.xml2json(b)},this.json2xml_str=function(a){return r(a)},this.json2xml=function(a){var b=this.json2xml_str(a);return this.parseXmlString(b)},this.getVersion=function(){return s},this.escapeMode=function(a){t=a}}var AzureHtml5JS;!function(a){!function(a){"use strict";function b(a,b){k(a,3,b)}function c(a,b){k(a,2,b)}function d(a,b){k(a,1,b)}function e(a){n=a}function f(a){void 0===a||null===a?o.forEach(function(a,b,c){c[b]=!0}):o[a]=!0}function g(a){void 0===a||null===a?o.forEach(function(a,b,c){c[b]=!1}):o[a]=!1}function h(a){"undefined"==typeof a&&(a=!0),q=a}function i(a){"undefined"==typeof a&&(a=!0);var b=r;return a&&(r=""),b}function j(a,b){s=a,t=b}function k(a,b,c){if(s&&n>=b)return void s(t,b,m[a]+": "+c);var d=new Date(Date.now());if(n>=b&&o[a]){var e="["+d.getHours()+":"+d.getMinutes()+":"+(d.getSeconds()+d.getMilliseconds()/1e3).toFixed(3)+"] "+l[b]+": "+m[a]+": "+c;q&&(r+="\n"+e)}}!function(a){a[a.none=0]="none",a[a.error=1]="error",a[a.warning=2]="warning",a[a.verbose=3]="verbose"}(a.Level||(a.Level={}));var l=a.Level;!function(a){a[a.workflowSequencer=0]="workflowSequencer",a[a.workflowCoordinator=1]="workflowCoordinator",a[a.htmlAdapter=2]="htmlAdapter",a[a.videoElementAdapter=3]="videoElementAdapter",a[a.manifestParser=4]="manifestParser",a[a.httpDataRetriever=5]="httpDataRetriever",a[a.dashUrlFormatter=6]="dashUrlFormatter",a[a.azureHTML5=7]="azureHTML5",a[a.heuristics=8]="heuristics",a[a.segmentLocator=9]="segmentLocator",a[a.mediaParser=10]="mediaParser",a[a.mp4Parser=11]="mp4Parser",a[a.encrypted=12]="encrypted",a[a.common=13]="common",a[a.functionalTest=14]="functionalTest",a[a.ad=15]="ad",a[a.ttml=16]="ttml",a[a.context=17]="context",a[a.max=18]="max"}(a.Area||(a.Area={}));var m=a.Area;a.verbose=b,a.warning=c,a.error=d,a.setConsoleOutputByLevel=e,a.enableConsoleOutputByArea=f,a.disableConsoleOutputByArea=g,a.enableMemoryLog=h,a.getMemoryLog=i,a.setLoggerFunction=j;for(var n=0,o=[],p=0;18>p;p++)o.push(!1);var q=!1,r="",s=void 0,t=null;a.enableConsoleOutputByArea(),a.setConsoleOutputByLevel(1)}(a.Log||(a.Log={}));a.Log}(AzureHtml5JS||(AzureHtml5JS={})),Dash=function(){"use strict";return{modules:{},dependencies:{},vo:{},di:{}}}(),Dash.dependencies.DashParser=function(){"use strict";var a=31536e3,b=2592e3,c=86400,d=3600,e=60,f=60,g=1e3,h=/^P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,i=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})([0-9]{2}))?/,j=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,k=[{type:"duration",test:function(a){return h.test(a)},converter:function(f){var g=h.exec(f),i=parseFloat(g[2]||0)*a+parseFloat(g[4]||0)*b+parseFloat(g[6]||0)*c+parseFloat(g[8]||0)*d+parseFloat(g[10]||0)*e+parseFloat(g[12]||0);return i=parseFloat(i.toFixed(9))},suffix:function(){return""}},{type:"datetime",test:function(a){return i.test(a)},converter:function(a){var b,c=i.exec(a);if(b=Date.UTC(parseInt(c[1],10),parseInt(c[2],10)-1,parseInt(c[3],10),parseInt(c[4],10),parseInt(c[5],10),c[6]&&parseInt(c[6],10)||0,c[7]&&parseFloat(c[7])*g||0),c[9]&&c[10]){var d=parseInt(c[9],10)*f+parseInt(c[10],10);b+=("+"===c[8]?-1:1)*d*e*g}return new Date(b)},suffix:function(){return""}},{type:"numeric",test:function(a){return j.test(a)},converter:function(a){return parseFloat(a)},suffix:function(){return""}},{type:"numeric",test:function(a){return j.test(a)},converter:function(a){return a},suffix:function(){return"_str"}}],l=function(){var a,b,c,d;return d=[{name:"profiles",merge:!1},{name:"width",merge:!1},{name:"height",merge:!1},{name:"sar",merge:!1},{name:"frameRate",merge:!1},{name:"audioSamplingRate",merge:!1},{name:"mimeType",merge:!1},{name:"segmentProfiles",merge:!1},{name:"codecs",merge:!1},{name:"maximumSAPPeriod",merge:!1},{name:"startsWithSap",merge:!1},{name:"maxPlayoutRate",merge:!1},{name:"codingDependency",merge:!1},{name:"scanType",merge:!1},{name:"FramePacking",merge:!0},{name:"AudioChannelConfiguration",merge:!0},{name:"ContentProtection",merge:!0}],a={},a.name="AdaptationSet",a.isRoot=!1,a.isArray=!0,a.parent=null,a.children=[],a.properties=d,b={},b.name="Representation",b.isRoot=!1,b.isArray=!0,b.parent=a,b.children=[],b.properties=d,a.children.push(b),c={},c.name="SubRepresentation",c.isRoot=!1,c.isArray=!0,c.parent=b,c.children=[],c.properties=d,b.children.push(c),a},m=function(){var a,b,c,d;return d=[{name:"SegmentBase",merge:!0},{name:"SegmentTemplate",merge:!0},{name:"SegmentList",merge:!0}],a={},a.name="Period",a.isRoot=!1,a.isArray=!0,a.parent=null,a.children=[],a.properties=d,b={},b.name="AdaptationSet",b.isRoot=!1,b.isArray=!0,b.parent=a,b.children=[],b.properties=d,a.children.push(b),c={},c.name="Representation",c.isRoot=!1,c.isArray=!0,c.parent=b,c.children=[],c.properties=d,b.children.push(c),a},n=function(){var a,b,c,d,e;return e=[{name:"BaseURL",merge:!0,mergeFunction:function(a,b){var c;return c=0===b.indexOf("http://")?b:a+b}}],a={},a.name="mpd",a.isRoot=!0,a.isArray=!0,a.parent=null,a.children=[],a.properties=e,b={},b.name="Period",b.isRoot=!1,b.isArray=!0,b.parent=null,b.children=[],b.properties=e,a.children.push(b),c={},c.name="AdaptationSet",c.isRoot=!1,c.isArray=!0,c.parent=b,c.children=[],c.properties=e,b.children.push(c),d={},d.name="Representation",d.isRoot=!1,d.isArray=!0,d.parent=c,d.children=[],d.properties=e,c.children.push(d),a},o=function(){var a=[];return a.push(l()),a.push(m()),a.push(n()),a},p=function(a,b){var c,d=new X2JS(k,"",!0),e=new ObjectIron(o()),f=new Date,g=null,h=null;try{c=d.xml_str2json(a),g=new Date,c.hasOwnProperty("BaseURL")?(c.BaseURL=c.BaseURL_asArray[0],0!==c.BaseURL.toString().indexOf("http")&&(c.BaseURL=b+c.BaseURL)):c.BaseURL=b,e.run(c),h=new Date,this.debug.log("Parsing complete: ( xml2json: "+(g.getTime()-f.getTime())+"ms, objectiron: "+(h.getTime()-g.getTime())+"ms, total: "+(h.getTime()-f.getTime())/1e3+"s)")}catch(i){return this.errHandler.manifestError("parsing the manifest failed","parse",a),null}return c};return{debug:void 0,errHandler:void 0,parse:p}},Dash.dependencies.DashParser.prototype={constructor:Dash.dependencies.DashParser},function(){function a(a){function b(a){if(this.data="",this.read=0,"string"==typeof a)this.data=a;else if(c.isArrayBuffer(a)||c.isArrayBufferView(a)){var d=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,d)}catch(e){for(var f=0;f<d.length;++f)this.putByte(d[f])}}else(a instanceof b||"object"==typeof a&&"string"==typeof a.data&&"number"==typeof a.read)&&(this.data=a.data,this.read=a.read);this._constructedStringLength=0}var c=a.util=a.util||{};c.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},c.isArrayBuffer=function(a){return"undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer},c.isArrayBufferView=function(a){return a&&c.isArrayBuffer(a.buffer)&&void 0!==a.byteLength},c.ByteBuffer=b,c.ByteStringBuffer=b;var d=4096;c.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a,this._constructedStringLength>d&&(this.data.substr(0,1),this._constructedStringLength=0)},c.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},c.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},c.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))},c.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;b>0;)1&b&&(c+=a),b>>>=1,b>0&&(a+=a);return this.data=c,this._optimizeConstructedString(b),this},c.ByteStringBuffer.prototype.putBytes=function(a){return this.data+=a,this._optimizeConstructedString(a.length),this},c.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(c.encodeUtf8(a))},c.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&255)+String.fromCharCode(255&a))},c.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(255&a))},c.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(255&a))},c.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(255&a)+String.fromCharCode(a>>8&255))},c.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(255&a)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))},c.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(255&a)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))},c.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(b>0);return this.putBytes(c)},c.ByteStringBuffer.prototype.putSignedInt=function(a,b){return 0>a&&(a+=2<<b-1),this.putInt(a,b)},c.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())},c.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},c.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,a},c.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,a},c.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,a},c.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,a},c.ByteStringBuffer.prototype.getInt24Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,a},c.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,a},c.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(a>0);return b},c.ByteStringBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a),c=2<<a-2;return b>=c&&(b-=c<<1),b},c.ByteStringBuffer.prototype.getBytes=function(a){var b;return a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear()),b},c.ByteStringBuffer.prototype.bytes=function(a){return"undefined"==typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)},c.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+a)},c.ByteStringBuffer.prototype.setAt=function(a,b){return this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1),this},c.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},c.ByteStringBuffer.prototype.copy=function(){var a=c.createBuffer(this.data);return a.read=this.read,a},c.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},c.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},c.ByteStringBuffer.prototype.truncate=function(a){var b=Math.max(0,this.length()-a);return this.data=this.data.substr(this.read,b),this.read=0,this},c.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0"),a+=c.toString(16)}return a},c.ByteStringBuffer.prototype.toString=function(){return c.decodeUtf8(this.bytes())},c.createBuffer=function(a,b){return b=b||"raw",void 0!==a&&"utf8"===b&&(a=c.encodeUtf8(a)),new c.ByteBuffer(a)},c.encodeUtf8=function(a){return unescape(encodeURIComponent(a))},c.decodeUtf8=function(a){return decodeURIComponent(escape(a))}}return"undefined"==typeof forge&&(forge={}),a(forge)}(),function(){function a(a){a.cipher=a.cipher||{},a.cipher.algorithms=a.cipher.algorithms||{},a.cipher.createDecipher=function(b,c){var d=b;if("string"==typeof d&&(d=a.cipher.getAlgorithm(d),d&&(d=d())),!d)throw new Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})},a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase(),a.cipher.algorithms[b]=c},a.cipher.getAlgorithm=function(b){return b=b.toUpperCase(),b in a.cipher.algorithms?a.cipher.algorithms[b]:null};var b=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=a.decrypt,this.algorithm.initialize(a)};b.prototype.start=function(b){b=b||{};var c={};for(var d in b)c[d]=b[d];c.decrypt=this._decrypt,this._finish=!1,this._input=a.util.createBuffer(),this.output=b.output||a.util.createBuffer(),this.mode.start(c)},b.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},b.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};return b.decrypt=this._decrypt,b.overflow=this._input.length()%this.blockSize,this._decrypt||!this.mode.pad||this.mode.pad(this._input,b)?(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)?!1:this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0):!1}}return"undefined"==typeof forge&&(forge={}),a(forge)}(),function(){function a(a){function b(b){if("string"==typeof b&&(b=a.util.createBuffer(b)),a.util.isArray(b)&&b.length>4){var c=b;b=a.util.createBuffer();for(var d=0;d<c.length;++d)b.putByte(c[d])}return a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]),b}a.cipher=a.cipher||{};var c=a.cipher.modes=a.cipher.modes||{};c.cbc=function(a){a=a||{},this.name="CBC",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},c.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in a))throw new Error("Invalid IV parameter.");this._iv=b(a.iv),this._prev=this._iv.slice(0)}},c.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=this._prev[d]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._outBlock[d]);this._prev=this._outBlock},c.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._prev[d]^this._outBlock[d]);this._prev=this._inBlock.slice(0)},c.cbc.prototype.pad=function(a){var b=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();return a.fillWithByte(b,b),!0},c.cbc.prototype.unpad=function(a,b){if(b.overflow>0)return!1;var c=a.length(),d=a.at(c-1);return d>this.blockSize<<2?!1:(a.truncate(d),!0)}}return"undefined"==typeof forge&&(forge={}),a(forge)}(),function(){function a(a){function b(b,c){var d=function(){return new a.aes.Algorithm(b,c)};a.cipher.registerAlgorithm(b,d)}function c(){k=!0,h=[0,1,2,4,8,16,32,64,128,27,54];for(var a=new Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;f=new Array(256),g=new Array(256),i=new Array(4),j=new Array(4);for(var b=0;4>b;++b)i[b]=new Array(256),j[b]=new Array(256);for(var c,d,e,l,m,n,o,p=0,q=0,b=0;256>b;++b){l=q^q<<1^q<<2^q<<3^q<<4,l=l>>8^255&l^99,f[p]=l,g[l]=p,m=a[l],c=a[p],d=a[c],e=a[d],n=m<<24^l<<16^l<<8^(l^m),o=(c^d^e)<<24^(p^e)<<16^(p^d^e)<<8^(p^c^e);for(var r=0;4>r;++r)i[r][p]=n,j[r][l]=o,n=n<<24|n>>>8,o=o<<24|o>>>8;0===p?p=q=1:(p=c^a[a[a[c^e]]],q^=a[a[q]])}}function d(a,b){for(var c,d=a.slice(0),e=1,g=d.length,i=g+6+1,k=l*i,m=g;k>m;++m)c=d[m-1],m%g===0?(c=f[c>>>16&255]<<24^f[c>>>8&255]<<16^f[255&c]<<8^f[c>>>24]^h[e]<<24,e++):g>6&&m%g===4&&(c=f[c>>>24]<<24^f[c>>>16&255]<<16^f[c>>>8&255]<<8^f[255&c]),d[m]=d[m-g]^c;if(b){var n,o=j[0],p=j[1],q=j[2],r=j[3],s=d.slice(0);k=d.length;for(var m=0,t=k-l;k>m;m+=l,t-=l)if(0===m||m===k-l)s[m]=d[t],s[m+1]=d[t+3],s[m+2]=d[t+2],s[m+3]=d[t+1];else for(var u=0;l>u;++u)n=d[t+u],s[m+(3&-u)]=o[f[n>>>24]]^p[f[n>>>16&255]]^q[f[n>>>8&255]]^r[f[255&n]];d=s}return d}function e(a,b,c,d){var e,h,k,l,m,n=a.length/4-1;d?(e=j[0],h=j[1],k=j[2],l=j[3],m=g):(e=i[0],h=i[1],k=i[2],l=i[3],m=f);var o,p,q,r,s,t,u;o=b[0]^a[0],p=b[d?3:1]^a[1],q=b[2]^a[2],r=b[d?1:3]^a[3];for(var v=3,w=1;n>w;++w)s=e[o>>>24]^h[p>>>16&255]^k[q>>>8&255]^l[255&r]^a[++v],t=e[p>>>24]^h[q>>>16&255]^k[r>>>8&255]^l[255&o]^a[++v],u=e[q>>>24]^h[r>>>16&255]^k[o>>>8&255]^l[255&p]^a[++v],r=e[r>>>24]^h[o>>>16&255]^k[p>>>8&255]^l[255&q]^a[++v],o=s,p=t,q=u;c[0]=m[o>>>24]<<24^m[p>>>16&255]<<16^m[q>>>8&255]<<8^m[255&r]^a[++v],c[d?3:1]=m[p>>>24]<<24^m[q>>>16&255]<<16^m[r>>>8&255]<<8^m[255&o]^a[++v],c[2]=m[q>>>24]<<24^m[r>>>16&255]<<16^m[o>>>8&255]<<8^m[255&p]^a[++v],c[d?1:3]=m[r>>>24]<<24^m[o>>>16&255]<<16^m[p>>>8&255]<<8^m[255&q]^a[++v]}a.aes=a.aes||{},a.aes.Algorithm=function(a,b){k||c();var d=this;d.name=a,d.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return e(d._w,a,b,!1)},decrypt:function(a,b){return e(d._w,a,b,!0)}}}),d._init=!1},a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c,e=b.key;if("string"!=typeof e||16!==e.length&&24!==e.length&&32!==e.length){if(a.util.isArray(e)&&(16===e.length||24===e.length||32===e.length)){c=e,e=a.util.createBuffer();for(var f=0;f<c.length;++f)e.putByte(c[f])}}else e=a.util.createBuffer(e);if(!a.util.isArray(e)){c=e,e=[];var g=c.length();if(16===g||24===g||32===g){g>>>=2;for(var f=0;g>f;++f)e.push(c.getInt32())}}if(!a.util.isArray(e)||4!==e.length&&6!==e.length&&8!==e.length)throw new Error("Invalid key parameter.");var h=this.mode.name,i=-1!==["CFB","OFB","CTR","GCM"].indexOf(h);this._w=d(e,b.decrypt&&!i),this._init=!0}},a.aes._expandKey=function(a,b){return k||c(),d(a,b)},a.aes._updateBlock=e,b("AES-CBC",a.cipher.modes.cbc);var f,g,h,i,j,k=!1,l=4}return"undefined"==typeof forge&&(forge={}),a(forge)}(),!function(){var a,b,c,d;!function(){var e={},f={};a=function(a,b,c){e[a]={deps:b,callback:c}},d=c=b=function(a){function c(b){if("."!==b.charAt(0))return b;for(var c=b.split("/"),d=a.split("/").slice(0,-1),e=0,f=c.length;f>e;e++){var g=c[e];if(".."===g)d.pop();else{if("."===g)continue;d.push(g)}}return d.join("/")}if(d._eak_seen=e,f[a])return f[a];if(f[a]={},!e[a])throw new Error("Could not find module "+a);for(var g,h=e[a],i=h.deps,j=h.callback,k=[],l=0,m=i.length;m>l;l++)k.push("exports"===i[l]?g={}:b(c(i[l])));var n=j.apply(this,k);return f[a]=g||n}}(),a("promise/all",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to all.");return new b(function(b,c){function d(a){return function(b){f(a,b)}}function f(a,c){h[a]=c,0===--i&&b(h)}var g,h=[],i=a.length;0===i&&b([]);for(var j=0;j<a.length;j++)g=a[j],g&&e(g.then)?g.then(d(j),c):f(j,g)})}var d=a.isArray,e=a.isFunction;b.all=c}),a("promise/asap",["exports"],function(a){"use strict";function b(){return function(){process.nextTick(e)}}function c(){var a=0,b=new i(e),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function d(){return function(){j.setTimeout(e,1)}}function e(){for(var a=0;a<k.length;a++){var b=k[a],c=b[0],d=b[1];c(d)}k=[]}function f(a,b){var c=k.push([a,b]);1===c&&g()}var g,h="undefined"!=typeof window?window:{},i=h.MutationObserver||h.WebKitMutationObserver,j="undefined"!=typeof global?global:void 0===this?window:this,k=[];g="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?b():i?c():d(),a.asap=f}),a("promise/config",["exports"],function(a){"use strict";function b(a,b){return 2!==arguments.length?c[a]:void(c[a]=b)}var c={instrument:!1};a.config=c,a.configure=b}),a("promise/polyfill",["./promise","./utils","exports"],function(a,b,c){"use strict";function d(){var a;a="undefined"!=typeof global?global:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),f(b)}();b||(a.Promise=e)}var e=a.Promise,f=b.isFunction;c.polyfill=d}),a("promise/promise",["./config","./utils","./all","./race","./resolve","./reject","./asap","exports"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){if(!v(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof i))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],j(a,this)}function j(a,b){function c(a){o(b,a)}function d(a){q(b,a)}try{a(c,d)}catch(e){d(e)}}function k(a,b,c,d){var e,f,g,h,i=v(c);if(i)try{e=c(d),g=!0}catch(j){h=!0,f=j}else e=d,g=!0;n(b,e)||(i&&g?o(b,e):h?q(b,f):a===D?o(b,e):a===E&&q(b,e))}function l(a,b,c,d){var e=a._subscribers,f=e.length;e[f]=b,e[f+D]=c,e[f+E]=d}function m(a,b){for(var c,d,e=a._subscribers,f=a._detail,g=0;g<e.length;g+=3)c=e[g],d=e[g+b],k(b,c,d,f);a._subscribers=null}function n(a,b){var c,d=null;try{if(a===b)throw new TypeError("A promises callback cannot return that same promise.");if(u(b)&&(d=b.then,v(d)))return d.call(b,function(d){return c?!0:(c=!0,void(b!==d?o(a,d):p(a,d)))},function(b){return c?!0:(c=!0,void q(a,b))}),!0}catch(e){return c?!0:(q(a,e),!0)}return!1}function o(a,b){a===b?p(a,b):n(a,b)||p(a,b)}function p(a,b){a._state===B&&(a._state=C,a._detail=b,t.async(r,a))}function q(a,b){a._state===B&&(a._state=C,a._detail=b,t.async(s,a))}function r(a){m(a,a._state=D)}function s(a){m(a,a._state=E)}var t=a.config,u=(a.configure,b.objectOrFunction),v=b.isFunction,w=(b.now,c.all),x=d.race,y=e.resolve,z=f.reject,A=g.asap;t.async=A;var B=void 0,C=0,D=1,E=2;i.prototype={constructor:i,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(a,b){var c=this,d=new this.constructor(function(){});if(this._state){var e=arguments;t.async(function(){k(c._state,d,e[c._state-1],c._detail)})}else l(this,d,a,b);return d},"catch":function(a){return this.then(null,a)}},i.all=w,i.race=x,i.resolve=y,i.reject=z,h.Promise=i}),a("promise/race",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to race.");return new b(function(b,c){for(var d,e=0;e<a.length;e++)d=a[e],d&&"function"==typeof d.then?d.then(b,c):b(d)})}var d=a.isArray;b.race=c}),a("promise/reject",["exports"],function(a){"use strict";function b(a){var b=this;return new b(function(b,c){c(a)})}a.reject=b}),a("promise/resolve",["exports"],function(a){"use strict";function b(a){if(a&&"object"==typeof a&&a.constructor===this)return a;var b=this;return new b(function(b){b(a)})}a.resolve=b}),a("promise/utils",["exports"],function(a){"use strict";function b(a){return c(a)||"object"==typeof a&&null!==a}function c(a){return"function"==typeof a}function d(a){return"[object Array]"===Object.prototype.toString.call(a)}var e=Date.now||function(){return(new Date).getTime()};a.objectOrFunction=b,a.isFunction=c,a.isArray=d,a.now=e}),b("promise/polyfill").polyfill()}();var Uint8ArrayUtil={};!function(){Uint8ArrayUtil.subarray=function(a,b){return this.slice(a,b)},Uint8ArrayUtil.set_=function(a,b){arguments.length<2&&(b=0);for(var c=0,d=a.length;d>c;++c,++b)this[b]=255&a[c]},Uint8ArrayUtil.TypedArray=function(a){var b;if("number"==typeof a){b=new Array(a);for(var c=0;a>c;++c)b[c]=0}else b=a.slice(0);return b.subarray=Uint8ArrayUtil.subarray,b.buffer=b,b.byteLength=b.length,b.set=Uint8ArrayUtil.set_,"object"==typeof a&&a.buffer&&(b.buffer=a.buffer),b}}(),void 0===window.Uint8Array&&(window.Uint8Array=Uint8ArrayUtil.TypedArray);var AzureHtml5JS;!function(a){"use strict";function b(a,b,c){return new d(a,b,c)}a.CreateAzureHtml5=b,function(a){a[a.internalErrStart=0]="internalErrStart",a[a.internalErrDisposed=0]="internalErrDisposed",a[a.internalErrSegmentNotFound=1]="internalErrSegmentNotFound",a[a.internalErrEnd=1048575]="internalErrEnd"}(a.ErrorCode||(a.ErrorCode={}));var c=(a.ErrorCode,function(){function a(){}return a.exception="exception",a.flushvideo="flushvideo",a.audiocodecchanged="audiocodecchanged",a}());a.InternalEventName=c;var d=function(){function b(b,c,d){this._sessionContext=new a.Context.Session(this,b,c,d),this._playerType=null,this._autoplay=!0,this._type="",this._error=null,this._dispose=!1,this._retryAttempt=!1,this._oldPlaybackRateBeforePlay=null,this._passThroughEventNames=[a.EventName.volumechange,a.EventName.ended,a.EventName.timeupdate,a.EventName.pause,a.EventName.play,a.EventName.playing,a.EventName.seeking,a.EventName.seeked,a.EventName.suspend,a.EventName.loadstart,a.EventName.loadeddata,a.EventName.ratechange],this._conditionalEventNames=[a.EventName.waiting,a.EventName.canplaythrough,a.EventName.error],this._registerVideoTagEvents(!0),this._registerInternalEvents(!0)}return b.prototype.setStaleDataTimeLimit=function(a){this._sessionContext.maxBufferBehindCurrentTimeInSec=a},b.prototype.dispose=function(){this._dispose=!0,this._workflowCoordinator&&(this._workflowCoordinator.dispose(),this._workflowCoordinator=null),this._sessionContext&&(this._registerVideoTagEvents(!1),this._registerInternalEvents(!1),this._sessionContext.dispose(),this._sessionContext=null),this._error=null},Object.defineProperty(b.prototype,"currentVideoStreamList",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.videoStreamList:null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"currentAudioStreamList",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.audioStreamList:null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"src",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.src:this._sessionContext.videoTag.src},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"currentTime",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.currentTime:this._sessionContext.videoTag.currentTime},set:function(b){a.Log.verbose(7,"currentTime: "+b+" sec"),this._workflowCoordinator?this._workflowCoordinator.currentTime=b:this._sessionContext.videoTag.currentTime=b;

},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"currentAbsoluteTime",{get:function(){return this._sessionContext.videoTag.currentTime},set:function(b){a.Log.verbose(7,"currentAbsoluteTime: "+b+" sec"),this._workflowCoordinator?this._workflowCoordinator.currentPresentationTime=b:this._sessionContext.videoTag.currentTime=b},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"currentMediaTime",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.currentMediaTime:null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"presentationTimeOffsetInSec",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.presentationTimeOffsetInSec:null},enumerable:!0,configurable:!0}),b.prototype.presentationTimeFromPercentageOfDvrWindow=function(a){return this._workflowCoordinator?this._workflowCoordinator.presentationTimeFromPercentageOfDvrWindow(a):null},Object.defineProperty(b.prototype,"currentDownloadBitrate",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.downloadBitrate:null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"currentPlaybackBitrate",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.playbackBitrate:null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"videoBufferData",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.videoBufferData:null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"audioBufferData",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.audioBufferData:null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"volume",{get:function(){return this._sessionContext.videoTag.volume},set:function(b){a.Log.verbose(7,"volume: "+b.toString());var c=b;if(0/0!==b&&void 0!==b&&null!==b){0>b?c=0:b>1&&(c=1);try{this._sessionContext.videoTag.volume=c}catch(d){a.Log.warning(7,"set volume() error: "+d)}}},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"autoplay",{get:function(){return this._autoplay},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"paused",{get:function(){return this._sessionContext.videoTag.paused},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"seeking",{get:function(){return this._sessionContext.videoTag.seeking},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"ended",{get:function(){return this._sessionContext.videoTag.ended},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"height",{get:function(){return this._sessionContext.videoTag.height},set:function(a){this._sessionContext.videoTag.height=a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"width",{get:function(){return this._sessionContext.videoTag.width},set:function(a){this._sessionContext.videoTag.width=a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"videoHeight",{get:function(){return this._sessionContext.videoTag.videoHeight},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"videoWidth",{get:function(){return this._sessionContext.videoTag.videoWidth},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"isFullScreen",{get:function(){var a=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;return a===this._sessionContext.videoTag?document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled:!1},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"isLive",{get:function(){return!!this._sessionContext.commonPresentation&&this._sessionContext.commonPresentation.isLive},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"duration",{get:function(){return this._workflowCoordinator?this._workflowCoordinator.duration:this._sessionContext.videoTag.duration},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"buffered",{get:function(){if(this._workflowCoordinator)return this._workflowCoordinator.buffered;try{return this._sessionContext.videoTag.buffered}catch(b){return a.Log.warning(7,"buffered() error: "+b),new a.Common.TimeRangeSet}},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"manifestPlayableWindowLength",{get:function(){return this._sessionContext&&this._sessionContext.commonPresentation&&this._sessionContext.commonPresentation.isLive?this._sessionContext.commonPresentation.timeShiftBufferDepth:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"currentPlayableWindow",{get:function(){return this._sessionContext&&this._sessionContext.commonPresentation&&this._sessionContext.commonPresentation.isLive?new a.Common.TimeRange(this._sessionContext.commonPresentation.playableWindow.startInSec,this._sessionContext.commonPresentation.playableWindow.endInSec):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"playableWindowEndInSec",{get:function(){return this._sessionContext&&this._sessionContext.commonPresentation&&this._sessionContext.commonPresentation.playableWindow?this._sessionContext.commonPresentation.playableWindow.endInSec:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"segmentBoundaries",{get:function(){return this._sessionContext&&this._sessionContext.commonPresentation?this._sessionContext.commonPresentation.segmentBoundaries:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"error",{get:function(){return this._workflowCoordinator&&this._workflowCoordinator.error?this._workflowCoordinator.error:this._error},enumerable:!0,configurable:!0}),b.prototype.getWallClockTime=function(a,b,c,d,e){a=a||this.currentAbsoluteTime,b=b||!1,c=c||0,e=e||!1,(null===d||void 0===d)&&(d=!0);var f=null;if(this._sessionContext.commonPresentation){var g=this._sessionContext.commonPresentation.getWallClockTimeAtPresentationTime(a);if(g){var h=null;if(b===!0)h=this.getDetailsFromDateObject(g,"local",d,e);else{if(0!==c){var i=36e5*c;g=new Date(g.getTime()+i)}h=this.getDetailsFromDateObject(g,"utc",d,e)}if(!h||h.length<7)return null;var j=h[0],k=h[1],l=h[2],m=h[3],n=h[4],o=h[5],p=h[6];f=e?m+":"+n+":"+o+" "+p:b===!1&&0===c?j+"-"+k+"-"+l+"T"+m+":"+n+":"+o+"Z":j+"-"+k+"-"+l+"T"+m+":"+n+":"+o+this.getTimezoneTimeOffset(g,b,c)}}return f},b.prototype.getTimezoneTimeOffset=function(a,b,c){var d=b===!0?-1*a.getTimezoneOffset()/60:c,e=d%1*60;d=Math.floor(d);var f=Math.abs(d)>=10?Math.abs(d).toString():"0"+Math.abs(d).toString(),g=0===e?":00":":"+e.toString();return d>=0?"+"+f+g:"-"+f+g},b.prototype.getDetailsFromDateObject=function(a,b,c,d){if("utc"!==b&&"local"!==b)return null;var e={year:a.getUTCFullYear,month:a.getUTCMonth,day:a.getUTCDate,hours:a.getUTCHours,minutes:a.getUTCMinutes,seconds:a.getUTCSeconds},f={year:a.getFullYear,month:a.getMonth,day:a.getDate,hours:a.getHours,minutes:a.getMinutes,seconds:a.getSeconds},g={utc:e,local:f},h=g[b].year.call(a).toString(),i=(g[b].month.call(a)+1).toString();i=1==i.length?"0"+i:i;var j=g[b].day.call(a).toString();j=1==j.length?"0"+j:j;var k=g[b].hours.call(a).toString();k=1==k.length?"0"+k:k;var l=g[b].minutes.call(a).toString();l=1==l.length?"0"+l:l;var m=g[b].seconds.call(a).toString();m=1==m.length?"0"+m:m;var n="";if(c&&d){var o=parseInt(k);n=12>o?"AM":"PM",k=((o+11)%12+1).toString()}return[h,i,j,k,l,m,n]},b.prototype.canPlayType=function(b){return a.PlayerType.getByPresentationType(b,this._sessionContext.videoTag)?"maybe":""},b.prototype.setSrc=function(a,b){this.setSrcInternal(a,b,!1)},b.prototype.setSrcInternal=function(c,d,e){this._playStarted=!1;var f="",g=0;return e?g=b._dtsOffsetToAddForChrome:(this._src=c,this._options=d?d:null,this._retryAttempt=!1),"https:"===window.location.protocol.toLowerCase()&&0===c.toLowerCase().indexOf("http:")?(f="The page was loaded over HTTPS, but the source was set to serve over HTTP. The content must be served over HTTPS. Source URL: "+c+", Page URL: "+window.location.href,a.Log.error(7,f),void this._handleError(new a.Failure.External(1048578,f))):(this._sessionContext.reset(),this._reset(d),this._playerType=a.PlayerType.getByPresentationType(this._type,this._sessionContext.videoTag),this._playerType||(a.Log.verbose(7,"Unable to determine player type by presentation type. Trying the url method..."),this._playerType=a.PlayerType.getByUrl(c,this._sessionContext.videoTag)),a.Log.verbose(7,"src: "+c+" autoplay: "+this._autoplay+" type: "+(this._type&&this._type.length>0?this._type:"unknown")+" player: "+(null===this._playerType?"unknown":a.PlayerDetector.Type[this._playerType])),this._workflowCoordinator&&(this._workflowCoordinator.dispose(),this._workflowCoordinator=null),void(1===this._playerType?(this._sessionContext.videoTag.autoplay=this._autoplay,this._sessionContext.videoTag.src=c):3===this._playerType?(this._workflowCoordinator=a.Workflow.CreateCoordinator(this._sessionContext),this._workflowCoordinator.dtsOffsetToAdd=g,this._sessionContext.videoTag.autoplay=!1,this._workflowCoordinator.autoplay=this._autoplay,this._workflowCoordinator.src=c):(a.Log.error(7,c+" not supported by AzureHtml5 Video Element"),this._handleError(new a.Failure.External(4194307,c)))))},b.prototype.play=function(){a.Log.verbose(7,"play"),this._oldPlaybackRateBeforePlay=this.playbackRate(),this._workflowCoordinator?this._workflowCoordinator.play():this._sessionContext&&this._sessionContext.videoTag&&a.Common.videoTagPlay(this._sessionContext.videoTag)},b.prototype.pause=function(){a.Log.verbose(7,"pause"),this._workflowCoordinator?this._workflowCoordinator.pause():this._sessionContext&&this._sessionContext.videoTag&&this._sessionContext.videoTag.pause()},b.prototype.requestFullscreen=function(){a.Log.verbose(7,"requestFullscreen");var b=!1;if(!this.isFullScreen){var c=this._sessionContext.videoTag;c.requestFullscreen?(b=!0,c.requestFullscreen()):c.msRequestFullscreen?(b=!0,c.msRequestFullscreen()):c.webkitRequestFullscreen?(b=!0,c.webkitRequestFullscreen()):c.mozRequestFullScreen&&(b=!0,c.mozRequestFullScreen()),b&&this._sessionContext.eventMgr.dispatchEvent(a.EventName.fullscreenchange)}},b.prototype.exitFullscreen=function(){a.Log.verbose(7,"exitFullscreen");var b=!1;this.isFullScreen&&(document.exitFullscreen?(b=!0,document.exitFullscreen()):document.webkitExitFullscreen?(b=!0,document.webkitExitFullscreen()):document.mozCancelFullScreen?(b=!0,document.mozCancelFullScreen()):document.msExitFullscreen&&(b=!0,document.msExitFullscreen()),b&&this._sessionContext.eventMgr.dispatchEvent(a.EventName.fullscreenchange))},b.prototype.playbackRate=function(){return this._sessionContext.videoTag.playbackRate},b.prototype.setPlaybackRate=function(a){this._sessionContext.videoTag.playbackRate=a},b.prototype.addEventListener=function(a,b,c){"undefined"==typeof c&&(c=null),this._sessionContext.eventMgr.addHandler(a,b,c)},b.prototype.removeEventListener=function(a,b){this._sessionContext.eventMgr.removeHandler(a,b)},b.prototype.addKeySystem=function(a){return this._sessionContext.emeManager.addKeySystem(a)},b.prototype.setXmlHttpRequestFactory=function(a){this._sessionContext.setXmlHttpRequestFactory(a)},b.prototype.getAdSignalsAndReset=function(){return this._sessionContext.adManager.getAdSignalsAndReset()},b.prototype.restartCheckMediaWorkflowIfNeeded=function(){this._workflowCoordinator.restartCheckMediaWorkflowIfNeeded()},b.prototype._reset=function(a){function b(a){c._dispose||c._handleError(a)}var c=this;this._playerType=null,this._autoplay=!0,this._type="",this._error=null,a&&(this._type=a.type,"autoPlay"in a&&(this._autoplay=a.autoPlay),"authenticationTokens"in a&&(this._sessionContext.authenticationTokens=a.authenticationTokens),a.userConfig&&this._sessionContext.setUserConfig(a.userConfig),a.headers&&this._sessionContext.setRequestedDownloadHeaders(a.headers)),this._sessionContext.emeManager.setup(b,this._sessionContext.authenticationTokens)},b.prototype._registerVideoTagEvents=function(b){function c(b){f._dispose||f._error||(b.type&&(b.type===a.EventName.play||b.type===a.EventName.playing)&&(f._playStarted=!0,null!==f._oldPlaybackRateBeforePlay&&f._oldPlaybackRateBeforePlay!==f.playbackRate()&&(a.Log.verbose(7,"playback rate changed from: "+f._oldPlaybackRateBeforePlay+" to: "+f.playbackRate()+". Restoring the original playback rate!"),f.setPlaybackRate(f._oldPlaybackRateBeforePlay),f._oldPlaybackRateBeforePlay=null)),b.type===a.EventName.timeupdate&&f._workflowCoordinator&&f._workflowCoordinator.pendingPlay?a.Log.verbose(7,"skip dispatching event: "+b.type+" currentTime: "+f._sessionContext.videoTag.currentTime+" since work flow is in pending play state"):(a.Log.verbose(7,"dispatching event: "+b.type+" currentTime: "+f._sessionContext.videoTag.currentTime),f._sessionContext.eventMgr.dispatchEvent(b.type)))}function d(b){if(!f._dispose&&!f._error)if(a.EventName.error===b.type){if(f._sessionContext.videoTag.readyState===HTMLMediaElement.HAVE_NOTHING)return void a.Log.warning(7,"Ignoring video element error since state is HAVE_NOTHING "+a.Failure.mediaErrorToString(f._sessionContext.videoTag.error));var c=new a.Failure.External;c.translateMediaError(f._sessionContext.videoTag.error),f._handleError(c)}else f._workflowCoordinator||(a.Log.verbose(7,"dispatching event: "+b.type),f._sessionContext.eventMgr.dispatchEvent(b.type))}var e=this,f=this;this._passThroughEventNames.forEach(function(a){b?e._sessionContext.videoTag.addEventListener(a,c):e._sessionContext.videoTag.removeEventListener(a,c)}),this._conditionalEventNames.forEach(function(a){b?e._sessionContext.videoTag.addEventListener(a,d):e._sessionContext.videoTag.removeEventListener(a,d)})},b.prototype._registerInternalEvents=function(b){function d(b){function c(){var c,d=b;throw c=d.message&&d.message.message&&d.message.stack?d.message.message+", "+d.message.stack:d.message,a.Log.error(7,"Throwing error "+c),new Error(c)}e._dispose||b.message&&!e._checkErrorAndRetryPlayback()&&a.Util.setTimeout(c,0)}var e=this;b?this._sessionContext.eventMgr.addHandler(c.exception,d,this):this._sessionContext.eventMgr.removeHandler(c.exception,d)},b.prototype._checkErrorAndRetryPlayback=function(){return this._playStarted||!a.Common.isChrome||this._retryAttempt?!1:(a.Log.verbose(7,"Retrying Playback with Adjusted DTS"),this._retryAttempt=!0,this.setSrcInternal(this._src,this._options,!0),!0)},b.prototype._handleError=function(b){if(!(this._checkErrorAndRetryPlayback()||this._workflowCoordinator&&this._workflowCoordinator.error)){if(this._error=b,this._workflowCoordinator){var c=new Error;a.Log.verbose(7,"Disposing WorkflowCoordinator b/c "+b.toString()+", "+c.stack),this._workflowCoordinator.dispose(),this._workflowCoordinator=null}a.Log.verbose(7,"dispatching event: "+a.EventName.error),this._sessionContext.eventMgr.dispatchEvent(a.EventName.error)}},b._dtsOffsetToAddForChrome=.1,b}()}(AzureHtml5JS||(AzureHtml5JS={}));var __extends=this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);c.prototype=b.prototype,a.prototype=new c},AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function c(){this._disposed=!1,this._bandwidthTracker=null,this._buffer=null,this._downloadRequested=null,this._downloadCompleted=null,this._downloadDecrypted=null,this._downloadFailed=null,this._downloadTracker=null,this._eventMgr=new a.Events.Manager(null,!1)}return c.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._bandwidthTracker=null,this._buffer=null,this._downloadRequested=null,this._downloadCompleted=null,this._downloadDecrypted=null,this._downloadFailed=null,this._eventMgr&&(this._eventMgr.dispose(),this._eventMgr=null),this._downloadTracker&&(this._downloadTracker.dispose(),this._downloadTracker=null))},Object.defineProperty(c.prototype,"bufferLevel",{get:function(){return this._disposed||!this._buffer?null:this._buffer.getBufferedAheadOfCurrentTimeInSec()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"perceivedBandwidth",{get:function(){return this._disposed||!this._bandwidthTracker?null:this._bandwidthTracker.perceivedBandwidth()},enumerable:!0,configurable:!0}),c.prototype.updateBuffer=function(a){this._buffer=a},c.prototype.updateBandwidthTracker=function(a){this._bandwidthTracker=a,this._downloadTracker&&this._downloadTracker.dispose(),this._downloadTracker=new b.DownloadTracker},c.prototype.getPlaybackBitrate=function(a){return this._disposed||!this._downloadTracker?-1:this._downloadTracker.findBitrate(a)},Object.defineProperty(c.prototype,"downloadRequested",{get:function(){return this._downloadRequested},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"downloadCompleted",{get:function(){return this._downloadCompleted},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"downloadDecrypted",{get:function(){return this._downloadDecrypted},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"downloadFailed",{get:function(){return this._downloadFailed},enumerable:!0,configurable:!0}),c.prototype.dispatchDownloadRequested=function(b){this._downloadRequested=b,this._eventMgr.dispatchEvent(a.BufferDataEventName.downloadrequested)},c.prototype.dispatchDownloadCompleted=function(b,c,d){if(this._downloadCompleted=new e(b,c,d),this._eventMgr.dispatchEvent(a.BufferDataEventName.downloadcompleted),this._downloadTracker&&null!=b.mediaTime&&(this._downloadTracker.add(b.mediaTime,b.bitrate),this._buffer.buffered&&this._buffer.buffered.length>0)){var f=this._buffer.buffered.start(0);this._downloadTracker.cleanup(f)}},c.prototype.dispatchDownloadDecrypted=function(b){this._downloadDecrypted=b,this._eventMgr.dispatchEvent(a.BufferDataEventName.downloaddecrypted)},c.prototype.dispatchDownloadFailed=function(b,c,d){"undefined"==typeof d&&(d=""),this._downloadFailed=new f(b,c,d),this._eventMgr.dispatchEvent(a.BufferDataEventName.downloadfailed)},c.prototype.addEventListener=function(a,b,c){this._eventMgr.addHandler(a,b,c)},c.prototype.removeEventListener=function(a,b){this._eventMgr.removeHandler(a,b)},c}();b.BufferData=c;var d=function(){function a(a,b,c,d,e,f,g){this._url=a,this._bitrate=b,this._mediaTime=c,this._data=d,this._presentationTimeOffsetInSec=e,this._timeScale=f,this._durationInSec=g}return Object.defineProperty(a.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"bitrate",{get:function(){return this._bitrate},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"mediaTime",{get:function(){return this._mediaTime},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"presentationTimeOffsetInSec",{get:function(){return this._presentationTimeOffsetInSec},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"timeScale",{get:function(){return this._timeScale},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"durationInSec",{get:function(){return this._durationInSec},enumerable:!0,configurable:!0}),a}();b.MediaDownload=d;var e=function(){function a(a,b,c){this._mediaDownload=a,this._measuredBw=1e3*b.bandwidth,this._bytes=b.responseLengthInBytes,this._downloadTimeMs=b.totalDownloadTimeMs,this._responseHeaders=c}return Object.defineProperty(a.prototype,"mediaDownload",{get:function(){return this._mediaDownload},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"measuredBandwidth",{get:function(){return this._measuredBw},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"totalBytes",{get:function(){return this._bytes},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"totalDownloadMs",{get:function(){return this._downloadTimeMs},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"responseHeaders",{get:function(){return this._responseHeaders},enumerable:!0,configurable:!0}),a}();b.MediaDownloadCompleted=e;var f=function(){function a(a,b,c){this._mediaDownload=a,this._code=b,this._message=c}return Object.defineProperty(a.prototype,"code",{get:function(){return this._code},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"message",{get:function(){return this._message},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"mediaDownload",{get:function(){return this._mediaDownload},enumerable:!0,configurable:!0}),a}();b.MediaDownloadFailed=f;var g=function(a){function b(b,c,d,e,f,g,h,i){a.call(this,b,c,d,e,f,g,h),this._decryptionTimeInMS=i}return __extends(b,a),Object.defineProperty(b.prototype,"decryptionTimeInMS",{get:function(){return this._decryptionTimeInMS},enumerable:!0,configurable:!0}),b}(d);b.MediaDecrypted=g}(a.Context||(a.Context={}));a.Context}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";!function(a){a[a.proceed=0]="proceed",a[a.endOfStream=1]="endOfStream",a[a.retry=2]="retry"}(b.RequestState||(b.RequestState={}));b.RequestState;!function(a){a[a.arraybuffer=0]="arraybuffer",a[a.blob=1]="blob",a[a.document=2]="document",a[a.json=3]="json",a[a.text=4]="text"}(b.ResponseType||(b.ResponseType={}));b.ResponseType;!function(a){a[a.manifest=0]="manifest",a[a.mediaSegment=1]="mediaSegment",a[a.initSegment=2]="initSegment",a[a.initBandwidth=3]="initBandwidth"}(b.RequestType||(b.RequestType={}));var c=(b.RequestType,function(){function c(c,d,e,f){this.maxBufferBehindCurrentTimeInSec=-1,this.azureHtml5=c,this.videoTag=d,this.appConfig=f,this.emeManager=new a.KeySystem.EmeManager(d),this.eventMgr=new a.Events.Manager(c,!1),this.emeManager.setEventManager(this.eventMgr),this.adManager=new a.Ad.Manager(this.eventMgr),this.ttmlManager=new a.Ttml.Manager(e),this.workflows=null,this.presentationUrl=null,this.presentationQueryStr=null,this.presentationJson=null,this.commonPresentation=null,this.isLiveToVod=!1,this.videoBufferData=new b.BufferData,this.audioBufferData=new b.BufferData,this.textBufferData=new b.BufferData,this.startPositionInSec=0/0,this.authenticationTokens={},this.heuristicSettings=new a.Settings.Heuristics,this.httpRetryPolicySettings=new a.Settings.HttpRetryPolicy,this.httpDataRetrieverSettings=new a.Settings.HttpDataRetriever,this.decryptionTracker=new a.Heuristics.DecryptionTracker,this._disposed=!1,this._xmlHttpRequestFactory=null}return c.prototype.dispose=function(){this._disposed||(this._disposed=!0,this.videoTag=null,this.appConfig=null,this.workflows&&this.workflows.forEach(function(a){a.dispose()}),this.workflows=null,this.presentationUrl=null,this.presentationQueryStr=null,this.presentationJson=null,this.authenticationTokens=null,this._xmlHttpRequestFactory=null,this.azureHtml5=null,this.emeManager&&(this.emeManager.dispose(),this.emeManager=null),this.eventMgr&&(this.eventMgr.dispose(),this.eventMgr=null),this.adManager&&(this.adManager=null),this.ttmlManager&&(this.ttmlManager=null),this.commonPresentation&&(this.commonPresentation.dispose(),this.commonPresentation=null),this.heuristicSettings=null,this.decryptionTracker=null,this.videoBufferData&&(this.videoBufferData.dispose(),this.videoBufferData=null),this.audioBufferData&&(this.audioBufferData.dispose(),this.audioBufferData=null),this.textBufferData&&(this.textBufferData.dispose(),this.textBufferData=null))},Object.defineProperty(c.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),c.prototype.reset=function(){this.presentationUrl=null,this.presentationQueryStr=null,this.presentationJson=null,this.startPositionInSec=0/0,this.authenticationTokens={},this.commonPresentation&&(this.commonPresentation.dispose(),this.commonPresentation=null),this.emeManager&&this.emeManager.reset(),this.heuristicSettings&&this.heuristicSettings.reset(),this.videoBufferData&&(this.videoBufferData.dispose(),this.videoBufferData=new b.BufferData),this.audioBufferData&&(this.audioBufferData.dispose(),this.audioBufferData=new b.BufferData),this.textBufferData&&(this.textBufferData.dispose(),this.textBufferData=new b.BufferData),this.adManager&&this.adManager.reset(),this.ttmlManager&&this.ttmlManager.reset()},c.prototype.setRequestedDownloadHeaders=function(a){this.headers=a},c.prototype.setUserConfig=function(a){void 0!==a.maxBufferInWallClockSec&&(this.heuristicSettings.buffer.maxBufferInWallClockSec=a.maxBufferInWallClockSec),void 0!==a.prerollPercent&&(this.heuristicSettings.buffer.prerollPercent=a.prerollPercent),void 0!==a.livePlaybackOffsetPercent&&(this.heuristicSettings.buffer.livePlaybackOffsetPercent=a.livePlaybackOffsetPercent),void 0!==a.windowSizeHeuristicsEnabled&&(this.heuristicSettings.windowSizeHeuristicsEnabled=a.windowSizeHeuristicsEnabled),void 0!==a.useBrowserWindowForWindowSizeRule&&(this.heuristicSettings.useBrowserWindowForWindowSizeRule=a.useBrowserWindowForWindowSizeRule),void 0!==a.minFragmentsForBandwidthAverage&&(this.heuristicSettings.bandwidth.minBandwidthHistoryCount=a.minFragmentsForBandwidthAverage),void 0!==a.bandwidthTestWithTimeThresholdDuringLive&&(this.heuristicSettings.bandwidth.bandwidthTestWithTimeThresholdDuringLive=a.bandwidthTestWithTimeThresholdDuringLive),void 0!==a.useVariableFragmentSizeMode&&(this.heuristicSettings.bandwidth.useVariableFragmentSizeMode=a.useVariableFragmentSizeMode),void 0===a.decryptionTimeHeuristicsEnabled||a.decryptionTimeHeuristicsEnabled||(this.decryptionTracker=null),void 0!==a.preFetchDataEnabled&&(this.heuristicSettings.preFetchDataEnabled=a.preFetchDataEnabled),void 0!==a.maxRetryPerSegment&&(this.httpRetryPolicySettings.maxRetryPerSegment=a.maxRetryPerSegment),void 0!==a.maxSkipSegments&&(this.httpRetryPolicySettings.maxSkipSegments=a.maxSkipSegments),void 0!==a.maxTotalRetries&&(this.httpRetryPolicySettings.maxTotalRetries=a.maxTotalRetries),void 0!==a.infiniteSegmentRetryForPreconditionFailed&&(this.httpRetryPolicySettings.infiniteSegmentRetryForPreconditionFailed=a.infiniteSegmentRetryForPreconditionFailed),void 0!==a.maxRetriesForKeyAcquireFailure&&(this.httpRetryPolicySettings.maxRetriesForKeyAcquireFailure=a.maxRetriesForKeyAcquireFailure),void 0!==a.maxWaitTimeBetweenRetriesForKeyAcquireMS&&(this.httpRetryPolicySettings.maxWaitTimeBetweenRetriesForKeyAcquireMS=a.maxWaitTimeBetweenRetriesForKeyAcquireMS)},c.prototype.maxBufferInWallClockSec=function(){return this.appConfig&&this.appConfig.maxBufferInWallClockSec&&"0"!=this.appConfig.maxBufferInWallClockSec?parseInt(this.appConfig.maxBufferInWallClockSec):this.heuristicSettings.buffer.maxBufferInWallClockSec},c.prototype.maxBufferInSec=function(){return this.maxBufferInWallClockSec()*this.playbackRate()},c.prototype.prerollBufferInSec=function(){return this.maxBufferInSec()*this.heuristicSettings.buffer.prerollPercent},c.prototype.lowBufferInSec=function(){return this.maxBufferInSec()*this.heuristicSettings.vodDowngradeBufferLevelPercent*this.heuristicSettings.buffer.lowBufferPercent},c.prototype.liveStartBufferInSec=function(){return this.maxBufferInSec()*(this.heuristicSettings.buffer.prerollPercent+this.heuristicSettings.buffer.livePlaybackOffsetPercent)},c.prototype.updatePresentation=function(b){if(this.commonPresentation){var c=b.isLive&&null!==b.periods[0].streams.findFirst(function(a){return(0===a.type||1===a.type)&&!a.segments});c?a.Log.verbose(17,"New manifest without segments no presentationUpdate was done."):(this.commonPresentation.isLive&&!b.isLive&&(this.isLiveToVod=!0),this.commonPresentation.transferPresentationState(b),this.presentationJson=b.toJson()),b.dispose()}else this.commonPresentation=b,this.presentationJson=b.toJson()},c.prototype.setXmlHttpRequestFactory=function(a){this._xmlHttpRequestFactory=a},c.prototype.createXmlHttpRequest=function(){return this._xmlHttpRequestFactory?this._xmlHttpRequestFactory():new a.HttpRequest.XMLHttpRequestWrapper},c.prototype.playbackRate=function(){return this.azureHtml5.playbackRate()},c}());b.Session=c;var d=function(){function a(a,b){this.workflowType=a,this.sessionContext=b,this.state=0,this.retryWaitTimeMSec=0,this.currentModuleId=null,this.requestedStream=null,this.urlsToRetrieve=[],this.selectedTrack=null,this.selectedSegment=null,this.heuristicData=null,this.externalFailure=null,this.failTracker=new h,this._disposed=!1}return a.prototype.dispose=function(){this._disposed||(this._disposed=!0,this.workflowType=null,this.sessionContext=null,this.state=null,this.currentModuleId=null,this.requestedStream=null,this.urlsToRetrieve.forEach(function(a,b,c){c[b].dispose()}),this.urlsToRetrieve=[],this.selectedTrack=null,this.selectedSegment=null,this.heuristicData&&(this.heuristicData.dispose(),this.heuristicData=null),this.externalFailure&&(this.externalFailure.dispose(),this.externalFailure=null),this.failTracker&&(this.failTracker.dispose(),this.failTracker=null))},a.prototype.reset=function(){this.state=0,this.retryWaitTimeMSec=0,this.currentModuleId=null,this.selectedTrack=null,this.selectedSegment=null,1===this.workflowType&&(this.urlsToRetrieve=[]),this.heuristicData&&this.heuristicData.reset(),this.externalFailure=null},Object.defineProperty(a.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),a}();b.Request=d;var e=function(){function a(a,b,c,d,e,f,g){"undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=4),"undefined"==typeof d&&(d=""),"undefined"==typeof e&&(e=0/0),"undefined"==typeof f&&(f=0/0),"undefined"==typeof g&&(g=0/0),this.url=a,this.httpResponseCode=-1,this.httpResposeContentType="",this.mediaData=null,this.presentationData=null,this.streamId=d,this.bitrate=e,this.presTimeInSec=f,this.durationInSec=g,this.responseType=c,this.requestType=b}return a.prototype.dispose=function(){this.url=null,this.httpResponseCode=null,this.httpResposeContentType="",this.mediaData=null,this.presentationData=null,this.streamId="",this.bitrate=0/0,this.presTimeInSec=0/0,this.durationInSec=0/0,this.responseType=null},a.prototype.clone=function(){var b=new a(this.url,this.requestType,this.responseType,this.streamId,this.bitrate,this.presTimeInSec,this.durationInSec);return b.httpResponseCode=this.httpResponseCode,b.httpResposeContentType=this.httpResposeContentType,b.mediaData=this.mediaData.slice(0),b.presentationData=this.presentationData,b},a}();b.UrlRequest=e;var f=function(){function a(a){var b=[];a.tracks.forEach(function(a){a.streamingInfo.selectable&&b.push(new g(a))}),this.tracksData=b}return a.prototype.dispose=function(){this.tracksData.forEach(function(a,b,c){c[b].dispose()}),this.tracksData=[]},a.prototype.reset=function(){this.tracksData.forEach(function(a,b,c){c[b].reset()})},a}();b.HeuristicData=f;var g=function(){function a(a){this.trackInfo=a,this.selectable=!0,this.dataRetrieverEstimationInWallClockSec=null}return a.prototype.dispose=function(){this.trackInfo=null,this.selectable=null,this.dataRetrieverEstimationInWallClockSec=null},a.prototype.reset=function(){this.selectable=!0,this.dataRetrieverEstimationInWallClockSec=null},a}();b.TrackData=g;var h=function(){function a(){this.reset()}return a.prototype.dispose=function(){this.lastFailure=null,this.lastTrack=null,this.tracksToTry=[]},a.prototype.reset=function(){this.lastFailure=null,this.lastTrack=null,this.lastStreamType=-1,this.totalRetried=0,this.tracksToTry=[],this.trackToTryIdx=0,this.sameRequestRetried=0,this.segmentsSkipped=0,this.noDataReceivedFailure=!1},a.prototype.resetForSegment=function(){this.sameRequestRetried=0,this.trackToTryIdx=0},a.prototype.log=function(a,b,c){this.lastFailure=a,this.lastTrack=b,this.lastStreamType=c},a.prototype.isNone=function(){return null===this.lastFailure},a.prototype.isLastNetworkFail=function(){return this.lastFailure.code>=2097752&&this.lastFailure.code<3145727},a.prototype.isLastNetworkDown=function(){return 2097753===this.lastFailure.code},a.prototype.isLastNotReady=function(){return 2097564===this.lastFailure.code},a.prototype.isLastServerError=function(){return this.lastFailure.code>=2097652&&this.lastFailure.code<=2097751;

},a.prototype.isLastNotFound=function(){return 2097556===this.lastFailure.code},a.prototype.isSegmentDecryptionError=function(){return 5242885===this.lastFailure.code},a}();b.FailTracker=h}(a.Context||(a.Context={}));a.Context}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._downloads=[]}return b.prototype.dispose=function(){this._downloads=[]},b.prototype.add=function(b,c){if(0===this._downloads.length)return void this._downloads.push({time:b,bitrate:c});var d=this._downloads[this._downloads.length-1];if(b>d.time)return void(c!=d.bitrate&&this._downloads.push({time:b,bitrate:c}));var e=a.Common.binarySearchTimeline(b,this._downloads,this._compareTime);(-1===e||b>this._downloads[e].time)&&e++,this._downloads.splice(e,this._downloads.length-e),this._downloads.push({time:b,bitrate:c})},b.prototype.findBitrate=function(b){var c=a.Common.binarySearchTimeline(b,this._downloads,this._compareTime);return-1===c?-1:this._downloads[c].bitrate},b.prototype.cleanup=function(b){if(!(this._downloads.length>0&&b<=this._downloads[0].time)){var c=a.Common.binarySearchTimeline(b,this._downloads,this._compareTime);c>0&&this._downloads.splice(0,c)}},b.prototype._compareTime=function(a,b,c){var d=0;return c?(a<b.time?d=-1:a>=c.time&&(d=1),d):b.time<=a?0:-1},b}();b.DownloadTracker=c}(a.Context||(a.Context={}));a.Context}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function c(c){var d=this;this._videoElement=c,this._errorHandler=null,this.matchedKeySystem=null,this._audioContentType=null,this._videoContentType=null,this._psshBoxes=[],this._keySystems={},this._laUrls={},this._authenticationTokens={},this._disposed=!1,this._initializedKeySystem=null,this._eventManager=null,this._useEMEv3ForPlayReady="requestMediaKeySystemAccess"in navigator&&a.Common.isChromiumEdge;var e=this._useEMEv3ForPlayReady?new b.PlayReady:new b.PlayReadyLegacy;this.addKeySystem(e);var f=new b.Widevine;this.addKeySystem(f),this._needKeyHandlerWrapper=function(a){d._needKeyHandler(a)},this._encryptedHandlerWrapper=function(a){d._encryptedHandler(a)},this._useEMEv3ForPlayReady||a.EmeUtil.listenToNeedKey(c,this._needKeyHandlerWrapper),a.EmeUtil.listenToEncrypted(c,this._encryptedHandlerWrapper)}return c.prototype.reset=function(){this.matchedKeySystem&&(this.matchedKeySystem.deactivate(),this.matchedKeySystem=null),this._psshBoxes=[],this._laUrls={},this._errorHandler=null,this._audioContentType=null,this._videoContentType=null,this._authenticationTokens={},this._initializedKeySystem=null},c.prototype.dispose=function(){this._disposed||(this._disposed=!0,this.matchedKeySystem&&(this.matchedKeySystem.deactivate(),this.matchedKeySystem=null),a.EmeUtil.unlistenToNeedKey(this._videoElement,this._needKeyHandlerWrapper),a.EmeUtil.unlistenToEncrypted(this._videoElement,this._encryptedHandlerWrapper),this._needKeyHandlerWrapper=null,this._encryptedHandlerWrapper=null,this._psshBoxes=[],this._keySystems={},this._laUrls={},this._videoElement=null,this._errorHandler=null,this._audioContentType=null,this._videoContentType=null,this._authenticationTokens=null,this._initializedKeySystem=null,this._eventManager=null)},c.prototype.setEventManager=function(a){this._eventManager=a},c.prototype.setup=function(a,b){this._errorHandler=a,this._authenticationTokens=b},c.prototype.setContentTypes=function(a,b){this._audioContentType=a,this._videoContentType=b},c.prototype.addKeySystem=function(b){var c=a.Common.uint8ArrayToHexString(b.systemId);return c&&c.length>0?(this._keySystems[c]&&a.Log.warning(12,"Overwriting "+b.name),this._keySystems[c]=b,b):null},c.prototype.addPsshBoxes=function(b){var c=this;b.forEach(function(b){var d=a.Common.uint8ArrayToHexString(b.systemId);a.Log.verbose(12,"Adding pssh box with system ID "+d),c._psshBoxes.push(b)})},c.prototype.addLaUrl=function(b,c){var d=a.Common.uint8ArrayToHexString(b);return this._keySystems[d]?(this._laUrls[d]&&this._laUrls[d]!==c&&a.Log.warning(12,"Overwriting license acquisition URL for "+this._keySystems[d].name),void(this._laUrls[d]=c)):void a.Log.warning(12,"Cannot set license acquisition URL for system ID "+d)},c.prototype._needKeyHandler=function(b){var c=this;if(!this._disposed){if(a.Log.verbose(12,"Got needKey event"),b.initData){var d=new DataView(b.initData.buffer),e=a.Mp4Util.GetPsshBoxes(d);this.addPsshBoxes(e)}this._findMatchedKeySystem().then(function(b){if(!b||null!=c._initializedKeySystem&&c._initializedKeySystem!=b.type)c._reportKeySystemNotFound();else{null==c._initializedKeySystem&&(c._initializedKeySystem=b.type);for(var d=0;d<c._psshBoxes.length;d++)if(c._psshBoxes[d].systemId.isEqual(b.systemId)){var e=new Uint8Array(c._psshBoxes[d].serialize());a.Log.verbose(12,"needKeyHandler: Sending initData to: "+b.name),b.initData(null,e,c._audioContentType,c._videoContentType)}}},function(){c._reportKeySystemNotFound()})}},c.prototype._encryptedHandler=function(b){var c=this;if(!this._disposed){if(a.Log.verbose(12,"Got encrypted event"),b.initData){var d=new DataView(b.initData),e=a.Mp4Util.GetPsshBoxes(d);this.addPsshBoxes(e)}this._findMatchedKeySystem().then(function(d){if(!d||null!=c._initializedKeySystem&&c._initializedKeySystem!=d.type)c._reportKeySystemNotFound();else{null==c._initializedKeySystem&&(c._initializedKeySystem=d.type);for(var e=a.Common.uint8ArrayToHexString(d.systemId),f=0;f<c._psshBoxes.length;f++)if(c._psshBoxes[f].systemId.isEqual(d.systemId)){var g=new Uint8Array(c._psshBoxes[f].serialize());a.Log.verbose(12,"encryptedHandler: Sending initData to: "+d.name),d.initData(b.initData,g,c._audioContentType,c._videoContentType,c._laUrls[e])}}},function(){c._reportKeySystemNotFound()})}},c.prototype._findMatchedKeySystem=function(){var b=this;return new Promise(function(c,d){function e(){if(f>=b._psshBoxes.length)return void d();var g=a.Common.uint8ArrayToHexString(b._psshBoxes[f].systemId);b._keySystems[g]?b._keySystems[g].isSupported(b._psshBoxes[f].systemId,b._audioContentType,b._videoContentType).then(function(){b.matchedKeySystem=b._keySystems[g],b.matchedKeySystem.activate(b._videoElement,b._errorHandler,b._authenticationTokens[b.matchedKeySystem.type]),b._eventManager&&b._eventManager.dispatchEvent("drmselected"),a.Log.verbose(12,"Matched key system found: "+b.matchedKeySystem.name),c(b.matchedKeySystem)},function(){++f,e()}):(++f,e())}if(b.matchedKeySystem)return void c(b.matchedKeySystem);var f=0;e()})},c.prototype._reportKeySystemNotFound=function(){var b=new a.Failure.External(5242881,"no matching keySystem found");this._errorHandler(b)},c}();b.EmeManager=c}(a.KeySystem||(a.KeySystem={}));a.KeySystem}(AzureHtml5JS||(AzureHtml5JS={}));var __extends=this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);c.prototype=b.prototype,a.prototype=new c},AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this.name="com.microsoft.playready",this.type="PlayReady",this._authenticationToken="",this._errorHandler=null,this._videoElement=null,this._active=!1,b.overrideLicenseAcquisitionUrl=a.KeySystem.PlayReady.overrideLicenseAcquisitionUrl}return Object.defineProperty(b.prototype,"systemId",{get:function(){return b.systemId},enumerable:!0,configurable:!0}),b.prototype.isSupported=function(c,d,e){return c.isEqual(b.systemId)?a.EmeUtil.isTypeSupported(this.name,d,e):new Promise(function(a,b){b()})},b.prototype.activate=function(){},b.prototype.deactivate=function(){},b.prototype.initData=function(){},b.prototype._getPlayReadyLicense=function(c,d){var e=this;return new Promise(function(f,g){var h=null,i=[],j=new DOMParser,k=j.parseFromString(c,"application/xml");if(!k.getElementsByTagName("Challenge")[0])return a.Log.error(12,"Playready: Can not find Challenge in keyMessage"),void g(new a.Failure.External(5242886,"No challenge"));var l=k.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;l&&(h=atob(l));var m=k.getElementsByTagName("name"),n=k.getElementsByTagName("value");if(m.length!=n.length)return a.Log.error(12,"Playready update, invalid header name/value pair in keyMessage"),void g(new a.Failure.External(5242886,"Invalid headers"));for(var o=0;o<m.length;o++)i[o]={name:m[o].childNodes[0].nodeValue,value:n[o].childNodes[0].nodeValue};e._authenticationToken&&e._authenticationToken.length>0&&(i[m.length]={name:a.HttpUtil.authorizationHeader,value:e._authenticationToken}),b.overrideLicenseAcquisitionUrl&&(a.Log.verbose(12,"overriding license acquisition url: "+d+" with: "+b.overrideLicenseAcquisitionUrl),d=b.overrideLicenseAcquisitionUrl),a.HttpUtil.httpRequest(d,"POST","arraybuffer",i,h).then(function(b){a.Log.verbose(12,"Processed license request"),f(new Uint8Array(b))},function(b){var c=new a.Failure.External(5242886,"Http: "+a.Common.toHexString(b.code)+", reponse: "+b.response);g(c)})})},b.prototype._reportError=function(a){this._errorHandler&&this._errorHandler(a)},b.systemId=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),b}();b.PlayReadyBase=c;var d=function(b){function d(){b.call(this),this._laUrl="",this._session=null,this._initialized=!1}return __extends(d,b),d.prototype.activate=function(a,b,c){this._videoElement=a,this._errorHandler=b,this._authenticationToken=c,this._active=!0},d.prototype.deactivate=function(){this._active&&(this._active=!1,this._session&&(a.EmeUtil.unlistenToMessage(this._session,this._messageHandler),this._session.close(),this._session=null),this._videoElement&&(this._videoElement.src="",this._videoElement.setMediaKeys(null),this._videoElement=null),this._errorHandler=null,this._laUrl="",this._authenticationToken="",this._initialized=!1)},d.prototype.initData=function(b,d,e,f){function g(a){return a.createMediaKeys()}function h(b){if(a.Log.verbose(12,"creating media key session for PlayReady"),l._session=b.createSession(),!l._session){a.Log.error(12,l.name+" createSession failed");var c=new a.Failure.External(5242881,l.name+" createSession failed");return void l._reportError(c)}a.EmeUtil.listenToMessage(l._session,i),l._session.generateRequest("cenc",d)["catch"](function(){a.Log.error(12,l.name+" generateRequest failed");var b=new a.Failure.External(5242881,l.name+" generateRequest failed");l._reportError(b)}),l._videoElement.setMediaKeys(b)["catch"](function(){a.Log.error(12,l.name+" setMediaKeys failed");var b=new a.Failure.External(5242881,l.name+" setMediaKeys failed");l._reportError(b)})}function i(a){l._messageHandler(a)}function j(b){var c=new window.URL(b);return c&&"https:"!=c.protocol?(a.Log.verbose(12,"Converting url from http to https."),"https:"+c.href.substring(c.protocol.length)):b}function k(){a.Log.verbose(12,"Ensuring license server url uses https."),l._laUrl=j(l._laUrl),c.overrideLicenseAcquisitionUrl&&(a.Log.verbose(12,"Ensuring license server url override uses https."),c.overrideLicenseAcquisitionUrl=j(c.overrideLicenseAcquisitionUrl))}var l=this;if(!this._initialized){this._initialized=!0;for(var m=new DataView(b),n=a.Mp4Util.GetPsshBoxes(m),o=0;o<n.length;o++)if(a.Common.typedArraysAreEqual(n[o].systemId,c.systemId)){this._laUrl=this.getLicenseServerURL(n[o].specificData.buffer),k();break}a.Log.verbose(12,"laUrl "+(this._laUrl?"received":"not received"));var p=a.EmeUtil.createSupportedKeySystem(this.name,e,f);p["catch"](function(){a.Log.error(12,l.name+" createSupportedKeySystem failed");var b=new a.Failure.External(5242882,l.name+" createSupportedKeySystem failed");l._reportError(b)});var q=p.then(g);q["catch"](function(){a.Log.error(12,l.name+" createMediaKeys failed");var b=new a.Failure.External(5242882,l.name+" createMediaKeys failed");l._reportError(b)}),q.then(h)["catch"](function(){a.Log.error(12,l.name+" createKeySession failed");var b=new a.Failure.External(5242882,l.name+" createKeySession failed");l._reportError(b)})}},d.prototype._messageHandler=function(a){var b=this;if("license-request"===a.messageType){var c=new window.TextDecoder("utf-16").decode(a.message);this._getPlayReadyLicense(c,this._laUrl).then(function(a){b._active&&b._session&&b._session.update(a)},function(a){b._active&&b._reportError(a)})}},d.prototype.getLicenseServerURL=function(a){if(a)for(var b=new DataView(a),c=b.getUint16(4,!0),d=6,e=new DOMParser,f=0;c>f;f++){var g=b.getUint16(d,!0);d+=2;var h=b.getUint16(d,!0);if(d+=2,1===g){var i=a.slice(d,d+h),j=String.fromCharCode.apply(null,new Uint16Array(i)),k=e.parseFromString(j,"application/xml");if(k.getElementsByTagName("LA_URL")[0]){var l=k.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(l)return l}if(k.getElementsByTagName("LUI_URL")[0]){var m=k.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(m)return m}}else d+=h}return null},d}(c);b.PlayReady=d;var e=function(b){function c(){b.call(this),this._session=null}return __extends(c,b),c.prototype.activate=function(a,b,c){this._videoElement=a,this._errorHandler=b,this._authenticationToken=c,this._active=!0},c.prototype.deactivate=function(){this._active&&(this._active=!1,this._session&&(a.EmeUtil.unlistenToKeyMessage(this._session,this._keyMessageHandler),a.EmeUtil.unlistenKeyError(this._session,this._keyErrorHandler),this._session.close(),this._session=null),this._videoElement=null,this._errorHandler=null,this._authenticationToken="")},c.prototype.initData=function(b,c,d,e){function f(a){h._keyMessageHandler(a)}function g(){h._keyErrorHandler()}var h=this;if(!this._session){var i=a.EmeUtil.createMediaKeys(this.name);if(!i){a.Log.error(12,this.name+" createMediaKeys failed");var j=new a.Failure.External(5242881,this.name+" createMediaKeys failed");return void this._reportError(j)}a.EmeUtil.setMediaKeys(this._videoElement,i);var k=e.substr(0,e.length-1);if(d){var l=d.substr(d.indexOf("=")+2);k+=", "+l}if(a.Log.verbose(12,"creating media key session for PlayReady"),this._session=i.createSession(k,c),!this._session){a.Log.error(12,this.name+" createSession failed");var j=new a.Failure.External(5242881,this.name+" createSession failed");return void this._reportError(j)}a.EmeUtil.listenToKeyMessage(this._session,f),a.EmeUtil.listenKeyError(this._session,g)}},c.prototype._keyMessageHandler=function(a){var b=this,c=new Uint16Array(a.message.buffer),d=String.fromCharCode.apply(null,c),e=a.destinationURL;this._getPlayReadyLicense(d,e).then(function(a){b._active&&b._session&&b._session.update(a)},function(a){b._active&&b._reportError(a)})},c.prototype._keyErrorHandler=function(){if(this._active&&this._session.error){var b="MSMediaKeyError code: "+this._session.error.code+", systemCode: "+a.Common.toHexString(this._session.error.systemCode),c=new a.Failure.External(5242880,b);this._reportError(c)}},c}(c);b.PlayReadyLegacy=e}(a.KeySystem||(a.KeySystem={}));a.KeySystem}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";var b=function(){function a(){this.windowSizeHeuristicsEnabled=a._windowSizeHeuristicsEnabledDefault,this.useBrowserWindowForWindowSizeRule=a._useBrowserWindowForWindowSizeRuleDefault,this.preFetchDataEnabled=a._preFetchDataEnabledDefault,this.preFetchDataMiddle=a._preFetchDataMiddleDefault,this.vodStableBufferLevelPercent=a._vodStableBufferLevelPercentDefault,this.vodDowngradeBufferLevelPercent=a._vodDowngradeBufferLevelPercentDefault,this.belowDowngradeBufferLevelDownloadTimeFactor=a._belowDowngradeBufferLevelDownloadTimeFactorDefault,this.bandwidth=null,this.stepRule=null,this.buffer=null,this.bandwidth=new c,this.stepRule=new d,this.buffer=new e}return a.prototype.reset=function(){this.windowSizeHeuristicsEnabled=a._windowSizeHeuristicsEnabledDefault,this.useBrowserWindowForWindowSizeRule=a._useBrowserWindowForWindowSizeRuleDefault,this.preFetchDataEnabled=a._preFetchDataEnabledDefault,this.preFetchDataMiddle=a._preFetchDataMiddleDefault,this.vodStableBufferLevelPercent=a._vodStableBufferLevelPercentDefault,this.vodDowngradeBufferLevelPercent=a._vodDowngradeBufferLevelPercentDefault,this.belowDowngradeBufferLevelDownloadTimeFactor=a._belowDowngradeBufferLevelDownloadTimeFactorDefault,this.bandwidth.reset(),this.stepRule.reset(),this.buffer.reset()},a._windowSizeHeuristicsEnabledDefault=!0,a._useBrowserWindowForWindowSizeRuleDefault=!1,a._preFetchDataEnabledDefault=!0,a._preFetchDataMiddleDefault=!0,a._vodStableBufferLevelPercentDefault=.7,a._vodDowngradeBufferLevelPercentDefault=.15,a._belowDowngradeBufferLevelDownloadTimeFactorDefault=.75,a}();a.Heuristics=b;var c=function(){function a(){this.bandwidthUsabilityPercent=a._bandwidthUsabilityPercentDefault,this.bandwidthDataSizeThresholdInBytes=a._bandwidthDataSizeThresholdInBytesDefault,this.bandwidthEstimationMaxKbps=a._bandwidthEstimationMaxKbpsDefault,this.bandwidthEstimationMinMsec=a._bandwidthEstimationMinMsecDefault,this.maxBandwidthHistoryCount=a._maxBandwidthHistoryCountDefault,this.minBandwidthHistoryCount=a._minBandwidthHistoryCountDefault,this.bandwidthTestWithTimeThresholdDuringLive=a._bandwidthTestWithTimeThresholdDuringLiveDefault,this.useVariableFragmentSizeMode=a._useVariableFragmentSizeModeDefault}return a.prototype.reset=function(){this.bandwidthUsabilityPercent=a._bandwidthUsabilityPercentDefault,this.bandwidthDataSizeThresholdInBytes=a._bandwidthDataSizeThresholdInBytesDefault,this.bandwidthEstimationMaxKbps=a._bandwidthEstimationMaxKbpsDefault,this.bandwidthEstimationMinMsec=a._bandwidthEstimationMinMsecDefault,this.maxBandwidthHistoryCount=a._maxBandwidthHistoryCountDefault,this.minBandwidthHistoryCount=a._minBandwidthHistoryCountDefault,this.bandwidthTestWithTimeThresholdDuringLive=a._bandwidthTestWithTimeThresholdDuringLiveDefault,this.useVariableFragmentSizeMode=a._useVariableFragmentSizeModeDefault},a._bandwidthUsabilityPercentDefault=.85,a._bandwidthDataSizeThresholdInBytesDefault=1e4,a._bandwidthEstimationMaxKbpsDefault=5e5,a._bandwidthEstimationMinMsecDefault=5,a._maxBandwidthHistoryCountDefault=5,a._minBandwidthHistoryCountDefault=1,a._bandwidthTestWithTimeThresholdDuringLiveDefault=!0,a._useVariableFragmentSizeModeDefault=!1,a}();a.Bandwidth=c;var d=function(){function a(){this.minSegmentsBeforeDowngrade=a._minSegmentsBeforeDowngradeDefault,this.minSegmentsBeforeUpgrade=a._minSegmentsBeforeUpgradeDefault,this.maxStepDownInQuality=a._maxStepDownInQualityDefault,this.maxStepUpInQuality=a._maxStepUpInQualityDefault}return a.prototype.reset=function(){this.minSegmentsBeforeDowngrade=a._minSegmentsBeforeDowngradeDefault,this.minSegmentsBeforeUpgrade=a._minSegmentsBeforeUpgradeDefault,this.maxStepDownInQuality=a._maxStepDownInQualityDefault,this.maxStepUpInQuality=a._maxStepUpInQualityDefault},a._minSegmentsBeforeDowngradeDefault=0,a._minSegmentsBeforeUpgradeDefault=1,a._maxStepDownInQualityDefault=10,a._maxStepUpInQualityDefault=3,a}();a.StepRule=d;var e=function(){function a(){this.maxBufferInWallClockSec=a._maxBufferInSecDefault,this.prerollPercent=a._prerollPercentDefault,this.livePlaybackOffsetPercent=a._livePlaybackOffsetPercentDefault,this.leftEdgeBackoffInSec=a._leftEdgeBackoffInSecDefault,this.lowBufferPercent=a._lowBufferPercentDefault}return a.prototype.reset=function(){this.maxBufferInWallClockSec=a._maxBufferInSecDefault,this.prerollPercent=a._prerollPercentDefault,this.lowBufferPercent=a._lowBufferPercentDefault,this.livePlaybackOffsetPercent=a._livePlaybackOffsetPercentDefault,this.leftEdgeBackoffInSec=a._leftEdgeBackoffInSecDefault},a._maxBufferInSecDefault=30,a._prerollPercentDefault=.25,a._lowBufferPercentDefault=.25,a._livePlaybackOffsetPercentDefault=.25,a._leftEdgeBackoffInSecDefault=4,a}();a.Buffer=e;var f=function(){function a(){this.maxTotalRetries=a._maxTotalRetriesDefault,this.maxRetryPerSegment=a._maxRetryPerSegmentDefault,this.maxRetryPresentation=a._maxRetryPresentationDefault,this.maxSkipSegments=a._maxSkipSegmentsDefault,this.retryLowerBitrateOnly=!1,this.retryMediaInMSec=a._retryMediaInMSecDefault,this.retryMediaServerErrorInMSec=a._retryMediaServerErrorInMSecDefault,this.retryPresentationInMSec=a._retryPresentationInMSecDefault,this.retryDueToNetworkErrorInMSec=a._retryDueToNetworkErrorInMSecDefault,this.retryDueTo412InTextTrackInMSecDefault=a._retryDueTo412InTextTrackInMSecDefault,this.infiniteSegmentRetryForPreconditionFailed=!1,this.maxRetriesForKeyAcquireFailure=a._maxRetriesForKeyAcquireFailure,this.maxWaitTimeBetweenRetriesForKeyAcquireMS=a._retryInMSecBetweenKeyAcquireFailures}return a._maxTotalRetriesDefault=50,a._maxRetryPerSegmentDefault=10,a._maxRetryPresentationDefault=5,a._maxSkipSegmentsDefault=30,a._retryMediaInMSecDefault=2e3,a._retryMediaServerErrorInMSecDefault=4e3,a._retryPresentationInMSecDefault=500,a._retryDueToNetworkErrorInMSecDefault=1e3,a._retryDueTo412InTextTrackInMSecDefault=500,a._maxRetriesForKeyAcquireFailure=3,a._retryInMSecBetweenKeyAcquireFailures=500,a}();a.HttpRetryPolicy=f;var g=function(){function a(){this.initBandwidthTimeoutInMSec=a._initBandwidthTimeout,this.noDataTimeoutInMSec=a._noDataTimeoutDefault,this.timeoutInMSec=a._minTimeoutInMSecDefault,this.liveEdgeAdjustmentInSec=a._liveEdgeAdjustmentDefaultInSec}return Object.defineProperty(a.prototype,"maxTimeoutInMSec",{get:function(){return 6e4},enumerable:!0,configurable:!0}),a._minTimeoutInMSecDefault=1e4,a._initBandwidthTimeout=1e3,a._noDataTimeoutDefault=1e3,a._liveEdgeAdjustmentDefaultInSec=-1,a}();a.HttpDataRetriever=g}(a.Settings||(a.Settings={}));a.Settings}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(){return new g}function d(){return window.hasOwnProperty("MediaSource")||window.hasOwnProperty("WebKitMediaSource")?!0:!1}b.CreateAdapter=c,b.supported=d;var e={closed:0,open:1,ended:2},f=function(){function a(a,b,c){this.bufferIndex=a,this.startTime=b,this.endTime=c}return a}(),g=function(){function c(){this._mediaSource=new MediaSource,this._sourceOpenHandler=null,this._adapterSourceBuffers=new h,this._disposed=!1,this._videoTag=null,this._buffered=null}return c.prototype.dispose=function(){if(!this._disposed){if(this._mediaSource){for(var a=this._mediaSource.sourceBuffers.length-1;a>=0;a--)this._mediaSource.removeSourceBuffer(this._mediaSource.sourceBuffers[a]);this._sourceOpenHandler&&(this._mediaSource.removeEventListener("sourceopen",this._sourceOpenHandler),this._sourceOpenHandler=null),this._mediaSource=null}this._adapterSourceBuffers.dispose(),this._adapterSourceBuffers=null,this._videoTag&&(this._videoTag.src&&(URL.revokeObjectURL(this._videoTag.src),this._videoTag.src=null),this._videoTag=null),this._disposed=!0}},Object.defineProperty(c.prototype,"readyState",{get:function(){return this._disposed?0:e[this._mediaSource.readyState]},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"durationInSec",{get:function(){return this._disposed?0/0:this._mediaSource.duration},set:function(a){this._disposed||(this._mediaSource.duration=a)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"adapterBuffers",{get:function(){return this._disposed?null:this._adapterSourceBuffers.adapterBuffers},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"buffered",{get:function(){return this._buffered},enumerable:!0,configurable:!0}),c.prototype.setVideoElementSrcAsync=function(a){var b=this;return this._videoTag=a,new Promise(function(c,d){return b._disposed?void d("VideoElementAdapter already disposed"):(b._sourceOpenHandler=function(){return b._disposed?void d("VideoElementAdapter already disposed"):(b._mediaSource.removeEventListener("sourceopen",b._sourceOpenHandler),b._sourceOpenHandler=null,void c())},b._mediaSource.addEventListener("sourceopen",b._sourceOpenHandler),void(a.src=URL.createObjectURL(b._mediaSource)))})},c.prototype.setStartTime=function(b){function d(){!e._disposed&&e._videoTag&&0===e._videoTag.currentTime&&(e._videoTag.readyState!==HTMLMediaElement.HAVE_NOTHING?(e._videoTag.currentTime=b,a.Log.verbose(3,"StartTime set: "+b)):(a.Log.verbose(3,"Video tag not ready, will retry to set StartTime to "+b),a.Util.setTimeout(d,c._setCurrentTimeTimeoutInMSec)))}var e=this;d()},c.prototype.addAdapterBuffer=function(c,d,e,f,g){function h(){k._updateBuffered()}function i(a){e.call(k,a)}if(this._disposed)return null;var j,k=this,l=null;try{j=this._mediaSource.addSourceBuffer(c),l=new b.VideoElementAdapterBuffer(f,g,d,j,h,i,c),this._adapterSourceBuffers.add(l,j),a.Log.verbose(3,"Adapter buffer added: "+c+" Adapter buffer total: "+this._adapterSourceBuffers.length)}catch(m){a.Log.error(3,"Failed to add SourceBuffer to MediaSource: "+m)}if(null!==l&&null!==j&&"audio"===l.mediaType)try{j.changeType(c),l.hasAudioTypeChangeSupport=!0}catch(n){a.Log.verbose(3,"Adapter buffer added: "+c+" does not support type change: "+n)}return l},c.prototype.isTypeSupported=function(a){return MediaSource.isTypeSupported&&MediaSource.isTypeSupported(a)},c.prototype.removeAdapterBuffer=function(b){if(!this._disposed){var c;c=this._adapterSourceBuffers.find(b),-1!==c?(this._mediaSource.removeSourceBuffer(this._adapterSourceBuffers.sourceBuffers[c]),this._adapterSourceBuffers.remove(c),a.Log.verbose(3,"Adapter buffer removed, remaining: "+this._adapterSourceBuffers.length)):a.Log.error(3,"Failed to remove adapter buffer: instance not found")}},c.prototype.changeAdapterBufferType=function(b,c){if(this._disposed)return!1;var d,e=!1;if(d=this._adapterSourceBuffers.find(b),-1!==d)try{this._adapterSourceBuffers.sourceBuffers[d].updating&&this._adapterSourceBuffers.sourceBuffers[d].abort();var f=this._adapterSourceBuffers.sourceBuffers[d];f.changeType(c),a.Log.verbose(3,"Adapter buffer media type succesfully changed to "+c),e=!0}catch(g){a.Log.error(3,"Failed to change source buffer media type")}else a.Log.error(3,"Failed to find the source buffer to change its media type");return e},c.prototype.endOfStream=function(b){function d(){if(!e._disposed)try{f?e._mediaSource.endOfStream(f):e._mediaSource.endOfStream(),a.Log.verbose(3,"End of stream signaled")}catch(b){if(!(b.code===DOMException.INVALID_STATE_ERR&&g++<10))throw a.Log.error(3,"Failed to set end-of-stream: "+b),b;a.Log.warning(3,"MediaSource not ready, will retry: "+b),a.Util.setTimeout(d,c._retryTimeoutInMSec)}}var e=this,f=b,g=0;d()},c.prototype._updateBuffered=function(){if(!this._disposed){for(var b=this._adapterSourceBuffers.adapterBuffers,c=new a.Common.TimeRangeSet,d=this._findUniqueStartTimes(),e=0;e<d.length;e++){for(var f=d[e].startTime,g=d[e].endTime,h=!0,i=0;i<b.length;i++){var j=b[i].buffered;if(i!==d[e].bufferIndex){for(var k=!1,l=0;l<j.length;l++)if(j.start(l)<=f&&f<=j.end(l)){k=!0,j.end(l)<g&&(g=j.end(l));break}if(!k){h=!1;break}}}h&&(a.Log.verbose(3,"Intersecting buffer found ("+d[e].startTime+", "+g+")"),c.addRange(new a.Common.TimeRange(d[e].startTime,g)))}this._buffered=c}},c.prototype._findUniqueStartTimes=function(){for(var a=[],b=this._adapterSourceBuffers.adapterBuffers,c=0;c<b.length;c++)for(var d=b[c].buffered,e=0;e<d.length;e++)-1===a.findIndexOf(function(a){return a.startTime===d.start(e)})&&a.push(new f(c,d.start(e),d.end(e)));return a.sort(function(a,b){return a.startTime-b.startTime}),a},c._setCurrentTimeTimeoutInMSec=500,c._retryTimeoutInMSec=100,c}(),h=function(){function a(){this.adapterBuffers=[],this.sourceBuffers=[]}return a.prototype.dispose=function(){for(var a=this.adapterBuffers.length-1;a>=0;a--)this.adapterBuffers[a].dispose(),this.adapterBuffers[a]=null;for(var a=this.sourceBuffers.length-1;a>=0;a--)this.sourceBuffers[a]=null},Object.defineProperty(a.prototype,"length",{get:function(){if(this.sourceBuffers.length!==this.adapterBuffers.length)throw new Error("AdapterSourceBuffers in invalid state");return this.sourceBuffers.length},enumerable:!0,configurable:!0}),a.prototype.find=function(a){return this.adapterBuffers.indexOf(a)},a.prototype.add=function(a,b){this.adapterBuffers.push(a),this.sourceBuffers.push(b)},a.prototype.remove=function(a){a>=0&&a<this.sourceBuffers.length&&(this.sourceBuffers.splice(a,1),this.adapterBuffers.splice(a,1))},a}()}(a.VideoElementAdapter||(a.VideoElementAdapter={}));a.VideoElementAdapter}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(b,c,d,e,f,g,h){function i(){j._notifyBufferUpdated(),j._tryInternalRemove(),j._tryInternalAppend()}var j=this;this._disposed=!1,this._pendingBufferRanges=new a.Common.TimeRangeSet,this._sourceBuffer=e,this._maxAdapterBufferAheadInWallClockSec=b,this._maxAdapterBufferBehindCurrentTimeInSec=c,this._playbackPosFn=d,this._notifyBufferUpdated=f,this._pendingBuffer=[],this._pendingRemove=[],this._submittedRemove=null,this._appendErrorHandler=g,this._mediaType=h.split("/")[0],this._hasAudioTypeChangeSupport=!1,this._sourceBufferUpdated=function(){a.Log.verbose(3,j._decorateLogMessage("SourceBuffer 'update' event completed.")),i()},this._sourceBufferError=function(){a.Log.error(3,j._decorateLogMessage("SourceBuffer append failed with 'error' event.")),i()},this._sourceBuffer.addEventListener("update",this._sourceBufferUpdated),this._sourceBuffer.addEventListener("error",this._sourceBufferError)}return Object.defineProperty(b.prototype,"mediaType",{get:function(){return this._mediaType},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"hasAudioTypeChangeSupport",{get:function(){return this._hasAudioTypeChangeSupport},set:function(a){this._hasAudioTypeChangeSupport=a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"buffered",{get:function(){var b,c,d=new a.Common.TimeRangeSet;try{d.addRanges(this._sourceBuffer.buffered),c=d.length>0?d.end(d.length-1):0/0;for(var e=0;e<this._pendingBufferRanges.length;e++){var f=this._pendingBufferRanges.start(e),g=this._pendingBufferRanges.end(e);0===a.Common.diffTimes(f,c)?d.extendLast(g):(b=new a.Common.TimeRange(f,g),d.addRange(b)),c=g}for(var e=0;e<this._pendingRemove.length;e++){var h=this._pendingRemove[e].startInSec,i=this._pendingRemove[e].endInSec;d.removeRange(h,i)}if(this._submittedRemove){var h=this._submittedRemove.startInSec,i=this._submittedRemove.endInSec;d.removeRange(h,i)}}catch(j){a.Log.error(3,this._decorateLogMessage("buffered() threw exception "+j))}return d},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"presentationTimeOffsetInSec",{get:function(){return this._sourceBuffer.timestampOffset},set:function(a){this._sourceBuffer.timestampOffset=a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"audioTracks",{get:function(){return this._sourceBuffer.audioTracks},enumerable:!0,configurable:!0}),b.prototype.getBufferedAheadOfCurrentTimeInSec=function(){if(this._disposed)return 0;var a=this.buffered,b=this._playbackPosFn(),c=0;if(0===a.length)return 0;for(var d=0;d<a.length;d++)a.start(d)<=b&&b<a.end(d)?c+=a.end(d)-b:b<a.start(d)&&(c+=a.end(d)-a.start(d));return c},b.prototype.bufferFull=function(a){return this.getBufferedAheadOfCurrentTimeInSec()>this._maxAdapterBufferAheadInWallClockSec*a},b.prototype.contains=function(a){for(var b=this.buffered,c=0;c<b.length;c++)if(b.start(c)<=a&&a<b.end(c))return!0;return!1},b.prototype.dispose=function(){if(!this._disposed){this._disposed=!0,this._sourceBuffer.removeEventListener("update",this._sourceBufferUpdated),this._sourceBuffer.removeEventListener("error",this._sourceBufferError),this._notifyBufferUpdated=null,this._playbackPosFn=null,this._appendErrorHandler=null,this._sourceBufferUpdated=null,this._sourceBufferError=null;for(var a=this._pendingBuffer.length-1;a>=0;a--)this._pendingBuffer[a]=null;this._sourceBuffer=null;for(var a=this._pendingRemove.length-1;a>=0;a--)this._pendingRemove[a]=null;this._submittedRemove&&(this._submittedRemove=null),this._pendingBufferRanges&&(this._pendingBufferRanges.dispose(),this._pendingBufferRanges=null)}},b.prototype.flushBufferBehindCurrentTime=function(){if(this._maxAdapterBufferBehindCurrentTimeInSec>0)try{var b=this._playbackPosFn()-this._maxAdapterBufferBehindCurrentTimeInSec,c=this.getStartTimeOfCurrentBuffered();c!=0/0&&c>=0&&b>c&&this.flushUntil(b)}catch(d){a.Log.warning(3,this._decorateLogMessage("Ignoring Exception in flushBufferBehindCurrentTim"));

}},b.prototype.append=function(b,c,d){this.flushBufferBehindCurrentTime();var e,f,g,h;for(h=0;h<this._pendingBuffer.length&&!(c<this._pendingBuffer[h].presTimeInSec);h++);if(d){if(h>0){f=this._pendingBuffer[h-1];var i=a.Common.diffTimes(c,f.presTimeInSec+f.durationInSec);if(i>0)throw new Error(this._decorateLogMessage("append ("+c+","+d+") failed, overlaps with ("+f.presTimeInSec+","+f.durationInSec+")"))}if(h<this._pendingBuffer.length){g=this._pendingBuffer[h];var i=a.Common.diffTimes(g.presTimeInSec,c+d);if(i>0)throw new Error(this._decorateLogMessage("append ("+c+","+d+") failed, overlaps with ("+g.presTimeInSec+","+g.durationInSec+")"))}}e=new a.Common.SegmentData(b,c,d),this._pendingBuffer.splice(h,0,e),this._updatePendingRanges(),a.Log.verbose(3,this._decorateLogMessage("Appending segment: "+c+" sec "+b.byteLength+" bytes")),this._tryInternalAppend(),this._notifyBufferUpdated()},b.prototype.remove=function(b,c){var d;b=Math.max(b,0),d=new a.Common.TimeRange(b,c),this._pendingRemove.push(d),a.Log.verbose(3,this._decorateLogMessage("Added to remove pending list ["+b+","+c+")")),this._tryInternalRemove()},b.prototype.flushFrom=function(a){var b=this._sourceBuffer.buffered;this._sourceBuffer.updating&&this._sourceBuffer.abort();var c=0,d=0;if(b.length>0&&(c=b.start(0)),this._pendingBuffer.length>0&&(c=Math.min(c,this._pendingBuffer[0].presTimeInSec)),this._pendingBuffer.length>0){var e=this._pendingBuffer[this._pendingBuffer.length-1];d=e.presTimeInSec+e.durationInSec}if(b.length>0&&(d=Math.max(d,b.end(b.length-1))),void 0!==a&&(c=a),d>c)this.remove(c,d);else if(0!==c||0!==d)throw new Error(this._decorateLogMessage("flush failed, endTime ("+d+") not greater than startime ("+c+")"))},b.prototype.getStartTimeOfCurrentBuffered=function(){var a=this._sourceBuffer.buffered,b=0/0;return a.length>0&&(b=a.start(0)),this._pendingBuffer.length>0&&(b=Math.min(b,this._pendingBuffer[0].presTimeInSec)),b},b.prototype.flushUntil=function(a){var b=this._sourceBuffer.buffered,c=0,d=0;if(b.length>0&&(c=b.start(0)),this._pendingBuffer.length>0&&(c=Math.min(c,this._pendingBuffer[0].presTimeInSec)),this._pendingBuffer.length>0){var e=this._pendingBuffer[this._pendingBuffer.length-1];d=e.presTimeInSec+e.durationInSec}if(b.length>0&&(d=Math.max(d,b.end(b.length-1))),d=Math.min(d,a),d>c)this.remove(c,d);else if(0!==c||0!==d)throw new Error(this._decorateLogMessage("flush failed, endTime ("+d+") not greater than startime ("+c+")"))},b.prototype._tryInternalAppend=function(){if(this._pendingBuffer&&this._sourceBuffer&&0!==this._pendingBuffer.length&&!this._sourceBuffer.updating)try{this._sourceBuffer.appendBuffer(this._pendingBuffer[0].data),a.Log.verbose(3,this._decorateLogMessage("Appended segment to SourceBuffer: "+this._pendingBuffer[0].presTimeInSec+" sec "+this._pendingBuffer[0].data.byteLength+" bytes")),this._pendingBuffer.splice(0,1),this._updatePendingRanges()}catch(b){switch(b.code){case DOMException.INVALID_STATE_ERR:case DOMException.QUOTA_EXCEEDED_ERR:a.Log.error(3,this._decorateLogMessage("Failed to append segment to SourceBuffer, will retry: "+b)),this._appendErrorHandler&&this._appendErrorHandler(this._sourceBuffer);break;default:throw a.Log.error(3,this._decorateLogMessage("Failed to append segment to SourceBuffer: "+b)),b}}},b.prototype._tryInternalRemove=function(){if(this._sourceBuffer&&(this._sourceBuffer.updating||(this._submittedRemove=null),this._pendingBuffer&&this._pendingRemove))for(;0!==this._pendingRemove.length&&!this._sourceBuffer.updating;){var b;b=this._pendingRemove[0];for(var c=this._pendingBuffer.length-1;c>=0;c--){var d,e,f;d=this._pendingBuffer[c],e=d.presTimeInSec,f=d.durationInSec,e>=b.startInSec&&e<b.endInSec&&(e+f<=b.endInSec?(this._pendingBuffer.splice(c,1),this._updatePendingRanges(),this._notifyBufferUpdated(),a.Log.verbose(3,this._decorateLogMessage("Segment removed: "+b.startInSec))):a.Log.verbose(3,this._decorateLogMessage("Failed to remove range ("+b.startInSec+", "+b.endInSec+") from \r\n                            segment ("+e+", "+(e+f)+") - range ends mid - segment")))}try{this._sourceBuffer.remove(b.startInSec,b.endInSec),this._submittedRemove=this._pendingRemove.splice(0,1)[0],a.Log.verbose(3,this._decorateLogMessage("Removing range from SourceBuffer: ["+b.startInSec+","+b.endInSec+")"))}catch(g){switch(g.code){case DOMException.INVALID_ACCESS_ERR:case DOMException.INVALID_STATE_ERR:a.Log.error(3,this._decorateLogMessage("Failed to remove segment from SourceBuffer, will retry: "+g));break;default:throw a.Log.error(3,this._decorateLogMessage("Failed to remove segment from SourceBuffer: "+g)),g}}}},b.prototype._updatePendingRanges=function(){var b,c=this,d=0/0;this._pendingBufferRanges&&(this._pendingBufferRanges.dispose(),this._pendingBufferRanges=null),this._pendingBufferRanges=new a.Common.TimeRangeSet,this._pendingBuffer.forEach(function(e){0===a.Common.diffTimes(e.presTimeInSec,d)?c._pendingBufferRanges.extendLast(e.endTimestampInSec):(b=new a.Common.TimeRange(e.presTimeInSec,e.endTimestampInSec),c._pendingBufferRanges.addRange(b)),d=e.endTimestampInSec})},b.prototype._decorateLogMessage=function(a){return this._mediaType+": "+a},b}();b.VideoElementAdapterBuffer=c}(a.VideoElementAdapter||(a.VideoElementAdapter={}));a.VideoElementAdapter}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function c(){this.name="com.widevine.alpha",this.type="Widevine",this._videoElement=null,this._errorHandler=null,this._laUrl="",this._session=null,this._active=!1,this._authenticationToken=""}return Object.defineProperty(c.prototype,"systemId",{get:function(){return c.systemId},enumerable:!0,configurable:!0}),c.prototype.isSupported=function(b,d,e){return b.isEqual(c.systemId)?a.EmeUtil.isTypeSupported(this.name,d,e):new Promise(function(a,b){b()})},c.prototype.activate=function(a,b,c){this._videoElement=a,this._errorHandler=b,this._authenticationToken=c,this._active=!0},c.prototype.deactivate=function(){this._active&&(this._active=!1,this._session&&(a.EmeUtil.unlistenToMessage(this._session,this._messageHandler),this._session.close(),this._session=null),this._videoElement&&(this._videoElement.src="",this._videoElement.setMediaKeys(null),this._videoElement=null),this._errorHandler=null,this._laUrl="",this._authenticationToken="")},c.prototype.initData=function(b,c,d,e,f){function g(a){return a.createMediaKeys()}function h(b){if(a.Log.verbose(12,"creating media key session for Widevine"),j._session=b.createSession(),!j._session){a.Log.error(12,j.name+" createSession failed");var d=new a.Failure.External(5242881,j.name+" createSession failed");return void j._reportError(d)}a.EmeUtil.listenToMessage(j._session,i),j._session.generateRequest("cenc",c)["catch"](function(){a.Log.error(12,j.name+" generateRequest failed");var b=new a.Failure.External(5242881,j.name+" generateRequest failed");j._reportError(b)}),j._videoElement.setMediaKeys(b)["catch"](function(){a.Log.error(12,j.name+" setMediaKeys failed");var b=new a.Failure.External(5242881,j.name+" setMediaKeys failed");j._reportError(b)})}function i(a){j._messageHandler(a)}var j=this;if(f&&!this._laUrl){this._laUrl=f;var k=a.EmeUtil.createSupportedKeySystem(this.name,d,e);k["catch"](function(){a.Log.error(12,j.name+" createSupportedKeySystem failed");var b=new a.Failure.External(5242882,j.name+" createSupportedKeySystem failed");j._reportError(b)});var l=k.then(g);l["catch"](function(){a.Log.error(12,j.name+" createMediaKeys failed");var b=new a.Failure.External(5242882,j.name+" createMediaKeys failed");j._reportError(b)}),l.then(h)["catch"](function(){a.Log.error(12,j.name+" createKeySession failed");var b=new a.Failure.External(5242882,j.name+" createKeySession failed");j._reportError(b)})}},c.prototype._messageHandler=function(a){var b=this;"license-request"===a.messageType&&this._getWidevineLicense(a.message,this._laUrl).then(function(a){b._active&&b._session&&b._session.update(a)},function(a){b._active&&b._reportError(a)})},c.prototype._getWidevineLicense=function(d,e){var f=this;return new Promise(function(g,h){var i=[];f._authenticationToken&&f._authenticationToken.length>0&&i.push({name:b.WidevineCustomAuthorizationHeader||a.HttpUtil.authorizationHeader,value:f._authenticationToken}),c.overrideLicenseAcquisitionUrl&&(a.Log.verbose(12,"overriding license acquisition url: "+e+" with: "+c.overrideLicenseAcquisitionUrl),e=c.overrideLicenseAcquisitionUrl),a.HttpUtil.httpRequest(e,"POST","arraybuffer",i,d).then(function(a){g(new Uint8Array(a))},function(b){var c=new a.Failure.External(5242886,"Http: "+a.Common.toHexString(b.code)+", reponse: "+b.response);h(c)})})},c.prototype._reportError=function(a){this._errorHandler&&this._errorHandler(a)},c.systemId=new Uint8Array([237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237]),c}();b.Widevine=c,b.WidevineCustomAuthorizationHeader=""}(a.KeySystem||(a.KeySystem={}));a.KeySystem}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(a){return new d(a)}b.CreateCoordinator=c;var d=function(){function c(d){var e=this;this._sessionContext=d,this._workflowSeq=b.CreateSequencer(this._sessionContext),this._mediaSource=null,this._lastPresentation=new Date(0),this._pendingPresentation=new Date,this._disposed=!1,this._pendingPlay=!0,this._pendingTryMediaRequestCount=0,this._prerollMet=!1,this._error=null,this._playbackPosInSec=null,this._pendingPlaybackPosInSec=null,this._seekingForward=!0,this._lastDuration=0,this._videoStreamList=null,this._audioStreamList=null,this._healthCheckLastTime=0,this._healthCheckPeriodInMSec=c._healthCheckPeriodMinInMSec,this._healthCheckId=a.Util.setTimeout(this._periodicHealthCheck,this._healthCheckPeriodInMSec,this),this._healthCheckRetries=0,this._dtOffsetToAdd=0,this._lastPlaybackBitrate=null,this._lastDownloadBitrate=null,this._manifestRefreshed=!1,this._registerInternalEvents(!0),this.timeBeforeSettingVideoElementSrcInMs=0,this._seekStartTime=0,this._canPlayThroughEvent=function(){e._disposed||e._pendingPlay&&e._buffersAbovePreroll()&&e._startPlayback()},this._durationChangeEvent=function(){if(!e._disposed){var b=e._sessionContext;b.eventMgr.dispatchEvent(a.EventName.durationchange),b.commonPresentation&&b.commonPresentation.isLive&&a.Util.setTimeout(f,c._durationChangeMinIntervalInMSec)}};var f=function(){if(!e._disposed){var b=e._sessionContext;b.commonPresentation&&b.commonPresentation.isLive&&(e._lastDuration!==e.duration?(e._lastDuration=e.duration,b.eventMgr.dispatchEvent(a.EventName.durationchange),a.Util.setTimeout(f,c._durationChangeMinIntervalInMSec)):0===e._lastDuration&&a.Util.setTimeout(f,c._durationChangeMinIntervalInMSec))}};this._resetHealthCheckTimeHandler=function(){e._resetHealthCheckTime()},this._resetSeekStartTimeHandler=function(){e._seekStartTime=0},this._checkPlaybackBitrate=function(){if(!e._disposed){var b=e._sessionContext.videoBufferData,c=b.getPlaybackBitrate(e.currentMediaTime);c!=e._lastPlaybackBitrate&&(e._lastPlaybackBitrate=c,e._sessionContext.eventMgr.dispatchEvent(a.EventName.playbackbitratechanged))}}}return c.prototype.dispose=function(){this._disposed||(this._registerInternalEvents(!1),this._registerVideoTagEvents(!1),this._disposed=!0,this._sessionContext=null,this._lastPresentation=null,this._pendingPresentation=null,this._canPlayThroughEvent=null,this._durationChangeEvent=null,this._resetHealthCheckTimeHandler=null,this._checkPlaybackBitrate=null,this._manifestRefreshed=!1,this._mediaSource&&(this._mediaSource.dispose(),this._mediaSource=null),this._workflowSeq&&(this._workflowSeq.dispose(),this._workflowSeq=null),this._videoStreamList&&(this._videoStreamList.dispose(),this._videoStreamList=null),this._audioStreamList&&(this._audioStreamList.dispose(),this._audioStreamList=null),this.timeBeforeSettingVideoElementSrcInMs=0,a.Util.clearTimeout(this._healthCheckId))},Object.defineProperty(c.prototype,"videoStreamList",{get:function(){return this._videoStreamList},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"audioStreamList",{get:function(){return this._audioStreamList},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"videoBufferData",{get:function(){return this._sessionContext.videoBufferData},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"audioBufferData",{get:function(){return this._sessionContext.audioBufferData},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"src",{get:function(){return this._sessionContext.presentationUrl},set:function(b){function d(b){function d(){return null!==g._playbackPosInSec&&g._sessionContext.videoTag.seeking?g._playbackPosInSec:g._sessionContext.videoTag.currentTime}function e(b){if(this._mediaSource){for(var c=this._mediaSource.sourceBuffers,d=!1,e=0;e<c.length;e++)if(c[e]===b){d=!0;break}d||g._sessionContext.eventMgr.dispatchEvent(a.InternalEventName.exception,"SourceBuffer has been removed from MediaSource")}}function f(){if(a.Log.verbose(1,"_setVideoElementSrcResolved"),g._sessionContext.eventMgr.dispatchEvent(a.EventName.mediaSourceSrcSetResolved),a.Common.isChrome){var f=Date.now();f-g.timeBeforeSettingVideoElementSrcInMs>c._timeSpentSettingVideoElementSrcThresholdInMs&&(a.Log.verbose(1,"Adjusting playable window because we spent too much time setting video element source."),i.adjustPlayableWindowForChromeSourceDelay(f))}if(!g._disposed){var h=!1;i.periods[0].streams.forEach(function(c){if(!h&&c.streamingInfo.selected&&2!==c.type){if(c.streamingInfo.sourceBuffer=g._mediaSource.addAdapterBuffer(c.codec,d,e,b.sessionContext.maxBufferInWallClockSec(),b.sessionContext.maxBufferBehindCurrentTimeInSec),!c.streamingInfo.sourceBuffer){g._error=new a.Failure.External(4194307,"presentationWorkflowResolved: Failed to create source buffer for stream "+a.Presentation.StreamType[c.type]+", codec "+c.codec),b.sessionContext.eventMgr.dispatchEvent(a.EventName.error),h=!0;var f=c.tracks;return void(f&&f.length>0&&f.forEach(function(b){var c='video/mp4;codecs="'+b._codecs+'"';a.Log.verbose(1,"MediaSource.isTypeSupported() for "+c+"= "+g._mediaSource.isTypeSupported(c))}))}0===c.type?g._sessionContext.videoBufferData.updateBuffer(c.streamingInfo.sourceBuffer):1===c.type&&g._sessionContext.audioBufferData.updateBuffer(c.streamingInfo.sourceBuffer),c.streamingInfo.sourceBuffer.presentationTimeOffsetInSec=c.presentationTimeOffsetInSec+g._dtOffsetToAdd}}),h||(g._updateStartPosition(),g._updateDuration(),g._registerVideoDownloadedEvents(),g._registerVideoTagEvents(!0),g._checkMediaWorkflow(),g._tryTimeUpdateEvent()),b.dispose()}}function h(a){throw new Error(a)}if(!g._disposed){var i=null;if(a.Log.verbose(1,"presentationWorkflowResolved"),null===b.sessionContext.commonPresentation)throw new Error("presentationWorkflowResolved: unexpected null values");i=b.sessionContext.commonPresentation,g._videoStreamList=new a.Presentation.VideoStreamList(g._sessionContext,i.periods[0].streams),g._audioStreamList=new a.Presentation.AudioStreamList(g._sessionContext,i.periods[0].streams);var j=null;g._audioStreamList&&g._audioStreamList.streams&&g._audioStreamList.streams.length>0&&g._audioStreamList.enabledIndices.length>0&&(a.assert(1==g._audioStreamList.enabledIndices.length,"Current implementation only allows one enabled stream at a time"),j=g._audioStreamList.streams[g._audioStreamList.enabledIndices[0]].codec);var k=null;g._videoStreamList&&g._videoStreamList.streams&&g._videoStreamList.streams.length>0&&-1!==g._videoStreamList.selectedIndex&&(k=g._videoStreamList.streams[g._videoStreamList.selectedIndex].codec),g._sessionContext.emeManager.setContentTypes(j,k),g._sessionContext.eventMgr.dispatchEvent(a.EventName.loadedmetadata),g._mediaSource=a.VideoElementAdapter.CreateAdapter(),g.timeBeforeSettingVideoElementSrcInMs=Date.now(),g._mediaSource.setVideoElementSrcAsync(b.sessionContext.videoTag).then(f,h)["catch"](function(b){g._sessionContext.eventMgr.dispatchEvent(a.InternalEventName.exception,b)})}}function e(b){g._disposed||(a.Log.error(1,"presentationWorkflowRejected:  module: "+b.currentModuleId),b.externalFailure&&a.Failure.isExternalError(b.externalFailure.code)&&(g._error=new a.Failure.External(b.externalFailure.code,b.externalFailure.message),a.Log.error(1,"Dispatching error: "+g.error.toString()),b.sessionContext.eventMgr.dispatchEvent(a.EventName.error)),b.dispose())}a.Log.verbose(1,"src("+b+")");var f,g=this;this._sessionContext.presentationUrl=b,f=b.indexOf("?"),-1!==f&&(this._sessionContext.presentationQueryStr=b.slice(f)),this._presentationWorkflowAsync(d,e)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"dtsOffsetToAdd",{get:function(){return this._dtOffsetToAdd},set:function(a){this._dtOffsetToAdd=a},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"pendingPlay",{get:function(){return this._pendingPlay},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"currentPresentationTime",{set:function(b){a.Log.verbose(1,"currentPresentationTime("+b.toFixed(3)+")"),this.setCurrentTimeInternal(b,!0)},enumerable:!0,configurable:!0}),c.prototype.setCurrentTimeInternal=function(b,c){var d=this._sessionContext,e=d.commonPresentation.periods[0].streams,f=!1,g=0,h=0,i=this.duration;if(d.commonPresentation.isLive){var j=d.commonPresentation.timeShiftBufferDepth||1/0,k=d.heuristicSettings.buffer.leftEdgeBackoffInSec,l=j-k;g=d.liveStartBufferInSec(),h=l>i?0:k}if(c){var m=this._fromPresentationTime(b),n=Math.max(m,h);n=Math.min(n,i-g),m!==n&&(b=this._toPresentationTime(n))}else a.Log.verbose(1,"timeInSec: "+b+", leftEdgeBackoff: "+h),b=Math.max(b,h),a.Log.verbose(1,"timeInSec: "+b+", duration: "+i+", rightEdgeBackoff: "+g),b=Math.min(b,i-g),h>b&&(a.Log.warning(1,"timeInSec: "+b+"is less than leftEdgeBackoff. Seeking to leftEdgeBackoff"),b=h),a.Log.verbose(1,"timeInSec: "+b),b=this._toPresentationTime(b);a.Log.verbose(1,"seeking from presentation time "+d.videoTag.currentTime.toFixed(3)+" to "+b.toFixed(3));for(var o=b,p=0;p<e.length;p++)if(e[p].streamingInfo.selected){var q=e[p].segments.getByInSegmentTimestamp(b);if(q)continue;q=e[p].segments.getByInDiscontinuityTimestamp(b),q&&(o=Math.max(o,q.segmentInfo.presTimeInSec))}o!==b&&(a.Log.verbose(1,"skipping discontinuity from presentation time "+b+" to "+o),b=o),this._seekingForward=b>d.videoTag.currentTime,this._playbackPosInSec=b,d.videoTag.currentTime=b,this._pendingPlaybackPosInSec=null,a.Common.diffTimes(d.videoTag.currentTime,b)&&(a.Log.verbose(1,"set currentTime failed to update videoTag: requested="+b+", actual="+d.videoTag.currentTime),this._pendingPlaybackPosInSec=b);for(var p=0;p<e.length;p++)e[p].streamingInfo.selected&&(e[p].streamingInfo.sourceBuffer?!1===e[p].streamingInfo.sourceBuffer.contains(b)?(e[p].streamingInfo.pendingSeekPositionInSec=b,e[p].streamingInfo.abortCurrentRequest=!0,e[p].streamingInfo.sourceBuffer.flushFrom(),f=!0,2===e[p].streamingInfo.workflowState&&(e[p].streamingInfo.workflowState=0),this._seekStartTime=Date.now(),a.Log.verbose(1,"Seeked position not in current buffers: "+b)):a.Log.verbose(1,"Found seeked position in current buffers"):2===e[p].type&&(e[p].streamingInfo.pendingSeekPositionInSec=b,e[p].streamingInfo.abortCurrentRequest=!0,2===e[p].streamingInfo.workflowState&&(e[p].streamingInfo.workflowState=0)));this._checkMediaWorkflow(),f||this._buffersAbovePreroll()||this._endOfSelectedStreams()||(f=!0),f&&(d.videoTag.paused||(this._pendingPlay=!0,d.eventMgr.dispatchEvent(a.EventName.waiting),d.videoTag.pause()))},c.prototype.presentationTimeFromPercentageOfDvrWindow=function(b){if(!this._sessionContext.commonPresentation)return null;var c=this._sessionContext,d=c.commonPresentation.periods[0].streams,e=0,f=0,g=this.duration;if(c.commonPresentation.isLive){var h=c.commonPresentation.timeShiftBufferDepth||1/0,i=c.heuristicSettings.buffer.leftEdgeBackoffInSec,j=h-i;e=c.liveStartBufferInSec(),f=j>g?0:i}var k=b*g;k=Math.max(k,f),k=Math.min(k,g-e),f>k&&(k=f);for(var l=this._toPresentationTime(k),m=l,n=0;n<d.length;n++)if(d[n].streamingInfo.selected){var o=d[n].segments.getByInSegmentTimestamp(l);if(o)continue;o=d[n].segments.getByInDiscontinuityTimestamp(l),o&&(m=Math.max(m,o.segmentInfo.presTimeInSec))}return m!==l&&(l=m),a.Log.verbose(1,"From percentage of window time "+Math.round(100*b)+"% return presentation time "+l.toFixed(3)+" seconds"),l},Object.defineProperty(c.prototype,"currentTime",{get:function(){var a=this._sessionContext.videoTag,b=0;return this._sessionContext.commonPresentation&&(b=null!==this._pendingPlaybackPosInSec?this._manifestRefreshed?a.currentTime:this._pendingPlaybackPosInSec:a.currentTime,b=Math.max(this._fromPresentationTime(b),0)),b},set:function(b){a.Log.verbose(1,"currentTime("+b.toFixed(3)+")"),this.setCurrentTimeInternal(b,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"presentationTimeOffsetInSec",{get:function(){var a=0;if(this._sessionContext.commonPresentation){var b=this._sessionContext.commonPresentation.periods[0].streams;b&&b[0]&&(a=b[0].presentationTimeOffsetInSec)}return a},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"currentMediaTime",{get:function(){var a=this._sessionContext.videoTag,b=0;return this._sessionContext.commonPresentation&&(b=null!==this._pendingPlaybackPosInSec?this._pendingPlaybackPosInSec:a.currentTime,b-=this.presentationTimeOffsetInSec),b},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"downloadBitrate",{get:function(){return this._lastDownloadBitrate},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"playbackBitrate",{get:function(){return this._lastPlaybackBitrate},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"autoplay",{set:function(b){a.Log.verbose(1,"autoplay("+b+")"),this._pendingPlay=b},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"duration",{get:function(){var a=this._sessionContext,b=a.commonPresentation,c=1/0;if(b){var d=b.playableWindow;c=d.endInSec-d.startInSec}return Math.min(a.videoTag.duration||0,c)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"buffered",{get:function(){var b=null;if(this._mediaSource){var c=this._sessionContext.commonPresentation.playableWindow;b=new a.Common.TimeRangeSet,b.addRanges(this._mediaSource.buffered),b.rebase(c.startInSec)}return b},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"error",{get:function(){return this._error},enumerable:!0,configurable:!0}),c.prototype.play=function(){a.Log.verbose(1,"play()");var b=this._sessionContext,c=b.heuristicSettings.buffer.leftEdgeBackoffInSec,d=b.videoTag;if(!this._mediaSource)return void(this._pendingPlay=!0);0===this._mediaSource.readyState&&d.load();var e;b.commonPresentation&&b.commonPresentation.isLive&&d.paused&&!d.seeking&&(e=this._fromPresentationTime(d.currentTime))<c&&(a.Log.verbose(1,"play: skipping from "+d.currentTime+"(playable window time: "+e+") to left edge: "+c+", playable window start: "+b.commonPresentation.playableWindow.startInSec),this.currentTime=0),d.paused&&a.Common.diffTimes(d.currentTime,d.duration)<=0&&(this.currentTime=0),this._buffersAbovePreroll()||this._endOfSelectedStreams()?this._startPlayback():(this._pendingPlay=!0,b.eventMgr.dispatchEvent(a.EventName.waiting)),this._resetHealthCheckTime()},c.prototype.pause=function(){var b=this._sessionContext;a.Log.verbose(1,"pause()"),this._pendingPlay&&(this._pendingPlay=!1),b.videoTag.pause(),this._tryTimeUpdateEvent()},c.prototype._presentationWorkflowAsync=function(b,d){function e(){h._disposed||(!h._sessionContext.commonPresentation||h._sessionContext.commonPresentation.isLive)&&h._workflowSeq.presentationRequestAsync().then(f,g)["catch"](function(b){h._sessionContext.eventMgr.dispatchEvent(a.InternalEventName.exception,b)})}function f(f){if(h._disposed)return void(d&&d(f));a.Log.verbose(1,"presentationRequestResolved");var g=f.sessionContext.commonPresentation;if(null===g)throw new Error("presentationRequestResolved: unexpected null values");h._updateDuration();var i=new Date;if(g.isLive&&g.minimumUpdatePeriodInSec>0&&h._pendingPresentation<=i){var j=Math.max(c._minPresentationUpdatePeriodInMSec,1e3*g.minimumUpdatePeriodInSec);h._pendingPresentation.setTime(i.getTime()+j),a.Util.setTimeout(e,j)}h._lastPresentation=i,h._manifestRefreshed=!0,b&&(b(f),b=null)}function g(b){h._disposed||a.Log.error(1,"presentationRequestRejected:  module: "+b.currentModuleId),d&&d(b)}var h=this,i=0,j=Date.now()-h._lastPresentation.getTime();j<c._minPresentationUpdatePeriodInMSec&&(i=c._minPresentationUpdatePeriodInMSec-j),a.Util.setTimeout(e,i)},c.prototype.restartCheckMediaWorkflowIfNeeded=function(){0===this._pendingTryMediaRequestCount?(a.Log.verbose(1,"restartCheckMediaWorkflowIfNeeded: restart needed"),this._checkMediaWorkflow()):a.Log.verbose(1,"restartCheckMediaWorkflowIfNeeded: restart not needed")},c.prototype._checkMediaWorkflow=function(){function b(){if(!f._disposed){a.Log.verbose(1,"_doCheckMediaWorkflow");f._pendingTryMediaRequestCount--,g.videoTag.paused||f._endOfSelectedStreams()||!f._buffersNearEmpty()?f._buffersAbovePreroll()&&(f._dispatchCanPlayThroughEvent(),f._pendingPlay&&(a.Log.verbose(1,"_doCheckMediaWorkflow: we have a pending play. Starting the playback."),f._startPlayback())):(a.Log.verbose(1,"_doCheckMediaWorkflow: pausing play because the buffer is close to empty"),f._pendingPlay=!0,g.videoTag.pause(),g.eventMgr.dispatchEvent(a.EventName.waiting));for(var h=!1,i=0;i<g.commonPresentation.periods[0].streams.length;i++){var j=g.commonPresentation.periods[0].streams[i];if(j.streamingInfo.selected&&0===j.streamingInfo.workflowState){var k=j.streamingInfo.sourceBuffer,l=f._isBufferAheadOtherStreams(j),m=k&&j.streamingInfo.sourceBuffer.bufferFull(f._sessionContext.playbackRate()),n=f._buffersAtLiveEdge(j);k&&!l&&!m&&!n||2===j.type&&!l&&!f._textStreamTooFarAheadOfCurrentTimeDuringLive(j)?(a.Log.verbose(1,"starting media workflow "+a.Presentation.StreamType[j.type]),j.streamingInfo.workflowState=1,f._workflowSeq.mediaRequestAsync(j).then(d,e)["catch"](function(b){g.eventMgr.dispatchEvent(a.InternalEventName.exception,b)})):(a.Log.verbose(1,"_doCheckMediaWorkflow: need to retry. Stream type: "+a.Presentation.StreamType[j.type]+", sourcebuffer:"+k+", buffer is ahead of other streams: "+l+", buffer is full: "+m+", buffer is at live edge: "+n),h=!0)}else a.Log.verbose(1,"_doCheckMediaWorkflow: Stream skipped. Stream type: "+a.Presentation.StreamType[j.type]+", selected: "+j.streamingInfo.selected+", workflowState: "+j.streamingInfo.workflowState)}h&&0===f._pendingTryMediaRequestCount&&(f._pendingTryMediaRequestCount++,a.Log.verbose(1,"_doCheckMediaWorkflow: schedule try again. Pending try count = "+f._pendingTryMediaRequestCount),a.Util.setTimeout(b,c._mediaSegmentTimeoutInMSec))}}function d(b){if(!f._disposed){f._manifestRefreshed=!1;var c=b.requestedStream;c.streamingInfo.workflowState=0,1===b.state&&null===c.streamingInfo.pendingSeekPositionInSec&&(a.Log.verbose(1,"mediaRequestResolved: "+a.Presentation.StreamType[c.type]+" end of stream"),c.streamingInfo.workflowState=2,f._endOfSelectedStreams()&&(a.Log.verbose(1,"End of selected streams"),f._mediaSource.endOfStream(),f._dispatchCanPlayThroughEvent(),f._pendingPlay&&f._startPlayback()));for(var d=0;d<b.urlsToRetrieve.length;d++){if(null===b.urlsToRetrieve[d].mediaData)throw new Error("mediaRequestResolved: data is null url: "+b.urlsToRetrieve[d].url);if(c.streamingInfo){if(!c.streamingInfo.selected||null!==c.streamingInfo.pendingSeekPositionInSec){a.Log.verbose(1,"mediaRequestResolved discarding,"+(c.streamingInfo.selected?"seek in progress":"stream no longer selected ")+"url: "+b.urlsToRetrieve[d].url+"("+b.urlsToRetrieve[d].httpResposeContentType+", "+b.urlsToRetrieve[d].mediaData.byteLength+")");break}var e=b.urlsToRetrieve[d].presTimeInSec+b.urlsToRetrieve[d].durationInSec;a.Log.verbose(1,"mediaRequestResolved appending url: "+b.urlsToRetrieve[d].url+"("+b.urlsToRetrieve[d].httpResposeContentType+", "+b.urlsToRetrieve[d].mediaData.byteLength+" bytes, end time="+e+")"),2!==c.type?c.streamingInfo.sourceBuffer.append(b.urlsToRetrieve[d].mediaData,b.urlsToRetrieve[d].presTimeInSec,b.urlsToRetrieve[d].durationInSec):2===b.urlsToRetrieve[d].requestType?b.sessionContext.ttmlManager.parseInitSegment(b.urlsToRetrieve[d].mediaData)&&(b.sessionContext.ttmlManager.normalizedPresentationTimeInSeconds=c.presentationTimeOffsetInSec):b.sessionContext.ttmlManager.processTtml(c.id,b.urlsToRetrieve[d].mediaData)}}if(null!==f._pendingPlaybackPosInSec){for(var h=g.videoTag.buffered,i=!1,d=0;d<h.length;d++)if(h.start(d)<=f._pendingPlaybackPosInSec&&f._pendingPlaybackPosInSec<h.end(d)){i=!0;break}i&&(g.videoTag.currentTime=f._pendingPlaybackPosInSec,a.Common.diffTimes(g.videoTag.currentTime,f._pendingPlaybackPosInSec)&&(f._pendingPlaybackPosInSec>g.videoTag.currentTime&&f._seekingForward||f._pendingPlaybackPosInSec<g.videoTag.currentTime&&!f._seekingForward)?a.Log.verbose(1,"mediaRequestResolved failed to update videoTag currentTime: pending="+f._pendingPlaybackPosInSec+", actual="+g.videoTag.currentTime+", _seekingForward="+f._seekingForward):f._pendingPlaybackPosInSec=null)}f._checkMediaWorkflow(),b.dispose()}}function e(b){function c(b){if(!f._disposed){if(a.Log.verbose(1,"refreshPresentationWorkflowResolved"),null===b.sessionContext.commonPresentation)throw new Error("refreshPresentationWorkflowResolved: unexpected null values");e.streamingInfo.workflowState=0,f._checkMediaWorkflow(),b.dispose()}}function d(b){f._disposed||(a.Log.error(1,"refreshPresentationWorkflowRejected:  module: "+b.currentModuleId),b.externalFailure&&a.Failure.isExternalError(b.externalFailure.code)&&(f._error=new a.Failure.External(b.externalFailure.code,b.externalFailure.message),a.Log.error(1,"Dispatching error: "+f.error.toString()),b.sessionContext.eventMgr.dispatchEvent(a.EventName.error)),b.dispose())}if(!f._disposed){f._manifestRefreshed=!1;var e=b.requestedStream;if(a.Log.error(1,"mediaRequestRejected: "+a.Presentation.StreamType[b.requestedStream.type]+" module: "+b.currentModuleId),b.externalFailure){if((2097556===b.externalFailure.code||1===b.externalFailure.code||5242885===b.externalFailure.code)&&b.sessionContext.commonPresentation.isLive&&0===b.sessionContext.commonPresentation.minimumUpdatePeriodInSec&&b.failTracker.isNone())return void f._presentationWorkflowAsync(c,d);a.Failure.isExternalError(b.externalFailure.code)&&(f._error=new a.Failure.External(b.externalFailure.code,b.externalFailure.message),a.Log.error(1,"Dispatching error: "+f.error.toString()),g.eventMgr.dispatchEvent(a.EventName.error))}b.dispose()}}var f=this,g=f._sessionContext;this._pendingTryMediaRequestCount++,a.Util.setTimeout(b,0)},c.prototype._updateStartPosition=function(){var a=this._sessionContext,b=a.commonPresentation,c=a.liveStartBufferInSec(),d=1/0;b&&isNaN(a.startPositionInSec)&&(d=b.isLive?Math.max(b.playableWindow.startInSec,b.playableWindow.endInSec-c):b.playableWindow.startInSec,0!==d&&(this._mediaSource.setStartTime(d),a.startPositionInSec=d))},c.prototype._updateDuration=function(){var b,c=this._sessionContext.commonPresentation;if(c&&this._mediaSource){if(c.isLive)b=1/0;else if(this._sessionContext.isLiveToVod){if(b=c.playableWindow.endInSec,a.Common.isChrome){var d=Math.floor(1e6*b)/1e6;b=parseFloat(d.toFixed(6)),a.Log.verbose(1,"newDuration: "+b)}}else b=c.durationInSec;if(this._mediaSource.durationInSec!==b)try{this._mediaSource.durationInSec=b}catch(e){a.Log.warning(1,"ignoring set durationInSec error: "+e)}}},c.prototype._toPresentationTime=function(a){var b=this._sessionContext.commonPresentation.playableWindow.startInSec;return a+b},c.prototype._fromPresentationTime=function(a){var b=this._sessionContext.commonPresentation.playableWindow.startInSec;return a-b},c.prototype._endOfSelectedStreams=function(){if(!this._sessionContext.commonPresentation)return!1;for(var a=this._sessionContext.commonPresentation.periods[0].streams,b=0;b<a.length;b++)if(a[b].streamingInfo.selected&&2!==a[b].streamingInfo.workflowState)return!1;

return!0},c.prototype._buffersAbovePreroll=function(){var a=!0,b=this._sessionContext.videoTag;if(!this._sessionContext.commonPresentation)return!1;var c=this._sessionContext.commonPresentation.periods[0].streams;if(b.readyState<b.HAVE_METADATA)a=!1;else for(var d=0;d<c.length;d++)if(c[d].streamingInfo.selected&&2!==c[d].type&&c[d].streamingInfo.sourceBuffer.getBufferedAheadOfCurrentTimeInSec()<this._sessionContext.prerollBufferInSec()){a=!1;break}return a},c.prototype._buffersNearEmpty=function(){for(var a=this._sessionContext.commonPresentation.periods[0].streams,b=0;b<a.length;b++)if(a[b].streamingInfo.selected&&2!==a[b].type&&a[b].streamingInfo.sourceBuffer.getBufferedAheadOfCurrentTimeInSec()<this._sessionContext.lowBufferInSec())return!0;return!1},c.prototype._isBufferAheadOtherStreams=function(a){for(var b=0,d=1/0,e=null,f=0,g=this._sessionContext.commonPresentation.periods[0].streams,h=0;h<g.length;h++)if(g[h].streamingInfo.selected&&2!==g[h].type&&2!==g[h].streamingInfo.workflowState){b++;var i=g[h].streamingInfo.sourceBuffer.buffered;i.length>0&&i.end(i.length-1)<d&&(d=i.end(i.length-1),e=g[h],f=g[h].streamingInfo.sourceBuffer.getBufferedAheadOfCurrentTimeInSec())}if(2===a.type){if(a.streamingInfo&&a.streamingInfo.currentSegment){var j=a.streamingInfo.pendingSeekPositionInSec?a.streamingInfo.pendingSeekPositionInSec:a.streamingInfo.currentSegment.segmentInfo.presTimeInSec;return j-d>c._bufferTooFarAheadInSec}return!1}var i=a.streamingInfo.sourceBuffer.buffered;return 1===b||e===a||0===i.length?!1:a.streamingInfo.sourceBuffer.getBufferedAheadOfCurrentTimeInSec()>f&&i.end(i.length-1)-d>c._bufferTooFarAheadInSec},c.prototype._buffersAtLiveEdge=function(a){var b,c,d,e=this._sessionContext.commonPresentation;return a.streamingInfo.currentSegment?(b=a.streamingInfo.currentSegment.segmentInfo,c=b.presTimeInSec+b.durationInSec,d=e.playableWindow.endInSec,e.isLive&&0===e.minimumUpdatePeriodInSec&&c>=d):!1},c.prototype._textStreamTooFarAheadOfCurrentTimeDuringLive=function(a){if(!(this._sessionContext.commonPresentation&&this._sessionContext.commonPresentation.isLive&&2===a.type&&a.streamingInfo.currentSegment&&a.streamingInfo.currentSegment.segmentInfo))return!1;var b=a.streamingInfo.pendingSeekPositionInSec?a.streamingInfo.pendingSeekPositionInSec:a.streamingInfo.currentSegment.segmentInfo.presTimeInSec+a.maxSegmentDuration;return b-this._sessionContext.videoTag.currentTime>c._textStreamTooFarAheadOfCurrentTimeThresholdInSec},c.prototype._startPlayback=function(){var b=this._sessionContext.videoTag,d=this._dtOffsetToAdd;b.buffered&&b.buffered.length>0&&b.currentTime<b.buffered.start(0)&&(a.Common.isSafari&&a.Common.isOSXElCapitanOrEarlier()&&(d+=c._startTimeThresholdInSecForSafari),b.currentTime=b.buffered.start(0)+d,a.Log.verbose(1,"_startPlayback: skipping over missing data at the beginning. currentTime: "+b.currentTime+", buffer start: "+b.buffered.start(0))),this._pendingPlay=!1,a.Common.videoTagPlay(this._sessionContext.videoTag)},c.prototype._dispatchCanPlayThroughEvent=function(){this._prerollMet||(a.Log.verbose(7,"dispatching event: canplaythrough"),this._prerollMet=!0,this._sessionContext.eventMgr.dispatchEvent(a.EventName.canplaythrough))},c.prototype._registerVideoDownloadedEvents=function(){function b(){if(!c._disposed){var b=d.downloadCompleted.mediaDownload.bitrate;b!=this._lastDownloadBitrate&&(this._lastDownloadBitrate=b,this._sessionContext.eventMgr.dispatchEvent(a.EventName.downloadbitratechanged))}}var c=this,d=this._sessionContext.videoBufferData;d.addEventListener(a.BufferDataEventName.downloadcompleted,b,this)},c.prototype._registerVideoTagEvents=function(b){var c=this._sessionContext.videoTag;b?(c.addEventListener(a.EventName.canplaythrough,this._canPlayThroughEvent),c.addEventListener(a.EventName.durationchange,this._durationChangeEvent),c.addEventListener(a.EventName.playing,this._resetHealthCheckTimeHandler),c.addEventListener(a.EventName.seeked,this._resetHealthCheckTimeHandler),c.addEventListener(a.EventName.seeked,this._resetSeekStartTimeHandler),c.addEventListener(a.EventName.timeupdate,this._checkPlaybackBitrate)):(c.removeEventListener(a.EventName.canplaythrough,this._canPlayThroughEvent),c.removeEventListener(a.EventName.durationchange,this._durationChangeEvent),c.removeEventListener(a.EventName.playing,this._resetHealthCheckTimeHandler),c.removeEventListener(a.EventName.seeked,this._resetHealthCheckTimeHandler),c.removeEventListener(a.EventName.seeked,this._resetSeekStartTimeHandler),c.removeEventListener(a.EventName.timeupdate,this._checkPlaybackBitrate))},c.prototype._registerInternalEvents=function(b){b?(this._sessionContext.eventMgr.addHandler(a.InternalEventName.flushvideo,this._flushVideoToPreroll,this),this._sessionContext.eventMgr.addHandler(a.InternalEventName.audiocodecchanged,this._handleAudioCodecChanged,this)):(this._sessionContext.eventMgr.removeHandler(a.InternalEventName.flushvideo,this._flushVideoToPreroll),this._sessionContext.eventMgr.removeHandler(a.InternalEventName.audiocodecchanged,this._handleAudioCodecChanged))},c.prototype._periodicHealthCheck=function(b){if(b._sessionContext&&b._sessionContext.videoTag){var d=b._sessionContext.videoTag;if(b._healthCheckLastTime)if(d.paused||d.seeking||d.ended||b._healthCheckLastTime!==d.currentTime)b._healthCheckRetries=0,b._healthCheckPeriodInMSec=c._healthCheckPeriodMinInMSec;else{a.Log.verbose(1,"Health Check: currentTime stopped"),b._sessionContext.eventMgr.dispatchEvent(a.EventName.playbackstalled);var e,f=d.currentTime,g=-1,h=new a.Common.TimeRangeSet;if(h.addRanges(d.buffered),e=h.getIndexByInRangeTimestamp(f),e>=0&&(h.beforeDiscontinuity(f,e)?(g=h.start(e+1),a.Log.verbose(1,"Health Check: skipping over discontinuity")):h.atOrAfterDiscontinuity(f,e)&&(g=h.start(e),a.Log.verbose(1,"Health Check: resetting on discontinuity"))),0>g&&(g=f+c._healthCheckSkipInSec,a.Log.verbose(1,"Health Check: skipping "+c._healthCheckSkipInSec+" seconds ahead"),b._healthCheckPeriodInMSec+=c._healthCheckPeriodIncrementInMSec,b._healthCheckPeriodInMSec=Math.min(b._healthCheckPeriodInMSec,c._healthCheckPeriodMaxInMSec)),a.Log.verbose(1,"Health Check: seeking from "+f+" to "+g),d.currentTime=g,-2===e){b._healthCheckRetries++;var i=b._sessionContext.commonPresentation.isLive;(!i||i&&b._healthCheckRetries>=c._healthCheckMaxRetries)&&b.pause()}}if(b._healthCheckLastTime=d.currentTime,b._seekStartTime){var j=Date.now()-b._seekStartTime;j>c._timeSpentSeekingThresholdInMs&&(a.Log.warning(1,"Spent too much time in a seek: "+j+"ms.  Trying to get the player to resume playing."),b._seekStartTime=0,b.play())}}b._healthCheckId=a.Util.setTimeout(b._periodicHealthCheck,b._healthCheckPeriodInMSec,b)},c.prototype._resetHealthCheckTime=function(){this._disposed||(this._healthCheckLastTime=0)},c.prototype._flushVideoToPreroll=function(){function b(b,c){var d=c.prerollBufferInSec(),e=c.videoTag.currentTime+Math.max(d,1.5*b.maxSegmentDuration),g=null;f.flushStream=!1;var h=b.segments.getByInSegmentTimestamp(e);h?g=h.segmentInfo.presTimeInSec:(h=b.segments.getByInDiscontinuityTimestamp(e),h&&(g=h.segmentInfo.presTimeInSec)),null!=g&&f.sourceBuffer&&f.sourceBuffer.contains(g)&&(a.Log.verbose(7,"flushing at "+g+" from track selection"),f.sourceBuffer.flushFrom(g),f.pendingSeekPositionInSec=g,2===b.streamingInfo.workflowState&&(b.streamingInfo.workflowState=0))}if(a.Common.isChromiumEdge&&this._sessionContext&&this._sessionContext.emeManager&&this._sessionContext.emeManager.matchedKeySystem&&"PlayReady"===this._sessionContext.emeManager.matchedKeySystem.type)return void a.Log.warning(7,"Ignoring flush video request.  See code comment for the reason.");var c=this._sessionContext.commonPresentation.periods[0].streams,d=c.filter(function(a){return a.streamingInfo.flushStream===!0});0===d.length&&(d=c);for(var e=0;e<d.length;e++){var f=d[e].streamingInfo;0===d[e].type&&f.selected&&b(d[e],this._sessionContext)}this._checkMediaWorkflow()},c.prototype._handleAudioCodecChanged=function(){if(a.Log.verbose(1,"_handleAudioCodecChanged"),this._disposed)return!1;for(var b=(this._sessionContext.commonPresentation,this._sessionContext.commonPresentation.periods[0].streams),c=0;c<b.length;c++)if(b[c].streamingInfo.selected&&b[c].streamingInfo.audioTrackSwitched)return this._mediaSource.changeAdapterBufferType(b[c].streamingInfo.sourceBuffer,b[c].codec);return!1},c.prototype._tryTimeUpdateEvent=function(){function b(){d.disposed||d.videoTag.paused&&d.commonPresentation&&d.commonPresentation.isLive&&(d.eventMgr.dispatchEvent(a.EventName.timeupdate),a.Util.setTimeout(b,c._timeupdateLivePausedIntervalInMSec))}if(!this._disposed){var d=this._sessionContext;b()}},c._mediaSegmentTimeoutInMSec=2e3,c._minPresentationUpdatePeriodInMSec=1e3,c._bufferTooFarAheadInSec=4,c._textStreamTooFarAheadOfCurrentTimeThresholdInSec=2,c._timeupdateLivePausedIntervalInMSec=1e3,c._durationChangeMinIntervalInMSec=1e3,c._healthCheckPeriodMinInMSec=1e3,c._healthCheckPeriodMaxInMSec=5e3,c._healthCheckPeriodIncrementInMSec=2e3,c._healthCheckSkipInSec=.5,c._healthCheckMaxRetries=2,c._startTimeThresholdInSecForSafari=.2,c._timeSpentSettingVideoElementSrcThresholdInMs=100,c._timeSpentSeekingThresholdInMs=8e3,c}()}(a.Workflow||(a.Workflow={}));a.Workflow}(AzureHtml5JS||(AzureHtml5JS={}));var __extends=this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);c.prototype=b.prototype,a.prototype=new c},AzureHtml5JS;!function(a){!function(b){"use strict";function c(){return new f}function d(){return new g}b.CreatePresentation=c,b.CreateMedia=d;var e=function(){function b(b){this._eventManager=new a.Events.Manager,this._eventsOrdered=b,this._stepList=[]}return b.prototype.dispose=function(){this._eventManager.dispose(),this._eventManager=null,this._eventsOrdered=null,this._stepList=null},b.prototype.addHandler=function(a,b,c){this._eventManager.addHandler(a,b,c)},b.prototype.createSteps=function(){var a=this,b=0;for(var c in this._eventsOrdered){var d=this._eventManager.getHandlers(this._eventsOrdered[c]);d.forEach(function(c){a._stepList[b++]=c})}},Object.defineProperty(b.prototype,"stepList",{get:function(){return this._stepList},enumerable:!0,configurable:!0}),b}(),f=function(a){function b(){var b=[this.stepEvents.requestBegin,this.stepEvents.requestSend,this.stepEvents.dataRetrieved,this.stepEvents.requestEnd];a.call(this,b)}return __extends(b,a),Object.defineProperty(b.prototype,"stepEvents",{get:function(){return{requestBegin:"requestBegin",requestSend:"requestSend",dataRetrieved:"dataRetrieved",requestEnd:"requestEnd"}},enumerable:!0,configurable:!0}),b}(e),g=function(a){function b(){var b=[this.stepEvents.requestBegin,this.stepEvents.requestSend,this.stepEvents.dataRetrieved,this.stepEvents.requestEnd];a.call(this,b)}return __extends(b,a),Object.defineProperty(b.prototype,"stepEvents",{get:function(){return{requestBegin:"requestBegin",requestSend:"requestSend",dataRetrieved:"dataRetrieved",requestEnd:"requestEnd"}},enumerable:!0,configurable:!0}),b}(e)}(a.Workflow||(a.Workflow={}));a.Workflow}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(a){return new d(a)}b.CreateSequencer=c;var d=function(){function c(b){this._disposed=!1,this._sessionContext=b,this._orderedModules=[new a.DataRetriever.HttpRetryPolicy,new a.SegmentLocator.Dash,new a.Heuristics.InitialBandwidthDataUrlFormatter,new a.Heuristics.WindowSizeRule,new a.Heuristics.StepRule,new a.Heuristics.Engine,new a.UrlBuilder.DashUrlFormatter,new a.DataRetriever.HttpDataRetriever(b),new a.DashPresentation.Parser,new a.ContentProtection.PlayReady,new a.ContentProtection.Widevine,new a.ContentProtection.AesHandler,new a.DashMediaSegment.Parser,new a.Presentation.InitialStreamSelector,new a.Ad.AdHandler],this._createWorkflows(b)}return c.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._orderedModules.forEach(function(a){a.dispose()}),this._orderedModules=null,this._sessionContext=null)},c.prototype.presentationRequestAsync=function(){var b=this,c=this;return new Promise(function(d,e){var f=new a.Context.Request(0,c._sessionContext);f.urlsToRetrieve.push(new a.Context.UrlRequest(c._sessionContext.presentationUrl)),b._processSteps(f,d,e)})},c.prototype.mediaRequestAsync=function(b){var c=this;return new Promise(function(d,e){var f=new a.Context.Request(1,c._sessionContext);f.requestedStream=b,f.heuristicData=new a.Context.HeuristicData(b),c._processSteps(f,d,e)})},c.prototype._processSteps=function(b,c,d){function e(){if(h._disposed||b.disposed||b.sessionContext.disposed)return void d();if(i===b.sessionContext.workflows[b.workflowType].stepList.length)return 1===b.workflowType?a.Log.verbose(0,"Finished process steps for "+a.Presentation.StreamType[b.requestedStream.type]+" media workflow"):a.Log.verbose(0,"Finished process steps for presentation workflow"),void c(b);var e=b.sessionContext.workflows[b.workflowType].stepList[i],j=e.functionHandler.call(e.callerInstance,b);i++,j.then(f,g)}function f(){switch(b.state){case 0:a.Util.setTimeout(e,0);break;case 2:i=0,a.Util.setTimeout(e,b.retryWaitTimeMSec),b.reset();break;case 1:c(b);break;default:throw new Error("processSteps unexpected state"+b.state)}}function g(c){if(null===b.externalFailure)return void b.sessionContext.eventMgr.dispatchEvent(a.InternalEventName.exception,c);var e="stepRejected: "+b.externalFailure.toString();c&&(e+="err: "+c),a.Log.error(0,e),d(b)}var h=this;1===b.workflowType?a.Log.verbose(0,"Starting process steps for "+a.Presentation.StreamType[b.requestedStream.type]+" media workflow"):a.Log.verbose(0,"Starting process steps for presentation workflow");var i=0;a.Util.setTimeout(e,0)},c.prototype._createWorkflows=function(a){a.workflows=[b.CreatePresentation(),b.CreateMedia()],this._orderedModules.forEach(function(b){b.init(a)}),this._sessionContext.workflows.forEach(function(a){a.createSteps()})},c}()}(a.Workflow||(a.Workflow={}));a.Workflow}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){"use strict";var b=function(){function a(){}return a.volumechange="volumechange",a.ended="ended",a.timeupdate="timeupdate",a.durationchange="durationchange",a.pause="pause",a.play="play",a.playing="playing",a.seeking="seeking",a.seeked="seeked",a.suspend="suspend",a.loadstart="loadstart",a.loadedmetadata="loadedmetadata",a.loadeddata="loadeddata",a.fullscreenchange="fullscreenchange",a.waiting="waiting",a.canplaythrough="canplaythrough",a.error="error",a.playbackstalled="playbackstalled",a.downloadbitratechanged="downloadbitratechanged",a.playbackbitratechanged="playbackbitratechanged",a.ratechange="ratechange",a.spliceWaiting="splicewaiting",a.emsgAvailable="emsgAvailable",a.decryptorInitialized="decryptorInitialized",a.aesKeyFetchCompleted="aesKeyFetchCompleted",a.decryptionFailed="decryptionFailed",a.manifestFetchCompleted="manifestFetchCompleted",a.initialBandwidthEstimationCompleted="initialBandwidthEstimationCompleted",a.mediaSourceSrcSetResolved="mediaSourceSrcSetResolved",a}();a.EventName=b;var c=function(){function a(){}return a.trackselected="trackselected",a}();a.StreamEventName=c;var d=function(){function a(){}return a.streamselected="streamselected",a.streamindexinvalid="streamindexinvalid",a.streamselectnotsupported="streamselectnotsupported",a}();a.StreamListEventName=d;var e=function(){function a(){}return a.downloadrequested="downloadrequested",a.downloadcompleted="downloadcompleted",a.downloaddecrypted="downloaddecrypted",a.downloadfailed="downloadfailed",a}();a.BufferDataEventName=e,function(a){a[a.abortedErrStart=1048576]="abortedErrStart",a[a.abortedErrUnknown=1048576]="abortedErrUnknown",a[a.abortedErrNotImplemented=1048577]="abortedErrNotImplemented",a[a.abortedErrHttpMixedContentBlocked=1048578]="abortedErrHttpMixedContentBlocked",a[a.abortedErrEnd=2097151]="abortedErrEnd",a[a.networkErrStart=2097152]="networkErrStart",a[a.networkErrUnknown=2097152]="networkErrUnknown",a[a.networkErrHttpResponseBegin=2097552]="networkErrHttpResponseBegin",a[a.networkErrHttpBadUrlFormat=2097552]="networkErrHttpBadUrlFormat",a[a.networkErrHttpUserAuthRequired=2097553]="networkErrHttpUserAuthRequired",a[a.networkErrHttpUserForbidden=2097555]="networkErrHttpUserForbidden",a[a.networkErrHttpUrlNotFound=2097556]="networkErrHttpUrlNotFound",a[a.networkErrHttpNotAllowed=2097557]="networkErrHttpNotAllowed",a[a.networkErrHttpGone=2097562]="networkErrHttpGone",a[a.networkErrHttpPreconditionFailed=2097564]="networkErrHttpPreconditionFailed",a[a.networkErrHttpInternalServerFailure=2097652]="networkErrHttpInternalServerFailure",a[a.networkErrHttpBadGateway=2097654]="networkErrHttpBadGateway",a[a.networkErrHttpServiceUnavailable=2097655]="networkErrHttpServiceUnavailable",a[a.networkErrHttpGatewayTimeout=2097656]="networkErrHttpGatewayTimeout",a[a.networkErrHttpResponseEnd=2097751]="networkErrHttpResponseEnd",a[a.networkErrTimeout=2097752]="networkErrTimeout",a[a.networkErrError=2097753]="networkErrError",a[a.networkErrAbort=2097754]="networkErrAbort",a[a.networkErrNoInternet=2097755]="networkErrNoInternet",a[a.networkErrEnd=3145727]="networkErrEnd",a[a.decodeErrStart=3145728]="decodeErrStart",a[a.decodeErrUnknown=3145728]="decodeErrUnknown",a[a.decodeErrEnd=4194303]="decodeErrEnd",a[a.srcErrStart=4194304]="srcErrStart",a[a.srcErrUnknown=4194304]="srcErrUnknown",a[a.srcErrParsePresentation=4194305]="srcErrParsePresentation",a[a.srcErrParseSegment=4194306]="srcErrParseSegment",a[a.srcErrUnsupportedPresentation=4194307]="srcErrUnsupportedPresentation",a[a.srcErrInvalidSegment=4194308]="srcErrInvalidSegment",a[a.srcErrLiveNoChunks=4194309]="srcErrLiveNoChunks",a[a.srcErrEnd=5242879]="srcErrEnd",a[a.encryptErrStart=5242880]="encryptErrStart",a[a.encryptErrUnknown=5242880]="encryptErrUnknown",a[a.encryptErrDecrypterNotFound=5242881]="encryptErrDecrypterNotFound",a[a.encryptErrDecrypterInit=5242882]="encryptErrDecrypterInit",a[a.encryptErrDecrypterNotSupported=5242883]="encryptErrDecrypterNotSupported",a[a.encryptErrKeyAcquire=5242884]="encryptErrKeyAcquire",a[a.encryptErrDecryption=5242885]="encryptErrDecryption",a[a.encryptErrLicenseAcquire=5242886]="encryptErrLicenseAcquire",a[a.encryptErrCertAcquire=5242887]="encryptErrCertAcquire",a[a.encryptErrEnd=6291455]="encryptErrEnd"}(a.ErrorCode||(a.ErrorCode={}));a.ErrorCode}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";!function(a){a[a.video=0]="video",a[a.audio=1]="audio",a[a.text=2]="text"}(a.StreamType||(a.StreamType={}));a.StreamType;!function(a){a[a.playReadySpecificData=0]="playReadySpecificData",a[a.widevineSpecificData=1]="widevineSpecificData",a[a.seaEncryptionSystemId=2]="seaEncryptionSystemId",a[a.seaKeyUri=3]="seaKeyUri",a[a.seaIV=4]="seaIV"}(a.ContentProtectionDataType||(a.ContentProtectionDataType={}));a.ContentProtectionDataType}(a.Presentation||(a.Presentation={}));a.Presentation}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";!function(a){a[a.closed=0]="closed",a[a.open=1]="open",a[a.ended=2]="ended"}(a.ReadyState||(a.ReadyState={}));a.ReadyState}(a.VideoElementAdapter||(a.VideoElementAdapter={}));a.VideoElementAdapter}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";!function(a){a[a.presentation=0]="presentation",a[a.media=1]="media",a[a.max=2]="max"}(a.Type||(a.Type={}));a.Type}(a.Workflow||(a.Workflow={}));a.Workflow}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="AdHandler"}return b.prototype.dispose=function(){},b.prototype.init=function(a){var b=a.workflows[0],c=a.workflows[1];b.addHandler(b.stepEvents.requestEnd,this.onParseScte35InMpd,this),c.addHandler(c.stepEvents.dataRetrieved,this.onGetMediaData,this)},b.prototype.onParseScte35InMpd=function(a){a.currentModuleId=this._moduleId;var b=this;return new Promise(function(c){var d=a.sessionContext.presentationJson;if(b._adSignaledInMpd=!1,d&&d.Period&&d.Period.EventStream_asArray){var e=[];d.Period.EventStream_asArray.forEach(function(a){var c=b.extractAdSignal(a);e=e.concat(c)}),e.length>0&&(b._adSignaledInMpd=!0,b.sendAdSignals(a.sessionContext,e))}c()})},b.prototype.onGetMediaData=function(c){c.currentModuleId=this._moduleId;var d=this;return new Promise(function(e){var f=c.urlsToRetrieve.findFirst(function(a){return 1===a.requestType});if(!f||!f.mediaData)throw new Error(f.url+": no media segment data found");if(c.sessionContext.commonPresentation.isLive){var g=new DataView(f.mediaData),h=a.Mp4Util.GetEmsgBoxes(g);if(h){var i=[];h.forEach(function(d){if(d.schemeIdUrl===b._schemeIdUriScte35||d.schemeIdUrl===b._schemeIdUriSimple){var e=(d.timescale*f.presTimeInSec+d.presentationTimeDelta+c.requestedStream.rawPresentationTimeOffset)/d.timescale;if(a.Log.verbose(15,"ADSIGNAL: id: "+d.id+", mediaRequest.presTimeInSec: "+f.presTimeInSec+", presentationTimeDelta: "+d.presentationTimeDelta+", rawPresentationTimeOffset: "+c.requestedStream.rawPresentationTimeOffset+", presentationTime = "+e*d.timescale),d.schemeIdUrl===b._schemeIdUriScte35&&d.messageData){for(var g=new DataView(d.messageData.buffer),h="",j=0;j<d.messageData.length;j+=2){var k=g.getUint16(j,!0);if(0==k)break;h+=String.fromCharCode(k)}d.presentationTimeDelta>0?i.push({scteSignal:{signalInString:h,presentationTimeOverride:e}}):a.Log.verbose(15,"ADSIGNAL: skipping this one.")}else d.presentationTimeDelta>0?i.push({simpleSignal:{id:d.id,presentationTime:e,duration:d.eventDuration/d.timescale}}):a.Log.verbose(15,"ADSIGNAL: skipping this one.")}}),i.length>0&&d.sendAdSignals(c.sessionContext,i)}}e()})},b.prototype.extractAdSignal=function(c){var d=[],e=c.timescale;return c.schemeIdUri===b._schemeIdUriScte35?c.Event_asArray.forEach(function(b){var c=b.__text;if(c){var f=b.presentationTime;f&&(f/=e),d.push({scteSignal:{signalInString:c,presentationTimeOverride:f}}),a.Log.verbose(15,"ADSIGNAL mpd: presentationTime: "+f)}}):c.schemeIdUri===b._schemeIdUriSimple&&c.Event_asArray.forEach(function(b){var c=b.presentationTime;c&&(c/=e);var f=b.duration/e,g=b.id;d.push({simpleSignal:{id:g,presentationTime:c,duration:f}}),a.Log.verbose(15,"ADSIGNAL mpd: id: "+g+", presentationTime: "+c+", duration: "+f)}),d},b.prototype.sendAdSignals=function(a,b){a.adManager.addAdSignals(b)},b._schemeIdUriScte35="urn:scte:scte35:2013a:bin",b._schemeIdUriSimple="urn:com:adobe:dpi:simple:2015",b}();b.AdHandler=c}(a.Ad||(a.Ad={}));a.Ad}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="AesHandler",this._disposed=!1,this._decryptor=new a.WebCryptoUtil.Decryptor}return b.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._decryptor&&(this._decryptor.dispose(),this._decryptor=null))},b.prototype.init=function(a){var b=a.workflows[0],c=a.workflows[1];b.addHandler(b.stepEvents.requestEnd,this.onDownloadKey,this),c.addHandler(c.stepEvents.dataRetrieved,this.onDecrypt,this)},b.prototype.onDownloadKey=function(c){var d=this;return c.currentModuleId=this._moduleId,new Promise(function(e,f){function g(){k<j.length?a.Util.setTimeout(h,0,j[k++]):e()}function h(d){if(i._disposed)return a.Failure.attachFailureToRequest(c,c.currentModuleId,0),void f();if(i._decryptor.isInitialized(d.streamingInfo.aes))return void g();var e=b._getAesContentProtectionIndex(d);if(isNaN(e))return void g();var h=d.contentProtections[e],k=h.data(3),l=h.data(4);if(!k||!l)return a.Failure.attachFailureToRequest(c,c.currentModuleId,5242883,"Missing IV or keyUrl"),void f();var m=i._findExistingAesInfo(j,d,k,l);if(m)return d.streamingInfo.aes=m,void g();var n=c.sessionContext.authenticationTokens[b._tokenId];if(!a.AesUtil.verifyKeyUrlWithToken(k,n))return a.Failure.attachFailureToRequest(c,c.currentModuleId,5242883,"verify AMS hostname failed"),void f();var o=[];n&&n.length>0&&(o[0]={name:a.HttpUtil.authorizationHeader,value:n});var p={maxRetries:c.sessionContext.httpRetryPolicySettings.maxRetriesForKeyAcquireFailure,maxWaitTimeBetweenRetriesMS:c.sessionContext.httpRetryPolicySettings.maxWaitTimeBetweenRetriesForKeyAcquireMS},q=Date.now();a.Log.verbose(12,"Starting AES key acquisition"),a.HttpUtil.httpRequestWithRetryConfig(k,"POST","arraybuffer",p,o).then(function(b){c.sessionContext.eventMgr.dispatchEvent(a.EventName.aesKeyFetchCompleted),i._decryptor.initialize(d.streamingInfo.aes,b,a.Common.hexStringToUint8Array(l)).then(function(){a.Log.verbose(12,"AES key acquisition in "+(Date.now()-q)+" ms"),c.sessionContext.eventMgr.dispatchEvent(a.EventName.decryptorInitialized,i._decryptor.type),g()},function(b){a.Log.error(12,"Failed to initialize decryptor: "),a.Failure.attachFailureToRequest(c,c.currentModuleId,5242882,"AES: "+b),f()})},function(b){a.Log.error(12,"Failed to download AES key url: "+k+", "+a.Common.toHexString(b.code)),a.Failure.attachFailureToRequest(c,c.currentModuleId,5242884,"Http: "+a.Common.toHexString(b.code)+", response: "+b.response),f()})}var i=d,j=c.sessionContext.commonPresentation.periods[0].streams,k=0;g()})},b.prototype.onDecrypt=function(b){var c=this;return b.currentModuleId=this._moduleId,new Promise(function(d,e){function f(){i<b.urlsToRetrieve.length?a.Util.setTimeout(g,0,b.urlsToRetrieve[i++]):d()}function g(c){if(h._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void e();if(!c.mediaData)return void f();var g=new DataView(c.mediaData),i=a.Mp4Util.GetBoxByType(g,"moof");i&&a.Log.error(12,"Found moof box in supposedly encrypted fragment: "+c.url);var k=Date.now();h._decryptor.decrypt(j,c.mediaData).then(function(d){var e=Date.now()-k;a.Log.verbose(12,"AES decrypt data in "+e+" ms, bytes: "+c.mediaData.byteLength+" url: "+c.url),c.mediaData=d;var g=a.StreamUtil.getBufferData(b);g.dispatchDownloadDecrypted(h._createMediaDecrypted(b,c,e)),b.sessionContext.decryptionTracker&&b.sessionContext.decryptionTracker.updateDecryptionSpeedInfo(c.mediaData.byteLength,e/1e3),f()},function(e){b.sessionContext.eventMgr.dispatchEvent(a.EventName.decryptionFailed,c.url);var f="Failed to AES decrypt url: "+c.url+" "+JSON.stringify(e);a.Log.error(12,f),b.state=2,b.failTracker.log(new a.Failure.Record(b.currentModuleId,5242885,f),b.selectedTrack),b.failTracker.noDataReceivedFailure=!1,b.retryWaitTimeMSec=0,d()})}var h=c,i=0,j=b.requestedStream.streamingInfo.aes;return h._decryptor.isInitialized(j)?void f():void d()})},b._getAesContentProtectionIndex=function(a){for(var c=a.contentProtections,d=0;d<c.length;d++){var e=c[d].data(2);if(e===b._aesCbc128SystemId)return d}return 0/0},b.prototype._findExistingAesInfo=function(a,b,c,d){for(var e=0;e<a.length;e++)if(a[e]!==b)for(var f=a[e].contentProtections,g=0;g<f.length;g++){var h=f[g].data(3),i=f[g].data(4);if(h===c&&i===d&&this._decryptor.isInitialized(a[e].streamingInfo.aes))return a[e].streamingInfo.aes}return null},b.prototype._createMediaDecrypted=function(b,c,d){var e=b.requestedStream.presentationTimeOffsetInSec,f=b.requestedStream.streamingInfo.currentSegment.segmentInfo,g=2===c.requestType?null:f.mediaTimestamp/f.timescale;return new a.Context.MediaDecrypted(c.url,b.selectedTrack.bitrate,g,c.mediaData,e,f.timescale,f.durationInSec,d)},b._aesCbc128SystemId="urn:mpeg:dash:sea:aes128-cbc:2013",b._tokenId="AES",b}();b.AesHandler=c}(a.ContentProtection||(a.ContentProtection={}));a.ContentProtection}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(b,c){this._bandwidthSettings=b,this._decryptionTracker=c,this._averageCalc=new a.Util.AverageCalculator(this._bandwidthSettings.minBandwidthHistoryCount,this._bandwidthSettings.maxBandwidthHistoryCount)}return Object.defineProperty(b.prototype,"averageBandwidthInKbps",{get:function(){return this._averageCalc.average},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"latestInKbps",{get:function(){return this._averageCalc.latest},enumerable:!0,configurable:!0}),b.prototype.perceivedBandwidth=function(){var a=1e3*this._averageCalc.average;return a*this._bandwidthSettings.bandwidthUsabilityPercent},b.prototype.updateBandwidthInfo=function(b,c,d,e){if(a.Log.verbose(5,"updateBandWidthInfo - analyzing bandwidth data: received size="+b.responseLengthInBytes+" bytes, download time="+b.downloadTimeMs+" ms, TOTAL download time="+b.totalDownloadTimeMs+" ms, "+(this._bandwidthSettings.useVariableFragmentSizeMode?"(default mode) ":"")+"bandwidth = "+b.bandwidth+" kbps"),b.responseLengthInBytes<this._bandwidthSettings.bandwidthDataSizeThresholdInBytes)return void a.Log.verbose(5,"Ignoring bandwidth data, retrieved size "+b.responseLengthInBytes+" is less than the limit "+this._bandwidthSettings.bandwidthDataSizeThresholdInBytes+" bytes");if((!c||this._bandwidthSettings.bandwidthTestWithTimeThresholdDuringLive)&&b.downloadTimeMs<this._bandwidthSettings.bandwidthEstimationMinMsec)return a.Log.verbose(5,"Ignoring bandwidth estimation, download time "+Math.floor(b.downloadTimeMs)+" ms is less than configured min "+this._bandwidthSettings.bandwidthEstimationMinMsec+" ms"),void this._averageCalc.dropOldestKeepAtLeastOne();if(b.bandwidth>this._bandwidthSettings.bandwidthEstimationMaxKbps)return a.Log.verbose(5,"Ignoring bandwidth estimation "+Math.floor(b.bandwidth)+" Kbps, greater than configured max "+this._bandwidthSettings.bandwidthEstimationMaxKbps+" Kbps"),void this._averageCalc.dropOldestKeepAtLeastOne();var f;if(this._bandwidthSettings.useVariableFragmentSizeMode){var g=e.requestedStream.streamingInfo.currentSegment?a.StreamUtil.getSegmentDuration(e):d.durationInSec,h=d.bitrate;if(isNaN(h)||0>=h||isNaN(g)||0>=g||b.responseLengthInBytes<=0)return void a.Log.verbose(5,"Ignoring bandwidth estimation, supplied bitrate: "+h+", supplied chunk duration: "+g+", downloaded fragment size: "+b.responseLengthInBytes);var i=h*g,j=b.totalDownloadTimeMs-b.downloadTimeMs,k=j+i/(8*b.responseLengthInBytes)*b.downloadTimeMs;f=i/k,a.Log.verbose(5,"updateBandWidthInfo - vfsMode On, vfs bandwidth="+f+"kbps")}else f=b.bandwidth;var l=b.totalDownloadTimeMs;this._averageCalc.addValue(f),a.Log.verbose(5,"updateBandWidthInfo -  currentBw: "+Math.floor(this._averageCalc.latest)+" Kbps averageBw: "+Math.floor(this._averageCalc.average)+" Kbps size: "+b.responseLengthInBytes+" bytes time-taken: "+l+" ms")},b.prototype.reportHeuristicsData=function(b,c){var d=this.perceivedBandwidth(),e=this._decryptionTracker?this._decryptionTracker.averageDecryptionSpeed:1/0;if(a.Log.verbose(5,"averageBW reporting: "+Math.round(d/1e3)+" Kbps decryptionBW: "+Math.round(e/1e3)+" Kbps, chunk duration: "+c),!c)throw new Error("reportHeuristicsData failed, invalid chunkDuration");for(var f=0;f<b.tracksData.length;f++)if(b.tracksData[f].selectable){var g=b.tracksData[f].trackInfo.bitrate*c;if(d){var h=g/d,i=e?g/e:0;b.tracksData[f].dataRetrieverEstimationInWallClockSec=h+i,a.Log.verbose(5,"Estimated time to download "+g+" bits = "+b.tracksData[f].dataRetrieverEstimationInWallClockSec+" s")}else b.tracksData[f].dataRetrieverEstimationInWallClockSec=1/0}},b}();b.BandwidthTracker=c;var d=function(){function b(){this.requestStartTimeInMS=(new Date).getTime(),this.responseStartTimeInMS=null,this.responseEndTimeInMS=null,this.responseLengthInBytes=0}return Object.defineProperty(b.prototype,"totalDownloadTimeMs",{get:function(){return a.assert(this.responseEndTimeInMS>=this.requestStartTimeInMS,"BandwidthInfo.totalDownloadTimeMs: unexpected values:"+this.responseEndTimeInMS+" should not be < "+this.requestStartTimeInMS),this.responseEndTimeInMS-this.requestStartTimeInMS||1},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"latencyTimeMs",{get:function(){return a.assert(this.responseStartTimeInMS>=this.requestStartTimeInMS,"BandwidthInfo.latencyTimeMs: unexpected values:"+this.responseStartTimeInMS+" should not be < "+this.requestStartTimeInMS),this.responseStartTimeInMS-this.requestStartTimeInMS||1},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"downloadTimeMs",{
get:function(){return a.assert(this.responseEndTimeInMS>=this.responseStartTimeInMS,"BandwidthInfo.downloadTimeMs: unexpected values:"+this.responseEndTimeInMS+" should not be < "+this.responseStartTimeInMS),this.responseEndTimeInMS-this.responseStartTimeInMS||1},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"bandwidth",{get:function(){return a.assert(this.totalDownloadTimeMs>0,"BandwidthInfo.bandwidth: unexpected value:"+this.totalDownloadTimeMs+" should be > 0"),8*this.responseLengthInBytes/this.totalDownloadTimeMs},enumerable:!0,configurable:!0}),b}();b.BandwidthInfo=d}(a.Heuristics||(a.Heuristics={}));a.Heuristics}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="playReady",this._disposed=!1,this._initial=!0}return b.prototype.dispose=function(){this._disposed=!0},b.prototype.init=function(a){var b=a.workflows[0];b.addHandler(b.stepEvents.requestEnd,this.onContentProtected,this)},b.prototype.onContentProtected=function(b){var c=this;return b.currentModuleId=this._moduleId,new Promise(function(d,e){var f=[],g=b.sessionContext.commonPresentation;if(c._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void e("Disposed");if(!c._initial)return void d();if(!g)throw new Error("CommonPresentation is empty");g.periods[0].streams.forEach(function(b){for(var c=0;c<b.contentProtections.length;c++){var d=b.contentProtections[c].data(0);if(d){var e=new a.Mp4Util.PsshBox;e.systemId=a.KeySystem.PlayReadyBase.systemId,e.specificData=a.Common.stringToUint8Array(atob(d)),f.push(e)}}}),f.length>0&&b.sessionContext.emeManager.addPsshBoxes(f),c._initial=!1,d()})},b}();b.PlayReady=c}(a.ContentProtection||(a.ContentProtection={}));a.ContentProtection}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="widevine",this._disposed=!1,this._initial=!0}return b.prototype.dispose=function(){this._disposed=!0},b.prototype.init=function(a){var b=a.workflows[0];b.addHandler(b.stepEvents.requestEnd,this.onContentProtected,this)},b.prototype.onContentProtected=function(b){var c=this;return b.currentModuleId=this._moduleId,new Promise(function(d,e){var f=[],g=b.sessionContext.commonPresentation;if(c._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void e("Disposed");if(!c._initial)return void d();if(!g)throw new Error("CommonPresentation is empty");g.periods[0].streams.forEach(function(c){for(var d=0;d<c.contentProtections.length;d++){var e=c.contentProtections[d].data(1);if(e){var g=a.Common.stringToUint8Array(atob(e)),h=new DataView(g.buffer),i=a.Mp4Util.GetPsshBoxes(h);if(1!=i.length)throw new Error("Each cenc:pssh element should contain a 'pssh' box");f.push(i[0])}c.contentProtections[d].laUrl&&b.sessionContext.emeManager.addLaUrl(a.KeySystem.Widevine.systemId,c.contentProtections[d].laUrl)}}),f.length>0&&b.sessionContext.emeManager.addPsshBoxes(f),c._initial=!1,d()})},b}();b.Widevine=c}(a.ContentProtection||(a.ContentProtection={}));a.ContentProtection}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="DashMediaSegmentParser"}return b.prototype.dispose=function(){},b.prototype.init=function(a){var b=a.workflows[1];b.addHandler(b.stepEvents.dataRetrieved,this.onGetData,this)},b.prototype.onGetData=function(b){function c(b){var c=b.urlsToRetrieve.findFirst(function(a){return 1===a.requestType});if(c&&c.mediaData){var d=new DataView(c.mediaData),e=a.Mp4Util.GetEmsgBoxes(d);e&&e.length>0&&b.sessionContext.eventMgr.dispatchEvent(a.EventName.emsgAvailable,null,e)}}function e(){var c,e,g,h,i,j,k,l,m;m=b.requestedStream.streamingInfo.currentSegment;var n=b.urlsToRetrieve.findFirst(function(a){return 1===a.requestType});if(!n||!n.mediaData)throw new Error(n.url+": no media segment data found");if(c=new DataView(n.mediaData),k=0,e=a.Mp4Util.GetMp4Boxes(c,"moof"),null==e||0==e.length)return new d(4194306,"moof not found");l=1==e.length?!0:!1;for(var o in e){var p=e[o];if(g=a.Mp4Util.GetBoxByType(p.data,"traf"),!g)return new d(4194306,"traf not found");if(h=a.Mp4Util.GetTfhdBox(g.data),!h)return new d(4194306,"tfhd not found");if(i=a.Mp4Util.GetTrunBox(g.data),!i)return new d(4194306,"trun not found");if(j=a.Mp4Util.GetTfdtBox(g.data),!j)return new d(4194306,"tfdt not found");if(l&&a.Common.diffTimes(j.baseMediaDecodeTime,m.segmentInfo.mediaTimestamp))throw new Error("Segment mismatch, requested: "+m.segmentInfo.mediaTimestamp+" got: "+j.baseMediaDecodeTime);k+=f(h,i)}if(0===k)return new d(4194308,"failed to derive segment duration");a.Log.verbose(10,"Segment duration: "+k);var q=b.requestedStream.segments.updateSegmentDuration(m.segmentInfo.presTimeInSec,k);return q?(m.segmentInfo.mediaDuration=k,n.durationInSec=m.segmentInfo.durationInSec,null):new d(4194308,"failed to update segment duration in container")}function f(b,c){var d=0;return c.flags&a.Mp4Util.TrunBox.flags_sampleDurationPresent?c.sampleInfoArray.forEach(function(a){d+=a.sampleDuration}):b.defaultSampleDuration?d=b.defaultSampleDuration*c.sampleCount:a.Log.warning(10,"Cannot calculate chunk duration from 'tfhd' and 'trun'"),d}function g(){var c=b.requestedStream,d=c.streamingInfo.currentSegment,e=d.segmentInfo,f=c.segments;e.mediaDuration&&f.addMediaSegmentInfo(e.index+1,a.Timestamp.add(e.mediaTimestampStr,e.mediaDuration),0/0,e.presentationOffset,e.timescale)}return b.currentModuleId=this._moduleId,new Promise(function(d,f){c(b);var h;if(h=b.requestedStream.streamingInfo.currentSegment,!b.sessionContext.commonPresentation.isLive||b.sessionContext.commonPresentation.minimumUpdatePeriodInSec||h.next)return void d();if(!h.segmentInfo.mediaDuration){var i=e();if(i)return a.Failure.attachFailureToRequest(b,b.currentModuleId,i.errorCode,i.message),void f()}g(),d()})},b}();b.Parser=c;var d=function(){function a(a,b){this.errorCode=a,this.message=b}return a}()}(a.DashMediaSegment||(a.DashMediaSegment={}));a.DashMediaSegment}(AzureHtml5JS||(AzureHtml5JS={}));var __extends=this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);c.prototype=b.prototype,a.prototype=new c},AzureHtml5JS;!function(a){!function(b){"use strict";function c(a){var b;if(!("schemeIdUri"in a))throw new Error("ContentProtection missing @schemeIdUri");return b=a.schemeIdUri,b.toLowerCase()===k.schemeIdUri?new k(a):b.toLowerCase()===l.schemeIdUri?new l(a):b.toLowerCase()===m.schemeIdUri?new m(a):new n(a)}var d=function(){function b(){this._moduleId="DashPresentationParser"}return b.prototype.dispose=function(){},b.prototype.init=function(a){var b=a.workflows[0];b.addHandler(b.stepEvents.dataRetrieved,this.onParse,this)},b.prototype.onParse=function(c){return c.currentModuleId=this._moduleId,new Promise(function(d,f){var g,h,i;if(!c.urlsToRetrieve[0].presentationData)throw new Error(c.urlsToRetrieve[0].url+": no presentation data found");g=c.sessionContext;var j=b._getPublishTime(c.urlsToRetrieve[0].presentationData);if(j&&g.commonPresentation&&g.commonPresentation.publishTime&&g.commonPresentation.publishTime.getTime()>=Date.parse(j))return a.Log.verbose(4,"skipping MPD parse, not newer than last parsed: "+c.urlsToRetrieve[0].url),void d();if(h=b._getBaseURL(g.presentationUrl),i=new e(c.urlsToRetrieve[0].presentationData,h),!i||!i.periods)return a.Failure.attachFailureToRequest(c,c.currentModuleId,4194305,c.urlsToRetrieve[0].url+": failed to generate DASH presentation"),void f("failed to generate DASH presentation");if(!b._validPresentation(i))return a.Failure.attachFailureToRequest(c,c.currentModuleId,4194307,c.urlsToRetrieve[0].url+": unsupported presentation"),void f("unsupported presentation");for(var k=i.periods[0].streams,l=0;l<i.periods[0].streams.length;l++)2!==k[l].type||k[l].segments||(k.splice(l,1),a.Log.warning(4,"Text stream "+l+" has empty segments.  Ignoring the text stream."));var m=i.isLive,n=m&&null!==i.periods[0].streams.findFirst(function(a){return(0===a.type||1===a.type)&&!a.segments});return g.updatePresentation(i),a.Log.verbose(4,"MPD updated. Streaming type: "+(m?"Live":"VOD")),n?(a.Failure.attachFailureToRequest(c,c.currentModuleId,4194309,c.urlsToRetrieve[0].url+": no chunks in the live manifest"),void f("no chunks in this presentation")):void d()})},b._removeAudioOrVideoTracks=function(a,b){var c;do c=a.periods[0].streams.findIndexOf(function(a){return a.type===b}),-1!==c&&a.periods[0].streams.splice(c,1);while(-1!==c);return a},b._validPresentation=function(b){if(0===b.periods.length||b.periods.length>1)return a.Log.error(4,"invalid period count: "+(b.periods?b.periods.length.toString():"undefined")),!1;if(!b.periods[0].streams)return a.Log.error(4,"no streams found"),!1;for(var c=0;c<b.periods[0].streams.length;c++)a.Log.verbose(4,"Stream: "+b.periods[0].streams[c].codec);return!0},b._getPublishTime=function(a){var b,c,d="";return a&&(b=a.match(/<MPD[^>]*>/i),b&&b.length>0&&(c=b[0].match(/publishTime="[^"]*/i),c&&c.length>0&&(d=c[0].slice(13)))),d},b._getBaseURL=function(a){var b,c=a;if(b=c.indexOf("?"),-1!==b&&(c=c.slice(0,b)),b=c.lastIndexOf("/"),-1===b)throw new Error(a+": could not derive base URL");return c=c.slice(0,b+1)},b}();b.Parser=d;var e=function(){function b(a,b){var c,d=this,e=[];if(this._lastRetrievalTime=new Date,c=Dash.dependencies.DashParser(),c.debug=new p,c.errHandler=new q,this._manifest=c.parse(a,b),this._manifest){if("Period_asArray"in this._manifest&&this._manifest.Period_asArray.length>0&&this._manifest.Period_asArray.forEach(function(a){e.push(new f(a,d.publishTime,d.isLive))}),this._periods=e,e.length>1)throw new Error("Error parsing MPD: multiple periods not supported");"dynamic"===this._manifest.type&&0===this._manifest.minimumUpdatePeriod&&(this._timeShiftTracker=new o(e,this._manifest.timeShiftBufferDepth))}}return Object.defineProperty(b.prototype,"segmentBoundaries",{get:function(){var a=[];if(this.periods&&this.periods.length>0&&this.periods[0].streams&&this.periods[0].streams.length>0)for(var b=0;b<this.periods[0].streams.length;b++)if(0===this.periods[0].streams[b].type&&this.periods[0].streams[b].segments){for(var c=this.periods[0].streams[b].segments.first;c;)a.push(c.segmentInfo.presTimeInSec),c=c.next;break}return a},enumerable:!0,configurable:!0}),b.prototype.dispose=function(){this._periods&&(this._periods.forEach(function(a){a.dispose()}),this._periods=[]),this._manifest=null,this._lastRetrievalTime=null},Object.defineProperty(b.prototype,"startTime",{get:function(){var a=null;return"availabilityStartTime"in this._manifest&&(a=new Date(this._manifest.availabilityStartTime)),a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"publishTime",{get:function(){var a;return a="publishTime"in this._manifest?new Date(this._manifest.publishTime):this._lastRetrievalTime},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"isLive",{get:function(){return"dynamic"===this._manifest.type},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"minimumUpdatePeriodInSec",{get:function(){return this._manifest.minimumUpdatePeriod},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"durationInSec",{get:function(){var a=0;return"mediaPresentationDuration"in this._manifest&&(a=this._manifest.mediaPresentationDuration),a},enumerable:!0,configurable:!0}),b.prototype.getWallClockTimeAtPresentationTime=function(a){var b=null;if(this._periods&&this._periods.length>0&&this._periods[0].streams&&this._periods[0].streams.length>0&&this._periods[0].streams[0].segments&&this._periods[0].streams[0].segments.first&&this._periods[0].streams[0].producerReferenceTime){var c=this._periods[0].streams[0],d=c.segments.first.segmentInfo.timescale,e=0;if(this.isLive){var f=c.producerReferenceTime.presentationTime/d,g=c.rawPresentationTimeOffset/d;e=a+g-f}else{var h=c.segments.first.segmentInfo.presTimeInSec;e=a-h}var i=c.producerReferenceTime.wallClockTime,b=new Date(i.getTime()+1e3*e)}return b},Object.defineProperty(b.prototype,"timeShiftBufferDepth",{get:function(){return this._manifest.timeShiftBufferDepth},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"playableWindow",{get:function(){return new a.Common.TimeRange(this._playWindowLeftEdge(),this._playWindowLiveEdge())},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"maxSegmentDuration",{get:function(){var a=0;return this._periods.forEach(function(b){a=Math.max(a,b.maxSegmentDuration)}),a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"periods",{get:function(){return this._periods},enumerable:!0,configurable:!0}),b.prototype.toJson=function(){return this._manifest},b.prototype.transferPresentationState=function(b){var c=b,d=[],e=[];this._manifest=c._manifest,this._lastRetrievalTime=c._lastRetrievalTime,this._timeShiftTracker=c._timeShiftTracker,this.periods.forEach(function(a){d.push(a)}),c.periods.forEach(function(a){e.push(a)});for(var f=0;f<e.length;f++)for(var g=0;g<d.length;g++)if(d[g]&&e[f].startInSec===d[g].startInSec){d[g].transferPeriodState(e[f]),e[f]=null,d[g]=null;break}d=d.filter(function(a){return!!a}),e=e.filter(function(a){return!!a}),d.length>0&&a.Log.verbose(4,"Periods removed from MPD: "+d.length),e.length>0&&a.Log.verbose(4,"Periods added to MPD: "+e.length)},b.prototype.adjustPlayableWindow=function(a){this._timeShiftTracker&&this._timeShiftTracker.adjust(a)},b.prototype.adjustPlayableWindowForChromeSourceDelay=function(a){this._timeShiftTracker&&this._timeShiftTracker.adjustForChromeSourceDelay(a)},b.prototype._playWindowLeftEdge=function(){var a,b=0;return this._timeShiftTracker?this._timeShiftTracker.leftEdge:this._periods&&this._periods.length?(a=this._periods[0].streams,a&&a.length?(a.forEach(function(a){2!==a.type&&a.segments&&a.segments.first&&(b=Math.max(b,a.segments.first.segmentInfo.presTimeInSec))}),b):0):0},b.prototype._playWindowLiveEdge=function(){var a,b=1/0;return this._timeShiftTracker?this._timeShiftTracker.liveEdge:this._periods&&this._periods.length?(a=this._periods[0].streams,a&&a.length?(a.forEach(function(a){if(2!==a.type&&a.segments&&a.segments.last){var c=a.segments.last.segmentInfo;b=Math.min(b,c.presTimeInSec+(c.durationInSec||0))}}),b):0):0},b}();b.Mpd=e;var f=function(){function b(a,b,c){var d=this,e=[];this.startInSec="start"in a?a.start:0,"AdaptationSet_asArray"in a&&a.AdaptationSet_asArray.length>0&&a.AdaptationSet_asArray.forEach(function(a){e.push(new g(a,b,c,d.startInSec))}),this._streams=e}return Object.defineProperty(b.prototype,"streams",{get:function(){return this._streams},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"maxSegmentDuration",{get:function(){var a=0;return this._streams.forEach(function(b){a=Math.max(a,b.maxSegmentDuration)}),a},enumerable:!0,configurable:!0}),b.prototype.dispose=function(){this._streams&&(this._streams.forEach(function(a){a.dispose()}),this._streams=[])},b.prototype.transferPeriodState=function(b){var c=[],d=[];this.streams.forEach(function(a){c.push(a)}),b.streams.forEach(function(a){d.push(a)});for(var e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(c[f]&&d[e].id===c[f].id){c[f].transferStreamState(d[e]),d[e]=null,c[f]=null;break}c=c.filter(function(a){return!!a}),d=d.filter(function(a){return!!a}),c.length>0&&a.Log.verbose(4,"Adaptation Sets removed from period: "+c.length),d.length>0&&a.Log.verbose(4,"Adaptation Sets added to period: "+d.length)},b}();b.Period=f;var g=function(){function b(b,d,e,f){var g=[],j=[];if(this._adaptationSet=b,this.streamingInfo=new a.Presentation.MediaStreamStreamingInfo,"SegmentTemplate"in b&&(this._segmentTemplate=b.SegmentTemplate,"SegmentTimeline"in this._segmentTemplate)){var k,l,m,n;if(k=this._segmentTemplate.SegmentTimeline,l=this._segmentTemplate.timescale?this._segmentTemplate.timescale:1,m=f*l,this._rawPresentationTimeOffset=this._segmentTemplate.presentationTimeOffset?this._segmentTemplate.presentationTimeOffset:0,m-=this._rawPresentationTimeOffset,this._normalizedPtoInSec=m/l,n=new a.Presentation.MediaSegmentInfoContainer(l,m,d,e),"S_asArray"in k){var o,p="0";o=this._segmentTemplate.startNumber?this._segmentTemplate.startNumber:0;for(var q=0;q<k.S_asArray.length;q++){var r,s,t,u;r=k.S_asArray[q],s="t"in r?r.t_str:p,t="r"in r?r.r:0,u=new a.Presentation.SegmentRunEntry(o,s,r.d,m,l,t);var v=n.addMediaSegmentRun(u);o+=v,p=a.Timestamp.add(s,r.d*v)}this.segments=n}}"Representation"in b&&b.Representation_asArray.forEach(function(a){g.push(new h(a))}),this._tracks=g.sort(function(a,b){return a.bitrate-b.bitrate}),"ContentProtection"in b&&b.ContentProtection_asArray.forEach(function(a){j.push(c(a))}),this._contentProtections=j,"ProducerReferenceTime"in b&&(this._producerReferenceTime=new i(b.ProducerReferenceTime))}return b.prototype.dispose=function(){this._tracks&&(this._tracks.forEach(function(a){a.dispose()}),this._tracks=[]),this._contentProtections&&(this._contentProtections.forEach(function(a){a.dispose()}),this._contentProtections=[]),this.segments&&(this.segments.dispose(),this.segments=null),this.streamingInfo&&(this.streamingInfo.dispose(),this.streamingInfo=null),this._adaptationSet=null,this._segmentTemplate=null},Object.defineProperty(b.prototype,"codec",{get:function(){function a(){var a=b.codecs;if(!a)for(var c=0;c<b.Representation_asArray.length;c++)if(b.Representation_asArray[c].codecs){a=b.Representation_asArray[c].codecs;break}return a}var b=this._adaptationSet;return b.mimeType+';codecs="'+a()+'"'},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"type",{get:function(){var b;switch(this._adaptationSet.contentType){case"video":b=0;break;case"audio":b=1;break;case"text":b=2;break;default:a.Log.error(4,"Stream type not supported: "+this._adaptationSet.contentType)}return b},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"id",{get:function(){var a=null;return"id"in this._adaptationSet?a=this._adaptationSet.id.toString():(a=this._adaptationSet.codecs,"lang"in this._adaptationSet&&(a+=this._adaptationSet.lang)),a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"language",{get:function(){var a=null;return"lang"in this._adaptationSet&&(a=this._adaptationSet.lang),a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"initUrlTemplate",{get:function(){var a=null;return"initialization"in this._segmentTemplate&&(a=this._adaptationSet.BaseURL+this._segmentTemplate.initialization),a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"mediaUrlTemplate",{get:function(){var a=null;return"media"in this._segmentTemplate&&(a=this._adaptationSet.BaseURL+this._segmentTemplate.media),a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"presentationTimeOffsetInSec",{get:function(){return this._normalizedPtoInSec},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"rawPresentationTimeOffset",{get:function(){return this._rawPresentationTimeOffset},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"tracks",{get:function(){return this._tracks},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"contentProtections",{get:function(){return this._contentProtections},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"producerReferenceTime",{get:function(){return this._producerReferenceTime},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"maxSegmentDuration",{get:function(){return this.segments.maxSegmentDuration},enumerable:!0,configurable:!0}),b.prototype.transferStreamState=function(b){var c=[],d=[];this.tracks.forEach(function(a){c.push(a)}),b.tracks.forEach(function(a){d.push(a)});for(var e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(c[f]&&d[e].id===c[f].id){d[e]=null,c[f]=null;break}c=c.filter(function(a){return!!a}),d=d.filter(function(a){return!!a}),c.length>0&&a.Log.verbose(4,"Representations removed from MPD: "+c.length),d.length>0&&a.Log.verbose(4,"Representations added to MPD: "+d.length),this.segments.update(b.segments)},b}();b.AdaptationSet=g;var h=function(){function b(b){if(!("id"in b))throw new Error("Representation missing @id");if(this._id=b.id,!("bandwidth"in b))throw new Error("Representation missing @bandwidth");this._bitrate=b.bandwidth,this._height=b.height,this._width=b.width,this._codecs=b.codecs,this.streamingInfo=new a.Presentation.MediaTrackStreamingInfo}return Object.defineProperty(b.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"bitrate",{get:function(){return this._bitrate},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"codecs",{get:function(){return this._codecs},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"selectable",{get:function(){return this.streamingInfo.selectable},enumerable:!0,configurable:!0}),b.prototype.dispose=function(){},b}();b.Representation=h;var i=function(){function a(a){if(!("id"in a))throw new Error("ProducerReferenceTime missing @id");if(this._id=a.id,!("presentationTime"in a))throw new Error("ProducerReferenceTime missing @presentationTime");if(this._presentationTime=a.presentationTime,!("type"in a))throw new Error("ProducerReferenceTime missing @type");if(this._type=a.type,!("wallClockTime"in a))throw new Error("ProducerReferenceTime missing @wallClockTime");this._wallClockTime=a.wallClockTime}return Object.defineProperty(a.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"presentationTime",{get:function(){return this._presentationTime},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"wallClockTime",{get:function(){return this._wallClockTime},enumerable:!0,configurable:!0}),a.prototype.dispose=function(){},a}();b.ProducerReferenceTime=i;var j=function(){function a(a){if(!("schemeIdUri"in a))throw new Error("ContentProtection missing @schemeIdUri");this.schemeIdUri=a.schemeIdUri,"value_str"in a?this._value=a.value_str:"value"in a&&(this._value=a.value),"id"in a&&(this._id=a.id)}return Object.defineProperty(a.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),a.prototype.dispose=function(){},a}();b.BaseContentProtection=j;var k=function(a){function b(b){a.call(this,b),"pro"in b&&(this._specificData=b.pro.__text)}return __extends(b,a),b.prototype.data=function(a){return 0===a?this._specificData:null},b.prototype.dispose=function(){},b.schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",b}(j);b.PlayReadyContentProtection=k;var l=function(a){function b(b){a.call(this,b),"pssh"in b&&(this._specificData=b.pssh.__text),"laurl"in b&&(this._laUrl=b.laurl.licenseUrl)}return __extends(b,a),Object.defineProperty(b.prototype,"laUrl",{get:function(){return this._laUrl},enumerable:!0,configurable:!0}),b.prototype.data=function(a){return 1===a?this._specificData:null},b.prototype.dispose=function(){},b.schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",b}(j);b.WidevineContentProtection=l;var m=function(a){function b(b){if(a.call(this,b),"SegmentEncryption"in b&&(this._seaEncryptionSystemId=b.SegmentEncryption.schemeIdUri,"CryptoPeriod"in b)){var c=b.CryptoPeriod;"keyUriTemplate"in c&&(this._keyUri=c.keyUriTemplate),"IV"in c&&(this._iv=c.IV)}}return __extends(b,a),b.prototype.data=function(a){switch(a){case 2:return this._seaEncryptionSystemId;case 3:return this._keyUri;case 4:return this._iv;default:return null}},b.prototype.dispose=function(){},b.schemeIdUri="urn:mpeg:dash:sea:2012",b}(j);b.SegmentEncryptionContentProtection=m;var n=function(a){function b(b){a.call(this,b)}return __extends(b,a),b.prototype.data=function(){return null},b.prototype.dispose=function(){},b}(j);b.GenericContentProtection=n;var o=function(){function b(b,c){var d,e=0,f=1/0;b.length&&(d=b[0].streams,d&&d.length&&(d.forEach(function(a){2!==a.type&&a.segments&&a.segments.first&&a.segments.last&&(e=Math.max(e,a.segments.first.segmentInfo.presTimeInSec),f=Math.min(f,a.segments.last.segmentInfo.presTimeInSec+a.segments.last.segmentInfo.durationInSec))}),a.Log.verbose(4,"TimeShiftBufferTracker: leftEdge: "+e+" liveEdge: "+f+" duration: "+(f-e)),this._dvrWindowLenInSec=c?c:1/0,this._leftEdgeReferenceInPresentation=e,this._liveEdgeReferenceInPresentation=f,this._liveEdgeReferenceLocalTime=Date.now()))}return Object.defineProperty(b.prototype,"liveEdge",{get:function(){var a=(Date.now()-this._liveEdgeReferenceLocalTime)/1e3;return this._liveEdgeReferenceInPresentation+a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"leftEdge",{get:function(){var a=(Date.now()-this._liveEdgeReferenceLocalTime)/1e3,b=this._liveEdgeReferenceInPresentation+a;return b-this._leftEdgeReferenceInPresentation<this._dvrWindowLenInSec?this._leftEdgeReferenceInPresentation:b-this._dvrWindowLenInSec},enumerable:!0,configurable:!0}),b.prototype.adjust=function(b){var c=this._liveEdgeReferenceInPresentation+b;return 0>=c?void a.Log.warning(4,"TimeShiftBufferTracker error, ignoring invalid adjustment: "+b):(a.Log.verbose(4,"Adjusting TimeShiftBufferTracker: "+b),void(this._liveEdgeReferenceInPresentation=c))},b.prototype.adjustForChromeSourceDelay=function(b){this._liveEdgeReferenceLocalTime=b,a.Log.verbose(4,"Adjusting TimeShiftBufferTracker: _liveEdgeReferenceLocalTime to "+b)},b}(),p=function(){function b(){this.log=function(b){a.Log.verbose(4,b)}}return b}(),q=function(){function b(){this.manifestError=function(b){a.Log.error(4,b)}}return b}()}(a.DashPresentation||(a.DashPresentation={}));a.DashPresentation}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="DashUrlFormatter"}return b.prototype.init=function(a){var b=a.workflows[1];b.addHandler(b.stepEvents.requestSend,this.onUrlFormat,this)},b.prototype.dispose=function(){},b.prototype.onUrlFormat=function(b){return b.currentModuleId=this._moduleId,new Promise(function(c){if(!b.selectedTrack)throw new Error("Selected Track not set");var d=b.requestedStream.id;if(!d)throw new Error("stream id not set");var e=b.selectedTrack.bitrate;if(null===e||void 0===e)throw new Error("incorrect bitrate");var f=b.requestedStream.streamingInfo.currentSegment;if(!f)throw new Error("current segment not selected.");var g=f.segmentInfo.presTimeInSec;if(b.requestedStream.streamingInfo.fetchInitSegment){var h=b.requestedStream.initUrlTemplate;if(!h)throw new Error("initialization url template is not set for the stream");var i=a.Util.UrlFormatter.FormatDashInitUrl(h,e.toString(),b.sessionContext.presentationQueryStr);b.requestedStream.streamingInfo.fetchInitSegment=!1;var j=new a.Context.UrlRequest(i,2,0,d,e,g);b.urlsToRetrieve.push(j)}var k=b.requestedStream.mediaUrlTemplate;if(!k)throw new Error("media url template is not set for the stream");var l=f.segmentInfo.mediaTimestampStr,m=a.Util.UrlFormatter.FormatDashMediaUrl(k,e.toString(),l,b.sessionContext.presentationQueryStr);b.urlsToRetrieve.push(new a.Context.UrlRequest(m,1,0,d,e,g,f.segmentInfo.durationInSec)),c()})},b}();b.DashUrlFormatter=c}(a.UrlBuilder||(a.UrlBuilder={}));a.UrlBuilder}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._averageCalc=new a.Util.AverageCalculator(0,b._maxHistoryCount)}return Object.defineProperty(b.prototype,"averageDecryptionSpeed",{get:function(){return this._averageCalc.average},enumerable:!0,configurable:!0}),b.prototype.updateDecryptionSpeedInfo=function(a,b){var c=8*a/b;this._averageCalc.addValue(c)},b._maxHistoryCount=3,b}();b.DecryptionTracker=c}(a.Heuristics||(a.Heuristics={}));a.Heuristics}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="heuristics.Engine",this._disposed=!1}return b.prototype.dispose=function(){this._disposed=!0},b.prototype.init=function(a){var b=a.workflows[1];b.addHandler(b.stepEvents.requestSend,this.onGetIndex,this)},b.prototype.onGetIndex=function(b){function c(){b.selectedTrack!==b.requestedStream.streamingInfo.lastDownloadedTrack&&(b.requestedStream.streamingInfo.fetchInitSegment=!0)}function d(c){var d=b.heuristicData.tracksData;if(!c)throw new Error("findHighestTrack failed, invalid timeEstimationThresholdInSec");a.Log.verbose(8,"Time we have for fragment download: "+c+"s");for(var e=d.length-1;e>=0;e--)if(d[e].selectable&&d[e].dataRetrieverEstimationInWallClockSec*b.sessionContext.playbackRate()<c)return d[e].trackInfo;return null}function e(){for(var a=b.heuristicData.tracksData,c=1/0,d=a.length-1;d>=0;d--){var e=a[d];e.selectable&&(c=Math.min(c,e.dataRetrieverEstimationInWallClockSec))}return c}function f(a){for(var c=b.heuristicData.tracksData,d=null,e=c.length-1;e>=0;e--){var f=c[e];f.selectable&&f.trackInfo.bitrate>a&&(!d||f.trackInfo.bitrate<d.bitrate)&&(d=f.trackInfo)}return d}var g=this;a.Log.verbose(8,"OnGetIndex"),b.currentModuleId=this._moduleId;return new Promise(function(h,i){function j(){c(),h()}if(g._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void i("object is already disposed.");if(b.selectedTrack)return void j();if(0!==b.requestedStream.type)return b.selectedTrack=b.requestedStream.tracks[0],void j();var k=b.heuristicData.tracksData.findFirst(function(a){return a.selectable===!0});if(!k)return b.selectedTrack=b.heuristicData.tracksData[0].trackInfo,void j();b.selectedTrack=k.trackInfo;var l=b.requestedStream.streamingInfo.sourceBuffer.getBufferedAheadOfCurrentTimeInSec(),m=5*b.sessionContext.playbackRate();if(!b.requestedStream.streamingInfo.currentSegment)return void j();m=a.StreamUtil.getSegmentDuration(b);var n=b.sessionContext.maxBufferInSec()*b.sessionContext.heuristicSettings.vodStableBufferLevelPercent,o=b.sessionContext.maxBufferInSec()*b.sessionContext.heuristicSettings.vodDowngradeBufferLevelPercent;o>l&&!b.sessionContext.videoTag.paused&&(m*=b.sessionContext.heuristicSettings.belowDowngradeBufferLevelDownloadTimeFactor);var p=d(m);!p&&e()===1/0&&b.requestedStream.streamingInfo.lastDownloadedTrack&&(p=f(b.requestedStream.streamingInfo.lastDownloadedTrack.bitrate)),(!p||l>n&&p.bitrate<b.requestedStream.streamingInfo.lastDownloadedTrack.bitrate)&&b.heuristicData.tracksData.findFirst(function(a){return a.trackInfo===b.requestedStream.streamingInfo.lastDownloadedTrack&&a.selectable})&&(p=b.requestedStream.streamingInfo.lastDownloadedTrack),p&&(a.Log.verbose(8,"Selected bitrate: "+p.bitrate),b.selectedTrack=p),j()})},b}();b.Engine=c}(a.Heuristics||(a.Heuristics={}));a.Heuristics}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="stepRule",this._disposed=!1,this._currentTrackSegmentCount=0,this._previousTrackSelected=null,this._currentSelectedVideoStream=null}return b.prototype.dispose=function(){this._disposed=!0,this._previousTrackSelected=null,this._currentSelectedVideoStream=null},b.prototype.init=function(a){var b=a.workflows[1];b.addHandler(b.stepEvents.requestBegin,this.onRunStepRule,this)},b.prototype.onRunStepRule=function(b){var c=this;a.Log.verbose(8,"onRunStepRule"),b.currentModuleId=this._moduleId;var d=this;return new Promise(function(e,f){if(d._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void f("object is already disposed.");if(b.selectedTrack||null===b.requestedStream.streamingInfo.lastDownloadedTrack||0!==b.requestedStream.type)return void e();b.requestedStream!==c._currentSelectedVideoStream&&(d._currentSelectedVideoStream=b.requestedStream,
d._previousTrackSelected=null),b.requestedStream.streamingInfo.lastDownloadedTrack===d._previousTrackSelected?d._currentTrackSegmentCount++:(d._previousTrackSelected=b.requestedStream.streamingInfo.lastDownloadedTrack,d._currentTrackSegmentCount=1);var g=d._currentTrackSegmentCount>=b.sessionContext.heuristicSettings.stepRule.minSegmentsBeforeDowngrade,h=d._currentTrackSegmentCount>=b.sessionContext.heuristicSettings.stepRule.minSegmentsBeforeUpgrade,i=b.requestedStream.tracks.indexOf(d._previousTrackSelected),j=i,k=i;g&&b.sessionContext.heuristicSettings.stepRule.maxStepDownInQuality>0&&(j=Math.max(0,i-b.sessionContext.heuristicSettings.stepRule.maxStepDownInQuality)),h&&b.sessionContext.heuristicSettings.stepRule.maxStepUpInQuality>0&&(k=Math.min(b.heuristicData.tracksData.length-1,i+b.sessionContext.heuristicSettings.stepRule.maxStepUpInQuality));for(var l=0;l<b.heuristicData.tracksData.length;l++)(l>k||j>l)&&(b.heuristicData.tracksData[l].selectable=!1);e()})},b}();b.StepRule=c}(a.Heuristics||(a.Heuristics={}));a.Heuristics}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="windowSizeRule",this._disposed=!1,this._windowHeight=0,this._windowWidth=0,this._highestTrackIndexAllowed=0,this._currentSelectedVideoStream=null}return b.prototype.dispose=function(){this._disposed=!0,this._currentSelectedVideoStream=null},b.prototype.init=function(a){var b=a.workflows[1];b.addHandler(b.stepEvents.requestBegin,this.onRunWindowSizeRule,this)},b.prototype.onRunWindowSizeRule=function(b){a.Log.verbose(8,"onRunWindowSizeRule"),b.currentModuleId=this._moduleId;var c=!1,d=this;return new Promise(function(e,f){if(d._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void f("object is already disposed.");if(b.selectedTrack||!b.sessionContext.heuristicSettings.windowSizeHeuristicsEnabled||0!==b.requestedStream.type)return void e();b.requestedStream!==d._currentSelectedVideoStream&&(d._currentSelectedVideoStream=b.requestedStream,d._highestTrackIndexAllowed=0);var g,h;if(b.sessionContext.heuristicSettings.useBrowserWindowForWindowSizeRule?(g=window.innerWidth,h=window.innerHeight):(g=Math.max(b.sessionContext.videoTag.scrollWidth,b.sessionContext.videoTag.width),h=Math.max(b.sessionContext.videoTag.scrollHeight,b.sessionContext.videoTag.height)),0===h||0===g)return a.Log.warning(8,"Ignoring window size heuristic rule, as one of the window dimensions is 0."),void e();(d._windowWidth!==g||d._windowHeight!==h)&&((d._windowWidth<g||d._windowHeight<h)&&(a.Common.isChrome||a.Common.isChromiumEdge||(c=!0)),d._windowWidth=g,d._windowHeight=h,d._highestTrackIndexAllowed=0);for(var i=b.heuristicData.tracksData,j=!1,k=0,l=0,m=d._highestTrackIndexAllowed;m<i.length;m++)i[m].selectable&&i[m].trackInfo.width>g&&i[m].trackInfo.height>h&&(j?i[m].trackInfo.width==k&&i[m].trackInfo.height==l?d._highestTrackIndexAllowed=m:i[m].selectable=!1:(j=!0,d._highestTrackIndexAllowed=m,k=i[m].trackInfo.width,l=i[m].trackInfo.height));j||(d._highestTrackIndexAllowed=i.length-1),c&&b.requestedStream.streamingInfo.lastDownloadedTrack&&i[d._highestTrackIndexAllowed].trackInfo.bitrate>b.requestedStream.streamingInfo.lastDownloadedTrack.bitrate&&b.sessionContext.eventMgr.dispatchEvent(a.InternalEventName.flushvideo),e()})},b}();b.WindowSizeRule=c}(a.Heuristics||(a.Heuristics={}));a.Heuristics}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c;!function(a){a[a.success=200]="success",a[a.notFound=404]="notFound",a[a.badGateway=502]="badGateway"}(c||(c={}));var d=function(){function b(b){this._moduleId="httpDataRetriever",this._requestList=[],this._disposed=!1,this._bandwidthRequest=null,this._bandwidthData=new a.Heuristics.BandwidthTracker(b.heuristicSettings.bandwidth,b.decryptionTracker),b.videoBufferData.updateBandwidthTracker(this._bandwidthData)}return b.prototype.dispose=function(){for(;this._requestList.length>0;){var a=this._requestList.pop();a.request=null,a=null}this._bandwidthRequest=null,this._disposed=!0},b.prototype.init=function(a){var b=a.workflows[0],c=a.workflows[1];b.addHandler(b.stepEvents.requestBegin,this.onGetData,this),b.addHandler(b.stepEvents.requestEnd,this.onGetData,this),c.addHandler(c.stepEvents.requestBegin,this.onReportHeuristicData,this),c.addHandler(c.stepEvents.requestSend,this.onGetData,this)},b.prototype.onReportHeuristicData=function(b){a.Log.verbose(5,"onReportHeuristicData"),b.currentModuleId=this._moduleId;var c=this;return new Promise(function(d,e){return c._disposed?(a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void e("object is already disposed.")):0!==b.requestedStream.type?void d():(c._bandwidthData.reportHeuristicsData(b.heuristicData,a.StreamUtil.getSegmentDuration(b)),void d())})},b.prototype.getResponseHeaders=function(a,b){for(var c=b.sessionContext.headers||[],d={},e=0;e<c.length;e++)d[c[e]]=a.getResponseHeader(c[e]);return d},b.prototype.onGetData=function(c){a.Log.verbose(5,"onGetData"),c.currentModuleId=this._moduleId;var d=this;return new Promise(function(g,h){function i(){if(a.assert(null!=c.urlsToRetrieve[s],"Failed to start the download as urlToRetrieve at index "+s+" is null"),a.assert(null!=c.urlsToRetrieve[s].url&&c.urlsToRetrieve[s].url.length>0,"Failed to start the download as urlToRetrieve at index "+s+" is empty"),c.requestedStream&&(c.requestedStream.streamingInfo.abortCurrentRequest=!1),d._bandwidthRequest&&d._bandwidthRequest.req.streamId===c.urlsToRetrieve[s].streamId&&d._bandwidthRequest.req.presTimeInSec===c.urlsToRetrieve[s].presTimeInSec){var e=c.heuristicData.tracksData.findFirst(function(a){return a.trackInfo.bitrate===d._bandwidthRequest.req.bitrate});e&&d._bandwidthRequest.req.bitrate>=c.urlsToRetrieve[s].bitrate?2===c.urlsToRetrieve[s].requestType?d._bandwidthRequest.req.bitrate!==c.urlsToRetrieve[s].bitrate&&(a.Log.verbose(5,"Switching init segment request "+c.urlsToRetrieve[s].url+" to "+d._bandwidthRequest.req.bitrate),c.urlsToRetrieve[s].bitrate=d._bandwidthRequest.req.bitrate,c.urlsToRetrieve[s].url=a.Util.UrlFormatter.FormatDashInitUrl(c.requestedStream.initUrlTemplate,d._bandwidthRequest.req.bitrate.toString(),c.sessionContext.presentationQueryStr),c.selectedTrack=e.trackInfo):(a.Log.verbose(5,"Reusing bandwidth request "+d._bandwidthRequest.req.url),c.urlsToRetrieve[s].dispose(),c.urlsToRetrieve[s]=d._bandwidthRequest.req,1===c.workflowType&&a.StreamUtil.getBufferData(c).dispatchDownloadCompleted(p(s),d._bandwidthRequest.info,d._bandwidthRequest.headers),d._bandwidthRequest=null):(d._bandwidthRequest.req.dispose(),d._bandwidthRequest=null)}if(0===c.urlsToRetrieve[s].responseType&&null!=c.urlsToRetrieve[s].mediaData||4===c.urlsToRetrieve[s].responseType&&null!=c.urlsToRetrieve[s].presentationData){if(4===c.urlsToRetrieve[s].responseType&&null!=c.sessionContext.commonPresentation){var g=c.sessionContext.httpDataRetrieverSettings,h=1e3*c.sessionContext.commonPresentation.maxSegmentDuration;g.timeoutInMSec=Math.max(g.timeoutInMSec,2*h),g.timeoutInMSec=Math.min(g.timeoutInMSec,g.maxTimeoutInMSec),a.Log.verbose(5,"Setting data retriever timeout: "+g.timeoutInMSec+" ms")}s++,s>=c.urlsToRetrieve.length?q(null):i()}else{1===c.workflowType&&a.StreamUtil.getBufferData(c).dispatchDownloadRequested(p(s));var o=c.sessionContext.createXmlHttpRequest();o.open("GET",c.urlsToRetrieve[s].url),o.onreadystatechange=j,o.onprogress=k,o.onload=l,o.onerror=m,o.ontimeout=n,o.onabort=m,0===c.urlsToRetrieve[s].responseType&&(o.responseType=a.Context.ResponseType[0]),o.msCaching&&(o.msCaching="disabled"),o.timeout=c.sessionContext.httpDataRetrieverSettings.timeoutInMSec;var r=new f(c.urlsToRetrieve[s],o);if(c.requestedStream&&0==c.requestedStream.type&&c.selectedTrack?a.Log.verbose(5,"HeuristicInfo: SuggestedBr: "+c.selectedTrack.bitrate+" CurrentBw: "+Math.floor(1e3*d._bandwidthData.latestInKbps)+" AverageBw: "+Math.floor(1e3*d._bandwidthData.averageBandwidthInKbps)+" BufferSize: "+c.requestedStream.streamingInfo.sourceBuffer.getBufferedAheadOfCurrentTimeInSec()+" StreamType: "+a.Presentation.StreamType[c.requestedStream.type]+" StreamName: "+c.requestedStream.language+" Index: "+c.requestedStream.streamingInfo.currentSegment.segmentInfo.index+" TimeInMS: "+c.requestedStream.streamingInfo.currentSegment.segmentInfo.presTimeInSec+" MediaTimeStamp: "+c.requestedStream.streamingInfo.currentSegment.segmentInfo.mediaTimestamp+" Index: "+c.requestedStream.streamingInfo.currentSegment.segmentInfo.index+" Duration: "+(c.requestedStream.streamingInfo.currentSegment.segmentInfo.durationInSec||0)+" Url: "+c.urlsToRetrieve[s].url+" TimeoutInMS: "+c.sessionContext.httpDataRetrieverSettings.timeoutInMSec):0===c.workflowType&&a.Log.verbose(5,"Getting "+c.urlsToRetrieve[s].url),d._requestList.push(r),a.Common.isEdge){var t=function(c){if(!d._disposed&&c.urlRequest.url){var e=Date.now();a.Log.verbose(5,"Network req check: time since last progress: "+(e-c.lastProgressTimestamp)+" ,"+c.networkRequestCheckTimerId+", "+c.urlRequest.url),e-c.lastProgressTimestamp>o.timeout?(a.Log.verbose(5,"Stale http request with failed timeout. Aborting request: "+c.networkRequestCheckTimerId+", "+c.urlRequest.url),c.abortRequest()):c.networkRequestCheckTimerId=a.Util.setTimeout(t,b._networkRequestCheckPeriodInMSec,c)}};1===c.workflowType&&(r.networkRequestCheckTimerId=a.Util.setTimeout(t,b._networkRequestCheckPeriodInMSec,r))}o.send()}}function j(){var b=this;if(!d._disposed){var c=d._requestList.findFirst(function(a){return a.request===b});a.assert(null!=c,"cannot find the request in the request queue"),c.request.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!c.bandwidthInfo.responseStartTimeInMS&&(c.bandwidthInfo.responseStartTimeInMS=Date.now(),c.request.onreadystatechange=null)}}function k(b){var e=this;if(!d._disposed){var f=Date.now(),g=d._requestList.findFirst(function(a){return a.request===e});if(a.assert(null!=g,"cannot find the request in the request queue"),g.lastProgressTimestamp=f,!(a.Common.isSafari&&a.Common.isOSXElCapitanOrEarlier()&&g.getIsAbortInProgress())){if(g.request.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!g.bandwidthInfo.responseStartTimeInMS&&(g.bandwidthInfo.responseStartTimeInMS=f),c.requestedStream&&c.requestedStream.streamingInfo.abortCurrentRequest&&g.request.readyState<4)return g.abortRequest(),void a.Log.verbose(5,"Aborting request: "+g.urlRequest.url);if(0===b.loaded){var h=g.bandwidthInfo.responseStartTimeInMS,i=c.sessionContext.httpDataRetrieverSettings.noDataTimeoutInMSec;if(f-h>i)return g.abortRequest(),void a.Log.verbose(5,"Aborting request after timeout with no data received: "+g.urlRequest.url)}if(3===g.urlRequest.requestType){var h=g.bandwidthInfo.responseStartTimeInMS,i=c.sessionContext.httpDataRetrieverSettings.initBandwidthTimeoutInMSec;if(f-h>i){g.bandwidthInfo.responseLengthInBytes=b.loaded,g.bandwidthInfo.responseEndTimeInMS=f;var j=c.sessionContext&&c.sessionContext.commonPresentation&&c.sessionContext.commonPresentation.isLive;d._bandwidthData.updateBandwidthInfo(g.bandwidthInfo,j,g.urlRequest,c),g.abortRequest(),a.Log.verbose(5,"Aborting init bandwidth request due to timeout: "+g.urlRequest.url)}}}}}function l(){var b=this;if(!d._disposed){var f=d._requestList.findFirst(function(a){return a.request===b});a.assert(null!=f,"cannot find the request in the request queue"),f.bandwidthInfo.responseEndTimeInMS=Date.now(),d.stopNetworkRequestCheck(f);var g=c.urlsToRetrieve.indexOf(f.urlRequest);if(c.urlsToRetrieve[g].httpResposeContentType=this.getResponseHeader("Content-Type"),c.urlsToRetrieve[g].httpResponseCode=this.status,200===this.status){switch(d._requestList.removeFirst(function(a){return a.request===b}),f.urlRequest.responseType){case 0:c.urlsToRetrieve[g].mediaData=this.response,f.bandwidthInfo.responseLengthInBytes=c.urlsToRetrieve[g].mediaData.byteLength;var h=d.getResponseHeaders(this,c);1===c.workflowType?a.StreamUtil.getBufferData(c).dispatchDownloadCompleted(p(g),f.bandwidthInfo,h):(d._bandwidthRequest=new e(c.urlsToRetrieve[g].clone(),f.bandwidthInfo,h),d._bandwidthRequest.req.requestType=1,c.sessionContext.eventMgr.dispatchEvent(a.EventName.initialBandwidthEstimationCompleted));break;case 4:c.urlsToRetrieve[g].presentationData=this.response,f.bandwidthInfo.responseLengthInBytes=c.urlsToRetrieve[g].presentationData.length,c.sessionContext.eventMgr.dispatchEvent(a.EventName.manifestFetchCompleted);break;default:a.assert(!1,"Unexpected response Type in the request Context")}var j=this.getResponseHeader("Content-Length");if(null===j&&(j="unknown"),a.Log.verbose(5,"Download Finished for : "+f.urlRequest.url+" with bytes: "+f.bandwidthInfo.responseLengthInBytes+", contentLength: "+j),c.requestedStream){var k=c.sessionContext&&c.sessionContext.commonPresentation&&c.sessionContext.commonPresentation.isLive;d._bandwidthData&&0===c.requestedStream.type&&d._bandwidthData.updateBandwidthInfo(f.bandwidthInfo,k,f.urlRequest,c),c.requestedStream.streamingInfo.lastDownloadedTrack=c.selectedTrack}if(s++,a.Log.verbose(5,"index="+s+", urlsToRetrieve.length="+c.urlsToRetrieve.length),s>=c.urlsToRetrieve.length)return void q(f);a.Log.verbose(5,"Next request to process: "+c.urlsToRetrieve[s].url),i()}else a.Log.error(5,f.urlRequest.url+" failed, httpStatus: "+this.status),o.call(this,a.Failure.translateHttpStatusToCode(this.status))}}function m(b){if(!d._disposed){var c=2097152;"error"===b.type?c=a.Common.clientIsOffline()?2097755:2097753:"abort"===b.type&&(c=2097754),o.call(this,c,"http: "+b.type)}}function n(b){var e=this;if(!d._disposed){var f=d._requestList.findFirst(function(a){return a.request===e});if(a.assert(null!=f,"cannot find the request in the request queue"),b.loaded&&1===f.urlRequest.requestType){var g=c.sessionContext&&c.sessionContext.commonPresentation&&c.sessionContext.commonPresentation.isLive;f.bandwidthInfo.responseLengthInBytes=b.loaded,f.bandwidthInfo.responseEndTimeInMS=Date.now(),d._bandwidthData.updateBandwidthInfo(f.bandwidthInfo,g,f.urlRequest,c)}o.call(this,2097752,"http timed out")}}function o(b,e){var f=this,g=d._requestList.removeFirst(function(a){return a.request===f});!a.Common.isFirefox&&a.Common.isSafari&&a.Common.isOSXElCapitanOrEarlier()||a.assert(null!=g,"cannot find the request in the request queue");var h=!1;c.requestedStream&&c.requestedStream.streamingInfo.abortCurrentRequest&&(c.requestedStream.streamingInfo.abortCurrentRequest=!1,h=!0);var i=null!=g?g.urlRequest.url:"no details info";e&&(i+=", "+e);var j=new a.Failure.Record(c.currentModuleId,b,i);if(a.Log.error(5,j.toString()),null!=g)if(c.requestedStream){-1!==c.urlsToRetrieve.findIndexOf(function(a){return 2===a.requestType})&&(c.requestedStream.streamingInfo.fetchInitSegment=!0);var k=c.urlsToRetrieve.indexOf(g.urlRequest);if(1===c.workflowType&&a.StreamUtil.getBufferData(c).dispatchDownloadFailed(p(k),b,e),2097556===b&&c.sessionContext.commonPresentation.isLive&&c.requestedStream.streamingInfo&&c.requestedStream.streamingInfo.currentSegment&&!c.requestedStream.streamingInfo.currentSegment.next){var l=c.requestedStream.streamingInfo.currentSegment.segmentInfo,m=l?l.presTimeInSec:null;c.requestedStream.streamingInfo.currentSegment=c.requestedStream.streamingInfo.currentSegment.prev,c.failTracker.reset(),a.Log.verbose(5,"hit past live edge with 404: "+(e?e+", ":"")+"presTimeInSec: "+m+" "+g.urlRequest.url),c.externalFailure=j,r(g)}else if(2097564===b&&c.sessionContext.commonPresentation.isLive&&c.requestedStream.streamingInfo&&c.requestedStream.streamingInfo.currentSegment&&!c.requestedStream.streamingInfo.currentSegment.next){if(c.state=2,c.retryWaitTimeMSec=c.sessionContext.httpRetryPolicySettings.retryMediaInMSec,c.failTracker.log(j,c.selectedTrack,c.requestedStream.type),2!==c.requestedStream.type){var n=c.sessionContext.httpDataRetrieverSettings.liveEdgeAdjustmentInSec;c.sessionContext.commonPresentation.adjustPlayableWindow(n)}else c.retryWaitTimeMSec=c.sessionContext.httpRetryPolicySettings.retryDueTo412InTextTrackInMSecDefault;var l=c.requestedStream.streamingInfo.currentSegment.segmentInfo,m=l?l.presTimeInSec:null;a.Log.verbose(5,"hit past live edge with 412: "+(e?e+", ":"")+"presTimeInSec: "+m+" "+g.urlRequest.url),q(g)}else 0!==c.workflowType&&g&&g.urlRequest&&3!==g.urlRequest.requestType&&(c.state=2,c.failTracker.log(j,c.selectedTrack),c.failTracker.noDataReceivedFailure=!g.bandwidthInfo.responseLengthInBytes,c.retryWaitTimeMSec=c.failTracker.isLastServerError()?c.sessionContext.httpRetryPolicySettings.retryMediaServerErrorInMSec:2097753===b||2097755===b?c.sessionContext.httpRetryPolicySettings.retryDueToNetworkErrorInMSec:0),a.Log.error(5,"failed to download: "+(e?e+", ":"")+g.urlRequest.url),q(g)}else 0!==c.workflowType||2097556!==b&&2097752!==b&&2097753!==b&&2097755!==b?(c.externalFailure=j,a.Log.error(5,"failed to download: "+(e?e+", ":"")+g.urlRequest.url),r(g)):(c.state=2,c.retryWaitTimeMSec=2097556===b?c.sessionContext.httpRetryPolicySettings.retryPresentationInMSec:2097753===b||2097755===b?c.sessionContext.httpRetryPolicySettings.retryDueToNetworkErrorInMSec:0,c.failTracker.log(j),a.Log.error(5,"failed to download: "+(e?e+", ":"")+g.urlRequest.url),q(g));h&&c.failTracker.reset()}function p(b){var d=c.urlsToRetrieve[b],e=c.requestedStream.presentationTimeOffsetInSec,f=c.requestedStream.streamingInfo.currentSegment.segmentInfo,g=2===d.requestType?null:f.mediaTimestamp/f.timescale;return new a.Context.MediaDownload(d.url,c.selectedTrack.bitrate,g,d.mediaData,e,f.timescale,f.durationInSec)}function q(a){a&&d.stopNetworkRequestCheck(a),g()}function r(a,b){a&&d.stopNetworkRequestCheck(a),b?h(b):h()}if(d._disposed)return a.Failure.attachFailureToRequest(c,c.currentModuleId,0),void r(null,"object is already disposed.");a.assert(0!==c.urlsToRetrieve.length,"Failed to start the download as urlsToRetrieve is empty.");var s=0;i()})},b.prototype.stopNetworkRequestCheck=function(b){b.networkRequestCheckTimerId&&(a.Util.clearTimeout(b.networkRequestCheckTimerId),b.networkRequestCheckTimerId=0)},b._networkRequestCheckPeriodInMSec=2e3,b}();b.HttpDataRetriever=d;var e=function(){function a(a,b,c){this.req=a,this.info=b,this.headers=c}return a}(),f=function(){function b(b,c){this.urlRequest=b,this.request=c,this.bandwidthInfo=new a.Heuristics.BandwidthInfo,this.abortStarted=!1,this.lastProgressTimestamp=Date.now(),this.networkRequestCheckTimerId=0}return b.prototype.abortRequest=function(){this.abortStarted=!0,this.request.abort()},b.prototype.getIsAbortInProgress=function(){return this.abortStarted},b}()}(a.DataRetriever||(a.DataRetriever={}));a.DataRetriever}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c;!function(a){a[a.noRetry=0]="noRetry",a[a.nextTrack=1]="nextTrack",a[a.nextTrackDown=2]="nextTrackDown",a[a.nextSegment=3]="nextSegment",a[a.same=4]="same"}(c||(c={}));var d=function(){function b(){this._moduleId="httpRetryPolicy",this._disposed=!1}return b.prototype.dispose=function(){this._disposed||(this._disposed=!0)},b.prototype.init=function(a){var b=a.workflows[0],c=a.workflows[1];b.addHandler(c.stepEvents.requestBegin,this.onPresentationRetry,this),c.addHandler(c.stepEvents.requestBegin,this.onMediaRetry,this)},b.prototype.onPresentationRetry=function(b){var d=this;return a.Log.verbose(5,"onPresentationRetry"),b.currentModuleId=this._moduleId,new Promise(function(e,f){if(d._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void f("object is already disposed.");var g=b.failTracker,h=b.sessionContext.httpRetryPolicySettings;if(g.isNone())return void e();var i=d._getAction(0,h,b);switch(i){case 0:return b.externalFailure=g.lastFailure,a.Log.verbose(5,"onPresentationRetry: noRetry, "+b.urlsToRetrieve[0].url),void f();case 4:g.sameRequestRetried++;break;default:throw new Error("unexpected retry action: "+i)}g.totalRetried++,a.Log.verbose(5,"onPresentationRetry: "+c[i]+" URL: "+b.urlsToRetrieve[0].url),e()})},b.prototype.onMediaRetry=function(b){var d=this;return a.Log.verbose(5,"onMediaRetry"),b.currentModuleId=this._moduleId,new Promise(function(e,f){if(d._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void f("object is already disposed.");if(!b.requestedStream)return void e();var g=b.failTracker,h=b.requestedStream.streamingInfo,i=b.sessionContext.httpRetryPolicySettings;if(g.isNone()||null!==h.pendingSeekPositionInSec)return void e();0===g.totalRetried&&(g.tracksToTry=d._createTrackToTry(i,b.requestedStream,g.lastTrack));var j=d._getAction(1,i,b);switch(j){case 0:return b.externalFailure=g.lastFailure,a.Log.verbose(5,"onMediaRetry: noRetry,mediaTimestamp: "+h.currentSegment.segmentInfo.mediaTimestamp),void f();case 1:case 2:var k,l;g.sameRequestRetried++,b.selectedSegment=h.currentSegment,l=g.trackToTryIdx<g.tracksToTry.length-1?g.trackToTryIdx+1:0,k=g.tracksToTry[l],(1===j||k.bitrate<g.lastTrack.bitrate)&&(g.trackToTryIdx=l),b.selectedTrack=g.tracksToTry[g.trackToTryIdx];break;case 3:if(!h.currentSegment.next)return b.externalFailure=g.lastFailure,b.sessionContext&&b.sessionContext.commonPresentation&&b.sessionContext.commonPresentation.isLive?g.reset():a.Log.verbose(5,"onRetry: noRetry, EOS mediaTimestamp: "+h.currentSegment.segmentInfo.mediaTimestamp),void f();h.currentSegment=h.currentSegment.next,g.segmentsSkipped++,g.resetForSegment(),b.selectedSegment=h.currentSegment,b.selectedTrack=g.tracksToTry[0];break;case 4:g.sameRequestRetried++,b.selectedSegment=h.currentSegment,b.selectedTrack=g.tracksToTry[0];break;default:throw new Error("unexpected retry action: "+j)}g.totalRetried++,a.Log.verbose(5,"onRetry: "+c[j]+" bitrate: "+b.selectedTrack.bitrate+" mediaTimestamp: "+b.selectedSegment.segmentInfo.mediaTimestamp),e()})},b.prototype._getAction=function(a,b,c){var d=0,e=!1,f=c.failTracker;if(c.sessionContext&&c.sessionContext.commonPresentation&&(e=c.sessionContext.commonPresentation.isLive),0===a)d=f.sameRequestRetried>=b.maxRetryPresentation?0:4;else if(f.totalRetried>=b.maxTotalRetries&&2!==f.lastStreamType||f.segmentsSkipped>=b.maxSkipSegments&&(f.trackToTryIdx>=f.tracksToTry.length-1||f.sameRequestRetried>=b.maxRetryPerSegment))d=b.infiniteSegmentRetryForPreconditionFailed&&e&&this._isLiveEdge(c)&&f.isLastNotReady()?4:0;else if(f.isSegmentDecryptionError()||f.isLastNotFound()||f.isLastNotReady()&&e&&!this._isLiveEdge(c))d=f.trackToTryIdx<f.tracksToTry.length-1&&f.sameRequestRetried<b.maxRetryPerSegment?1:3;else if(e&&this._isLiveEdge(c)&&f.isLastNotReady())d=4,f.sameRequestRetried>=b.maxRetryPerSegment&&2!==f.lastStreamType&&!b.infiniteSegmentRetryForPreconditionFailed&&(d=0);else if(f.isLastServerError())d=1;else if(f.isLastNetworkFail()){var g=e&&this._isLiveEdge(c)&&f.isLastNetworkDown()?3*b.maxRetryPerSegment:b.maxRetryPerSegment;d=f.sameRequestRetried<g?f.noDataReceivedFailure?4:2:3}else d=0;return d},b.prototype._isLiveEdge=function(a){var b=!1;if(!a.requestedStream||!a.requestedStream.streamingInfo)return b;var c=a.requestedStream.streamingInfo.currentSegment;return b=c&&!c.next?!0:!1},b.prototype._createTrackToTry=function(a,b,c){var d=[],e=b.tracks.indexOf(c),f=b.tracks.length;d.push(b.tracks[e]);for(var g=e-1;g>=0;g--)b.tracks[g].streamingInfo.selectable&&d.push(b.tracks[g]);if(!a.retryLowerBitrateOnly)for(var g=e+1;f>g;g++)b.tracks[g].streamingInfo.selectable&&d.push(b.tracks[g]);return d},b}();b.HttpRetryPolicy=d}(a.DataRetriever||(a.DataRetriever={}));a.DataRetriever}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c;!function(a){a[a.success=200]="success",a[a.notFound=404]="notFound",a[a.badGateway=502]="badGateway"}(c||(c={}));var d=function(){function b(){this._moduleId="InitialBandwidthDataUrlFormatter",this._disposed=!1}return b.prototype.dispose=function(){this._disposed=!0},b.prototype.init=function(a){var b=a.workflows[0];b.addHandler(b.stepEvents.requestEnd,this.onPreFetchUrlFormat,this)},b.prototype.onPreFetchUrlFormat=function(b){a.Log.verbose(6,"OnPreFetchUrlFormat"),b.currentModuleId=this._moduleId;var c=this;return new Promise(function(d,e){if(c._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void e("object is already disposed.");if(!b.sessionContext.heuristicSettings.preFetchDataEnabled)return void d();var f=b.sessionContext.commonPresentation.periods[0].streams,g=f.findFirst(function(a){return 0===a.type});if(b.requestedStream=g,!b.requestedStream)return void d();var h=c.getBitrate(b);if(!h)throw new Error("bitrate of video track not set in presentation");var i=b.requestedStream.mediaUrlTemplate;if(!i)throw new Error("media url template is not set for the video stream");var j,k=g.segments;j=b.sessionContext.commonPresentation.isLive?k.last.segmentInfo:k.first.segmentInfo;var l=a.Util.UrlFormatter.FormatDashMediaUrl(i,h.toString(),j.mediaTimestampStr,b.sessionContext.presentationQueryStr),m=new a.Context.UrlRequest(l,3,0,g.id,h,j.presTimeInSec,j.durationInSec);b.urlsToRetrieve.push(m),b.sessionContext.heuristicSettings.preFetchDataEnabled=!1,d()})},b.prototype.getBitrate=function(a){var b=Math.max(a.sessionContext.videoTag.scrollWidth,a.sessionContext.videoTag.width),c=Math.max(a.sessionContext.videoTag.scrollHeight,a.sessionContext.videoTag.height),d=0;if(c>0&&b>0){for(var e=a.requestedStream.tracks,f=0,g=0,h=0;h<e.length;h++)if(e[h].selectable&&(!d&&e[h].width>b&&e[h].height>c||d&&f===e[h].width&&g===e[h].height))d=e[h].bitrate,f=e[h].width,g=e[h].height;else if(d)break;if(0==d){for(var h=e.length-1;h>=0&&(e[h].selectable&&(e[h].width>b||e[h].height>c));h--)d=e[h].bitrate;0==d&&e.length>0&&(d=e[e.length-1].bitrate)}}if(0==d)if(a.sessionContext.heuristicSettings.preFetchDataMiddle){var i;i=Math.round(a.requestedStream.tracks.length/2)-1,d=a.requestedStream.tracks[i].bitrate}else d=a.requestedStream.tracks[0].bitrate;return d},b}();b.InitialBandwidthDataUrlFormatter=d}(a.Heuristics||(a.Heuristics={}));a.Heuristics}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="streamSelector",this._disposed=!1,this._initial=!0}return b.prototype.dispose=function(){this._disposed=!0},b.prototype.init=function(a){var b=a.workflows[0];b.addHandler(b.stepEvents.requestEnd,this.onSelectStreams,this)},b.prototype.onSelectStreams=function(b){var c=this;return b.currentModuleId=this._moduleId,new Promise(function(d,e){var f=!1,g=!1,h=!1,i=null,j=!1,k=b.sessionContext.commonPresentation;if(c._disposed)return a.Failure.attachFailureToRequest(b,b.currentModuleId,0),void e("Disposed");if(!c._initial)return void d();if(!k)throw new Error("CommonPresentation is empty");k.periods[0].streams.forEach(function(a){a.streamingInfo.selected=!1});for(var l=k.periods[0].streams.length-1;l>=0;l--)0!==k.periods[0].streams[l].type||f?1===k.periods[0].streams[l].type?(k.periods[0].streams[l].streamingInfo.supported=MediaSource.isTypeSupported&&MediaSource.isTypeSupported(k.periods[0].streams[l].codec)||k.periods[0].streams[l].codec.indexOf("aac")>-1||k.periods[0].streams[l].codec.indexOf("mp4a")>-1,g&&h||!k.periods[0].streams[l].streamingInfo.supported||(g?!h&&k.periods[0].streams[l].codec.indexOf("ec-3")>-1&&(h=!0,null!==i&&(i.streamingInfo.selected=!1),k.periods[0].streams[l].streamingInfo.selected=!0):(g=!0,k.periods[0].streams[l].streamingInfo.selected=!0,i=k.periods[0].streams[l],k.periods[0].streams[l].codec.indexOf("ec-3")>-1&&(h=!0)))):2!==k.periods[0].streams[l].type||j||(j=!0,k.periods[0].streams[l].streamingInfo.selected=!0):(f=!0,k.periods[0].streams[l].streamingInfo.selected=!0);return f||g?(c._initial=!1,void d()):(a.Failure.attachFailureToRequest(b,b.currentModuleId,4194307),void e("Neither video nor audio streams are found"))})},b}();b.InitialStreamSelector=c}(a.Presentation||(a.Presentation={}));a.Presentation}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function a(a,b,c,d,e){this.index=a,this._timescale=e,this._presentationOffset=d,this._mediaTimestampStr=b,this._mediaTimestamp=parseInt(b),this._presTimeInSec=(this._mediaTimestamp+d)/e,c&&(this._mediaDuration=c,this._durationInSec=c/e)}return Object.defineProperty(a.prototype,"timescale",{get:function(){return this._timescale},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"presentationOffset",{get:function(){return this._presentationOffset},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"mediaTimestampStr",{get:function(){return this._mediaTimestampStr},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"mediaTimestamp",{get:function(){return this._mediaTimestamp},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"mediaDuration",{get:function(){return this._mediaDuration},set:function(a){this._mediaDuration=a,this._durationInSec=a/this._timescale},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"presTimeInSec",{get:function(){return this._presTimeInSec},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"durationInSec",{get:function(){return this._durationInSec},enumerable:!0,configurable:!0}),a.prototype.update=function(a,b){a&&(this.index+=a),this._presentationOffset!==b&&(this._presentationOffset=b,this._presTimeInSec=(this._mediaTimestamp+b)/this._timescale)},a}();b.MediaSegmentInfo=c;var d=function(){function a(a,b,d,e,f,g){this.firstSegment=new c(a,b,d,e,f),this.repeat=g,this.containerIndex=0/0}return a}();b.SegmentRunEntry=d;var e=function(){function b(b,d,e){this._container=b,this._pubTime=b.pubTime,this._runEntry=d,this._runEntryRepeatPosition=e;var f=d.firstSegment.mediaTimestampStr;e&&(f=a.Timestamp.add(f,e*d.firstSegment.mediaDuration)),this.segmentInfo=new c(d.firstSegment.index+e,f,d.firstSegment.mediaDuration,b.presentationTimeOffset,b.timescale)}return b.prototype.dispose=function(){this.segmentInfo=null,this._container=null,this._pubTime=null,this._runEntry=null,this._runEntryRepeatPosition=0/0},Object.defineProperty(b.prototype,"next",{get:function(){if(this._updateIterator(),isNaN(this._runEntryRepeatPosition))return null;var c=this._runEntry,d=0;if(this._runEntryRepeatPosition+1>this._runEntry.repeat){var e=this._runEntry.containerIndex+1;if(!(e<this._container.segmentTable.length))return a.Log.verbose(4,"Cannot get next iterator"),null;c=this._container.segmentTable[e]}else d=this._runEntryRepeatPosition+1;return new b(this._container,c,d)},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"prev",{get:function(){if(this._updateIterator(),isNaN(this._runEntryRepeatPosition))return null;var c,d=this._runEntry;if(0===this._runEntryRepeatPosition){var e=this._runEntry.containerIndex-1;if(!(e>=0&&e<this._container.segmentTable.length))return a.Log.warning(4,"Cannot get previous iterator"),null;d=this._container.segmentTable[e],c=d.repeat}else c=this._runEntryRepeatPosition-1;return new b(this._container,d,c)},enumerable:!0,configurable:!0}),b.prototype._updateIterator=function(){if(this._container.pubTime.getTime()>this._pubTime.getTime()){this._pubTime=this._container.pubTime;for(var b=this._runEntry.containerIndex,c=this._container.segmentTable[b];!c&&b>0;)b--,c=this._container.segmentTable[b];if(c){if(c.firstSegment.index<=this.segmentInfo.index&&this.segmentInfo.index<=c.firstSegment.index+c.repeat)return this._runEntry=c,this._runEntryRepeatPosition=this.segmentInfo.index-c.firstSegment.index,void this._updateInfo();if(this.segmentInfo.index>c.firstSegment.index+c.repeat&&this._container.segmentTable.length>b+1){var d=this._container.segmentTable[b+1];if(this.segmentInfo.index<=d.firstSegment.index+d.repeat)return this._runEntry=d,this._runEntryRepeatPosition=this.segmentInfo.index-d.firstSegment.index,void this._updateInfo()}}var e=this._container.getByIndex(this.segmentInfo.index);if(!e)return a.Log.warning(4,"Referenced segment not found in presentation, disposing iterator"),void this.dispose();this._runEntry=e._runEntry,this._runEntryRepeatPosition=e._runEntryRepeatPosition,this._updateInfo();

}},b.prototype._updateInfo=function(){var a=this._container.getByIndex(this.segmentInfo.index);if(a){var b=a.segmentInfo;(this.segmentInfo.mediaTimestampStr!==b.mediaTimestampStr||this.segmentInfo.mediaDuration!==b.mediaDuration)&&(this.segmentInfo=new c(b.index,b.mediaTimestampStr,b.mediaDuration,b.presentationOffset,b.timescale))}},b}();b.MediaSegmentInfoIterator=e;var f=function(){function c(a,b,c,d){this.maxSegmentDuration=0,this.timescale=a,this.presentationTimeOffset=b,this.pubTime=c,this.segmentTable=[],this._isLive=d}return c.prototype.dispose=function(){this.segmentTable.length=0},Object.defineProperty(c.prototype,"first",{get:function(){var a=null;return this.segmentTable.length>0&&(a=new e(this,this.segmentTable[0],0)),a},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"last",{get:function(){var a,b=null;return this.segmentTable.length>0&&(a=this.segmentTable[this.segmentTable.length-1],b=new e(this,a,a.repeat)),b},enumerable:!0,configurable:!0}),c.prototype.addMediaSegmentRun=function(b){var c=null,e=0;if(this.segmentTable.length>0){c=this.segmentTable[this.segmentTable.length-1],e=c.firstSegment.mediaTimestamp+c.firstSegment.mediaDuration*(c.repeat+1);var f=a.Common.timestampDeltaThreshold*this.timescale;if(e-b.firstSegment.mediaTimestamp>f)if(0===b.repeat)a.Log.warning(4,"Discontinuities detected at: "+b.firstSegment.mediaTimestamp);else{var g,h=b.firstSegment;for(g=1;g<=b.repeat;g++){var i=h.mediaTimestamp+h.mediaDuration*g;if(!(e>i)){var j=new d(h.index,i.toString(),h.mediaDuration,h.presentationOffset,h.timescale,b.repeat-g);b=j;break}}}}return b?(b.containerIndex=this.segmentTable.length,this.segmentTable.push(b),this.maxSegmentDuration=Math.max(this.maxSegmentDuration,b.firstSegment.durationInSec||0),a.Log.verbose(4,"Added segment with idx="+b.firstSegment.index+" mt="+b.firstSegment.mediaTimestamp+" pt="+b.firstSegment.presTimeInSec.toFixed(7)+" r="+b.repeat+(b.firstSegment.durationInSec?" d="+b.firstSegment.durationInSec.toFixed(7):"")),b.repeat+1):0},c.prototype.addMediaSegmentInfo=function(a,c,d,e,f){var g;if(this.segmentTable.length>0&&0/0===this.segmentTable[this.segmentTable.length-1].firstSegment.mediaDuration)throw new Error("Failed to add segment: previous entry doesn't have duration");g=new b.SegmentRunEntry(a,c,d,e,f,0),this.addMediaSegmentRun(g)},c.prototype.updateSegmentDuration=function(b,c){var d,e;if(0===this.segmentTable.length)return!1;if(d=this.segmentTable[this.segmentTable.length-1],d.firstSegment.presTimeInSec!==b){if(e=a.Common.binarySearch(b,this.segmentTable,this._compareTimestampInSec),-1===e)return a.Log.verbose(4,"Failed to update segment duration, run entry with presentation time "+b+" not found"),!1;d=this.segmentTable[e]}return d.firstSegment.mediaDuration!==c&&(a.assert(!d.firstSegment.mediaDuration&&0===d.repeat,"Failed to update segment duration, run entry (s:"+d.firstSegment.presTimeInSec+" d:"+d.firstSegment.durationInSec+" r:"+d.repeat+") cannot be overwritten by segment (s:"+b+" d:"+c/this.timescale+")"),d.firstSegment.mediaDuration=c),this.maxSegmentDuration=Math.max(this.maxSegmentDuration,d.firstSegment.durationInSec||0),!0},c.prototype.getByIndex=function(b){var c,d=null;if(0===this.segmentTable.length)return null;if(c=a.Common.binarySearch(b,this.segmentTable,this._compareIndex),-1!==c){var f=this.segmentTable[c],g=b-f.firstSegment.index;d=new e(this,f,g)}return d||a.Log.verbose(4,"Entry with index "+b+" not found"),d},c.prototype.getBySegmentStartTime=function(b,c){var d,f=null;if(0===this.segmentTable.length)return null;if(c||(c=a.Common.timestampDeltaThreshold),Math.abs(b-this.segmentTable[0].firstSegment.presTimeInSec)<c)return this.first;if(d=a.Common.binarySearch(b,this.segmentTable,this._compareTimestampInSec),-1!==d){var g=this.segmentTable[d],h=0;if(a.Common.diffTimes(b,g.firstSegment.presTimeInSec)&&(h=Math.round((b-g.firstSegment.presTimeInSec)/g.firstSegment.durationInSec)||0),h>g.repeat){if(!(d+1<this.segmentTable.length))return a.Log.verbose(4,"Cannot find match for "+b),null;g=this.segmentTable[d+1],h=0}var i=g.firstSegment.presTimeInSec+h*g.firstSegment.durationInSec;if(Math.abs(b-i)>c)return a.Log.verbose(4,"Cannot find match within error range for "+b),null;f=new e(this,g,h)}return f},c.prototype.getByInSegmentTimestamp=function(b){var c,d=null;if(0===this.segmentTable.length)return null;if(c=a.Common.binarySearch(b,this.segmentTable,this._compareTimestampInSec),-1===c&&this._isLive&&b<this.segmentTable[0].firstSegment.presTimeInSec&&(a.Log.verbose(4,"Live presentation requested time "+b+" is ahead of the first segment time "+this.segmentTable[0].firstSegment.presTimeInSec+" seeking to the first segment!"),c=0),-1!==c){var f,g=this.segmentTable[c];f=Math.floor(Math.abs(b-g.firstSegment.presTimeInSec)/g.firstSegment.durationInSec),d=new e(this,g,f)}return d||a.Log.verbose(4,"Entry including timestamp "+b+" not found"),d},c.prototype.getByInDiscontinuityTimestamp=function(b){var c,d=null;return 0===this.segmentTable.length?null:(c=a.Common.binarySearchInGaps(b,this.segmentTable,this._compareTimestampInSecInGaps),-1!==c&&(d=new e(this,this.segmentTable[c],0)),d||a.Log.verbose(4,"Discontinuity including timestamp "+b+" not found"),d)},c.prototype.update=function(b){var c=this,d=b,e=null,f=0;if(!(d.pubTime.getTime()<=this.pubTime.getTime())){if(this.pubTime=d.pubTime,e=this.getBySegmentStartTime(d.first.segmentInfo.presTimeInSec),e&&e.segmentInfo.index!==d.first.segmentInfo.index){if(f=e.segmentInfo.index,a.Common.diffTimes(d.first.segmentInfo.presTimeInSec,e.segmentInfo.presTimeInSec))throw new Error("Segment mismatch during container update");a.Log.verbose(4,"Segment index offset="+f)}if(d._isLive){var g=d.last.segmentInfo,h=g.index,i=g.mediaTimestamp+g.mediaDuration;for(e=this.getBySegmentStartTime(g.presTimeInSec);i&&e&&e.next&&(e=e.next,!(e.segmentInfo.mediaTimestamp<i));)g=e.segmentInfo,i=g.mediaTimestamp+g.mediaDuration,d.addMediaSegmentInfo(++h,g.mediaTimestampStr,g.mediaDuration,g.presentationOffset,g.timescale)}this._isLive=d._isLive,this.segmentTable.length=0,d.segmentTable.forEach(function(a){a.firstSegment.update(f,c.presentationTimeOffset),c.segmentTable.push(a)}),this.maxSegmentDuration=d.maxSegmentDuration}},c.prototype._compareTimestampInSec=function(b,c){var d=0;return a.Common.diffTimes(b,c.firstSegment.presTimeInSec)>0?d=-1:a.Common.diffTimes(b,c.firstSegment.presTimeInSec)&&a.Common.diffTimes(b,c.firstSegment.presTimeInSec+(c.repeat+1)*(c.firstSegment.durationInSec||0))<=0&&(d=1),d},c.prototype._compareIndex=function(a,b){var c=0;return a<b.firstSegment.index?c=-1:a>=b.firstSegment.index+(b.repeat+1)&&(c=1),c},c.prototype._compareTimestampInSecInGaps=function(a,b,c){var d=0,e=b.firstSegment.presTimeInSec+(b.repeat+1)*(b.firstSegment.durationInSec||0),f=c.firstSegment.presTimeInSec;return e>a?d=-1:a>=f&&(d=1),d},c}();b.MediaSegmentInfoContainer=f,function(a){a[a.needsToBeScheduled=0]="needsToBeScheduled",a[a.inProgress=1]="inProgress",a[a.endOfStream=2]="endOfStream"}(b.WorkflowState||(b.WorkflowState={}));var g=(b.WorkflowState,function(){function a(){this.forge=null,this.webCrypto=null}return a.prototype.dispose=function(){this.forge=null,this.webCrypto=null},a}());b.AesInfo=g;var h=function(){function a(){this.selected=!1,this.supported=!0,this.fetchInitSegment=!0,this.currentSegment=null,this.pendingSeekPositionInSec=null,this.abortCurrentRequest=!1,this.workflowState=0,this.sourceBuffer=null,this.lastDownloadedTrack=null,this.aes=new g,this.flushStream=!1}return a.prototype.dispose=function(){this.currentSegment=null,this.sourceBuffer&&(this.sourceBuffer.dispose(),this.sourceBuffer=null),this.lastDownloadedTrack=null,this.aes&&(this.aes.dispose(),this.aes=null)},a}();b.MediaStreamStreamingInfo=h;var i=function(){function a(){this.selectable=!0}return a}();b.MediaTrackStreamingInfo=i;var j=function(){function a(a,b){this._streams=[];for(var c=0;c<b.length;c++)if(0==b[c].type){var d=new k(a,b[c]);this._streams.push(d)}}return a.prototype.dispose=function(){for(var a=0;a<this._streams.length;a++)this._streams[a].dispose();this._streams=[]},Object.defineProperty(a.prototype,"streams",{get:function(){return this._streams},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"selectedIndex",{get:function(){for(var a=-1,b=0;b<this._streams.length;b++)if(this._streams[b].commonStream.streamingInfo.selected){a=b;break}return a},enumerable:!0,configurable:!0}),a}();b.VideoStreamList=j;var k=function(){function b(b,c){this._commonStream=c,this._eventMgr=new a.Events.Manager(b.azureHtml5,!1),this._sessionContext=b}return b.prototype.dispose=function(){this._commonStream=null,this._sessionContext=null,this._eventMgr&&(this._eventMgr.dispose(),this._eventMgr=null)},Object.defineProperty(b.prototype,"codec",{get:function(){return this._commonStream.codec},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"name",{get:function(){return this._commonStream.id},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"tracks",{get:function(){return this._commonStream.tracks},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"commonStream",{get:function(){return this._commonStream},enumerable:!0,configurable:!0}),b.prototype.selectTrackByIndex=function(b){var c=!1;(-1>b||b>=this._commonStream.tracks.length)&&(a.Log.warning(7,"selectTrackByIndex: "+b+" switching back to auto track selection"),b=-1),a.Log.verbose(7,"selectTrackByIndex: "+b);for(var d=0;d<this._commonStream.tracks.length;d++){var e=this._commonStream.tracks[d].streamingInfo.selectable;this._commonStream.tracks[d].streamingInfo.selectable=-1===b||d===b?!0:!1,e!=this._commonStream.tracks[d].streamingInfo.selectable&&(c=!0)}c&&(this.commonStream.streamingInfo.flushStream=!0,this._eventMgr.dispatchEvent(a.StreamEventName.trackselected),this._sessionContext.eventMgr.dispatchEvent(a.InternalEventName.flushvideo))},b.prototype.addEventListener=function(a,b,c){this._eventMgr.addHandler(a,b,c)},b.prototype.removeEventListener=function(a,b){this._eventMgr.removeHandler(a,b)},b}(),l=function(){function b(b,c){this._streams=[];for(var d=0;d<c.length;d++)if(1==c[d].type){var e=new m(b,c[d]);this._streams.push(e)}this._eventMgr=new a.Events.Manager(b.azureHtml5,!1),this._sessionContext=b}return b.prototype.dispose=function(){for(var a=0;a<this._streams.length;a++)this._streams[a].dispose();this._sessionContext=null,this._eventMgr&&(this._eventMgr.dispose(),this._eventMgr=null),this._streams=[]},Object.defineProperty(b.prototype,"streams",{get:function(){return this._streams},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"enabledIndices",{get:function(){for(var a=[],b=0;b<this._streams.length;b++)if(this._streams[b].enabled){a.push(b);break}return a},enumerable:!0,configurable:!0}),b.prototype.switchIndex=function(b){if(1!=this.enabledIndices.length)return a.Log.error(7,"switchIndex failed - only single stream supported: "+this.enabledIndices.length+" streams enabled"),this._eventMgr.dispatchEvent(a.StreamListEventName.streamselectnotsupported),!1;if(b>=this.streams.length||0>b)return a.Log.error(7,"switchIndex failed - tried to enable invalid index: "+b),this._eventMgr.dispatchEvent(a.StreamListEventName.streamindexinvalid),!1;var c=this._streams[this.enabledIndices[0]],d=this._streams[b];if(b===this.enabledIndices[0])return a.Log.verbose(7,"switchIndex failed - current stream selected"),this._eventMgr.dispatchEvent(a.StreamListEventName.streamselected),!1;if(d.codec!==c.codec&&!c.hasAudioTypeChangeSupport())return a.Log.verbose(7,"switchIndex failed - switch involves codec change but no changeType support"),this._eventMgr.dispatchEvent(a.StreamListEventName.streamselectnotsupported),!1;this._switchEnabledIndex(b);var e=this._sessionContext.videoTag.currentTime,f=this._sessionContext.prerollBufferInSec();return d.swapBuffersAndCleanUp(c,e,f),d.codec!==c.codec&&(this._sessionContext.eventMgr.dispatchEvent(a.InternalEventName.audiocodecchanged)||a.Log.verbose(7,"switchIndex failed - audiocodecchanged event handler failed")),this._eventMgr.dispatchEvent(a.StreamListEventName.streamselected),!0},b.prototype.addEventListener=function(a,b,c){this._eventMgr.addHandler(a,b,c)},b.prototype.removeEventListener=function(a,b){this._eventMgr.removeHandler(a,b)},b.prototype._switchEnabledIndex=function(b){a.assert(1==this.enabledIndices.length,"Current implementation only allows one enabled stream at a time");var c=this.enabledIndices[0];this._streams[c].enabled=!1,this._streams[b].enabled=!0},b}();b.AudioStreamList=l;var m=function(){function b(a,b){this._commonStream=b}return b.prototype.dispose=function(){this._commonStream=null},Object.defineProperty(b.prototype,"enabled",{get:function(){return this._commonStream.streamingInfo.selected},set:function(a){this._commonStream.streamingInfo.selected=a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"supported",{get:function(){return this._commonStream.streamingInfo.supported},set:function(a){this._commonStream.streamingInfo.supported=a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"name",{get:function(){var b=this._commonStream.mediaUrlTemplate.toLowerCase(),c="fragments(",d=b.indexOf(c),e=b.indexOf("=",d);return a.assert(e>d+c.length,"mediaUrlTemplate ("+b+") did not follow expected schema"),this._commonStream.mediaUrlTemplate.substring(d+c.length,e)},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"language",{get:function(){return this._commonStream.language},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"codec",{get:function(){return this._commonStream.codec},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"bitrate",{get:function(){return this._commonStream.tracks[0].bitrate},enumerable:!0,configurable:!0}),b.prototype.hasAudioTypeChangeSupport=function(){return null!==this._commonStream.streamingInfo.sourceBuffer?a.Common.isSafari?!1:this._commonStream.streamingInfo.sourceBuffer.hasAudioTypeChangeSupport:!0},b.prototype.swapBuffersAndCleanUp=function(b,c,d){if(b._commonStream.streamingInfo.sourceBuffer){this._commonStream.streamingInfo.sourceBuffer||(this._commonStream.streamingInfo.sourceBuffer=b._commonStream.streamingInfo.sourceBuffer);var e=this._commonStream.streamingInfo.sourceBuffer;this._commonStream.streamingInfo.workflowState=0,b._commonStream.streamingInfo.workflowState=2,this._commonStream.streamingInfo.pendingSeekPositionInSec=c,this._commonStream.streamingInfo.audioTrackSwitched=!0,e.buffered.length>0&&e.buffered.end(e.buffered.length-1)>c+d&&e.flushFrom(c+d);try{e.flushUntil(c)}catch(f){a.Log.error(7,f)}}},b}()}(a.Presentation||(a.Presentation={}));a.Presentation}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){this._moduleId="SegmentLocator.Dash",this._disposed=!1}return b.prototype.init=function(a){var b=a.workflows[1];b.addHandler(b.stepEvents.requestBegin,this.onFindSegment,this)},b.prototype.dispose=function(){this._disposed=!0},b.prototype.onFindSegment=function(c){var d="unknown";c.requestedStream&&(d=0===c.requestedStream.type?"video":1===c.requestedStream.type?"audio":"text"),a.Log.verbose(9,"onFindSegment:"+d),c.currentModuleId=this._moduleId;var e=this;return new Promise(function(f,g){if(e._disposed)return a.Failure.attachFailureToRequest(c,c.currentModuleId,0),void g("object is already disposed.");var h=c.requestedStream,i=h.streamingInfo.currentSegment,j=h.segments;if(c.selectedSegment)return void f();if(null!==h.streamingInfo.pendingSeekPositionInSec)a.Log.verbose(9,"onFindSegment("+d+"): pendingSeekPositionInSec "+h.streamingInfo.pendingSeekPositionInSec),h.streamingInfo.currentSegment=j.getByInSegmentTimestamp(h.streamingInfo.pendingSeekPositionInSec),h.streamingInfo.currentSegment?(a.Log.verbose(9,"found segment "+h.streamingInfo.currentSegment.segmentInfo.presTimeInSec+" for seek position "+h.streamingInfo.pendingSeekPositionInSec),h.streamingInfo.pendingSeekPositionInSec=null,c.requestedStream.streamingInfo.fetchInitSegment=!0):(a.Log.verbose(9,"onFindSegment: didn't find the segment in container. Trying other methods."),c.sessionContext.isLiveToVod&&(h.streamingInfo.pendingSeekPositionInSec=c.sessionContext.commonPresentation.playableWindow.endInSec-.01));else if(i)h.streamingInfo.currentSegment=i.next;else{var k=c.sessionContext;isNaN(k.startPositionInSec)?h.streamingInfo.currentSegment=j.first:(h.streamingInfo.currentSegment=j.getByInSegmentTimestamp(k.startPositionInSec),h.streamingInfo.currentSegment||(h.streamingInfo.currentSegment=k.startPositionInSec<j.first.segmentInfo.presTimeInSec?j.first:j.getByInDiscontinuityTimestamp(k.startPositionInSec)),!h.streamingInfo.currentSegment&&c.sessionContext.commonPresentation.isLive&&2===h.type&&k.startPositionInSec>j.last.segmentInfo.presTimeInSec&&(h.streamingInfo.currentSegment=j.last))}if(null===h.streamingInfo.currentSegment)if(c.sessionContext.commonPresentation.isLive&&i&&i.segmentInfo&&(i.segmentInfo.mediaTimestamp>=j.last.segmentInfo.mediaTimestamp||h.streamingInfo.pendingSeekPositionInSec)){if(a.Log.warning(9,"Unable to find a segment"),h.streamingInfo.currentSegment=i,!c.sessionContext.commonPresentation.minimumUpdatePeriodInSec)return h.streamingInfo.audioTrackSwitched=!1,a.Failure.attachFailureToRequest(c,c.currentModuleId,1),void g();c.state=2,c.retryWaitTimeMSec=b._retryWaitTimeMSec,a.Log.verbose(9,"Reverting to previous segment")}else{if((h.streamingInfo.audioTrackSwitched||i&&!i.segmentInfo)&&c.sessionContext.commonPresentation.isLive)return h.streamingInfo.audioTrackSwitched=!1,a.Failure.attachFailureToRequest(c,c.currentModuleId,1),void g();c.state=1}f()})},b._retryWaitTimeMSec=2e3,b}();b.Dash=c}(a.SegmentLocator||(a.SegmentLocator={}));a.SegmentLocator}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(a){this._adSignals=[],this._adSignalsSeen={},this._eventManager=a}return b.prototype.reset=function(){this._adSignals=[],this._adSignalsSeen={}},b.prototype.getAdSignalsAndReset=function(){var a=this._adSignals;return this._adSignals=[],a},b.prototype.addAdSignals=function(b){for(var c=b&&b.length>0&&!!b[0].simpleSignal,d=[],e=0;e<b.length;e++)if(!this.checkSignalHasBeenSeenBefore(b[e])){if(!c){var f=window.atob(b[e].scteSignal.signalInString),g=a.Common.stringToUint8Array(f);b[e].scteSignal.signalInBinary=g}d.push(b[e])}d.length>0&&(this._adSignals=this._adSignals.concat(d),this._eventManager.dispatchEvent(a.EventName.spliceWaiting))},b.prototype.checkSignalHasBeenSeenBefore=function(b){var c;return c=b.simpleSignal?b.simpleSignal.id+","+b.simpleSignal.duration+","+b.simpleSignal.presentationTime:b.scteSignal.signalInString+(b.scteSignal.presentationTimeOverride?b.scteSignal.presentationTimeOverride:0),this._adSignalsSeen[c]?(a.Log.verbose(15,"ADSIGNAL: Redundant ad signal: "+c+", ignoring..."),!0):(this._adSignalsSeen[c]=!0,!1)},b}();b.Manager=c}(a.Ad||(a.Ad={}));a.Ad}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){function c(b,c){if(!c||0===c.length)return!0;try{var d=decodeURIComponent(c)}catch(e){return a.Log.error(12,e),!1}var f="urn:microsoft:azure:mediaservices:keyacquisitionhostname",g=d.indexOf(f);if(-1===g)return!0;var h=d.indexOf("&",g);-1===h&&(h=d.length);var i=d.substring(g,h),j=i.split("=");if(2!=j.length)return a.Log.error(12,"AMS hostname token is malformed: "+i),!1;var k=document.createElement("a");return k.href=b,j[1].toLowerCase()!=k.hostname.toLowerCase()?(a.Log.error(12,"AMS hostname mismatch: "+j[1].toLowerCase()+", "+k.hostname.toLowerCase()),!1):!0}b.verifyKeyUrlWithToken=c}(a.AesUtil||(a.AesUtil={}));a.AesUtil}(AzureHtml5JS||(AzureHtml5JS={})),Object.defineProperty(Array.prototype,"findFirst",{value:function(a){for(var b=0;b<this.length;b++){var c=this[b];if(a.call(this,c,b,Object(this)))return c}return null},enumerable:!1,configurable:!0}),Object.defineProperty(Array.prototype,"findLast",{value:function(a){for(var b=this.length-1;b>=0;b--){var c=this[b];if(a.call(this,c,b,Object(this)))return c}return null},enumerable:!1,configurable:!0}),Object.defineProperty(Array.prototype,"findIndexOf",{value:function(a){for(var b=0;b<this.length;b++){var c=this[b];if(a.call(this,c,b,Object(this)))return b}return-1},enumerable:!1,configurable:!0}),Object.defineProperty(Array.prototype,"removeFirst",{value:function(a){var b=this.findIndexOf(a),c=null;return-1!==b&&(c=this.splice(b,1)[0]),c},enumerable:!1,configurable:!0}),Object.defineProperty(Uint8Array.prototype,"isEqual",{value:function(a){if(this.length===a.length){for(var b=0;b<this.length;b++)if(this[b]!==a[b])return!1;return!0}return!1},enumerable:!1,configurable:!0}),window.ArrayBuffer&&(ArrayBuffer.prototype.polyfill_slice=function(a,b){b=b||this.byteLength;for(var c=new Uint8Array(this),d=new Uint8Array(b-a),e=a;b>e;e++)d[e-a]=c[e];return d.buffer},ArrayBuffer.prototype.slice=ArrayBuffer.prototype.slice||ArrayBuffer.prototype.polyfill_slice);var AzureHtml5JS;!function(a){"use strict";function b(a,b){if(!a)throw new Error(b)}a.assert=b}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";var b=function(){function a(a,b){if(this.dropOldestKeepAtLeastOne=function(){this._slidingWindow.length>1&&this.dropOldest()},this._slidingWindow=[],this._sum=0,this._minWindowLength=a,this._maxWindowLength=b,0>a||1>b||a>b)throw new Error("window length for average class should be greater than 0")}return a.prototype.dispose=function(){this._slidingWindow=null},Object.defineProperty(a.prototype,"average",{get:function(){return 0===this._slidingWindow.length||this._slidingWindow.length<this._minWindowLength?0:this._sum/this._slidingWindow.length},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"latest",{get:function(){return 0===this._slidingWindow.length?0:this._slidingWindow[this._slidingWindow.length-1]},enumerable:!0,configurable:!0}),a.prototype.addValue=function(a){this._slidingWindow.length>=this._maxWindowLength&&this.dropOldest(),this._slidingWindow.push(a),this._sum+=a},a.prototype.dropOldest=function(){if(this._slidingWindow.length>0){var a=this._slidingWindow.splice(0,1);a[0]!=1/0?this._sum-=a[0]:this._sum=this._slidingWindow.reduce(function(a,b){return a+b})}},a}();a.AverageCalculator=b}(a.Util||(a.Util={}));a.Util}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(){var a=/.*Mac OS X (\d+)_(\d+)_*.*\).*/.exec(navigator.userAgent);if(a&&3===a.length){var b=parseInt(a[1],10),c=parseInt(a[2],10);return 10==b&&11>=c||10>b}return!1}function d(a,c,d){"undefined"==typeof d&&(d=b.timestampDeltaThreshold);var e=c-a;return Math.abs(e)<d&&(e=0),e}function e(a,b,c){for(var d=0,e=b.length-1,f=0;e>=d;){f=Math.floor((d+e)/2);var g=c(a,b[f]);if(0>g)e=f-1;else{if(!(g>0))return f;d=f+1}}return-1}function f(a,b,c){var d=0,e=b.length-1,f=0;if(0>=e)return-1;for(;e>=d;){if(f=Math.floor((d+e)/2),0===f)return c(a,b[d],b[e])?-1:1;var g=c(a,b[f-1],b[f]);if(0>g)e=f-1;else{if(!(g>0))return f;d=f+1}}return-1}function g(a,b,c){var d=0,e=b.length-1,f=0;if(0>e)return-1;if(0===e)return c(a,b[0]);for(;e>=d;){if(f=Math.floor((d+e)/2),0===f)return c(a,b[d],b[e]);var g=c(a,b[f-1],b[f]);if(0>g)e=f-1;else{if(!(g>0))return f-1;d=f+1}}return b.length-1}function h(a){for(var b="",c=0;c<a.length;c++){var d=a[c].toString(16);b+=d.length<2?"0"+d:d}return b}function i(a){if(a.length<=2||"0x"!=a.substr(0,2).toLowerCase())throw new Error("Invalid hexString");var b=a.substr(2);a.length%2!=0&&(b="0"+b);for(var c=new Uint8Array(b.length/2),d=0;d<b.length;d+=2){var e=parseInt(b.substr(d,2),16);if(isNaN(e))throw new Error("Invalid hexString");c[d/2]=e}return c}function j(a){return 0>a&&(a=4294967295+a+1),"0x"+("00000000"+a.toString(16).toUpperCase()).substr(-8)}function k(a){for(var b="",c=0;c<a.byteLength;c++)b+=String.fromCharCode(a[c]);return b}function l(a){for(var b=new Uint8Array(a.length),c=0;c<b.byteLength;c++)b[c]=a.charCodeAt(c);return b}function m(a,b){return a.byteLength!==b.byteLength?!1:a.every(function(a,c){return a===b[c]})}function n(c){if(b.isChrome||b.isSafari){var d=c.play();void 0!==d?d.then(function(){a.Log.verbose(7,"videoTag.play() executed successfullly.")})["catch"](function(b){a.Log.warning(7,"videoTag.play() failed: "+b)}):a.Log.warning(7,"play() promise undefined.")}else c.play()}function o(){return window&&window.navigator&&!window.navigator.onLine}b.timestampDeltaThreshold=5e-4,b.nearDiscontinuityThreshold=2,b.isChrome=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),b.isEdge=/Edge/i.test(navigator.userAgent),b.isChromiumEdge=!b.isEdge&&/Chrome/i.test(navigator.userAgent)&&/Edg/i.test(navigator.userAgent),b.isIEMobile=/IEMobile\/([0-9.]*)/.test(navigator.userAgent),b.isSafari=/Safari/i.test(navigator.userAgent)&&!b.isChrome&&!b.isEdge&&!b.isIEMobile,b.isFirefox=/Firefox/i.test(navigator.userAgent)&&!b.isChrome&&!b.isEdge&&!b.isIEMobile&&!b.isSafari,b.isMobile=/android|webos|windows phone|iphone|ipad|ipod|blackBerry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),b.isOSXElCapitanOrEarlier=c,b.diffTimes=d;var p=function(){function a(a,b){this.startInSec=a,this.endInSec=b}return a}();b.TimeRange=p;var q=function(){function a(){this._timeRanges=[]}return a.prototype.dispose=function(){this._timeRanges=null},Object.defineProperty(a.prototype,"length",{get:function(){return this._timeRanges.length},enumerable:!0,configurable:!0}),a.prototype.start=function(a){return this._timeRanges[a].startInSec},a.prototype.end=function(a){return this._timeRanges[a].endInSec},a.prototype.duration=function(a){return this._timeRanges[a].endInSec-this._timeRanges[a].startInSec},a.prototype.extendLast=function(a){this._timeRanges[this._timeRanges.length-1].endInSec=a},a.prototype.addRange=function(a){this._timeRanges.push(a)},a.prototype.addRanges=function(a){if(a)for(var b=0;b<a.length;b++)this.addRange(new p(a.start(b),a.end(b)))},a.prototype.removeRange=function(a,c){if(c>a)for(var d=0;d<this._timeRanges.length;d++){var e=this._timeRanges[d].startInSec,f=this._timeRanges[d].endInSec;b.diffTimes(f,a)>=0||b.diffTimes(c,e)>=0||(b.diffTimes(e,a)>=0&&b.diffTimes(a,f)>=0&&b.diffTimes(f,c)>=0?this._timeRanges[d].endInSec=a:b.diffTimes(e,a)>=0&&b.diffTimes(c,f)>=0?(this._timeRanges[d].endInSec=a,this._timeRanges.splice(d+1,0,new p(c,f))):b.diffTimes(a,e)>=0&&b.diffTimes(f,c)>=0?(this._timeRanges.splice(d,1),--d):b.diffTimes(a,e)>=0&&b.diffTimes(e,c)>=0&&b.diffTimes(c,f)>=0&&(this._timeRanges[d].startInSec=c),b.diffTimes(this._timeRanges[d].endInSec,this._timeRanges[d].startInSec)>=0&&(this._timeRanges.splice(d,1),--d))}},a.prototype.rebase=function(a){this._timeRanges.forEach(function(b){b.startInSec-=a,b.endInSec-=a})},a.prototype.removeGaps=function(a){for(var b=0;b+1<this._timeRanges.length;)this._timeRanges[b+1].startInSec-this._timeRanges[b].endInSec<a?(this._timeRanges[b].endInSec=this._timeRanges[b+1].endInSec,this._timeRanges.splice(b+1,1)):b++},a.prototype.getIndexByInRangeTimestamp=function(a){for(var b=0;b<this._timeRanges.length;b++){var c=this._timeRanges[b];if(a<c.startInSec)return-1;if(c.startInSec<=a&&a<c.endInSec)return b;if(b+1>=this._timeRanges.length)return-2;var d=this._timeRanges[b+1];if(c.endInSec<=a&&a<=d.startInSec)return b+1}return-1},a.prototype.beforeDiscontinuity=function(a,c){return 0>c||c+1>=this._timeRanges.length||this._timeRanges[c].startInSec>a||a>=this._timeRanges[c].endInSec?!1:0!==d(this._timeRanges[c].endInSec,this._timeRanges[c+1].startInSec)&&this._timeRanges[c].endInSec-a<b.nearDiscontinuityThreshold},a.prototype.atOrAfterDiscontinuity=function(a,c){return 0>=c||c>=this._timeRanges.length||this._timeRanges[c-1].endInSec>a||a>=this._timeRanges[c].endInSec?!1:0!==d(this._timeRanges[c-1].endInSec,this._timeRanges[c].startInSec)&&(a<this._timeRanges[c].startInSec||a-this._timeRanges[c].startInSec<b.nearDiscontinuityThreshold)},a}();b.TimeRangeSet=q;var r=function(){function a(a,b,c){this.presTimeInSec=b,this.durationInSec=c,this.data=a}return Object.defineProperty(a.prototype,"endTimestampInSec",{get:function(){return this.presTimeInSec+this.durationInSec},enumerable:!0,configurable:!0}),a}();b.SegmentData=r,b.binarySearch=e,b.binarySearchInGaps=f,b.binarySearchTimeline=g,b.uint8ArrayToHexString=h,b.hexStringToUint8Array=i,b.toHexString=j,b.uint8ArrayToString=k,b.stringToUint8Array=l,b.typedArraysAreEqual=m,b.videoTagPlay=n,b.clientIsOffline=o}(a.Common||(a.Common={}));a.Common}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";var b=function(){function a(a,b){"undefined"==typeof b&&(b=0),this.data=a,this.readPos=b}return a.prototype.getUint8=function(){return this.data.getUint8(this.readPos++)},a.prototype.getUint32=function(){var a=this.data.getUint32(this.readPos);return this.readPos+=4,a},a.prototype.getInt32=function(){var a=this.data.getInt32(this.readPos);return this.readPos+=4,a},a.prototype.getBytes=function(a){for(var b=new Uint8Array(a),c=0;a>c;c++)b[c]=this.getUint8();return b},a.prototype.readString=function(a){for(var b="",c=0;a>c;c++)b+=String.fromCharCode(this.getUint8());return b},a.prototype.readStringUntilEnd=function(){for(var a="",b=0;this.readPos<this.data.byteLength;b++)a+=String.fromCharCode(this.getUint8());return a},a.prototype.readUTF8StringUntilEnd=function(){for(var a="",b=[];this.readPos<this.data.byteLength;)b.push(this.getUint8());for(var c=0;c<b.length;){var d=b[c++];128>d||(224>d?(d=(31&d)<<6,d|=63&b[c++]):240>d?(d=(15&d)<<12,d|=(63&b[c++])<<6,d|=63&b[c++]):(d=(7&d)<<18,d|=(63&b[c++])<<12,d|=(63&b[c++])<<6,d|=63&b[c++])),a+=String.fromCharCode(d)}return a},a.prototype.readTerminatedString=function(){for(var a="",b=this.getUint8();b;b=this.getUint8())a+=String.fromCharCode(b);return a},a}();a.Reader=b;var c=function(){function a(a,b){"undefined"==typeof b&&(b=0),this.data=a,this.writePos=b}return a.prototype.setUint8=function(a){this.data.setUint8(this.writePos++,a)},a.prototype.setUint32=function(a){this.data.setUint32(this.writePos,a),this.writePos+=4},a.prototype.setInt32=function(a){this.data.setInt32(this.writePos,a),this.writePos+=4},a.prototype.setString=function(a){for(var b=0;b<a.length;b++)this.setUint8(a.charCodeAt(b))},a.prototype.setBytes=function(a){for(var b=0;b<a.length;b++)this.setUint8(a[b])},a}();a.Writer=c}(a.DataViewReaderWriter||(a.DataViewReaderWriter={}));a.DataViewReaderWriter}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(a,b,c){var d="WebKitMediaKeys"in window,e="MSMediaKeys"in window,f="requestMediaKeySystemAccess"in navigator;if(f){var g=[];b&&g.push(new t(b));var h=[];c&&h.push(new t(c));var i=new s(["cenc"],g,h);return navigator.requestMediaKeySystemAccess(a,[i])}return new Promise(function(b,c){var f="video/mp4";return d?void(window.WebKitMediaKeys.isTypeSupported(a,f)?b():c()):e?void(window.MSMediaKeys.isTypeSupported(a,f)?b():c()):void c()})}function d(a,b,c){var d={initDataTypes:["cenc"],videoCapabilities:[new t(c)],audioCapabilities:[new t(b)]};b||delete d.audioCapabilities,c||delete d.videoCapabilities;var e=[d];return navigator.requestMediaKeySystemAccess(a,e)}function e(a){var b="WebKitMediaKeys"in window,c="MSMediaKeys"in window;if(b)return new window.WebKitMediaKeys(a);if(c)return new window.MSMediaKeys(a);throw new Error("create MediaKeys not supported")}function f(a,b){var c="WebKitSetMediaKeys"in a,d="msSetMediaKeys"in a;if(c)a.WebKitSetMediaKeys(b);else{if(!d)throw new Error("setMediaKeys not supported");a.msSetMediaKeys(b)}}function g(a,b){a.addEventListener("webkitneedkey",b),a.addEventListener("msneedkey",b)}function h(a,b){a.addEventListener("encrypted",b)}function i(a,b){a.addEventListener("message",b)}function j(a,b){a.addEventListener("webkitkeymessage",b),a.addEventListener("mskeymessage",b)}function k(a,b){a.addEventListener("webkitkeyadded",b),a.addEventListener("mskeyadded",b)}function l(a,b){a.addEventListener("webkitkeyerror",b),
a.addEventListener("mskeyerror",b)}function m(a,b){a.removeEventListener("webkitneedkey",b),a.removeEventListener("msneedkey",b)}function n(a,b){a.removeEventListener("encrypted",b)}function o(a,b){a.removeEventListener("message",b)}function p(a,b){a.removeEventListener("webkitkeymessage",b),a.removeEventListener("mskeymessage",b)}function q(a,b){a.removeEventListener("webkitkeyadded",b),a.removeEventListener("mskeyadded",b)}function r(a,b){a.removeEventListener("webkitkeyerror",b),a.removeEventListener("mskeyerror",b)}var s=function(){function a(a,b,c){this.initDataTypes=a,this.audioCapabilities=b,this.videoCapabilities=c}return a}(),t=function(){function b(b){this.contentType=b,this.robustness=a.Common.isChrome?"SW_SECURE_CRYPTO":""}return b}();b.isTypeSupported=c,b.createSupportedKeySystem=d,b.createMediaKeys=e,b.setMediaKeys=f,b.listenToNeedKey=g,b.listenToEncrypted=h,b.listenToMessage=i,b.listenToKeyMessage=j,b.listenToKeyAdded=k,b.listenKeyError=l,b.unlistenToNeedKey=m,b.unlistenToEncrypted=n,b.unlistenToMessage=o,b.unlistenToKeyMessage=p,b.unlistenToKeyAdded=q,b.unlistenKeyError=r}(a.EmeUtil||(a.EmeUtil={}));a.EmeUtil}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";var b=function(){function a(a,b){"undefined"==typeof a&&(a=null),"undefined"==typeof b&&(b=!0),this._azureHtml5=a,this._allowDuplicateHandlers=b,this._registrations={}}return a.prototype.dispose=function(){this._registrations=null},a.prototype.getHandlers=function(a){return a in this._registrations||(this._registrations[a]=[]),this._registrations[a]},a.prototype.addHandler=function(a,b,c){var e=this.getHandlers(a);if(this._allowDuplicateHandlers||-1===this._findHandlerByFunction(e,b)){var f=new d(c,b);e[e.length]=f}},a.prototype.removeHandler=function(a,b){for(var c=this.getHandlers(a),d=this._findHandlerByFunction(c,b);-1!==d;)c.splice(d,1),d=this._findHandlerByFunction(c,b)},a.prototype.dispatchEvent=function(a,b,d){for(var e=this,f=0,g=this.getHandlers(a).slice(),f=0;f<g.length;f++){var h=new c(a,e._azureHtml5,b,d);g[f].functionHandler.call(g[f].callerInstance,h)}},a.prototype._findHandlerByFunction=function(a,b){for(var c=-1,d=0;d<a.length;d++)if(a[d].functionHandler===b){c=d;break}return c},a}();a.Manager=b;var c=function(){function a(a,b,c,d){this.type=a,this.currentDate=new Date,this.azureHtml5=b,this.presentationTimeInSec=b?b.currentTime:0,this.message=c,this.data=d}return a}();a.EventInfo=c;var d=function(){function a(a,b){this.callerInstance=a,this.functionHandler=b}return a}();a.Handler=d}(a.Events||(a.Events={}));a.Events}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(a){return a>=400&&600>a?2097152|a:2097152}function d(a){var b="";return a.filename&&(b+=" file: "+a.filename),a.lineno&&(b+=" line: "+a.lineno),a.colno&&(b+=" colno: "+a.colno),a.error&&(b+="error: "+a.error),a.message&&(b+="msg: "+a.message),b}function e(b){if(void 0===b||null===b)return"undefined";var c=g(b.code);return b.msExtendedCode&&(c+=", msErrorCode: "+a.Common.toHexString(b.msExtendedCode)),c}function f(a,b,c,d){var e=new i(b,c,d);null!=a&&(a.externalFailure=e)}function g(a){switch(a){case MediaError.MEDIA_ERR_ABORTED:return"MEDIA_ERR_ABORTED";case MediaError.MEDIA_ERR_NETWORK:return"MEDIA_ERR_NETWORK";case MediaError.MEDIA_ERR_DECODE:return"MEDIA_ERR_DECODE";case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:return"MEDIA_ERR_SRC_NOT_SUPPORTED";default:return a.toString()}}function h(a){return a>1048575}var i=function(){function b(a,b,c){this.originModuleId=a,this.code=b,this.message=c}return b.prototype.dispose=function(){this.originModuleId=null,this.code=null,this.message=null},b.prototype.toString=function(){var b;return b="Module = "+this.originModuleId+" FailureCode = "+a.Common.toHexString(this.code),this.message&&(b+=" "+this.message),b},b}();b.Record=i,b.translateHttpStatusToCode=c,b.errorEventToString=d,b.mediaErrorToString=e,b.attachFailureToRequest=f,b.isExternalError=h;var j=function(){function b(a,b){a?(this.code=a,this.message=b):(this.code=0,this.message=null)}return b.prototype.translateMediaError=function(b){this.code=b.code<<20,b.msExtendedCode&&(this.message="msErrorCode: "+a.Common.toHexString(b.msExtendedCode));var c=b.message;c&&c.length&&(this.message=this.message?this.message+" "+c:c)},b.prototype.toString=function(){var b="code: "+a.Common.toHexString(this.code);return this.message&&(b+=", msg: "+this.message),b},b}();b.External=j}(a.Failure||(a.Failure={}));a.Failure}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";a.forgeScript='(function(){function n(n){function i(n){var r,u;if(this.data="",this.read=0,typeof n=="string")this.data=n;else if(t.isArrayBuffer(n)||t.isArrayBufferView(n)){r=new Uint8Array(n);try{this.data=String.fromCharCode.apply(null,r)}catch(f){for(u=0;u<r.length;++u)this.putByte(r[u])}}else(n instanceof i||typeof n=="object"&&typeof n.data=="string"&&typeof n.read=="number")&&(this.data=n.data,this.read=n.read);this._constructedStringLength=0}var t=n.util=n.util||{},r;t.isArray=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"};t.isArrayBuffer=function(n){return typeof ArrayBuffer!="undefined"&&n instanceof ArrayBuffer};t.isArrayBufferView=function(n){return n&&t.isArrayBuffer(n.buffer)&&n.byteLength!==undefined};t.ByteBuffer=i;t.ByteStringBuffer=i;r=4096;t.ByteStringBuffer.prototype._optimizeConstructedString=function(n){this._constructedStringLength+=n;this._constructedStringLength>r&&(this.data.substr(0,1),this._constructedStringLength=0)};t.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};t.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};t.ByteStringBuffer.prototype.putByte=function(n){return this.putBytes(String.fromCharCode(n))};t.ByteStringBuffer.prototype.fillWithByte=function(n,t){n=String.fromCharCode(n);for(var i=this.data;t>0;)t&1&&(i+=n),t>>>=1,t>0&&(n+=n);return this.data=i,this._optimizeConstructedString(t),this};t.ByteStringBuffer.prototype.putBytes=function(n){return this.data+=n,this._optimizeConstructedString(n.length),this};t.ByteStringBuffer.prototype.putString=function(n){return this.putBytes(t.encodeUtf8(n))};t.ByteStringBuffer.prototype.putInt16=function(n){return this.putBytes(String.fromCharCode(n>>8&255)+String.fromCharCode(n&255))};t.ByteStringBuffer.prototype.putInt24=function(n){return this.putBytes(String.fromCharCode(n>>16&255)+String.fromCharCode(n>>8&255)+String.fromCharCode(n&255))};t.ByteStringBuffer.prototype.putInt32=function(n){return this.putBytes(String.fromCharCode(n>>24&255)+String.fromCharCode(n>>16&255)+String.fromCharCode(n>>8&255)+String.fromCharCode(n&255))};t.ByteStringBuffer.prototype.putInt16Le=function(n){return this.putBytes(String.fromCharCode(n&255)+String.fromCharCode(n>>8&255))};t.ByteStringBuffer.prototype.putInt24Le=function(n){return this.putBytes(String.fromCharCode(n&255)+String.fromCharCode(n>>8&255)+String.fromCharCode(n>>16&255))};t.ByteStringBuffer.prototype.putInt32Le=function(n){return this.putBytes(String.fromCharCode(n&255)+String.fromCharCode(n>>8&255)+String.fromCharCode(n>>16&255)+String.fromCharCode(n>>24&255))};t.ByteStringBuffer.prototype.putInt=function(n,t){var i="";do t-=8,i+=String.fromCharCode(n>>t&255);while(t>0);return this.putBytes(i)};t.ByteStringBuffer.prototype.putSignedInt=function(n,t){return n<0&&(n+=2<<t-1),this.putInt(n,t)};t.ByteStringBuffer.prototype.putBuffer=function(n){return this.putBytes(n.getBytes())};t.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};t.ByteStringBuffer.prototype.getInt16=function(){var n=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,n};t.ByteStringBuffer.prototype.getInt24=function(){var n=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,n};t.ByteStringBuffer.prototype.getInt32=function(){var n=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,n};t.ByteStringBuffer.prototype.getInt16Le=function(){var n=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,n};t.ByteStringBuffer.prototype.getInt24Le=function(){var n=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,n};t.ByteStringBuffer.prototype.getInt32Le=function(){var n=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,n};t.ByteStringBuffer.prototype.getInt=function(n){var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),n-=8;while(n>0);return t};t.ByteStringBuffer.prototype.getSignedInt=function(n){var t=this.getInt(n),i=2<<n-2;return t>=i&&(t-=i<<1),t};t.ByteStringBuffer.prototype.getBytes=function(n){var t;return n?(n=Math.min(this.length(),n),t=this.data.slice(this.read,this.read+n),this.read+=n):n===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};t.ByteStringBuffer.prototype.bytes=function(n){return typeof n=="undefined"?this.data.slice(this.read):this.data.slice(this.read,this.read+n)};t.ByteStringBuffer.prototype.at=function(n){return this.data.charCodeAt(this.read+n)};t.ByteStringBuffer.prototype.setAt=function(n,t){return this.data=this.data.substr(0,this.read+n)+String.fromCharCode(t)+this.data.substr(this.read+n+1),this};t.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};t.ByteStringBuffer.prototype.copy=function(){var n=t.createBuffer(this.data);return n.read=this.read,n};t.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};t.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};t.ByteStringBuffer.prototype.truncate=function(n){var t=Math.max(0,this.length()-n);return this.data=this.data.substr(this.read,t),this.read=0,this};t.ByteStringBuffer.prototype.toHex=function(){for(var i,n="",t=this.read;t<this.data.length;++t)i=this.data.charCodeAt(t),i<16&&(n+="0"),n+=i.toString(16);return n};t.ByteStringBuffer.prototype.toString=function(){return t.decodeUtf8(this.bytes())};t.createBuffer=function(n,i){return i=i||"raw",n!==undefined&&i==="utf8"&&(n=t.encodeUtf8(n)),new t.ByteBuffer(n)};t.encodeUtf8=function(n){return unescape(encodeURIComponent(n))};t.decodeUtf8=function(n){return decodeURIComponent(escape(n))}}return typeof forge=="undefined"&&(forge={}),n(forge)})(),function(){function n(n){n.cipher=n.cipher||{};n.cipher.algorithms=n.cipher.algorithms||{};n.cipher.createDecipher=function(t,i){var r=t;if(typeof r=="string"&&(r=n.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+t);return new n.cipher.BlockCipher({algorithm:r,key:i,decrypt:!0})};n.cipher.registerAlgorithm=function(t,i){t=t.toUpperCase();n.cipher.algorithms[t]=i};n.cipher.getAlgorithm=function(t){return(t=t.toUpperCase(),t in n.cipher.algorithms)?n.cipher.algorithms[t]:null};var t=n.cipher.BlockCipher=function(n){this.algorithm=n.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this._input=null;this.output=null;this._op=n.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=n.decrypt;this.algorithm.initialize(n)};t.prototype.start=function(t){var i,r;t=t||{};i={};for(r in t)i[r]=t[r];i.decrypt=this._decrypt;this._finish=!1;this._input=n.util.createBuffer();this.output=t.output||n.util.createBuffer();this.mode.start(i)};t.prototype.update=function(n){for(n&&this._input.putBuffer(n);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};t.prototype.finish=function(n){n&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(t){return n(this.blockSize,t,!1)},this.mode.unpad=function(t){return n(this.blockSize,t,!0)});var t={};return(t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))?!1:(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))?!1:this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)?!1:!0}}return typeof forge=="undefined"&&(forge={}),n(forge)}(),function(){function n(n){function i(t){var r,i;if(typeof t=="string"&&(t=n.util.createBuffer(t)),n.util.isArray(t)&&t.length>4)for(r=t,t=n.util.createBuffer(),i=0;i<r.length;++i)t.putByte(r[i]);return n.util.isArray(t)||(t=[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]),t}n.cipher=n.cipher||{};var t=n.cipher.modes=n.cipher.modes||{};t.cbc=function(n){n=n||{};this.name="CBC";this.cipher=n.cipher;this.blockSize=n.blockSize||16;this._ints=this.blockSize/4;this._inBlock=new Array(this._ints);this._outBlock=new Array(this._ints)};t.cbc.prototype.start=function(n){if(n.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in n)this._iv=i(n.iv),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.");};t.cbc.prototype.encrypt=function(n,t,i){var r;if(n.length()<this.blockSize&&!(i&&n.length()>0))return!0;for(r=0;r<this._ints;++r)this._inBlock[r]=this._prev[r]^n.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),r=0;r<this._ints;++r)t.putInt32(this._outBlock[r]);this._prev=this._outBlock};t.cbc.prototype.decrypt=function(n,t,i){var r;if(n.length()<this.blockSize&&!(i&&n.length()>0))return!0;for(r=0;r<this._ints;++r)this._inBlock[r]=n.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),r=0;r<this._ints;++r)t.putInt32(this._prev[r]^this._outBlock[r]);this._prev=this._inBlock.slice(0)};t.cbc.prototype.pad=function(n){var t=n.length()===this.blockSize?this.blockSize:this.blockSize-n.length();return n.fillWithByte(t,t),!0};t.cbc.prototype.unpad=function(n,t){if(t.overflow>0)return!1;var r=n.length(),i=n.at(r-1);return i>this.blockSize<<2?!1:(n.truncate(i),!0)}}return typeof forge=="undefined"&&(forge={}),n(forge)}(),function(){function n(n){function l(t,i){var r=function(){return new n.aes.Algorithm(t,i)};n.cipher.registerAlgorithm(t,r)}function h(){var u,o,c,l,w,a,h,b,v,y,n,p;for(f=!0,s=[0,1,2,4,8,16,32,64,128,27,54],u=new Array(256),n=0;n<128;++n)u[n]=n<<1,u[n+128]=n+128<<1^283;for(t=new Array(256),e=new Array(256),r=new Array(4),i=new Array(4),n=0;n<4;++n)r[n]=new Array(256),i[n]=new Array(256);for(o=0,c=0,n=0;n<256;++n){for(h=c^c<<1^c<<2^c<<3^c<<4,h=h>>8^h&255^99,t[o]=h,e[h]=o,b=u[h],l=u[o],w=u[l],a=u[w],v=b<<24^h<<16^h<<8^h^b,y=(l^w^a)<<24^(o^a)<<16^(o^w^a)<<8^o^l^a,p=0;p<4;++p)r[p][o]=v,i[p][h]=y,v=v<<24|v>>>8,y=y<<24|y>>>8;o===0?o=c=1:(o=l^u[u[u[l^a]]],c^=u[u[c]])}}function c(n,r){for(var h,y,e=n.slice(0),o,p=1,c=e.length,w=c+6+1,a=u*w,f=c;f<a;++f)o=e[f-1],f%c==0?(o=t[o>>>16&255]<<24^t[o>>>8&255]<<16^t[o&255]<<8^t[o>>>24]^s[p]<<24,p++):c>6&&f%c==4&&(o=t[o>>>24]<<24^t[o>>>16&255]<<16^t[o>>>8&255]<<8^t[o&255]),e[f]=e[f-c]^o;if(r){var v,b=i[0],k=i[1],d=i[2],g=i[3],l=e.slice(0);for(a=e.length,f=0,h=a-u;f<a;f+=u,h-=u)if(f===0||f===a-u)l[f]=e[h],l[f+1]=e[h+3],l[f+2]=e[h+2],l[f+3]=e[h+1];else for(y=0;y<u;++y)v=e[h+y],l[f+(3&-y)]=b[t[v>>>24]]^k[t[v>>>16&255]]^d[t[v>>>8&255]]^g[t[v&255]];e=l}return e}function o(n,u,f,o){var tt=n.length/4-1,y,p,w,b,s,h,c,l,a,d,g,nt,v,k;for(o?(y=i[0],p=i[1],w=i[2],b=i[3],s=e):(y=r[0],p=r[1],w=r[2],b=r[3],s=t),h=u[0]^n[0],c=u[o?3:1]^n[1],l=u[2]^n[2],a=u[o?1:3]^n[3],v=3,k=1;k<tt;++k)d=y[h>>>24]^p[c>>>16&255]^w[l>>>8&255]^b[a&255]^n[++v],g=y[c>>>24]^p[l>>>16&255]^w[a>>>8&255]^b[h&255]^n[++v],nt=y[l>>>24]^p[a>>>16&255]^w[h>>>8&255]^b[c&255]^n[++v],a=y[a>>>24]^p[h>>>16&255]^w[c>>>8&255]^b[l&255]^n[++v],h=d,c=g,l=nt;f[0]=s[h>>>24]<<24^s[c>>>16&255]<<16^s[l>>>8&255]<<8^s[a&255]^n[++v];f[o?3:1]=s[c>>>24]<<24^s[l>>>16&255]<<16^s[a>>>8&255]<<8^s[h&255]^n[++v];f[2]=s[l>>>24]<<24^s[a>>>16&255]<<16^s[h>>>8&255]<<8^s[c&255]^n[++v];f[o?1:3]=s[a>>>24]<<24^s[h>>>16&255]<<16^s[c>>>8&255]<<8^s[l&255]^n[++v]}n.aes=n.aes||{};n.aes.Algorithm=function(n,t){f||h();var i=this;i.name=n;i.mode=new t({blockSize:16,cipher:{encrypt:function(n,t){return o(i._w,n,t,!1)},decrypt:function(n,t){return o(i._w,n,t,!0)}}});i._init=!1};n.aes.Algorithm.prototype.initialize=function(t){var i,f,u,r,e,o;if(!this._init){if(i=t.key,typeof i=="string"&&(i.length===16||i.length===24||i.length===32))i=n.util.createBuffer(i);else if(n.util.isArray(i)&&(i.length===16||i.length===24||i.length===32))for(f=i,i=n.util.createBuffer(),r=0;r<f.length;++r)i.putByte(f[r]);if(!n.util.isArray(i)&&(f=i,i=[],u=f.length(),u===16||u===24||u===32))for(u=u>>>2,r=0;r<u;++r)i.push(f.getInt32());if(!n.util.isArray(i)||!(i.length===4||i.length===6||i.length===8))throw new Error("Invalid key parameter.");e=this.mode.name;o=["CFB","OFB","CTR","GCM"].indexOf(e)!==-1;this._w=c(i,t.decrypt&&!o);this._init=!0}};n.aes._expandKey=function(n,t){return f||h(),c(n,t)};n.aes._updateBlock=o;l("AES-CBC",n.cipher.modes.cbc);var f=!1,u=4,t,e,s,r,i}return typeof forge=="undefined"&&(forge={}),n(forge)}(),function(){function n(n){for(var i=new Uint8Array(n.length),t=0;t<i.byteLength;t++)i[t]=n.charCodeAt(t);return i}onmessage=function(t){if(t.data.keyStr&&t.data.ivStr&&t.data.encrypted){var i=forge.cipher.createDecipher("AES-CBC",t.data.keyStr);i.start({iv:t.data.ivStr});i.update(new forge.util.ByteBuffer(t.data.encrypted));i.finish();postMessage({decrypted:n(i.output.bytes())})}}}();'}(a.Forge||(a.Forge={}));a.Forge}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";if(b.decrypt,b.decrypt=function(b,c,d){var e=forge.cipher.createDecipher("AES-CBC",c.keyStr);e.start({iv:c.ivStr}),e.update(new forge.util.ByteBuffer(d)),e.finish();var f=a.Common.stringToUint8Array(e.output.bytes());return b.apply(null,[f]),!0},!(window.Worker&&Blob&&window.URL&&window.URL.createObjectURL))return void a.Log.verbose(7,"AzureHtml5JS.Forge: cannot start worker for Forge");var c=null;try{var d=new Blob(["'use strict';var forge;"+b.forgeScript],{type:"text/javascript"}),e=new Worker(window.URL.createObjectURL(d));b.decrypt=function(a,b,d){return null===c?(c=a,e.postMessage({keyStr:b.keyStr,ivStr:b.ivStr,encrypted:d}),!0):!1},e.onmessage=function(a){a.data.decrypted&&(c.apply(null,[a.data.decrypted]),c=null)}}catch(f){a.Log.verbose(7,"AzureHtml5JS.Forge: Forge worker setup failed: "+f)}}(a.Forge||(a.Forge={}));a.Forge}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(b,c,e,f,g){return new Promise(function(h,i){function j(){d(b,c,e,g).then(k,l)}function k(a){h(a)}function l(b){f.maxRetries>m&&b.code&&b.code>=a.Failure.translateHttpStatusToCode(500)?(m++,a.Log.warning(13,"Request failed error: "+a.Common.toHexString(b.code)+", number of times tried: "+m+" , retrying the request"),setTimeout(function(){j()},Math.pow(2,m)*f.maxWaitTimeBetweenRetriesMS)):i(b)}var m=0;j()})}function d(b,c,d,e,f){return new Promise(function(g,h){function i(){if(200==k.status)g(k.response);else{var d="";if(null!==k.response){var e=new a.DataViewReaderWriter.Reader(new DataView(k.response));d=e.readStringUntilEnd()}a.Log.error(13,"XHR load failed status:"+k.statusText+"("+k.status+"), expected to be 200, readyState:"+k.readyState+" ("+c+" "+b+"), response:"+d),h({code:a.Failure.translateHttpStatusToCode(k.status),response:d})}}function j(){a.Log.error(13,"XHR failed status: "+k.statusText+" ("+k.status+"), readyState: "+k.readyState),h({code:2097753,response:""})}var k=new a.HttpRequest.XMLHttpRequestWrapper;k.onload=i,k.onerror=j,k.open(c,b),k.responseType=d,e&&e.forEach(function(a){k.setRequestHeader(a.name,a.value)}),f?k.send(f):k.send()})}b.authorizationHeader="Authorization",b.httpRequestWithRetryConfig=c,b.httpRequest=d}(a.HttpUtil||(a.HttpUtil={}));a.HttpUtil}(AzureHtml5JS||(AzureHtml5JS={}));var __extends=this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);c.prototype=b.prototype,a.prototype=new c},AzureHtml5JS;!function(a){!function(b){"use strict";function c(b,c,d){"undefined"==typeof d&&(d=0);var f,g=d;if(!c||4!==c.length)return a.Log.error(11,"Parameter error, box type must have four characters"),null;if(!b||b.byteLength<8)return a.Log.error(11,"Parameter error, not enough data"),null;for(;g<b.byteLength&&(f=e(b,g));){if(f.type===c)return f;g+=f.size}return null}function d(b,c){if(!c||4!==c.length)return a.Log.error(11,"Parameter error, box type must have four characters"),null;if(!b||!b.data||b.data.byteLength<8)return a.Log.error(11,"Parameter error, not enough data"),null;for(var d=b.getUint32(),f=4;d>0&&f<b.data.byteLength&&(b=e(b.data,f));){if(b.type===c)return b;f+=b.size,d--}return null}function e(b,c){if(!b||b.byteLength-c<8)return a.Log.error(11,"MP4 box parsing error, not enough data for box header"),null;var d=new l(b,c);if(d.size=d.getUint32(),d.type=d.readString(4),1===d.size){if(b.byteLength-c<16)return a.Log.error(11,"MP4 box parsing error, not enough data for largesize"),null;if(d.size=d.getUint32()<<32,d.size+=d.getUint32(),d.size>9007199254740991)return a.Log.error(11,"Box size too big for precise representation as Javascript number"),null}else 0===d.size&&(d.size=b.byteLength);if(d.size>b.byteLength-c)return null;if("uuid"===d.type){if(b.byteLength-d.readPosition<16)return a.Log.error(11,"MP4 box parsing error, not enough data for usertype"),null;d.usertype=d.readString(16)}return d.data=new DataView(b.buffer,b.byteOffset+d.readPosition,b.byteLength-d.readPosition),d}function f(b){var d,e=null;return(d=c(b,"tfhd"))?(e=n.parse(d),e||a.Log.warning(11,"Parsing of tfhd failed"),e):(a.Log.warning(11,"tfhd not found"),null)}function g(b){var d,e=null;return(d=c(b,"trun"))?(e=o.parse(d),e||a.Log.warning(11,"Parsing of trun failed"),e):(a.Log.warning(11,"trun not found"),null)}function h(b){var d,e=null;return(d=c(b,"tfdt"))?(e=q.parse(d),e||a.Log.warning(11,"Parsing of tfdt failed"),e):(a.Log.warning(11,"tfdt not found"),null)}function i(b){for(var d,e=[],f=0;f<b.byteLength;){if(d=c(b,r.typeStr,f),!d)return a.Log.warning(11,"pssh not found"),e;var g=r.parse(d);g?e.push(g):a.Log.warning(11,"Parsing of pssh failed"),f+=d.size}return e}function j(b){for(var d,e=[],f=0;f<b.byteLength;){if(d=c(b,s.typeStr,f),!d)return e;var g=s.parse(d);g?e.push(g):a.Log.warning(11,"Parsing of emsg failed"),f+=d.size}return e.length>0&&a.Log.verbose(11,"emsg boxes found: "+e.length),e}function k(b,c){for(var d,f=[],g=0;g<b.byteLength&&(d=e(b,g));)d.type===c&&f.push(d),g+=d.size;return f.length>0&&a.Log.verbose(11,"Boxes in type "+c+" found: "+f.length),f}var l=function(){function b(b,c){b&&"undefined"!=typeof c&&(this.data=b,this.reader=new a.DataViewReaderWriter.Reader(b,c))}return b.prototype.getUint32=function(){return this.reader.getUint32()},b.prototype.getInt32=function(){return this.reader.getInt32()},b.prototype.getUint8=function(){return this.reader.getUint8()},b.prototype.getBytes=function(a){return this.reader.getBytes(a)},b.prototype.getRemainingBytes=function(){return this.reader.getBytes(this.size-this.readPosition)},b.prototype.readString=function(a){return this.reader.readString(a)},b.prototype.readStringUntilEnd=function(){return this.reader.readStringUntilEnd()},b.prototype.readUTF8StringUntilEnd=function(){return this.reader.readUTF8StringUntilEnd()},b.prototype.readTerminatedString=function(){return this.reader.readTerminatedString()},Object.defineProperty(b.prototype,"readPosition",{get:function(){return this.reader.readPos},enumerable:!0,configurable:!0}),b}();b.Mp4Box=l;var m=function(b){function c(c){b.call(this),c&&(this.size=c.size,this.type=c.type,this.usertype=c.usertype,this.data=c.data,this.reader=new a.DataViewReaderWriter.Reader(this.data),this._versionFlags=c._versionFlags)}return __extends(c,b),c.parse=function(b){var d=null;return b.data.byteLength<4?(a.Log.error(11,"Full box parsing error, not enough bytes"),null):(d=new c,d.size=b.size,d.type=b.type,d.usertype=b.usertype,d._versionFlags=b.data.getUint32(0),d.data=new DataView(b.data.buffer,b.data.byteOffset+4,b.data.byteLength-4),d.reader=new a.DataViewReaderWriter.Reader(d.data),d)},c.serialize=function(b,c){var d=("uuid"===b.type?16:0)+12,e=c+d,f=new ArrayBuffer(e),g=new DataView(f),h=new a.DataViewReaderWriter.Writer(g);if(e>4294967295)throw new Error("Mp4FullBox::serialize, large size is not supported");if(h.setUint32(e),h.setString(b.type),"uuid"===b.type&&h.setString(b.usertype),h.setUint32(b._versionFlags),h.writePos!==d)throw new Error("Mp4FullBox::serialize, inconsistent bytes written");return h},Object.defineProperty(c.prototype,"version",{get:function(){return this._versionFlags>>24},set:function(a){this._versionFlags&=16777215,this._versionFlags|=a<<24},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"flags",{get:function(){return 16777215&this._versionFlags},set:function(a){this._versionFlags&=4278190080,this._versionFlags|=16777215&a},enumerable:!0,configurable:!0}),c.prototype.getUint32Cond=function(a){var b;return a&this.flags&&(b=this.reader.getUint32()),b},c}(l);b.Mp4FullBox=m;var n=function(b){function c(a){b.call(this,a)}return __extends(c,b),c.parse=function(b){var d=null,e=null;return(e=m.parse(b))?(d=new c(e),e.data.byteLength<d._calculatedSize()?(a.Log.error(11,"tfhd box parsing error, not enough data"),null):(d.trackId=d.getUint32(),d.baseDataOffsetHi=d.getUint32Cond(c.flags_baseDataOffsetPresent),d.baseDataOffsetLo=d.getUint32Cond(c.flags_baseDataOffsetPresent),d.sampleDescriptionIndex=d.getUint32Cond(c.flags_sampleDescriptionIndexPresent),d.defaultSampleDuration=d.getUint32Cond(c.flags_defaultSampleDurationPresent),d.defaultSampleSize=d.getUint32Cond(c.flags_defaultSampleSizePresent),d.defaultSampleFlags=d.getUint32Cond(c.flags_defaultSampleFlagsPresent),d)):null},c.prototype._calculatedSize=function(){var a=4;return a+=this.flags&c.flags_baseDataOffsetPresent?8:0,a+=this.flags&c.flags_sampleDescriptionIndexPresent?4:0,a+=this.flags&c.flags_defaultSampleDurationPresent?4:0,a+=this.flags&c.flags_defaultSampleSizePresent?4:0,a+=this.flags&c.flags_defaultSampleFlagsPresent?4:0},c.typeStr="tfhd",c.flags_baseDataOffsetPresent=1,c.flags_sampleDescriptionIndexPresent=2,c.flags_defaultSampleDurationPresent=8,c.flags_defaultSampleSizePresent=16,c.flags_defaultSampleFlagsPresent=32,c.flags_durationIsEmpty=65536,c.flags_defaultBaseIsMoof=131072,c}(m);b.TfhdBox=n;var o=function(b){function c(a){b.call(this,a)}return __extends(c,b),c.parse=function(b){var d=null,e=null;if(e=m.parse(b),!e)return null;if(d=new c(e),e.data.byteLength<4)return a.Log.error(11,"trun box parsing error, not enough data"),null;if(d.sampleCount=d.getUint32(),e.data.byteLength<d._calculatedSize())return a.Log.error(11,"trun box parsing error, not enough data"),null;d.dataOffset=d.getUint32Cond(c.flags_dataOffsetPresent),d.firstSampleFlags=d.getUint32Cond(c.flags_firstSampleFlagsPresent),d.sampleInfoArray=[];for(var f=0;f<d.sampleCount;f++){var g=new p;g.sampleDuration=d.getUint32Cond(c.flags_sampleDurationPresent),g.sampleSize=d.getUint32Cond(c.flags_sampleSizePresent),g.sampleFlags=d.getUint32Cond(c.flags_sampleFlagsPresent),d.flags&c.flags_sampleCompositionTimeOffsetsPresent&&(g.sampleCompositionTimeOffset=0===d.version?d.getUint32():d.getInt32()),d.sampleInfoArray.push(g)}return d},c.prototype._calculatedSize=function(){var a,b=4;return b+=this.flags&c.flags_dataOffsetPresent?4:0,b+=this.flags&c.flags_firstSampleFlagsPresent?4:0,a=this.flags&c.flags_sampleDurationPresent?4:0,a+=this.flags&c.flags_sampleSizePresent?4:0,a+=this.flags&c.flags_sampleFlagsPresent?4:0,a+=this.flags&c.flags_sampleCompositionTimeOffsetsPresent?4:0,b+=this.sampleCount*a},c.typeStr="trun",c.flags_dataOffsetPresent=1,c.flags_firstSampleFlagsPresent=4,c.flags_sampleDurationPresent=256,c.flags_sampleSizePresent=512,c.flags_sampleFlagsPresent=1024,c.flags_sampleCompositionTimeOffsetsPresent=2048,c}(m);b.TrunBox=o;var p=function(){function a(){}return a}();b.TrunSampleInfo=p;var q=function(b){function c(a){b.call(this,a),this.baseMediaDecodeTime=0}return __extends(c,b),c.parse=function(b){var d=null,e=null;return(e=m.parse(b))?(d=new c(e),e.data.byteLength<d._calculatedSize()?(a.Log.error(11,"tfdt box parsing error, not enough data"),null):(1===d.version&&(d.baseMediaDecodeTime=4294967296*d.getUint32()),d.baseMediaDecodeTime+=d.getUint32(),d.baseMediaDecodeTime>=9007199254740992&&a.Log.warning(11,"tfdt timestamp greater than 53 bits, possible precision loss"),d)):null},c.prototype._calculatedSize=function(){return 1===this.version?8:4},c.typeStr="tfdt",c}(m);b.TfdtBox=q;var r=function(b){function c(a){a?b.call(this,a):this.type=c.typeStr,this._keyIds=[]}return __extends(c,b),c.parse=function(b){var d=null,e=null;if(e=m.parse(b),!e)return null;if(d=new c(e),e.data.byteLength<d._calculatedSize())return a.Log.error(11,"pssh box parsing error, not enough data"),null;d.systemId=d.getBytes(16);var f=0;if(d.version>0){if(f=d.getUint32(),d._keyIds.length=f,e.data.byteLength<d._calculatedSize())return a.Log.error(11,"pssh box parsing error, not enough data"),null;for(var g=0;f>g;g++){var h=d.getBytes(16);d._keyIds[g]=h}}var i=d.getUint32();return e.data.byteLength<d._calculatedSize(i)?(a.Log.error(11,"pssh box parsing error, not enough data"),null):(d.specificData=d.getBytes(i),d)},c.prototype.addKeyId=function(a){if(16!==a.length)throw new Error("keyId must be 16 bytes");this.version=1,this._keyIds.push(a)},Object.defineProperty(c.prototype,"keyIds",{get:function(){return this._keyIds},enumerable:!0,configurable:!0}),c.prototype._calculatedSize=function(a){"undefined"==typeof a&&(a=0);var b=20+a;return this.version>0&&(b+=4+16*this._keyIds.length),b},c.prototype.serialize=function(){var a=m.serialize(this,this._calculatedSize(this.specificData.byteLength));if(!this.systemId)throw new Error("systemId is not set");if(a.setBytes(this.systemId),this.version>0&&(a.setUint32(this._keyIds.length),this._keyIds.forEach(function(b){a.setBytes(b)})),!this.specificData)throw new Error("specificData is not set");if(a.setUint32(this.specificData.byteLength),a.setBytes(this.specificData),a.writePos!=a.data.buffer.byteLength)throw new Error("Failed to write to end of buffer");return a.data.buffer},c.typeStr="pssh",c}(m);b.PsshBox=r;var s=function(a){function b(c){c?a.call(this,c):this.type=b.typeStr}return __extends(b,a),b.parse=function(a){var c=null,d=null;if(d=m.parse(a),!d)return null;if(c=new b(d),0===c.version)c.schemeIdUrl=c.readTerminatedString(),c.value=c.readTerminatedString(),c.timescale=c.getUint32(),c.presentationTimeDelta=c.getUint32(),c.eventDuration=c.getUint32(),c.id=c.getUint32();else{if(1!=c.version)return null;c.timescale=c.getUint32(),c.presentationTimePartA=c.getUint32(),c.presentationTimePartB=c.getUint32(),c.eventDuration=c.getUint32(),c.id=c.getUint32(),c.schemeIdUrl=c.readTerminatedString(),c.value=c.readTerminatedString()}return c.messageData=c.getRemainingBytes(),c},b.typeStr="emsg",b}(m);b.EmsgBox=s,b.GetBoxByType=c,b.GetBoxByTypeFromFixedChildren=d,b.GetTfhdBox=f,b.GetTrunBox=g,b.GetTfdtBox=h,b.GetPsshBoxes=i,b.GetEmsgBoxes=j,b.GetMp4Boxes=k}(a.Mp4Util||(a.Mp4Util={}));a.Mp4Util}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(){return a.VideoElementAdapter.supported()}function d(a){var b=!1;if(a&&a.canPlayType){var c=a.canPlayType("application/vnd.apple.mpegurl");("maybe"===c||"probably"===c)&&(b=!0)}return b}function e(a){var b=!1;if(a&&a.canPlayType){var c=a.canPlayType("video/mp4");("maybe"===c||"probably"===c)&&(b=!0)}return b}!function(a){a[a.type1=1]="type1",a[a.type2=2]="type2",a[a.type3=3]="type3"}(b.Type||(b.Type={}));b.Type;b.MseSupported=c,b.HlsType1Supported=d,b.Mp4Type1Supported=e}(a.PlayerDetector||(a.PlayerDetector={}));a.PlayerDetector}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;

!function(a){!function(b){"use strict";function c(a,b){if(a&&a.length>0){var c=a.trim().toLowerCase();if(j[c])return g(j[c],b)}}function d(a,b){var c=a.trim().toLowerCase();if(c.lastIndexOf(".ism/")>-1){var d=f(c);if(h[d])return g(h[d],b)}var j=e(c);return i[j]?g(i[j],b):null}function e(a){var b=null,c=a.lastIndexOf("."),d=a.indexOf("/",c);return c>-1&&(b=a.substring(c+1,-1!==d?d:a.length)),b}function f(a){var b=null,c=a,d="(format=",e=a.lastIndexOf("?");e>-1&&(c=a.substring(0,e));var f=c.lastIndexOf(d);if(f>-1){var g=c.lastIndexOf(")");if(g>f){b=c.substring(f+d.length,g);var h=b.indexOf(",");h>-1&&(b=b.substring(0,h))}}return b}function g(b,c){a.Log.verbose(7,"Using format "+b+" to get player type.");var d=null;switch(b){case 1:a.PlayerDetector.HlsType1Supported(c)?d=1:a.Log.warning(7,"HLS type1 is not supported.");break;case 2:a.PlayerDetector.Mp4Type1Supported(c)?d=1:a.Log.warning(7,"MP4 type1 is not supported.");break;case 3:a.PlayerDetector.MseSupported(c)?d=3:a.Log.warning(7,"MSE is not supported.")}return d}!function(a){a[a.hls=1]="hls",a[a.mp4=2]="mp4",a[a.dash=3]="dash"}(b.Format||(b.Format={}));var h=(b.Format,{"m3u8-aapl-v3":1,"m3u8-aapl-v4":1,"mpd-time-csf":3,"mpd-time-cmaf":3}),i={mp4:2,m3u8:1},j={"video/mp4":2,"application/dash+xml":3,"application/vnd.apple.mpegurl":1};b.getByPresentationType=c,b.getByUrl=d,b._getFileExtension=e,b._getAzureMediaFormatTag=f,b._getPlayerTypeByFormat=g}(a.PlayerType||(a.PlayerType={}));a.PlayerType}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(a){for(var b=0;b<e.length;b++)if(e[b]&&e[b].id&&e[b].id==a){var c=e.splice(b,1);return 1===c.length?c[0]:null}return null}if(b.setTimeout=window.setTimeout.bind(window),b.clearTimeout=window.clearTimeout.bind(window),!(window.Worker&&Blob&&window.URL&&window.URL.createObjectURL&&-1==navigator.userAgent.indexOf("MSAppHost")))return void a.Log.verbose(7,"AzureHtml5JS.Util: cannot override setTimeout/clearTimeout");var d=0,e=[];try{var f=new Blob(["'use strict';(function () {var timers = [];onmessage = function (event) {if (!event.data.id) {return;}if (event.data.start) {if (event.data.ms) {var internalId = setTimeout(function () {var expiredId = removeTimer(event.data.id);if (expiredId && expiredId.external) {postMessage({ type: 'timeout', id: expiredId.external });}}, event.data.ms);timers.push({ external: event.data.id, internal: internalId });postMessage({ type: 'started', id: event.data.id });}else {postMessage({ type: 'timeout', id: event.data.id });}}else if (event.data.stop) {var removedId = removeTimer(event.data.id);if (removedId && removedId.internal) {clearTimeout(removedId.internal);}postMessage({ type: 'cancelled', id: event.data.id });}};function removeTimer(timerId) {for (var i = 0; i < timers.length; i++) {if (timers[i] && timers[i].external && timers[i].external == timerId) {var removed = timers.splice(i, 1);return removed.length === 1 ? removed[0] : null;}}return null;}})();"],{type:"text/javascript"}),g=new Worker(window.URL.createObjectURL(f));g.onmessage=function(a){if("timeout"===a.data.type){var b=c(a.data.id);b&&b.callback&&b.callback.apply(b.ctx,b.args)}else"cancelled"===a.data.type&&c(a.data.id)},b.setTimeout=function(a,b){for(var c=[],f=0;f<arguments.length-2;f++)c[f]=arguments[f+2];return d++,e.push({id:d,ctx:this,callback:a,args:c}),g.postMessage({start:!0,id:d,ms:b}),d},b.clearTimeout=function(a){g.postMessage({stop:!0,id:a})}}catch(h){a.Log.verbose(7,"AzureHtml5JS.Util: setTimeout/clearTimeout override failed: "+h)}}(a.Util||(a.Util={}));a.Util}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";function c(a){var b=a.requestedStream.streamingInfo.currentSegment,c=b.segmentInfo.durationInSec;return!c&&a.sessionContext.commonPresentation.isLive&&b.prev&&(c=b.prev.segmentInfo.durationInSec),c}function d(b){return a.assert(0===b.requestedStream.type||1===b.requestedStream.type||2===b.requestedStream.type,"getBufferData: unexpected type"),0===b.requestedStream.type?b.sessionContext.videoBufferData:1===b.requestedStream.type?b.sessionContext.audioBufferData:b.sessionContext.textBufferData}b.getSegmentDuration=c,b.getBufferData=d}(a.StreamUtil||(a.StreamUtil={}));a.StreamUtil}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";function b(a,b){var e,f,g="";if(a.length>c?(e=parseInt(a.slice(0,a.length-c),10),f=parseInt(a.slice(a.length-c),10)):(e=0,f=parseInt(a,10)),f+=b,f>=d){var h=Math.floor(f/d);e+=h,f%=d}var i=f.toString();if(e){g=e.toString();for(var j=0;j<c-i.length;j++)g+="0"}return g+=i}var c=6,d=Math.pow(10,c);a.add=b}(a.Timestamp||(a.Timestamp={}));a.Timestamp}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(a){this.imsc1Disabled=!1,this.imsc1TrackPreviouslySelected=!1,this.ttmlTrackIsValid=!1,this.cueDownloadCount=0,this.consecutiveEmptyTtmlsLookup={},this.playerId=a,this.domParser=new DOMParser}return b.prototype.reset=function(){this.ttmlTrackIsValid=!1,this.consecutiveEmptyTtmlsLookup={}},b.prototype.parseInitSegment=function(b){if(!b)return a.Log.warning(16,"Init segment: no media data for TTML"),!1;var c,d,e,f,g,h,i,j=new DataView(b);return(c=a.Mp4Util.GetBoxByType(j,"moov"))?(d=a.Mp4Util.GetBoxByType(c.data,"trak"))?(e=a.Mp4Util.GetBoxByType(d.data,"mdia"))?(f=a.Mp4Util.GetBoxByType(e.data,"minf"))?(g=a.Mp4Util.GetBoxByType(f.data,"stbl"))?(h=a.Mp4Util.GetBoxByType(g.data,"stsd"))?(h=a.Mp4Util.Mp4FullBox.parse(h),i=a.Mp4Util.GetBoxByTypeFromFixedChildren(h,"stpp"),i?(this.ttmlTrackIsValid=!0,a.Log.warning(16,"The ttml track is valid.")):a.Log.warning(16,"The ttml track is invalid."),this.ttmlTrackIsValid):(a.Log.warning(16,"stsd not found"),!1):(a.Log.warning(16,"stbl not found"),!1):(a.Log.warning(16,"minf not found"),!1):(a.Log.warning(16,"mdia not found"),!1):(a.Log.warning(16,"trak not found"),!1):(a.Log.warning(16,"moov not found"),!1)},Object.defineProperty(b.prototype,"normalizedPresentationTimeInSeconds",{set:function(a){this.normalizedPresentationTimeInSecs=a},enumerable:!0,configurable:!0}),b.prototype.processTtml=function(c,d){a.Log.verbose(16,"Processing ttml data");var e=this;if(this.ttmlTrackIsValid){var f=this.extractTtml(d);if(f){var g=this.ttmlToCue(f);if(g.cues.length>0){var h=window.amp.getPlayers(),i=null;if(h&&(i=h[this.playerId])){for(var j=!0,k=g.cues.length-1;k>=0;k--)if(g.cues[k].text){j=!1;break}!j&&this.imsc1Disabled&&(a.Log.verbose(16,"Restarting IMSC1 captions."),i.prepareForImsc1Captions(this.imsc1TrackPreviouslySelected),this.imsc1Disabled=!1);for(var l=1===i.options_.imsc1CaptionsSettings.length,m=i.textTracks(),k=0;k<m.length;k++){var n=m[k];if(n.isImsc1&&(void 0!==n.language&&n.language.toLowerCase()==g.lang||l)){e.cueDownloadCount%b.cueCleanupFrequency||e.cleanupCues(i,n),n.loaded_=!0,g.cues.forEach(function(a){n.addCue(a)});var o=this.consecutiveEmptyTtmlsLookup[c];if((!o||isNaN(o))&&(o=0),j){if(++o>=b.consecutiveEmptyCaptionsThreshold){var p="Empty IMSC1 captions in stream "+c;a.Log.error(16,p),o=0}Date.now()-this.lastNonEmptyTtmlTimestamp>b.emptyCaptionsTimeThreadhold&&(a.Log.verbose(16,"Turning off IMSC1 captions."),this.imsc1TrackPreviouslySelected="showing"===n.mode,i.removeRemoteTextTrack(n),this.imsc1Disabled=!0)}else o=0,this.lastNonEmptyTtmlTimestamp=Date.now();this.consecutiveEmptyTtmlsLookup[c]=o;break}}e.cueDownloadCount++}}}}else a.Log.error(16,"Skipping ttml data. The ttml track is invalid.")},b.prototype.extractTtml=function(b){if(a.Log.verbose(16,"Extracting ttml data"),!b)return a.Log.warning(16,"Media segment: no media data for TTML"),null;var c,d=new DataView(b);return c=a.Mp4Util.GetBoxByType(d,"mdat"),c?c.readUTF8StringUntilEnd():(a.Log.warning(16,"mdat not found"),null)},b.prototype.ttmlToCue=function(a){var b=this.domParser.parseFromString(a,"text/xml"),c=this.getLanguage(b),d=b.getElementsByTagName("p"),e=[];if(d.length>0)for(var f=0;f<d.length;f++)e=e.concat(this.parseTTMLCue(d[f]));return{lang:c,cues:e}},b.prototype.getLanguage=function(a){var b,c=a.getElementsByTagName("tt");return c&&c.length>0&&(b=c[0].getAttribute("xml:lang")),b=b||"",b.toLowerCase()},b.prototype.parseTTMLCue=function(a){for(var b=a.getAttribute("begin").split(":"),c=a.getAttribute("end").split(":"),d=this.convertTimeToSeconds(b)+this.normalizedPresentationTimeInSecs,e=this.convertTimeToSeconds(c)+this.normalizedPresentationTimeInSecs,f="",g=0;g<a.childNodes.length;g++){var h=a.childNodes[g],i="";3===h.nodeType&&"\n"!==h.nodeValue[0]?i=h.nodeValue:1===h.nodeType&&("br"===h.nodeName?i="\n":"span"===h.nodeName&&""!==h.textContent&&(i=h.textContent)),f+=i}return{startTime:d,endTime:e,text:f,hasBeenReset:!0,align:"middle",line:14,lineAlign:"start",position:50,positionAlign:"middle",size:100,snapToLines:!0,vertical:""}},b.prototype.convertTimeToSeconds=function(a){return 60*(60*parseFloat(a[0])+parseFloat(a[1]))+parseFloat(a[2])},b.prototype.cleanupCues=function(b,c){for(var d=Date.now(),e=b.currentAbsoluteTime()||b.currentTime(),f=c.cues,g=0,h=0;h<f.length;)f[h].endTime<e?(c.removeCue(f[h]),g++):h++;a.Log.verbose(16,"cleanupCues removed "+g+" cues. Spent "+(Date.now()-d)+"ms")},b.prototype.calculateMemorySize=function(b){for(var c=Date.now(),d=b.cues,e=0,f=0,g=function(a){return a?a.length:0};f<d.length;){if(e+=d[f].text.length,d[f].displayState){var h=d[f].displayState;e+=g(h.innerHTML),e+=g(h.innerText),e+=g(h.outerHTML),e+=g(h.outerText),e+=g(h.textContent),e+=g(h.baseURI)}e*=2,f++}a.Log.verbose(16,"calculateMemorySize mem size="+e/1024/1024+" mb. Spent "+(Date.now()-c)+"ms")},b.cueCleanupFrequency=5,b.consecutiveEmptyCaptionsThreshold=10,b.emptyCaptionsTimeThreadhold=3e4,b}();b.Manager=c}(a.Ttml||(a.Ttml={}));a.Ttml}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";var b=function(){function b(){}return b.FormatDashMediaUrl=function(a,b,c,d){if(!a)throw new Error("url Template is not set");if(!b)throw new Error("bitrate is not set");var e=a;return e=e.replace("$Bandwidth$",b),c&&(e=e.replace("$Time$",c)),d&&(e+=d),e},b.FormatDashInitUrl=function(b,c,d){return a.UrlFormatter.FormatDashMediaUrl(b,c,null,d)},b}();a.UrlFormatter=b}(a.Util||(a.Util={}));a.Util}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(b){"use strict";var c=function(){function b(){if(!b.useJavascriptLibrary){var a="msCrypto"in window,c=a?window.msCrypto:window.crypto;this._webCryptor=c.subtle||c.webkitSubtle}}return b.prototype.dispose=function(){this._webCryptor=null},b.prototype.initialize=function(b,c,d){var e=this,f={name:"aes-cbc",iv:d};return new Promise(function(g,h){e._webCryptoImportKey(c,f).then(function(c){b.webCrypto={importedkey:c,algorithm:f},e.type="webcrypto",a.Log.verbose(12,"Using webcrypto"),g()},function(f){return c&&d?(b.forge={keyStr:a.Common.uint8ArrayToString(new Uint8Array(c)),ivStr:a.Common.uint8ArrayToString(new Uint8Array(d))},e.type="forge",a.Log.verbose(12,"Using forge"),void g()):void h(f)})})},b.prototype.isInitialized=function(a){return null!=a.forge||null!=a.webCrypto},b.prototype.decrypt=function(a,b){var c=this;return new Promise(function(d,e){a.webCrypto?c._webCryptoDecrypt(a.webCrypto.algorithm,a.webCrypto.importedkey,b).then(function(a){d(a)},function(a){e(a)}):c._forgeDecrypt(a.forge,b).then(function(a){d(a)},function(a){e(a)})})},b.prototype._webCryptoImportKey=function(a,b){var c=this;return new Promise(function(d,e){function f(a){var b=h.result?h.result:a;d(b)}function g(a){e(a)}if(!c._webCryptor)return void e("Platform doesn't support webCrypto");var h=c._webCryptor.importKey("raw",new Uint8Array(a),b,!1,["decrypt"]);"oncomplete"in h?(h.oncomplete=f,h.onerror=g):h.then(function(a){f(a)},function(a){g(a)})})},b.prototype._forgeDecrypt=function(c,d){return new Promise(function(e,f){function g(){a.Forge.decrypt(h,c,d)||(Date.now()-i<b._maxWorkerWaitMSec?a.Util.setTimeout(g,0):f("The forge worker is too busy, total wait time = "+(Date.now()-i)+"ms"))}function h(a){e(a.buffer)}var i=Date.now();g()})},b.prototype._webCryptoDecrypt=function(a,b,c){var d=this;return new Promise(function(e,f){function g(a){var b=i.result?i.result:a;e(b)}function h(a){f(a)}var i=d._webCryptor.decrypt(a,b,new Uint8Array(c));"oncomplete"in i?(i.oncomplete=g,i.onerror=h,i.onabort=h):i.then(function(a){g(a)},function(a){h(a)})})},b.useJavascriptLibrary=!1,b._maxWorkerWaitMSec=3e4,b}();b.Decryptor=c}(a.WebCryptoUtil||(a.WebCryptoUtil={}));a.WebCryptoUtil}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JS;!function(a){!function(a){"use strict";var b=function(){function a(){this.xmlHttpRequestDelegate=new XMLHttpRequest}return Object.defineProperty(a.prototype,"responseType",{get:function(){return this.xmlHttpRequestDelegate.responseType},set:function(a){this.xmlHttpRequestDelegate.responseType=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"timeout",{get:function(){return this.xmlHttpRequestDelegate.timeout},set:function(a){this.xmlHttpRequestDelegate.timeout=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"msCaching",{get:function(){return this.xmlHttpRequestDelegate.msCaching?this.xmlHttpRequestDelegate.msCaching:void 0},set:function(a){this.xmlHttpRequestDelegate.msCaching&&(this.xmlHttpRequestDelegate.msCaching=a)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"readyState",{get:function(){return this.xmlHttpRequestDelegate.readyState},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"status",{get:function(){return this.xmlHttpRequestDelegate.status},set:function(a){this.xmlHttpRequestDelegate.status=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"response",{get:function(){return this.xmlHttpRequestDelegate.response},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"statusText",{get:function(){return this.xmlHttpRequestDelegate.statusText},enumerable:!0,configurable:!0}),a.prototype.setRequestHeader=function(a,b){this.xmlHttpRequestDelegate.setRequestHeader(a,b)},a.prototype.abort=function(){this.xmlHttpRequestDelegate.abort()},a.prototype.open=function(a,b,c,d,e){this.xmlHttpRequestDelegate.open(a,b,c?c:!0,d,e)},a.prototype.getResponseHeader=function(a){return this.xmlHttpRequestDelegate.getResponseHeader(a)},a.prototype.send=function(a){this.setCallbacksOnDelegate(),this.xmlHttpRequestDelegate.send(a)},a.prototype.setCallbacksOnDelegate=function(){var a=this;this.xmlHttpRequestDelegate.onabort=function(b){a.onabort&&a.onabort(b)},this.xmlHttpRequestDelegate.onerror=function(b){a.onerror&&a.onerror(b)},this.xmlHttpRequestDelegate.onload=function(b){a.onload&&a.onload(b)},this.xmlHttpRequestDelegate.onloadstart=function(b){a.onloadstart&&a.onloadstart(b)},this.xmlHttpRequestDelegate.onloadend=function(b){a.onloadend&&a.onloadend(b)},this.xmlHttpRequestDelegate.onprogress=function(b){a.onprogress&&a.onprogress(b)},this.xmlHttpRequestDelegate.ontimeout=function(b){a.ontimeout&&a.ontimeout(b)},this.xmlHttpRequestDelegate.onreadystatechange=function(b){a.onreadystatechange&&a.onreadystatechange(b)}},a}();a.XMLHttpRequestWrapper=b}(a.HttpRequest||(a.HttpRequest={}));a.HttpRequest}(AzureHtml5JS||(AzureHtml5JS={}));var AzureHtml5JSTech=AzureHtml5JS,silverlightSSLoaded,onSilverlightError,UrlRewriter;!function(a){"use strict";function b(a){d(a)&&(u=a)}function c(){u=n}function d(a){if(a&&a.length>0){for(var b=0;b<a.length;b++)if(-1===n.indexOf(a[b]))throw new Error('Format "'+a[b]+'" not supported');return!0}return!1}function e(a,b){for(var c=[],d=0;d<b.length;d++)-1!==s[a].indexOf(b[d].type)&&c.push(b[d]);return c}function f(a){for(var b,c,d=[],e=[],f=0;a&&f<a.length;f++){var i=a[f].src,j=a[f].src.indexOf("?");-1!==j&&(i=a[f].src.substr(0,j).toLowerCase()),-1===i.toLowerCase().lastIndexOf(".ism/manifest")||a[f].disableUrlRewriter?d.push(a[f]):(c=g(a[f].src),-1===e.indexOf(c)&&(e.push(c),b=h(a[f]),b&&(d=d.concat(b))))}return d.length>0?d:null}function g(a){var b=a.trim(),c=b.search(/\.ism\/manifest/i);return b.substr(0,c+t.length)}function h(a){var b,c=a.src.trim(),f=c.search(/format=/i),h=[],n="",s="",x=c.indexOf("?");if(-1!==x&&(s=c.substr(x),""!==s)){var y=new RegExp("(\\?|&)protectionType=(.[^&]*)","i"),z=new RegExp("(\\?|&)token=(.[^&]*)","i"),A=s.match(y),B=s.match(z);if(A&&3===A.length){var C=new w;C.type=A[2],B&&3===B.length&&(C.authenticationToken=decodeURIComponent(B[2])),a.protectionInfo=[C]}}var D=c.match(/.*\(format=(.*)\)/),E=!1;if(D&&2===D.length){var F=D[1].toLowerCase();(0===F.indexOf(p)||0===F.indexOf(q))&&(E=!0)}f>-1&&(c=c.replace(/format=[^,)]*[ ,]*/i,""),c=c.replace(/\(\s*\)/,"")),b=c.match(/\.ism\/manifest\([^)]*\)/i),b&&b.length>0&&(n=b[0].substr(t.length+1).trim()),c=g(a.src.trim());var G=u;a.streamingFormats&&d(a.streamingFormats)&&(G=a.streamingFormats);for(var H=0;H<G.length;H++){var I,J,K,L="";if(I=G[H],J=r[I],I!==i){var M;M=I==j&&E?p:I!=k&&I!=l&&I!=m||!E?o[I]:q,L="(format="+M,L+=n?","+n:")"}else n&&(L="("+n);if(a.protectionInfo){var N=e(I,a.protectionInfo);if(!N.length)continue;K=new v(c+L,J,N)}else K=new v(c+L,J,null);""!==s&&(K.src+=s),h.push(K)}return h.length>0?h:null}var i="SMOOTH",j="DASH",k="HLS-V3",l="HLS-V4",m="HLS",n=[i,j,l,k,m],o={DASH:"mpd-time-csf","HLS-V3":"m3u8-aapl-v3","HLS-V4":"m3u8-aapl-v4",HLS:"m3u8-aapl"},p="mpd-time-cmaf",q="m3u8-cmaf",r={SMOOTH:"application/vnd.ms-sstr+xml",DASH:"application/dash+xml","HLS-V3":"application/vnd.apple.mpegurl","HLS-V4":"application/vnd.apple.mpegurl",HLS:"application/vnd.apple.mpegurl"},s={SMOOTH:["PlayReady","AES"],DASH:["PlayReady","AES","Widevine"],"HLS-V3":["PlayReady","AES"],"HLS-V4":["PlayReady","AES"],HLS:["PlayReady","AES","FairPlay"]},t=".ism/manifest",u=n,v=function(){function a(a,b,c){this.src=a,this.type=b,this.protectionInfo=c}return a}();a.streamSrc=v;var w=function(){function a(){}return a}();a.protectionInfo=w,a.setStreamingFormats=b,a.resetStreamingFormats=c,a.expandSources=f}(UrlRewriter||(UrlRewriter={}));var AMP;!function(a){!function(a){"use strict";function b(a){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=[],d=0;d<a.byteLength;){var e=a[d++];c.push(b.charAt(e>>2)),e=(3&e)<<4,d<a.byteLength?(c.push(b.charAt(e|a[d]>>4)),e=(15&a[d++])<<2,d<a.byteLength?(c.push(b.charAt(e|a[d]>>6)),c.push(b.charAt(63&a[d++]))):(c.push(b.charAt(e)),c.push("="))):(c.push(b.charAt(e)),c.push("=="))}return c.join("")}function c(a){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=new Uint8Array(new ArrayBuffer(3*a.length/4+4)),d=0,e=0;d<a.length;){var f=b.indexOf(a.charAt(d)),g=b.indexOf(a.charAt(d+1));if(c[e++]=f<<2|g>>4,"="!==a.charAt(d+2)){var h=b.indexOf(a.charAt(d+2));if(c[e++]=g<<4|h>>2,"="!==a.charAt(d+3)){var i=b.indexOf(a.charAt(d+3));c[e++]=h<<6|i}}d+=4}return new Uint8Array(c.buffer,0,e)}a.binaryToBase64=b,a.base64ToBinary=c}(a.Base64Utils||(a.Base64Utils={}));a.Base64Utils}(AMP||(AMP={}));var AMP;!function(a){!function(a){"use strict";function b(a,b){o(a,3,b)}function c(a,b){o(a,2,b)}function d(a,b){o(a,1,b)}function e(a,b){o(a,0,b)}function f(a){for(var e=[],f=0;f<arguments.length-1;f++)e[f]=arguments[f+1];if(e&&e.length>0){var g=Array.prototype.slice.call(e[0]);switch(a){case"warn":c(4,g.join(" "));break;case"error":d(4,g.join(" "));break;case null:b(4,g.join(" "));break;default:b(4,g.join(" "))}}}function g(a){u=a}function h(a){void 0===a||null===a?v.forEach(function(a,b,c){c[b]=!0}):v[a]=!0}function i(a){void 0===a||null===a?v.forEach(function(a,b,c){c[b]=!1}):v[a]=!1}function j(a){"undefined"==typeof a&&(a=!0),y=a}function k(a){if(void 0!==a&&a.TraceTargets&&!(a.TraceTargets.length<=0)){y=!1,C=!1,u=a.maxLogLevel;for(var b=0;b<a.TraceTargets.length;b++)"console"===a.TraceTargets[b].target.toLowerCase()?C=!0:"memory"===a.TraceTargets[b].target.toLowerCase()&&(y=!0,A=a.TraceTargets[b].maxMemoryTraceCount?a.TraceTargets[b].maxMemoryTraceCount:x)}}function l(a){"undefined"==typeof a&&(a=!0);var b=z;return a&&(z=[]),b.join("\n")}function m(){B=z.slice()}function n(){return B.join("\n")}function o(a,b,c){var d=new Date(Date.now());if(u>=b&&v[a]){var e="["+("0"+d.getHours()).slice(-2)+":"+("0"+d.getMinutes()).slice(-2)+":"+("0"+(d.getSeconds()+d.getMilliseconds()/1e3).toFixed(3)).slice(-6)+"] "+p[b]+": "+q[a]+": "+c;y&&(z.length>A&&z.shift(),z.push(e)),C&&s.log(e)}}!function(a){a[a.none=0]="none",a[a.error=1]="error",a[a.warning=2]="warning",a[a.verbose=3]="verbose"}(a.Level||(a.Level={}));var p=a.Level;!function(a){a[a.functionalTest=0]="functionalTest",a[a.azureHtml5JS=1]="azureHtml5JS",a[a.flashSS=2]="flashSS",a[a.silverlightSS=3]="silverlightSS",a[a.videojs=4]="videojs",a[a.plugin=5]="plugin",a[a.html5FairplayHLS=6]="html5FairplayHLS",a[a.html5=7]="html5",a[a.scte35=8]="scte35",a[a.scheduler=9]="scheduler",a[a.ad=10]="ad",a[a.ampAPI=11]="ampAPI",a[a.cea608Module=12]="cea608Module",a[a.ttml=13]="ttml",a[a.max=14]="max"}(a.Area||(a.Area={}));var q=a.Area;a.verbose=b,a.warning=c,a.error=d,a.startup=e,a.videoJSLogOverride=f,a.setConsoleOutputByLevel=g,a.enableConsoleOutputByArea=h,a.disableConsoleOutputByArea=i,a.enableMemoryLog=j,a.setLogConfig=k,a.getMemoryLog=l,a.saveMemoryLog=m,a.getSavedMemoryLog=n,a.writeEntry=o;for(var r=function(){},s=window.console||{log:r,warn:r,error:r},t=!1,u=0,v=[],w=0;14>w;w++)v.push(!1);var x=5e4,y=!1,z=[],A=x,B=[],C=!0;a.enableConsoleOutputByArea(),a.setConsoleOutputByLevel(t?3:1)}(a.Logger||(a.Logger={}));a.Logger}(AMP||(AMP={}));var AMP;!function(a){!function(a){"use strict";function b(){for(var a=[],b=0;b<arguments.length-0;b++)a[b]=arguments[b+0];var c=Array.prototype.slice.call(a,1);return a[0].replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}a.formatString=b}(a.Misc||(a.Misc={}));a.Misc}(AMP||(AMP={}));var AMP;!function(a){!function(a){"use strict";!function(a){a[a.audio=0]="audio",a[a.video=1]="video"}(a.MediaType||(a.MediaType={}));var b=(a.MediaType,function(){function a(a,b){this._el=a,this._typeStr=0===b?"Audio":"Video",this._bufferLevel=0,this._handlers=new c,this.downloadRequested=null,this.downloadCompleted=null,this.downloadFailed=null}return Object.defineProperty(a.prototype,"bufferLevel",{get:function(){var a="get"+this._typeStr+"BufferLength";return this._el&&this._el[a]?this._el[a]():0},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"perceivedBandwidth",{get:function(){return this._el&&this._el.getPerceivedBandwidth?this._el.getPerceivedBandwidth():0},enumerable:!0,configurable:!0}),a.prototype.addEventListener=function(a,b){this._handlers[a]&&this._handlers[a].push(b)},a.prototype.removeEventListener=function(a,b){if(this._handlers[a]){var c=this._handlers[a].indexOf(b);-1!==c&&this._handlers[a].splice(c,1)}},a.prototype.dispatchEvent=function(a){if(this._handlers[a])for(var b={type:a},c=0;c<this._handlers[a].length;c++)this._handlers[a][c].call(this,b)},a}());a.BufferData=b;var c=function(){function a(){this.downloadrequested=[],this.downloadcompleted=[],this.downloaddecrypted=[],this.downloadfailed=[]}return a}()}(a.FlashSS||(a.FlashSS={}));a.FlashSS}(AMP||(AMP={}));var AMP;!function(a){!function(b){"use strict";var c=function(){function b(a){this._streams=[],this._flashElement=a;for(var b=0;b<a.getNumAlternativeAudioStreams();b++){var c=new d(a,b);this._streams.push(c)}this.selectedIndex=this._streams.length>0?a.getCurrentAlternativeAudioStreamIndex():void 0}return Object.defineProperty(b.prototype,"streams",{get:function(){return this._streams},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"enabledIndices",{get:function(){for(var a=[],b=0;b<this._streams.length;b++)if(this._streams[b].enabled){a.push(b);break}return a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(a){0!=this._streams.length&&(void 0!=this._selectedIndex&&(this._streams[this._selectedIndex].enabled=!1),this._streams[a].enabled=!0,this._selectedIndex=a)},enumerable:!0,configurable:!0}),b.prototype.switchIndex=function(b){if(this._flashElement.getHasAlternativeAudio()){if(1!=this.enabledIndices.length)return a.Logger.error(2,"switchIndex failed - only single stream supported: "+this.enabledIndices.length+" streams enabled"),void this._flashElement.tech.trigger(amp.streamListEventName.streamselectnotsupported);if(b>=this.streams.length||0>b)return a.Logger.error(2,"audioChange failed - tried to enable invalid index: "+b),void this._flashElement.tech.trigger(amp.streamListEventName.streamindexinvalid);if(b===this.enabledIndices[0])return a.Logger.verbose(2,"audioChange failed because current stream selected"),void this._flashElement.tech.trigger(amp.streamListEventName.streamselected);this.selectedIndex=b,this._flashElement.switchAlternativeAudioIndex(b),this._flashElement.tech.trigger(amp.streamListEventName.streamselected)}else a.Logger.error(2,"No alternative audio streams found")},b.prototype.addEventListener=function(a,b){this._flashElement.tech.on(a,b)},b.prototype.removeEventListener=function(a,b){this._flashElement.tech.off(a,b)},b}();b.AudioStreamList=c;var d=function(){function a(a,b){this.enabled=!1,this.language=a.getAlternativeAudioItemAt(b).info.attributes.Language,this.codec=a.getAlternativeAudioItemAt(b).info.targetTrack.fourCC,this.bitrate=1e3*a.getAlternativeAudioItemAt(b).bitrate,this.name=this.getName(a,b)}return a.prototype.getName=function(a,b){var c=a.getAlternativeAudioItemAt(b).info.urlTemplate.toLowerCase(),d="fragments(",e=c.indexOf(d),f=c.indexOf("=",e);return a.getAlternativeAudioItemAt(b).info.urlTemplate.substring(e+d.length,f)},a}();b.AudioStream=d}(a.FlashSS||(a.FlashSS={}));a.FlashSS}(AMP||(AMP={}));var AMP;!function(a){!function(a){"use strict";var b=function(){function a(a){if(this.streams=[],a.getIsDynamicStream()){var b=new c(a);this.streams.push(b)}this.selectedIndex=this.streams.length>0?0:void 0}return a}();a.VideoStreamList=b;var c=function(){function a(a){this.name="",this.tracks=[],this._flashElement=a,this._selectedTrack=-1;for(var b=a.getStreamItems(),c=0;c<b.length;c++){var d=new e(b[c]);this.tracks.push(d)}}return a.prototype.selectTrackByIndex=function(a){if(this._selectedTrack!=a){-1==a?this._flashElement.setAutoDynamicStreamSwitch(!0):(this._flashElement.setAutoDynamicStreamSwitch(!1),this._flashElement.switchDynamicStreamIndex(a));for(var b=0;b<this.tracks.length;b++)this.tracks[b].streamingInfo.selectable=-1===a?!0:a===b;this._selectedTrack=a,this._flashElement.tech.trigger(amp.streamEventName.trackselected)}},a.prototype.addEventListener=function(a,b){this._flashElement.tech.on(a,b)},a.prototype.removeEventListener=function(a,b){this._flashElement.tech.off(a,b)},a}();a.VideoStream=c;var d=function(){function a(){this.selectable=!0}return a}();a.MediaTrackStreamingInfo=d;var e=function(){function a(a){this.width=a.width,this.height=a.height,this.bitrate=1e3*a.bitrate,this.streamingInfo=new d}return Object.defineProperty(a.prototype,"selectable",{get:function(){return this.streamingInfo.selectable},enumerable:!0,configurable:!0}),a}();a.VideoTrack=e}(a.FlashSS||(a.FlashSS={}));a.FlashSS}(AMP||(AMP={}));var AMP;!function(a){!function(a){"use strict";var b=function(){function a(a){this._html5Tech=a}return Object.defineProperty(a.prototype,"streams",{get:function(){var a=[],b=this._html5Tech.player().audioTracks();if(b)for(var c=0;c<b.length;c++){var d={name:b[c].label,codec:"aac",language:b[c].language,bitrate:0,enabled:b[c].enabled};a.push(d)}return a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"enabledIndices",{get:function(){var a=[],b=this._html5Tech.player().audioTracks();if(b)for(var c=0;c<b.length;c++)b[c].enabled&&a.push(c);return a},enumerable:!0,configurable:!0}),a.prototype.switchIndex=function(a){var b=this._html5Tech.player().audioTracks();if(b&&a>=0&&a<b.length)for(var c=0;c<b.length;c++)b[c].enabled=c===a,c===a&&this._html5Tech.trigger(amp.streamListEventName.streamselected)},a.prototype.addEventListener=function(a,b){this._html5Tech.on(a,b)},a.prototype.removeEventListener=function(a,b){this._html5Tech.off(a,b)},a}();a.AudioStreamList=b}(a.Html5||(a.Html5={}));a.Html5}(AMP||(AMP={}));var AMP;!function(a){!function(b){"use strict";var c;!function(a){a[a.success=200]="success"}(c||(c={}));var d=function(){function a(a,b,c){this.src=a,this.autoPlay=b,this.fairplayInfo=c}return a}();b.SrcInfo=d;var e=function(){function a(a,b){this.code=a,this.msg=b}return a}(),f=function(){function a(a,b,c,d){this.target=a,this.listener=b,this.eventName=c,this.useCapture=d}return a}(),g=function(){function b(a,b,c,d){this.videoTag=a,this.srcInfo=b,this.onError=c,this.onEvent=d,this.certFecthed=!1,this.certificate=null,this.session=null,this.licenseUrl=null,this.disposed=!1,this.keySessionEventListeners=[],this.init()}return b.prototype.dispose=function(){this.disposed=!0,this.keySessionEventListeners.forEach(function(a){a.target.removeEventListener(a.eventName,a.listener,a.useCapture)}),this.keySessionEventListeners=null,this.videoTag&&(this.videoTag=null),this.srcInfo=null,this.onError=null,this.certificate=null,this.onEvent=null,this.certFecthed=!1,this.session&&this.session.close()},b.prototype.init=function(){function b(){d.certFecthed=!0,d.setSrcOnVideoElement()}function c(){return new Promise(function(b,c){function f(){d.disposed||(a.Logger.verbose(6,"FairPlay certificate fetch completed"),200===this.status?(d.certificate=new Uint8Array(this.response),b()):c(new e(5242887,"Fairplay certificate fetch failed with status ="+this.status)))}function g(){d.disposed||c(new e(5242887,"Error occurred during Fairplay certificate fetch."))}var h=new XMLHttpRequest;h.open("GET",d.srcInfo.fairplayInfo.certificateUrl,!0),h.responseType="arraybuffer",h.onload=f,h.onerror=g,a.Logger.verbose(6,"Fairplay certificate fetch initiated"),h.send()})}if(!this.srcInfo.fairplayInfo||!this.srcInfo.fairplayInfo.type||"FairPlay"!=this.srcInfo.fairplayInfo.type||!this.srcInfo.fairplayInfo.certificateUrl)return void this.onError(4194304,"Initialization Error in FairPlay");var d=this;c().then(b)["catch"](function(b){a.Logger.error(6,b.msg),d.onError(b.code,b.msg)})},b.prototype.play=function(){this.certFecthed?this.videoTag.play():this.pendingPlay=!0},b.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,d),this.keySessionEventListeners.push(new f(a,c,b,d))},b.prototype.setSrcOnVideoElement=function(){function b(a){if(!j.disposed){var b=a.initData,g="com.apple.fps.1_0";j.contentId=f(b),b=j.concatInitDataContentIdAndCertificate(b,i(j.contentId)),j.session=e(b,g),j.session&&(j.addEventListener(j.session,"webkitkeymessage",c,!1),j.addEventListener(j.session,"webkitkeyerror",d,!1))}}function c(b){function c(){if(!j.disposed)try{if(a.Logger.verbose(6,"FairPlay License fetch completed"),200!==this.status)throw Error("License fetch failed with http status = "+this.status);var b=this.responseText.trim(),c=b.indexOf("<ckc>"),d=b.indexOf("</ckc>");if(-1===c||-1===d)throw Error("License data format not as expected, missing or misplaced <ckc> tag");c+=5,b=b.substr(c,d-c);var e=a.Base64Utils.base64ToBinary(b);j.session.update(e)}catch(f){var g=f.message?f.message:"Failed to update MediaKeySession with fetched Fairplay license.";a.Logger.error(6,g),j.onError(5242886,g)}}function d(){if(!j.disposed){var b="Error occurred during Fairplay license fetch.";a.Logger.error(6,b),j.onError(5242886,b)}}if(!j.disposed){var e=new XMLHttpRequest;e.open("POST",j.licenseUrl,!0),e.onload=c,e.onerror=d,e.responseType="text";var f="spc="+a.Base64Utils.binaryToBase64(b.message)+"&assetId="+encodeURIComponent(j.contentId);e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),j.srcInfo.fairplayInfo.authenticationToken&&e.setRequestHeader("Authorization",j.srcInfo.fairplayInfo.authenticationToken),a.Logger.verbose(6,"FairPlay License fetch initiated"),e.send(f)}}function d(){if(!j.disposed){var b="MediaKeyError code: "+j.session.error.code+", systemCode: "+AzureHtml5JS.Common.toHexString(j.session.error.systemCode);a.Logger.error(6,b),
j.onError(5242880,b)}}function e(b,c){var d="video/mp4",e="WebKitMediaKeys"in window,f=null;try{if(!e||!window.WebKitMediaKeys.isTypeSupported(c,d))throw new Error("No EME support.");j.videoTag.webkitSetMediaKeys(new window.WebKitMediaKeys(c)),f=j.videoTag.webkitKeys.createSession(d,b)}catch(g){var h=g.message?g.message:c+" session creation failed";a.Logger.error(6,h),j.onError(5242881,h)}return f}function f(a){var b=h(a);return j.licenseUrl=b.substring(1).replace("skd://","https://"),g(j.licenseUrl)}function g(a){var b=document.createElement("a");return b.href=a,b.hostname}function h(a){var b=new Uint16Array(a.buffer);try{return String.fromCharCode.apply(null,b)}catch(c){for(var d=[],e=0;e<b.byteLength;e++)d.push(String.fromCharCode(b[e]));return d.join("")}}function i(a){for(var b=new ArrayBuffer(2*a.length),c=new Uint16Array(b),d=0,e=a.length;e>d;d++)c[d]=a.charCodeAt(d);return c}if(!this.disposed){this.addEventListener(this.videoTag,"webkitneedkey",b,!1),this.videoTag.autoplay=this.srcInfo.autoPlay,this.videoTag.src=this.srcInfo.src,this.pendingPlay&&this.videoTag.play();var j=this}},b.prototype.concatInitDataContentIdAndCertificate=function(a,b){var c=4,d=a.length+c+b.byteLength+c+this.certificate.byteLength,e=new ArrayBuffer(d),f=new DataView(e),g=0,h=new Uint8Array(e,g,a.byteLength);h.set(a),g+=h.byteLength,f.setUint32(g,b.byteLength,!0),g+=c;var i=new Uint16Array(e,g,b.length);i.set(b),g+=i.byteLength,f.setUint32(g,this.certificate.byteLength,!0),g+=c;var j=new Uint8Array(e,g,this.certificate.byteLength);return j.set(this.certificate),new Uint8Array(e,0,e.byteLength)},b}();b.FairPlay=g}(a.Html5Fairplay||(a.Html5Fairplay={}));a.Html5Fairplay}(AMP||(AMP={}));var AMP;!function(a){!function(b){"use strict";function c(a){var b=null;if(a)try{for(var c=window.atob(a),e=new ArrayBuffer(c.length),f=new Uint8Array(e),g=0;g<c.length;g++)f[g]=c.charCodeAt(g);b=d(f)}catch(h){b=null}return b}function d(b){var c=null;if(b&&b.length>18)try{var d=9e4,e=4294967296,f=67108864,g=16777216;c={id:void 0,startOffset:0};var h=b[4]>>7;if(h)a.Logger.warning(8,"Received encrypted message. Skipping..");else{var i=(127&b[4])*f+(b[5]<<18)+(b[6]<<10)+(b[7]<<2)+(b[8]>>6),j=b[13];if(5!=j)a.Logger.warning(8,"Skipping unsupported splice command: "+j);else if(c.id=b[14]*g+(b[15]<<16)+(b[16]<<8)+b[17],c.cancel=b[18]>>7==1,!c.cancel){c.out=b[19]>>7==1;var k=(64&b[19])>>6==1,l=(32&b[19])>>5==1,m=(16&b[19])>>4==1;if(k)if(m)-1==c.startOffset;else{var n=(128&b[20])>>7==1;if(n){var o=(1&b[20])*e+b[21]*g+(b[22]<<16)+(b[23]<<8)+b[24];c.startOffset=(o+i)/d}if(l){var p=n?25:21,q=(1&b[p],(1&b[p])*e+b[p+1]*g+(b[p+2]<<16)+(b[p+3]<<8)+b[p+4]);c.duration=q/d}}else a.Logger.warning(8,"Component splice mode is not supported.")}}}catch(r){c=null}return c}b.parseBase64EncodedMessage=c,b.parseBinaryMessage=d}(a.Scte35Parser||(a.Scte35Parser={}));a.Scte35Parser}(AMP||(AMP={})),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var f=a("./lib/iso_boxer.js"),g=d(f),h=a("./cea608DataExtractor.js"),i=d(h),j=a("./textTrackManager.js"),k=d(j),l=a("./cueParser.js"),m=d(l),n=a("../ampDefs.js"),o=function(){function a(b){e(this,a),this.player=b,this.isInitialized=!1,this.onDownloadCompleted=this.onDownloadCompleted.bind(this),this.onDownloadDecrypted=this.onDownloadDecrypted.bind(this),this.onSeeking=this.onSeeking.bind(this),this.onLoadedMetadata=this.onLoadedMetadata.bind(this),this.onReady=this.onReady.bind(this)}return a.prototype.init=function(){this.player.options().cea708CaptionsSettings&&this.player.options().cea708CaptionsSettings.enabled&&(this.parsedSequenceNumbers=[],this.cueParser=new m["default"],this.textTrackManager=new k["default"](this.player),this.player.ready(this.onReady))},a.prototype.onReady=function(){this.player.addEventListener(n.eventName.loadedmetadata,this.onLoadedMetadata),this.player.addEventListener(n.eventName.seeking,this.onSeeking)},a.prototype.onSeeking=function(){this.cueParser.reset()},a.prototype.onLoadedMetadata=function(){this.videoBufferData=this.player.videoBufferData(),this.videoBufferData&&(this.videoBufferData.addEventListener(n.bufferDataEventName.downloadcompleted,this.onDownloadCompleted),this.videoBufferData.addEventListener(n.bufferDataEventName.downloaddecrypted,this.onDownloadDecrypted))},a.prototype.onDownloadDecrypted=function(){var a="flashSS"===this.player.currentTechName()?this.videoBufferData.downloadDecrypted.mediaDownload:this.videoBufferData.downloadDecrypted;this.processMediaDownload(a)},a.prototype.onDownloadCompleted=function(){this.processMediaDownload(this.videoBufferData.downloadCompleted.mediaDownload)},a.prototype.processMediaDownload=function(a){var b=a.data;if(b){this.cueParser.presentationTimeOffsetInSec||(this.cueParser.presentationTimeOffsetInSec=a.presentationTimeOffsetInSec);var c=g["default"].parseBuffer(b),d=c.fetch("mfhd"),e=d?d.sequence_number:null;if(-1===this.parsedSequenceNumbers.indexOf(e)){var f=i["default"].extractCea608Data(b,c,a.mediaTime);f&&f.fields&&f.fields[0].length&&(this.isInitialized||(this.isInitialized=!0,this.initializeTextTrack(),this.cueParser.initialize(this.player,this.textTrackManager.getAllTracks()),this.player.trigger(n.eventName.embeddedcaptionsfound)),this.cueParser.addCcDataToFieldParsers(f,c,a.timeScale),this.parsedSequenceNumbers.push(e))}}},a.prototype.initializeTextTrack=function(){var a={justification:"center"};this.player.textTrackSettings.setValues(a);var b=this.player.options().cea708CaptionsSettings,c={label:b.label||"CEA708",lang:b.srclang,channel:"CC1"};this.textTrackManager.addTextTrack(c.label,c.lang,c.channel)},a.prototype.dispose=function(){this.player.removeEventListener(n.eventName.loadedmetadata,this.onLoadedMetadata),this.player.removeEventListener(n.eventName.seeking,this.onSeeking),this.videoBufferData&&(this.videoBufferData.removeEventListener(n.bufferDataEventName.downloadcompleted,this.onDownloadCompleted),this.videoBufferData.removeEventListener(n.bufferDataEventName.downloaddecrypted,this.onDownloadDecrypted)),this.textTrackManager&&(this.textTrackManager.removePreviousEmbeddedTextTracks(),this.textTrackManager=null),this.cueParser=null,this.isInitialized=!1},a}();c["default"]=o,b.exports=c["default"]},{"../ampDefs.js":11,"./cea608DataExtractor.js":2,"./cueParser.js":3,"./lib/iso_boxer.js":6,"./textTrackManager.js":9}],2:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){var d=b.fetch("moof"),e=b.fetch("tfdt"),g=b.fetchAll("trun"),i=void 0,k=void 0,l=void 0,m=void 0,n=void 0,o=new DataView(a),p=new j["default"],q=0;if(!g.length)return null;i=g[0],k=d._offset+i.data_offset,l=i.sample_count,m=k,n=e?e.baseMediaDecodeTime:10*c;for(var r=0;l>r;r++){for(var s=i.samples[r],t=n+q+s.sample_composition_time_offset,u=h["default"].findCea608Nalus(o,m,s.sample_size),v=0;v<u.length;v++)for(var w=h["default"].extractCea608DataFromRange(o,u[v]),x=0;2>x;x++)w[x].length>0&&f(p.fields[x],t,w[x]);q+=s.sample_duration,m+=s.sample_size}return p.startTime=n,p.endTime=n+q,p}function f(a,b,c){var d=a.length;if(d>0)if(b>=a[d-1][0])a.push([b,c]);else{for(var e=-1,f=d-1;f>=0&&!(b>a[f][0]);f--)e=f;e>=0&&a.splice(e,0,[b,c])}else a.push([b,c])}c.__esModule=!0;var g=a("./lib/cea608-parser.js"),h=d(g),i=a("./models/ccData.js"),j=d(i),k={extractCea608Data:e};c["default"]=k,b.exports=c["default"]},{"./lib/cea608-parser.js":4,"./models/ccData.js":8}],3:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var f=a("stream"),g=d(f),h=a("global/window"),i=d(h),j=a("./lib/cea608-parser.js"),k=d(j),l=a("./lib/cea608-towebvtt.js"),m=d(l),n=a("./models/captionsBuffer.js"),o=d(n),p=function(){function a(){e(this,a),this.videoTimeScale=0,this.embeddedCea608FieldParsers=[],this.presentationTimeOffsetInSec=0,this.cueParser=new i["default"].WebVTT.Parser(i["default"],i["default"].vttjs,i["default"].WebVTT.StringDecoder()),this.cueParser.onparsingerror=function(a){return AMP.Logger.error(AMP.Logger.Area.cea608Module,"CEA608 module: an error happened: "+a)}}return a.prototype.reset=function(){this.embeddedCea608FieldParsers.forEach(function(a){return a.reset()})},a.prototype.addCcDataToFieldParsers=function(a,b,c){function d(a){var b=a.fetch("mdhd"),d=1e7;return b?b.timescale:c?c:d}if(a){this.videoTimeScale=this.videoTimeScale||d(b);for(var e=0;e<this.embeddedCea608FieldParsers.length;e++){var f=a.fields[e],g=this.embeddedCea608FieldParsers[e];if(g){for(var h=0;h<f.length;h++)g.addData(f[h][0]/this.videoTimeScale,f[h][1]);a.endTime&&g.cueSplitAtTime(a.endTime/this.videoTimeScale)}}}},a.prototype.initialize=function(a,b){function c(a){switch(a.toLowerCase()){case"cc1":return 1;case"cc3":return 2}return AMP.Logger.error(AMP.Logger.Area.cea608Module,"Channel '"+a+"' is not supported. Supported channels are CC1 and CC3."),null}function d(a,b,c){return function(d,e,g){function h(b){if(b.startTime!==b.endTime){var c=!0;a.cues.cues_.forEach(function(a){a.text===b.text&&a.startTime===b.startTime&&(c=!1)}),c&&a.addCue(b)}}if((0===d||d)&&e&&g){b.newCue(d+f.presentationTimeOffsetInSec,e+f.presentationTimeOffsetInSec,g);var i=c.extract();f.cueParser.oncue=h,f.cueParser.parse(i),f.cueParser.flush()}}}for(var e=this,f=this,h=function(a){var f=c(b[a].channel);if(!f)return"continue";var h=new o["default"],i=new g["default"];i.writable=!0,i.write=function(a){return h.append(a)};var j={newCue:d(b[a],new m["default"](i),h)};e.embeddedCea608FieldParsers[a]=new k["default"].Cea608Parser(f,j,null)},i=0;i<b.length;i++){{h(i)}}},a}();c["default"]=p,b.exports=c["default"]},{"./lib/cea608-parser.js":4,"./lib/cea608-towebvtt.js":5,"./models/captionsBuffer.js":7,"global/window":251,stream:193}],4:[function(a,b,c){"use strict";!function(a){var b={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},c=function(a){var c=a;return b.hasOwnProperty(a)&&(c=b[a]),String.fromCharCode(c)},d=15,e=32,f={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},g={17:2,18:4,21:6,22:8,23:10,19:13,20:15},h={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},i={25:2,26:4,29:6,30:8,31:10,27:13,28:15},j=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],k={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(a){this.time=a},log:function(a){var b=this.verboseFilter[a];this.verboseLevel>=b}},l=function(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c].toString(16));return b},m=function(a,b,c,d,e){this.foreground=a||"white",this.underline=b||!1,this.italics=c||!1,this.background=d||"black",this.flash=e||!1};m.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(a){for(var b=["foreground","underline","italics","background","flash"],c=0;c<b.length;c++){var d=b[c];a.hasOwnProperty(d)&&(this[d]=a[d])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(a){return this.foreground===a.foreground&&this.underline===a.underline&&this.italics===a.italics&&this.background===a.background&&this.flash===a.flash},copy:function(a){this.foreground=a.foreground,this.underline=a.underline,this.italics=a.italics,this.background=a.background,this.flash=a.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var n=function(a,b,c,d,e,f){this.uchar=a||" ",this.penState=new m(b,c,d,e,f)};n.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(a,b){this.uchar=a,this.penState.copy(b)},setPenState:function(a){this.penState.copy(a)},equals:function(a){return this.uchar===a.uchar&&this.penState.equals(a.penState)},copy:function(a){this.uchar=a.uchar,this.penState.copy(a.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var o=function(){this.chars=[];for(var a=0;e>a;a++)this.chars.push(new n);this.pos=0,this.currPenState=new m};o.prototype={equals:function(a){for(var b=!0,c=0;e>c;c++)if(!this.chars[c].equals(a.chars[c])){b=!1;break}return b},copy:function(a){for(var b=0;e>b;b++)this.chars[b].copy(a.chars[b])},isEmpty:function(){for(var a=!0,b=0;e>b;b++)if(!this.chars[b].isEmpty()){a=!1;break}return a},setCursor:function(a){this.pos!==a&&(this.pos=a),this.pos<0?(k.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>e&&(k.log("ERROR","Too large cursor position "+this.pos),this.pos=e)},moveCursor:function(a){var b=this.pos+a;if(a>1)for(var c=this.pos+1;b+1>c&&e>c;c++)this.chars[c].setPenState(this.currPenState);this.setCursor(b)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(a){a>=144&&this.backSpace();var b=c(a);return this.pos>=e?void k.log("ERROR","Cannot insert "+a.toString(16)+" ("+b+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(b,this.currPenState),void(this.pos<e-1?this.moveCursor(1):k.log("WARNING: cursor at end of chars. Cannot advance cursor.")))},clearFromPos:function(a){var b;for(b=a;e>b;b++)this.chars[b].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var a=[],b=!0,c=0;e>c;c++){var d=this.chars[c].uchar;" "!==d&&(b=!1),a.push(d)}return b?"":a.join("")},setPenStyles:function(a){if(this.currPenState.setStyles(a),this.pos<e){var b=this.chars[this.pos];b.setPenState(this.currPenState)}}};var p=function(){this.rows=[];for(var a=0;d>a;a++)this.rows.push(new o);this.currRow=d-1,this.nrRollUpRows=null,this.reset()};p.prototype={reset:function(){for(var a=0;d>a;a++)this.rows[a].clear();this.currRow=d-1},equals:function(a){for(var b=!0,c=0;d>c;c++)if(!this.rows[c].equals(a.rows[c])){b=!1;break}return b},copy:function(a){for(var b=0;d>b;b++)this.rows[b].copy(a.rows[b])},isEmpty:function(){for(var a=!0,b=0;d>b;b++)if(!this.rows[b].isEmpty()){a=!1;break}return a},backSpace:function(){var a=this.rows[this.currRow];a.backSpace()},clearToEndOfRow:function(){var a=this.rows[this.currRow];a.clearToEndOfRow()},insertChar:function(a){var b=this.rows[this.currRow];b.insertChar(a)},setPen:function(a){var b=this.rows[this.currRow];b.setPenStyles(a)},moveCursor:function(a){var b=this.rows[this.currRow];b.moveCursor(a)},setCursor:function(a){k.log("INFO","setCursor: "+a);var b=this.rows[this.currRow];b.setCursor(a)},setPAC:function(a){k.log("INFO","pacData = "+JSON.stringify(a));var b=a.row-1;this.nrRollUpRows&&b<this.nrRollUpRows-1&&(b=this.nrRollUpRows-1),this.currRow=b;var c=this.rows[this.currRow];if(null!==a.indent){var d=a.indent,e=Math.max(d-1,0);c.setCursor(a.indent),a.color=c.chars[e].penState.foreground}var f={foreground:a.color,underline:a.underline,italics:a.italics,background:"black",flash:!1};this.setPen(f)},setBkgData:function(a){k.log("INFO","bkgData = "+JSON.stringify(a)),this.backSpace(),this.setPen(a),this.insertChar(32)},setRollUpRows:function(a){this.nrRollUpRows=a},rollUp:function(){if(null===this.nrRollUpRows)return void k.log("DEBUG","roll_up but nrRollUpRows not set yet");k.log("TEXT",this.getDisplayText());var a=this.currRow+1-this.nrRollUpRows,b=this.rows.splice(a,1)[0];b.clear(),this.rows.splice(this.currRow,0,b),k.log("INFO","Rolling up")},getDisplayText:function(a){a=a||!1;for(var b=[],c="",e=-1,f=0;d>f;f++){var g=this.rows[f].getTextString();g&&(e=f+1,b.push(a?"Row "+e+': "'+g+'"':g.trim()))}return b.length>0&&(c=a?"["+b.join(" | ")+"]":b.join("\n")),c},getTextAndFormat:function(){return this.rows}};var q=function(a,b){this.chNr=a,this.outputFilter=b,this.mode=null,this.verbose=0,this.displayedMemory=new p,this.nonDisplayedMemory=new p,this.lastOutputScreen=new p,this.currRollUpRow=this.displayedMemory.rows[d-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};q.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[d-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(a){this.outputFilter=a},setPAC:function(a){this.writeScreen.setPAC(a)},setBkgData:function(a){this.writeScreen.setBkgData(a)},setMode:function(a){a!==this.mode&&(this.mode=a,k.log("INFO","MODE="+a),"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=a)},insertChars:function(a){for(var b=0;b<a.length;b++)this.writeScreen.insertChar(a[b]);var c=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";k.log("INFO",c+": "+this.writeScreen.getDisplayText(!0)),("MODE_PAINT-ON"===this.mode||"MODE_ROLL-UP"===this.mode)&&(k.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){k.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){k.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){k.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(a){k.log("INFO","RU("+a+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(a)},cc_FON:function(){k.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){k.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){k.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){k.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){k.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){k.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){k.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(k.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var a=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=a,this.writeScreen=this.nonDisplayedMemory,k.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(a){k.log("INFO","TO("+a+") - Tab Offset"),this.writeScreen.moveCursor(a)},cc_MIDROW:function(a){var b={flash:!1};if(b.underline=a%2===1,b.italics=a>=46,b.italics)b.foreground="white";else{var c=Math.floor(a/2)-16,d=["white","green","blue","cyan","red","yellow","magenta"];b.foreground=d[c]}k.log("INFO","MIDROW: "+JSON.stringify(b)),this.writeScreen.setPen(b)},outputDataUpdate:function(){var a=k.time;null!==a&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(a,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:a):this.cueStartTime=a,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(a){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.displayedMemory),this.cueStartTime=a))}};var r=function(a,b,c){this.field=a||1,this.outputs=[b,c],this.channels=[new q(1,b),new q(2,c)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,"char":0,cmd:0,other:0}};r.prototype={getHandler:function(a){return this.channels[a].getHandler()},setHandler:function(a,b){this.channels[a].setHandler(b)},addData:function(a,b){var c,d,e,f=!1;this.lastTime=a,k.setTime(a);for(var g=0;g<b.length;g+=2)if(d=127&b[g],e=127&b[g+1],0!==d||0!==e){if(k.log("DATA","["+l([b[g],b[g+1]])+"] -> ("+l([d,e])+")"),c=this.parseCmd(d,e),c||(c=this.parseMidrow(d,e)),c||(c=this.parsePAC(d,e)),c||(c=this.parseBackgroundAttributes(d,e)),!c&&(f=this.parseChars(d,e)))if(this.currChNr&&this.currChNr>=0){var h=this.channels[this.currChNr-1];h.insertChars(f)}else k.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:f?this.dataCounters["char"]+=2:(this.dataCounters.other+=2,k.log("WARNING","Couldn't parse cleaned data "+l([d,e])+" orig: "+l([b[g],b[g+1]])))}else this.dataCounters.padding+=2},parseCmd:function(a,b){var c=null,d=(20===a||28===a)&&b>=32&&47>=b,e=(23===a||31===a)&&b>=33&&35>=b;if(!d&&!e)return!1;if(a===this.lastCmdA&&b===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,k.log("DEBUG","Repeated command ("+l([a,b])+") is dropped"),!0;c=20===a||23===a?1:2;var f=this.channels[c-1];return 20===a||28===a?32===b?f.cc_RCL():33===b?f.cc_BS():34===b?f.cc_AOF():35===b?f.cc_AON():36===b?f.cc_DER():37===b?f.cc_RU(2):38===b?f.cc_RU(3):39===b?f.cc_RU(4):40===b?f.cc_FON():41===b?f.cc_RDC():42===b?f.cc_TR():43===b?f.cc_RTD():44===b?f.cc_EDM():45===b?f.cc_CR():46===b?f.cc_ENM():47===b&&f.cc_EOC():f.cc_TO(b-32),this.lastCmdA=a,this.lastCmdB=b,this.currChNr=c,!0},parseMidrow:function(a,b){var c=null;if((17===a||25===a)&&b>=32&&47>=b){if(c=17===a?1:2,c!==this.currChNr)return k.log("ERROR","Mismatch channel in midrow parsing"),!1;var d=this.channels[c-1];return d.cc_MIDROW(b),k.log("DEBUG","MIDROW ("+l([a,b])+")"),!0}return!1},parsePAC:function(a,b){var c=null,d=null,e=(a>=17&&23>=a||a>=25&&31>=a)&&b>=64&&127>=b,j=(16===a||24===a)&&b>=64&&95>=b;if(!e&&!j)return!1;if(a===this.lastCmdA&&b===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;c=23>=a?1:2,d=b>=64&&95>=b?1===c?f[a]:h[a]:1===c?g[a]:i[a];var k=this.interpretPAC(d,b),l=this.channels[c-1];return l.setPAC(k),this.lastCmdA=a,this.lastCmdB=b,this.currChNr=c,!0},interpretPAC:function(a,b){var c=b,d={color:null,italics:!1,indent:null,underline:!1,row:a};return c=b>95?b-96:b-64,d.underline=1===(1&c),13>=c?d.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:15>=c?(d.italics=!0,d.color="white"):d.indent=4*Math.floor((c-16)/2),d},parseChars:function(a,b){var d=null,e=null,f=null;if(a>=25?(d=2,f=a-8):(d=1,f=a),f>=17&&19>=f){var g=b;g=17===f?b+80:18===f?b+112:b+144,k.log("INFO","Special char '"+c(g)+"' in channel "+d),e=[g]}else a>=32&&127>=a&&(e=0===b?[a]:[a,b]);if(e){var h=l(e);k.log("DEBUG","Char codes =  "+h.join(",")),this.lastCmdA=null,this.lastCmdB=null}return e},parseBackgroundAttributes:function(a,b){var c,d,e,f,g=(16===a||24===a)&&b>=32&&47>=b,h=(23===a||31===a)&&b>=45&&47>=b;return g||h?(c={},16===a||24===a?(d=Math.floor((b-32)/2),c.background=j[d],b%2===1&&(c.background=c.background+"_semi")):45===b?c.background="transparent":(c.foreground="black",47===b&&(c.underline=!0)),e=24>a?1:2,f=this.channels[e-1],f.setBkgData(c),this.lastCmdA=null,this.lastCmdB=null,!0):!1},reset:function(){for(var a=0;a<this.channels.length;a++)this.channels[a]&&this.channels[a].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(a){for(var b=0;b<this.channels.length;b++)this.channels[b]&&this.channels[b].cueSplitAtTime(a)}};var s=function(a,b,c){for(var d=0,e=b,f=0,g=[],h=function(a,b,c,d){if(4!==a||8>b)return null;var e=c.getUint8(d),f=c.getUint16(d+1),g=c.getUint32(d+3),h=c.getUint8(d+7);return 181==e&&49==f&&1195456820==g&&3==h};b+c>e;){if(d=a.getUint32(e),f=31&a.getUint8(e+4),6===f)for(var i=e+5,j=-1;e+4+d-1>i;){j=0;for(var k=255;255===k;)k=a.getUint8(i),j+=k,i++;var l=0;for(k=255;255===k;)k=a.getUint8(i),l+=k,i++;h(j,l,a,i)&&g.push([i,l]),i+=l}e+=d+4}return g},t=function(a,b){var c=b[0],d=[[],[]];c+=8;var e=31&a.getUint8(c);c+=2;for(var f=0;e>f;f++){var g=a.getUint8(c),h=4&g,i=3&g;c++;var j=a.getUint8(c);c++;var k=a.getUint8(c);c++,h&&(127&j)+(127&k)!==0&&(0===i?(d[0].push(j),d[0].push(k)):1===i&&(d[1].push(j),d[1].push(k)))}return d};a.logger=k,a.PenState=m,a.CaptionScreen=p,a.Cea608Parser=r,a.findCea608Nalus=s,a.extractCea608DataFromRange=t}("undefined"==typeof c?(void 0).cea608parser={}:c)},{}],5:[function(a,b,c){"use strict";c.__esModule=!0;var d=a("./cea608-parser.js"),e=function(a,b,c){this.stream=a,this.channelNr=1|b,this.combineConsecutiveRows=c|!0,this.initWritten=!1};e.prototype={newCue:function(a,b,c){this.initWritten||this.writeInit();var d=this.formatTime(a),e=this.formatTime(b);this.writeCue(d,e,c)},writeToStream:function(a){this.stream&&this.stream.write(a)},formatTime:function(a){var b,c,d,e=Math.floor(a),f=a-e,g=function(a){var b=a.toString();return 1===b.length?"0"+b:b},h=function(a){for(var b=a.toString(),c=3-b.length;c>0;)b="0"+b,c--;return b};return b=Math.floor(e/3600),e-=3600*b,c=Math.floor(e/60),e-=60*c,d=Math.floor(1e3*f),g(b)+":"+g(c)+":"+g(e)+"."+h(d)},writeInit:function(a,b){this.writeToStream("WEBVTT\nStyling=CEA608\nKind=Caption\nChannel=CC"+this.channelNr+"\n"),b&&(this.lastScreen.copy(b),this.lastTime=a),this.initWritten=!0},writeCue:function(a,b,c){for(var d=-2,e=0;e<c.rows.length;e++){var f=c.rows[e];if(!f.isEmpty()){if(!this.combineConsecutiveRows||e!==d+1){var g=e+1;this.writeToStream("\n"+a+" --> "+b+" line:"+g+"\n")}this.outputTextRow(f),this.writeToStream("\n"),d=e}}},outputTextRow:function(a){for(var b=new d.PenState,c=null,e=null,f=0;f<a.chars.length;f++){e=a.chars[f];var g=!1;if(c=e.penState,(c.foreground!==b.foreground||c.background!==b.background||c.flash!==b.flash)&&(("white"!==b.foreground||"black"!==b.background||b.flash)&&this.writeToStream("</c>"),g=!0),c.underline!==b.underline&&b.underline&&this.writeToStream("</u>"),c.italics!==b.italics&&b.italics&&this.writeToStream("</i>"),c.italics!==b.italics&&(c.italics&&this.writeToStream("<i>"),b.italics=c.italics),c.underline!==b.underline&&c.underline&&this.writeToStream("<u>"),g&&("white"!==c.foreground||"black"!==c.background||c.flash)){var h=[],i=c.background;if("transparent"===c.background)h.push("transparent");else{var j=i.split("_");2===j.length&&"semi"===j[1]&&h.push("semi-transparent"),"black"!==i&&h.push("bg_"+j[0])}"white"!==c.foreground&&h.push(c.foreground),c.flash&&h.push("blink");var k=h.join(".");this.writeToStream("<c."+k+">")}this.writeToStream(e.uchar),b.copy(c)}("white"!==c.foreground||"black"!==c.background)&&this.writeToStream("</c>"),c.underline&&this.writeToStream("</u>"),c.italics&&this.writeToStream("</i>")},close:function(){this.stream&&(this.stream.end(),this.stream=null)}},c["default"]=e,b.exports=c["default"]},{"./cea608-parser.js":4}],6:[function(a,b,c){/*! codem-isoboxer v0.2.10 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
"use strict";var d={};d.parseBuffer=function(a){return new e(a).parse()},d.addBoxParser=function(a,b){"string"==typeof a&&"function"==typeof b&&(f.prototype._boxParsers[a]=b)},d.Utils={},d.Utils.dataViewToString=function(a,b){var c=b||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(c).decode(a);var d=[],e=0;if("utf-8"===c)for(;e<a.byteLength;){var f=a.getUint8(e++);128>f||(224>f?(f=(31&f)<<6,f|=63&a.getUint8(e++)):240>f?(f=(15&f)<<12,f|=(63&a.getUint8(e++))<<6,f|=63&a.getUint8(e++)):(f=(7&f)<<18,f|=(63&a.getUint8(e++))<<12,f|=(63&a.getUint8(e++))<<6,f|=63&a.getUint8(e++))),d.push(String.fromCharCode(f))}else for(;e<a.byteLength;)d.push(String.fromCharCode(a.getUint8(e++)));return d.join("")},"undefined"!=typeof c&&(c.parseBuffer=d.parseBuffer,c.addBoxParser=d.addBoxParser,c.Utils=d.Utils),d.Cursor=function(a){this.offset="undefined"==typeof a?0:a};var e=function(a){this._raw=new DataView(a),this._cursor=new d.Cursor,this.boxes=[]};e.prototype.fetch=function(a){var b=this.fetchAll(a,!0);return b.length?b[0]:null},e.prototype.fetchAll=function(a,b){var c=[];return e._sweep.call(this,a,c,b),c},e.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var a=f.parse(this);if("undefined"==typeof a.type)break;this.boxes.push(a)}return this},e._sweep=function(a,b,c){this.type&&this.type==a&&b.push(this);for(var d in this.boxes){if(b.length&&c)return;e._sweep.call(this.boxes[d],a,b,c)}};var f=function(){this._cursor=new d.Cursor};f.parse=function(a){var b=new f;return b._offset=a._cursor.offset,b._root=a._root?a._root:a,b._raw=a._raw,b._parent=a,b._parseBox(),a._cursor.offset=b._raw.byteOffset+b._raw.byteLength,b},f.prototype._readInt=function(a){var b=null;switch(a){case 8:b=this._raw.getInt8(this._cursor.offset-this._raw.byteOffset);break;case 16:b=this._raw.getInt16(this._cursor.offset-this._raw.byteOffset);break;case 32:b=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset);break;case 64:var c=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset),d=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset+4);b=c*Math.pow(2,32)+d}return this._cursor.offset+=a>>3,b},f.prototype._readUint=function(a){var b,c,d=null;switch(a){case 8:d=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset);break;case 16:d=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset);break;case 24:b=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset),c=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset+2),d=(b<<8)+c;break;case 32:d=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset);break;case 64:b=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset),c=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset+4),d=b*Math.pow(2,32)+c}return this._cursor.offset+=a>>3,d},f.prototype._readString=function(a){for(var b="",c=0;a>c;c++){var d=this._readUint(8);b+=String.fromCharCode(d)}return b},f.prototype._readTerminatedString=function(){for(var a="";this._cursor.offset-this._offset<this._raw.byteLength;){var b=this._readUint(8);if(0===b)break;a+=String.fromCharCode(b)}return a},f.prototype._readTemplate=function(a){var b=this._readUint(a/2),c=this._readUint(a/2);return b+c/Math.pow(2,a/2)},f.prototype._readData=function(a){var b=a>0?a:this._raw.byteLength-(this._cursor.offset-this._offset),c=new DataView(this._raw.buffer,this._cursor.offset,b);return this._cursor.offset+=b,c},f.prototype._parseBox=function(){if(this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)return void(this._root._incomplete=!0);switch(this.size=this._readUint(32),this.type=this._readString(4),1==this.size&&(this.largesize=this._readUint(64)),"uuid"==this.type&&(this.usertype=this._readString(16)),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._boxParsers[this.type]&&this._boxParsers[this.type].call(this))},f.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},f.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(f.parse(this))},f.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc"],f.prototype._boxParsers={},f.prototype._boxParsers.avc1=function(){this.reserved1=[this._readUint(8),this._readUint(8),this._readUint(8),this._readUint(8),this._readUint(8),this._readUint(8)],this.data_reference_index=this._readUint(16),this.pre_defined1=this._readUint(16),this.reserved2=this._readUint(16),this.pre_defined2=[this._readUint(32),this._readUint(32),this._readUint(32)],this.width=this._readUint(16),this.height=this._readUint(16),this.horizresolution=this._readTemplate(32),this.vertresolution=this._readTemplate(32),this.reserved3=this._readUint(32),this.frame_count=this._readUint(16);var a=this._readUint(8);this.compressorname=this._readString(a);for(var b=0;31-a>b;b++)this._readUint(8);this.depth=this._readUint(16),this.pre_defined3=this._readInt(16),this.config=this._readData()},f.prototype._boxParsers.dref=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var a=0;a<this.entry_count;a++)this.entries.push(f.parse(this))},f.prototype._boxParsers.elst=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var a=1;a<=this.entry_count;a++){var b={};1==this.version?(b.segment_duration=this._readUint(64),b.media_time=this._readInt(64)):(b.segment_duration=this._readUint(32),b.media_time=this._readInt(32)),b.media_rate_integer=this._readInt(16),b.media_rate_fraction=this._readInt(16),this.entries.push(b)}},f.prototype._boxParsers.emsg=function(){this._parseFullBox(),this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString(),this.timescale=this._readUint(32),this.presentation_time_delta=this._readUint(32),this.event_duration=this._readUint(32),this.id=this._readUint(32),this.message_data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},f.prototype._boxParsers.free=f.prototype._boxParsers.skip=function(){this.data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},f.prototype._boxParsers.ftyp=f.prototype._boxParsers.styp=function(){for(this.major_brand=this._readString(4),this.minor_version=this._readUint(32),this.compatible_brands=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.compatible_brands.push(this._readString(4))},f.prototype._boxParsers.hdlr=function(){this._parseFullBox(),this.pre_defined=this._readUint(32),this.handler_type=this._readString(4),this.reserved=[this._readUint(32),this._readUint(32),this._readUint(32)],this.name=this._readTerminatedString()},f.prototype._boxParsers.mdat=function(){this.data=this._readData()},f.prototype._boxParsers.mdhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32));var a=this._readUint(16);this.pad=a>>15,this.language=String.fromCharCode((a>>10&31)+96,(a>>5&31)+96,(31&a)+96),this.pre_defined=this._readUint(16)},f.prototype._boxParsers.mehd=function(){this._parseFullBox(),this.fragment_duration=this._readUint(1==this.version?64:32)},f.prototype._boxParsers.mfhd=function(){this._parseFullBox(),this.sequence_number=this._readUint(32)},f.prototype._boxParsers.mfro=function(){this._parseFullBox(),this.mfra_size=this._readUint(32)},f.prototype._boxParsers.mp4a=function(){this.reserved1=[this._readUint(8),this._readUint(8),this._readUint(8),this._readUint(8),this._readUint(8),this._readUint(8)],this.data_reference_index=this._readUint(16),this.reserved2=[this._readUint(32),this._readUint(32)],this.channelcount=this._readUint(16),this.samplesize=this._readUint(16),this.pre_defined=this._readUint(16),this.reserved3=this._readUint(16),this.samplerate=this._readTemplate(32),this.esds=this._readData()},f.prototype._boxParsers.mvhd=function(){this._parseFullBox();var a;for(1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32)),this.rate=this._readTemplate(32),this.volume=this._readTemplate(16),this.reserved1=this._readUint(16),this.reserved2=[this._readUint(32),this._readUint(32)],this.matrix=[],a=0;9>a;a++)this.matrix.push(this._readTemplate(32));for(this.pre_defined=[],a=0;6>a;a++)this.pre_defined.push(this._readUint(32));this.next_track_ID=this._readUint(32)},f.prototype._boxParsers.payl=function(){var a=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.cue_text=d.Utils.dataViewToString(a)},f.prototype._boxParsers.sidx=function(){this._parseFullBox(),this.reference_ID=this._readUint(32),this.timescale=this._readUint(32),0===this.version?(this.earliest_presentation_time=this._readUint(32),this.first_offset=this._readUint(32)):(this.earliest_presentation_time=this._readUint(64),this.first_offset=this._readUint(64)),this.reserved=this._readUint(16),this.reference_count=this._readUint(16),this.references=[];for(var a=0;a<this.reference_count;a++){var b={},c=this._readUint(32);b.reference_type=c>>31&1,b.referenced_size=2147483647&c,b.subsegment_duration=this._readUint(32);var d=this._readUint(32);b.starts_with_SAP=d>>31&1,b.SAP_type=d>>28&7,b.SAP_delta_time=268435455&d,this.references.push(b)}},f.prototype._boxParsers.smhd=function(){this._parseFullBox(),this.balance=this._readTemplate(16),this.reserved=this._readUint(16)},f.prototype._boxParsers.ssix=function(){this._parseFullBox(),this.subsegment_count=this._readUint(32),this.subsegments=[];for(var a=0;a<this.subsegment_count;a++){var b={};b.ranges_count=this._readUint(32),b.ranges=[];for(var c=0;c<b.ranges_count;c++){var d={};d.level=this._readUint(8),d.range_size=this._readUint(24),b.ranges.push(d)}this.subsegments.push(b)}},f.prototype._boxParsers.stsd=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var a=0;a<this.entry_count;a++)this.entries.push(f.parse(this))},f.prototype._boxParsers.subs=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var a=0;a<this.entry_count;a++){var b={};b.sample_delta=this._readUint(32),b.subsample_count=this._readUint(16),b.subsamples=[];for(var c=0;c<b.subsample_count;c++){var d={};d.subsample_size=this._readUint(1&this.version?32:16),d.subsample_priority=this._readUint(8),d.discardable=this._readUint(8),d.codec_specific_parameters=this._readUint(32),b.subsamples.push(d)}this.entries.push(b)}},f.prototype._boxParsers.tfdt=function(){this._parseFullBox(),this.baseMediaDecodeTime=this._readUint(1==this.version?64:32)},f.prototype._boxParsers.tfhd=function(){this._parseFullBox(),this.track_ID=this._readUint(32),1&this.flags&&(this.base_data_offset=this._readUint(64)),2&this.flags&&(this.sample_description_offset=this._readUint(32)),8&this.flags&&(this.default_sample_duration=this._readUint(32)),16&this.flags&&(this.default_sample_size=this._readUint(32)),32&this.flags&&(this.default_sample_flags=this._readUint(32))},f.prototype._boxParsers.tfra=function(){this._parseFullBox(),this.track_ID=this._readUint(32),this._packed=this._readUint(32),this.reserved=this._packed>>>6,this.length_size_of_traf_num=(this._packed&&0xffff00000000)>>>4,this.length_size_of_trun_num=(this._packed&&4294901760)>>>2,this.length_size_of_sample_num=this._packed&&255,this.number_of_entry=this._readUint(32),this.entries=[];for(var a=0;a<this.number_of_entry;a++){var b={};1==this.version?(b.time=this._readUint(64),b.moof_offset=this._readUint(64)):(b.time=this._readUint(32),b.moof_offset=this._readUint(32)),b.traf_number=this._readUint(8*(this.length_size_of_traf_num+1)),b.trun_number=this._readUint(8*(this.length_size_of_trun_num+1)),b.sample_number=this._readUint(8*(this.length_size_of_sample_num+1)),this.entries.push(b)}},f.prototype._boxParsers.tkhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(32)),this.reserved2=[this._readUint(32),this._readUint(32)],this.layer=this._readUint(16),this.alternate_group=this._readUint(16),this.volume=this._readTemplate(16),this.reserved3=this._readUint(16),this.matrix=[];for(var a=0;9>a;a++)this.matrix.push(this._readTemplate(32));this.width=this._readTemplate(32),this.height=this._readTemplate(32)},f.prototype._boxParsers.trex=function(){this._parseFullBox(),this.track_ID=this._readUint(32),this.default_sample_description_index=this._readUint(32),this.default_sample_duration=this._readUint(32),this.default_sample_size=this._readUint(32),this.default_sample_flags=this._readUint(32)},f.prototype._boxParsers.trun=function(){this._parseFullBox(),this.sample_count=this._readUint(32),1&this.flags&&(this.data_offset=this._readInt(32)),4&this.flags&&(this.first_sample_flags=this._readUint(32)),this.samples=[];for(var a=0;a<this.sample_count;a++){var b={};256&this.flags&&(b.sample_duration=this._readUint(32)),512&this.flags&&(b.sample_size=this._readUint(32)),1024&this.flags&&(b.sample_flags=this._readUint(32)),2048&this.flags&&(b.sample_composition_time_offset=this._readInt(32)),this.samples.push(b)}},f.prototype._boxParsers["url "]=f.prototype._boxParsers["urn "]=function(){this._parseFullBox(),"urn "===this.type&&(this.name=this._readTerminatedString()),this.location=this._readTerminatedString()},f.prototype._boxParsers.vlab=function(){var a=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.source_label=d.Utils.dataViewToString(a)},f.prototype._boxParsers.vmhd=function(){this._parseFullBox(),this.graphicsmode=this._readUint(16),this.opcolor=[this._readUint(16),this._readUint(16),this._readUint(16)]},f.prototype._boxParsers.vttC=function(){var a=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.config=d.Utils.dataViewToString(a)},f.prototype._boxParsers.vtte=function(){}},{}],7:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0,function(){var a=function(){function a(){d(this,a),this._captions=""}return a.prototype.get=function(){return this._captions},a.prototype.append=function(a){this._captions+=a},a.prototype.clear=function(){this._captions=""},a.prototype.extract=function(){var a=this.get().slice();return this.clear(),a},a}();c["default"]=a}(),b.exports=c["default"]},{}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0,function(){var a=function b(){d(this,b),this.startTime=null,this.endTime=null,this.fields=[[],[]]};c["default"]=a}(),b.exports=c["default"]},{}],9:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var f=a("../video.js/src/js/tracks/track-enums.js"),g=d(f),h=function(){function a(b){e(this,a),this.cea608TextTracks=[],this.player=b}return a.prototype.getAllTracks=function(){return this.cea608TextTracks},a.prototype.getTrackById=function(a){for(var b=this.player.textTracks(),c=0;c<b.length;c++)if(b[c].id===a)return b[c];return null},a.prototype.addTextTrack=function(a,b,c){var d=this.player.addTextTrack(g["default"].TextTrackKind.captions,a,b);return d.channel=c,this.cea608TextTracks.push(d),d},a.prototype.removePreviousEmbeddedTextTracks=function(){function a(a){var c=b.getTrackById(a.id);c&&b.player.removeRemoteTextTrack(c)}if(this.cea608TextTracks.length){var b=this;this.cea608TextTracks.forEach(a),this.cea608TextTracks=[]}},a}();c["default"]=h,b.exports=c["default"]},{"../video.js/src/js/tracks/track-enums.js":148}],10:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b,c){var d=4026531840,e=g(a)<<28;b&=~d,b|=e;var f=new H["default"](b);return f.message=c,f}function g(a){switch(a.toLowerCase()){case"amp":return 1;case"azurehtml5js":return 2;case"flashss":return 3;case"silverlightss":return 4;case"html5":return 5;case"html5fairplayhls":return 6;default:return 0}}c.__esModule=!0;var h=a("global/window"),i=e(h),j=a("global/document"),k=e(j),l=a("object.assign"),m=e(l),n=a("lodash-compat/function/throttle"),o=e(n),p=a("./video.js/src/js/utils/events.js"),q=d(p),r=a("./video.js/src/js/utils/guid.js"),s=(d(r),a("./video.js/src/js/utils/fn.js")),t=d(s),u=a("./video.js/src/js/utils/dom.js"),v=d(u),w=a("./video.js/src/js/utils/languageLabels.js"),x=d(w),y=a("./video.js/src/js/utils/url.js"),z=d(y),A=a("./video.js/src/js/utils/browser.js"),B=d(A),C=a("./video.js/src/js/component.js"),D=e(C),E=a("./video.js/src/js/error-display.js"),F=e(E),G=a("./video.js/src/js/media-error.js"),H=e(G),I=a("./video.js/src/js/menu/menu.js"),J=e(I),K=a("./video.js/src/js/player.js"),L=e(K),M=a("./video.js/src/js/tech/tech.js"),N=e(M),O=a("./video.js/src/js/utils/to-title-case.js"),P=e(O),Q=a("./video.js/src/js/video.js"),R=e(Q),S=a("./video.js/src/js/utils/log.js"),T=a("./video.js/src/js/utils/merge-options.js"),U=e(T),V=(d(y),a("./video.js/src/js/tracks/text-track.js")),W=e(V),X=a("./lang/languages.js"),Y=(e(X),a("./ampHeuristicProfiles.js")),Z=d(Y),$=a("./ampDefs.js"),_=d($),aa=a("./version.js"),ba=a("./tech-wrappers/Html5.js"),ca=(e(ba),a("./tech-wrappers/amp-tech-azureHtml5JS.js")),da=(e(ca),a("./tech-wrappers/amp-tech-flashSS.js")),ea=(e(da),a("./tech-wrappers/amp-tech-silverlightSS.js")),fa=(e(ea),a("./tech-wrappers/amp-tech-html5FairPlayHLS.js")),ga=(e(fa),a("./Cea608/Cea608Module.js")),ha=e(ga),ia=a("timers"),ja=R["default"];i["default"].amp=ja,"object"==typeof c&&"object"==typeof b&&(b.exports=ja),c["default"]=ja,ja.errorCode=_.errorCode,ja.eventName=_.eventName,ja.streamEventName=_.streamEventName,ja.streamListEventName=_.streamListEventName,ja.bufferDataEventName=_.bufferDataEventName,ja.internalEventName=_.internalEventName,ja.protectionType=_.protectionType,ja.CorsConfig=_.CorsConfig,ja.downloadableMediaType=_.downloadableMediaType,ja.getIsoLangs=x.getIsoLangs,ja.get2LetterLangCode=x.get2LetterLangCode,ja.decodeURL=z.decodeURL,ja.encodeURL=z.encodeURL,i["default"].videojs=ja,ja.Player=L["default"],ja.options.techOrder=["azureHtml5JS","flashSS","html5FairPlayHLS","silverlightSS","html5"];var ka="https://amp.azure.net/libs/amp/",la=3;ja.levelTwoErrors={},ja.levelTwoErrors[ja.errorCode.srcErrLiveNoSegments]="LEVEL2_ERR_CONTENT_NOT_AVAIL_YET",L["default"].prototype.enterFullscreen=L["default"].prototype.requestFullscreen,L["default"].prototype.addEventListener=L["default"].prototype.on,L["default"].prototype.removeEventListener=L["default"].prototype.off,L["default"].prototype.currentTechName=function(){return this.techName_},L["default"].prototype.playerElement=function(){return this.el_},L["default"].prototype.currentAbsoluteTime=function(a){var b=this.techGet_("currentAbsoluteTime");return void 0!==b&&void 0!==a?(this.trigger("currentTimeChanging",{time:this.fromPresentationTime(a)}),this.techCall_("setCurrentAbsoluteTime",a),b>a&&this.trigger("rewind"),this):b},L["default"].prototype.presentationTimeOffsetInSec=function(){return this.techGet_("presentationTimeOffsetInSec")},L["default"].prototype.currentMediaTime=function(){return this.techGet_("currentMediaTime")},L["default"].prototype.currentVideoStreamList=function(){return this.techGet_("currentVideoStreamList")},L["default"].prototype.currentAudioStreamList=function(){return this.techGet_("currentAudioStreamList")},L["default"].prototype.videoBufferData=function(){return this.techGet_("videoBufferData")},L["default"].prototype.audioBufferData=function(){return this.techGet_("audioBufferData")},L["default"].prototype.currentDownloadBitrate=function(){return this.techGet_("currentDownloadBitrate")},L["default"].prototype.currentPlaybackBitrate=function(){return this.techGet_("currentPlaybackBitrate")},L["default"].prototype.videoWidth=function(){return this.techGet_("videoWidth")},L["default"].prototype.videoHeight=function(){return this.techGet_("videoHeight")},L["default"].prototype.currentProtectionInfo=function(){return this.options_.sourceOptions.protectionInfo},L["default"].prototype.isLive=function(){return this.techGet_("isLive")},L["default"].prototype.manifestPlayableWindowLength=function(){return this.techGet_("manifestPlayableWindowLength")},L["default"].prototype.currentPlayableWindow=function(){return this.techGet_("currentPlayableWindow")},L["default"].prototype.playableWindowEndInSec=function(){return this.techGet_("playableWindowEndInSec")},L["default"].prototype.segmentBoundaries=function(){return this.techGet_("segmentBoundaries")},L["default"].prototype.toPresentationTime=function(a){return this.player().isLive()&&this.player().currentPlayableWindow()?a+this.player().currentPlayableWindow().startInSec:a},L["default"].prototype.fromPresentationTime=function(a){return this.player().isLive()&&this.player().currentPlayableWindow()?a-this.player().currentPlayableWindow().startInSec:a},L["default"].prototype.currentHeuristicProfile=function(a){return void 0===a?Z.findProfile(this.options_.heuristicProfile).name:(this.options_.heuristicProfile=a,this)},L["default"].prototype.currentPlayerSettingValue=function(a){var b=null;return this.tech_&&N["default"]._availableSettings.heuristicSettings.hasOwnProperty(a)&&(this.tech_.updateCurrentPlayerConfigs(),b=this.tech_.options_.currentPlayerConfigs.currentHeuristicConfigs[a]),b},L["default"].getScriptRootURL=function(){var a=k["default"].getElementsByTagName("script"),b=null;if(a&&a.length>=1)for(var c=a.length-1;c>=0;c--){var d=null;d=a[c].src;var e=new RegExp("(.[^?]+)/azuremediaplayer(?:\\.min)?\\.js(?:\\?.*)?$","i");if(d){var f=d.match(e);if(f&&2===f.length){b=f[1];break}}}var g=L["default"].prototype.getAmpVersion();return!b&&g&&(b=ka+g),b},L["default"].prototype.getAmpVersion=function(){var a=null;if(aa.ampVersion){var b=new RegExp("([0-9]+.[0-9]+.[0-9]+).[0-9]+"),c=aa.ampVersion.match(b);c&&2===c.length&&(a=c[1])}return a},L["default"].prototype.getFullAmpVersion=function(){return aa.ampVersion},L["default"].prototype.addThrottledWindowResizeListener=function(a,b,c){c&&(a=a.bind(c));var d=o["default"](a,b);i["default"].addEventListener("resize",d),this.on("dispose",function(){i["default"].removeEventListener("resize",d)})},L["default"].prototype.disableTextTracks=function(){var a=this.textTracks();if(a)for(var b=0;b<a.length;b++){var c=a[b];c.mode="disabled"}},L["default"].prototype.setActiveTextTrack=function(a){a instanceof W["default"]||AMP.Logger.error(AMP.Logger.Area.ampAPI,"textTrack is expecting a TextTrack object.");var b=this.textTracks(),c=!1;b||AMP.Logger.error(AMP.Logger.Area.ampAPI,"The text tracks are not found.");for(var d=0;d<b.length;d++){var e=b[d];e.id===a.id?(e.mode="showing",c=!0):e.mode="disabled"}c||AMP.Logger.error(AMP.Logger.Area.ampAPI,"The specified text track not found.")},L["default"].prototype.src=function(a,b,c){if(AMP.Logger.verbose(AMP.Logger.Area.videojs,"AMP version "+this.getFullAmpVersion()),void 0===a)return this.currentSrc();if(this.sizeCal=!1,this.presentationFlow=!0,void 0!==c&&c||(this.presentationFlow=!1,this.presentationLayout({})),!(Array.isArray(a)||a instanceof Object))throw new Error("src is expecting a source object or an array of source objects");this.setupInitAmpEventHandlers_(),this.one("loadstart",function(){var a=!this.techName_||"Html5"===this.techName_,b=!this.techName_||"Html5FairPlayHLS"===this.techName_,c=this.options().autoplay;(a||b&&!c)&&(this.removeClass("vjs-waiting"),this.trigger("removeSpinner"))}),this.showPlayerLoad(),void 0!==b&&null!==b&&b.length>0&&(this.options_.tracks=b),a.selected||(this.currentRetryCountForLiveMediaLoad=0,this.clearPlayerTimers(),this.options_.sdn={},Array.isArray(a)?this.options_.sourceList=a:a instanceof Object&&(this.options_.sourceList=[a]),AMP.Logger.verbose(AMP.Logger.Area.videojs,"dispatching event: sourceset "+JSON.stringify(a,function(a,b){return"authenticationToken"!==a?b:"provided"})),this.trigger(ja.eventName.sourceset),this.drmSupportCheck(this.options_.sourceList));var d=function e(){this.techSetupCheck()&&this.pluginSetupCheck()?a instanceof Object&&a.selected?(this.trigger("playerSetupCheckCompleted"),this.refreshTextTracks(),this.cache_.src=a.src,this.currentType_=a.type||"",this.options_.currentType=this.currentType_,this.techCall_("updatePlayerOptions",this.options_),this.ready(function(){this.loadMediaWithTimeout(function(){this.techCall_("src",a.src),"auto"===this.options_.preload&&this.load()})})):this.sourceList_(UrlRewriter.expandSources(this.options_.sourceList)):ia.setTimeout(e.bind(this),50)};return d.call(this),this},L["default"].prototype.vjsOptions=L["default"].prototype.options,L["default"].prototype.options=function(a){var b=this.vjsOptions(a);return this.techCall_("updatePlayerOptions",b),b},L["default"].prototype.showPlayerLoad=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-paused"),this.removeClass("vjs-playing"),this.isPreloadSupported()&&this.addClass("vjs-waiting")},L["default"].prototype.drmSupportCheck=function(a){for(var b=0,c=this.options_.techOrder;b<c.length;b++){var d=P["default"](c[b]),e=N["default"].getTech(d);e&&e.drmSupportCheck&&e.drmSupportCheck(a)}},L["default"].prototype.techSetupCheck=function(){for(var a=0,b=this.options_.techOrder;a<b.length;a++){var c=P["default"](b[a]),d=N["default"].getTech(c);if(d&&d.setupDone&&!d.setupDone())return!1}return!0},L["default"].prototype.pluginSetupCheck=function(){var a=this.options_.plugins;for(var b in a)if(a.hasOwnProperty(b)&&this[b]&&this[b].setupDone&&!this[b].setupDone())return!1;return!0},L["default"].prototype.setupInitAmpEventHandlers_=function(){var a=this;this.ampEventHandlersReady?(this.startTriggered=!1,this.firstQuartileTriggered=!1,this.midpointTriggered=!1,this.thirdQuartileTriggered=!1,this.wasPaused=!1):!function(){var b=a,c=function(a,c){b.addEventListener(a,c),b.addEventListener("dispose",function(){b.removeEventListener(a,c)})};c("timeupdate",function(){var a=this.duration(),b=this.currentTime();a>0&&(!this.startTriggered&&b>0&&(this.startTriggered=!0,this.trigger("start")),this.isLive()||(!this.firstQuartileTriggered&&b>=a/4&&(this.firstQuartileTriggered=!0,this.trigger("firstquartile")),!this.midpointTriggered&&b>=a/2&&(this.midpointTriggered=!0,this.trigger("midpoint")),!this.thirdQuartileTriggered&&b>=3*a/4&&(this.thirdQuartileTriggered=!0,this.trigger("thirdquartile"))))}),c("play",function(){this.wasPaused&&(this.trigger("resume"),this.wasPaused=!1),this.currentRetryCountForLiveMediaLoad=0}),c("pause",function(){this.wasPaused=!0}),c("fullscreenchange",function(){this.trigger(this.isFullscreen()?"fullscreen":"exitfullscreen")}),c("canplaythrough",function(){this.clearPlayerTimers()}),c("loadstart",function(){"azurehtml5js"===this.techName_.toLowerCase()&&this.clearSetupCheckTimer()}),a.ampEventHandlersReady=!0}()},L["default"].prototype.sourceList_=function(a){var b=this.selectSource(a),c=!0;if(b&&(this.updateSourceOptions(b.source),"FlashSS"===b.tech&&void 0!==this.options_.sourceOptions.protectionInfo)){var d=R["default"].getTech(b.tech);d.isVersionSupported("30.0")===!0&&d.isVersionSupported("30.0.0.145")===!1&&(c=!1)}c&&b?(this.tech_&&b.tech===this.techName_&&("FlashSS"!==b.tech||JSON.stringify(this.options_.sourceOptions.protectionInfo)===JSON.stringify(b.source.protectionInfo)&&!this.tech_.isReloadNeeded())?(b.source.selected=!0,this.src(b.source,[],this.presentationFlow)):this.loadMediaWithTimeout(function(){this.loadTech_(b.tech,b.source),this.refreshTextTracks()}),this.cea608Module&&this.cea608Module.dispose(),this.cea608Module=this.cea608Module||new ha["default"](this),this.cea608Module.init(),"AzureHtml5JS"===this.techName_&&this.prepareForImsc1Captions(!0)):(this.tech_&&this.unloadTech_(),L["default"].raiseError.call(this,L["default"].getAMPErrorCode.call(this,a)),this.triggerReady())},L["default"].prototype.options_.sourceOptions={},L["default"].prototype.updateSourceOptions=function(a){this.options({sourceOptions:null});var b={};a&&a.protectionInfo&&(b.protectionInfo=a.protectionInfo),this.options({sourceOptions:b})},L["default"].prototype.pauseAndHide=function(){try{this.el().style.display="none",null!==this.currentSrc()&&this.pause()}catch(a){AMP.Logger.warning(AMP.Logger.Area.videojs,"Exception while quering currentSrc in player.pauseAndHide()")}},L["default"].prototype.hide=function(){void 0===this.el().style.opacity?this.el().style.display="none":(this.el().style.opacity=0,this.bigPlayButton.el().style.opacity=0)},L["default"].prototype.isVisible=function(){return"none"!==this.el().style.display},L["default"].prototype.playerContainer=function(){return this.multiPlayerContainerDiv},L["default"].prototype.currentClip=function(){return this.clip},L["default"].prototype.clip=null,L["default"].prototype.playClip=function(a){this.src(a.parent.source,a.parent.tracks,!0),this.clip=a,this.clip.isAd&&(this.title_=a.name)},L["default"].prototype.addMidRoll=function(a){return null===this.scheduler&&(this.scheduler=new AMP.Scheduler.Scheduler(this)),this.scheduler.addMidRoll(a)},L["default"].prototype.show=function(){this.el().style.display="block",this.el().style.opacity=1,this.bigPlayButton.el().style.opacity=1,this.setupSkipAd(),this.trigger("visibilityChange");var a=this;ia.setTimeout(function(){if(a.multiPlayerContainerDiv===k["default"].activeElement)try{a.multiPlayerContainerDiv.blur()}catch(b){AMP.Logger.warning(AMP.Logger.Area.videojs,"Exception while removing focus from player container")}},100)},L["default"].prototype.isDisposed=function(){return null===this.el()},L["default"].prototype.resetPlayer=function(){this.error(null),this.clip=null,this.title_="",void 0!==this.skipAdButton&&null!==this.skipAdButton&&(this.skipAdButton.style.display="none",this.skipAdButton.innerHTML="")},L["default"].prototype.setupSkipAd=function(){if(null!==this.clip&&this.clip.isAd&&this.clip.skippable&&this.clip.skippable>0){var a=this,b=function(){if(null!==a.clip&&a.skipAdInitialized){var b=a.duration()>0?Math.min(a.clip.skippable,a.duration()):a.clip.skippable,c=Math.ceil(b-a.currentTime());c>0?a.skipAdButton.innerHTML=AMP.Misc.formatString(a.localize("SKIP_AD_COUNTDOWN_FORMAT"),c):-1===(" "+a.skipAdButton.className+" ").indexOf(" enabled ")&&(a.skipAdButton.className+=" enabled",a.skipAdButton.innerHTML=a.localize("SKIP")),"block"!==a.skipAdButton.style.display&&a.currentTime()>0&&(a.skipAdButton.style.display="block");

}},c=function d(){a.skipAdInitialized=!1,a.off("timeupdate",b),a.off("ended",d),a.skipAdButton.className="amp-skip-ad-button",a.skipAdButton.style.display="none"};this.skipAdButton||(this.skipAdButton=i["default"].document.createElement("div"),this.skipAdButton.className="amp-skip-ad-button",this.skipAdButton.style.display="none",this.skipAdButton.onclick=function(){(" "+this.className+" ").indexOf(" enabled ")>=0&&(a.trigger("skip"),c())},this.el().appendChild(this.skipAdButton)),this.skipAdInitialized||(this.on("timeupdate",b),this.on("ended",c),this.skipAdInitialized=!0)}else this.skipAdButton&&(this.skipAdButton.style.display="none")},L["default"].prototype.getSkipButton=function(){return this.skipAdButton},L["default"].prototype.showControls=function(){this.controlBar.el_.style.display="none"},L["default"].prototype.hideControls=function(){this.controlBar.el_.style.display="block"},L["default"].prototype.scheduler=null,L["default"].prototype.getScheduler=function(){return this.scheduler},L["default"].prototype.playlist=function(a){return a?(null===this.scheduler&&(this.scheduler=new AMP.Scheduler.Scheduler(this)),void this.scheduler.setPlaylist(a)):this.scheduler?this.scheduler.playlist():null},L["default"].prototype.oldDispose=L["default"].prototype.dispose,L["default"].prototype.dispose=function(){this.clearPlayerTimers(),this.scheduler&&null!==this.scheduler&&this.scheduler.dispose(),this.oldDispose()},L["default"].prototype.getMemoryLog=function(a){return AMP.Logger.getMemoryLog(a)},L["default"].prototype.saveMemoryLog=function(){return AMP.Logger.saveMemoryLog()},L["default"].prototype.getSavedMemoryLog=function(){return AMP.Logger.getSavedMemoryLog()},L["default"].prototype.setXmlHttpRequestFactory=function(a){this.tech_&&this.tech_.setXmlHttpRequestFactory?this.tech_.setXmlHttpRequestFactory(a):AMP.Logger.warning(AMP.Logger.Area.videojs,"setXmlHttpRequestFactory unavailable on "+this.techName_+" playback technology element.")},N["default"].prototype.updatePlayerOptions=function(a){this.options_.playerOptions=U["default"](this.options_.playerOptions,a)},N["default"].prototype.updateCurrentPlayerConfigs=function(){this.options_.currentPlayerConfigs||(this.options_.currentPlayerConfigs={});var a=Z.findProfile(this.options_.playerOptions.heuristicProfile);void 0===this.options_.heuristicProfile&&a&&(this.options_.heuristicProfile=a.name);var b=a?m["default"]({},a):{},c=this.options_.playerOptions.customPlayerSettings;if(c&&c.customHeuristicSettings){var d={};for(var e in c.customHeuristicSettings)N["default"]._availableSettings.heuristicSettings.hasOwnProperty(e)&&(d[e]=c.customHeuristicSettings[e]);b=m["default"](b,d)}b.maxBufferInWallClockSec<b.preRollInWallClockSec&&(b.maxBufferInWallClockSec=b.preRollInWallClockSec),b.livePlaybackOffsetInWallClockSec<b.preRollInWallClockSec&&(b.livePlaybackOffsetInWallClockSec=b.preRollInWallClockSec),this.options_.currentPlayerConfigs.currentHeuristicConfigs=b},N["default"]._availableSettings={heuristicSettings:{preRollInWallClockSec:0,maxBufferInWallClockSec:0,livePlaybackOffsetInWallClockSec:0,windowSizeHeuristics:!1,useBrowserWindowForWindowSizeRule:!1,minFragmentsForBandwidthAverage:1,bandwidthTestWithTimeThresholdDuringLive:!0,useVariableFragmentSizeMode:!1}},L["default"].canSupportFormats=function(a,b){var c=b[a.type];if(c){if(!a.protectionInfo)return"maybe";for(var d=0;d<a.protectionInfo.length;d++)if(-1!==c.indexOf(a.protectionInfo[d].type))return"maybe"}return""},L["default"].prototype.refreshTextTracks=function(){if(this.tech_){if(this.remoteTextTracks()&&this.remoteTextTracks().tracks_)for(;this.remoteTextTracks().tracks_.length>0;)this.removeRemoteTextTrack(this.remoteTextTracks().tracks_[0]);for(var a=this.options_.tracks||[],b=0;b<a.length;b++){var c=a[b];if(this.player_.addRemoteTextTrack(c),la>b){var d=this.remoteTextTracks().tracks_[b];d.activeCues}}this.controlBar&&this.controlBar.subtitlesButton&&this.controlBar.subtitlesButton.update(),this.controlBar&&this.controlBar.captionsButton&&this.controlBar.captionsButton.update(),this.options_.tracks.length=0,this.textTracks_=this.player_.textTracks()}},L["default"].prototype.getCurrentTextTrack=function(){var a=this.textTracks(),b=0,c=void 0;if(a)for(;b<a.length;b++)if(c=a[b],"showing"===c.mode)return c},L["default"].prototype.trigger=function(a,b,c,d){switch(a){case"waiting":case"fullscreenchange":AMP.Logger.verbose(AMP.Logger.Area.videojs,"triggering event: "+a)}return c?q.trigger(this.el_,a,b,c,d):q.trigger(this.el_,a,b,this.currentClip(),d),this},L["default"].raiseError=function(a,b){var c=f("amp",a,b);this.error(c)},L["default"].prototype.retryPlayerLoad=function(a){this.clearPlayerTimers();var b=void 0===a;if(void 0!==a)try{b=this.techGet_("isLiveStartupError")}catch(c){b=!1}if(b&&this.options_.manifestFetchAutoRetryForLive&&this.currentRetryCountForLiveMediaLoad<this.options_.maxRetryCountForLive){this.currentRetryCountForLiveMediaLoad++,this.trigger("livestartupretry",{retryCount:this.currentRetryCountForLiveMediaLoad}),AMP.Logger.warning(AMP.Logger.Area.ampAPI,"live startup retry. count :"+this.currentRetryCountForLiveMediaLoad);var d=this;return this.retryTimer=ia.setTimeout(function(){d.retryTimer=0/0,d.retryMediaLoad()},this.options_.retryIntervalForLiveInMSec),!0}return!1},L["default"].prototype.clearPlayerTimers=function(){this.retryTimer&&(ia.clearTimeout(this.retryTimer),this.retryTimer=0/0),this.clearSetupCheckTimer()},L["default"].prototype.clearSetupCheckTimer=function(){this.techSetupCheckTimer&&(ia.clearTimeout(this.techSetupCheckTimer),this.techSetupCheckTimer=0/0)},L["default"].prototype.loadMediaWithTimeout=function(a){a&&(this.originalSetSource=a),a.call(this),this.startSetupTimeout()},L["default"].prototype.retryMediaLoad=function(){this.techCall_("src",this.cache_.src),this.startSetupTimeout()},L["default"].prototype.startSetupTimeout=function(){var a=this;this.clearSetupCheckTimer(),this.options_.playerStartupTimeoutTimer&&(this.techSetupCheckTimer=ia.setTimeout(function(){a.techSetupCheckTimer=0/0,a.currentRetryCountForLiveMediaLoad<a.options_.maxRetryCountForLive?a.retryPlayerLoad():L["default"].raiseError.call(this,_.errorCode.srcErrUnknown)},this.options_.playerStartupTimeoutInMSec),this.showBusy())},N["default"].raiseError=function(a,b,c){var d=f(a,b,c);this.error(d)},L["default"].prototype.prepareForImsc1Captions=function(a){var b=this.options().imsc1CaptionsSettings;if(b){b.length>1&&S.Log.warning(AMP.Logger.Area.ttml,"Only 1 IMSC1 track is currently supported.");var c=this;b.forEach(function(b){if(b.label&&void 0!==b.srclang){var d=c.addRemoteTextTrack({kind:"captions",label:b.label,srclang:b.srclang});d&&d.track?(d.track.isImsc1=!0,a&&(d.track.mode="showing")):AMP.Logger.error(AMP.Logger.Area.ttml,"Unable to create IMSC1 track: "+JSON.stringify(b)),c.textTrackSettings.setValues({justification:"left"})}else AMP.Logger.error(AMP.Logger.Area.ttml,"IMSC1 label or srclang is missing: "+JSON.stringify(b))})}},L["default"].prototype.getErrorUI=function(a){var b=ja.levelTwoErrors[268435455&a.code];if(b&&b.length>0)return b;var c=267386880,d=(a.code&c)>>20;return 0===d?a.message:6===d?this.options().notSupportedMessage:255===d?"MEDIA_ERR_UNKNOWN":H["default"].errorTypes[d]||""},F["default"].prototype.content=function(){var a=this.player().error();if(a){var b=this.player().getErrorUI(a);return[this.htmlEncode(this.localize(b)),k["default"].createElement("br"),"(0x"+a.code.toString(16)+")"]}},L["default"].getAMPErrorCode=function(a){for(var b=ja.errorCode.srcPlayerMismatchUnknown,c=0,d=this.options_.techOrder;c<d.length;c++){var e=P["default"](d[c]),f=R["default"].getTech(e);if(f&&(!f.isSupported()||"FlashSS"===e&&f.isVersionSupported("30.0.0.145")===!1&&f.isVersionSupported("30.0")===!0))for(var g=0,h=a;g<h.length;g++){var i=h[g];f.canPlaySource(i)&&("SilverlightSS"===e?b|=ja.errorCode.srcPlayerMismatchSilverlightNotInstalled:"FlashSS"===e&&(b|=ja.errorCode.srcPlayerMismatchFlashNotInstalled))}}return b},L["default"].prototype.checkWidewineHttpErrorScenario=function(a){var b=(16711680&a.code)===ja.errorCode.srcPlayerMismatchStart,c=(16777215&a.code)===ja.errorCode.abortedErrHttpMixedContentBlocked;if(b&&!c){var d=function(a){var b=!1;return void 0!==a&&a.length>0&&a.forEach(function(a){a.protectionInfo&&a.protectionInfo.length>0&&a.protectionInfo.forEach(function(a){"Widevine"===a.type&&(b=!0)})}),b};try{d(this.options_.sourceList)&&(a.code=4278190080&a.code|ja.errorCode.encryptErrDecrypterNotFound)}catch(a){AMP.Logger.warning(AMP.Logger.Area.videojs,"exception in checkWidewineHttpsErrorScenario")}}},L["default"].prototype.preloadClip=function(a){this.options_.preload="auto",this.options_.autoplay=!1,this.src(a.parent.source,a.parent.tracks,!0),this.clip=a,this.clip.isAd&&(this.title_=a.name)},L["default"].prototype.canControlPlaybackRate=function(){return this.tech_&&this.tech_.featuresPlaybackRate},L["default"].prototype.isPreloadSupported=function(){return this.tech_&&this.tech_.featuresPreload},L["default"].prototype.downloadableMedia=function(a){return void 0!==a?(this.downloadableMediaOptions=a,this.trigger("downloadableMediaChanged"),this):this.downloadableMediaOptions},L["default"].prototype.spliceWaiting=function(){var a=[];if(this.tech){var b=this.techGet_("getAdSignalsAndReset");if(b&&b.length>0){var c=!!b[0].simpleSignal;b.forEach(function(b){if(c)a.push({id:b.simpleSignal.id,startOffset:b.simpleSignal.presentationTime,duration:b.simpleSignal.duration,out:!0});else{var d=AMP.Scte35Parser.parseBinaryMessage(b.scteSignal.signalInBinary);d&&d.id&&(b.scteSignal.presentationTimeOverride&&(d.startOffset=b.scteSignal.presentationTimeOverride),a.push(d))}})}}return a},L["default"].prototype.addElClass=function(a,b){v.addElClass(a,b)},L["default"].prototype.removeElClass=function(a,b){v.removeElClass(a,b)},L["default"].prototype.showBusy=function(){v.addElClass(this.el(),"vjs-waiting"),this.trigger("waiting")},L["default"].prototype.presentationLayout=function(a){return void 0===a?this.preLayout:(this.title_="",this.preLayout=a,this.clip=null,void this.trigger("presentationUpdate"))},L["default"].prototype.createAdPlayer=function(){var a=k["default"].createElement("video");B.isMobile||v.setElAttributes(a,{preload:"auto"}),this.el().parentNode.appendChild(a);var b=this.options_,c={};c.width=b.width,c.height=b.height,c.fluid=b.fluid,c.autoplay=b.autoplay,c.poster=b.poster,c.controls=!1,c.adClickEnabled=!0,c.overrideDisabledForBigPlayButton=!0,c.techOrder=["html5"],c.hotkeys={enableSeek:!1,enablePlayPause:!1},c.isAdPlayer=!0,c.logo={enabled:!1},c.ariaLabel="Ad player";var d=new L["default"](a,c,null,this);return d},S.Log.logByType=AMP.Logger.videoJSLogOverride,D["default"].prototype.prependChild=function(a,b){var c=this.addChild(a,b);return this.contentEl().insertBefore(c.el(),this.contentEl().firstChild),c},D["default"].prototype.toggleClass=function(a,b){return void 0!==b?void(b?this.addClass(a):this.removeClass(a)):void(this.hasClass(a)?this.removeClass(a):this.addClass(a))},D["default"].prototype.addCrossOriginPolicy=function(a,b){b||(b=this.el()),a===ja.CorsConfig.UseCredentials?b.setAttribute("crossorigin","use-credentials"):a===ja.CorsConfig.Anonymous&&b.setAttribute("crossorigin","anonymous")},J["default"].prototype.prependItem=function(a,b){this.prependChild(a),a.parent=b,a.on("click",t.bind(this,function(){this.unlockShowing()}))},b.exports=c["default"]},{"./Cea608/Cea608Module.js":1,"./ampDefs.js":11,"./ampHeuristicProfiles.js":12,"./lang/languages.js":38,"./tech-wrappers/Html5.js":64,"./tech-wrappers/amp-tech-azureHtml5JS.js":66,"./tech-wrappers/amp-tech-flashSS.js":67,"./tech-wrappers/amp-tech-html5FairPlayHLS.js":68,"./tech-wrappers/amp-tech-silverlightSS.js":69,"./version.js":70,"./video.js/src/js/component.js":77,"./video.js/src/js/error-display.js":114,"./video.js/src/js/media-error.js":119,"./video.js/src/js/menu/menu.js":122,"./video.js/src/js/player.js":124,"./video.js/src/js/tech/tech.js":136,"./video.js/src/js/tracks/text-track.js":147,"./video.js/src/js/utils/browser.js":153,"./video.js/src/js/utils/dom.js":156,"./video.js/src/js/utils/events.js":157,"./video.js/src/js/utils/fn.js":158,"./video.js/src/js/utils/guid.js":161,"./video.js/src/js/utils/languageLabels.js":163,"./video.js/src/js/utils/log.js":164,"./video.js/src/js/utils/merge-options.js":165,"./video.js/src/js/utils/to-title-case.js":169,"./video.js/src/js/utils/url.js":170,"./video.js/src/js/video.js":171,"global/document":250,"global/window":251,"lodash-compat/function/throttle":200,"object.assign":244,timers:195}],11:[function(a,b,c){"use strict";c.__esModule=!0;var d={PlayReady:"PlayReady",Widevine:"Widevine",AES:"AES",FairPlay:"FairPlay"};c.protectionType=d;var e={Anonymous:"Anonymous",UseCredentials:"UseCredentials"};c.CorsConfig=e;var f={Smooth:"application/vnd.ms-sstr+xml",Dash:"application/dash+xml",HLS:"application/vnd.apple.mpegurl"};c.StreamingFormatMimeType=f;var g={canplaythrough:"canplaythrough",durationchange:"durationchange",ended:"ended",error:"error",fullscreenchange:"fullscreenchange",loadstart:"loadstart",loadedmetadata:"loadedmetadata",loadeddata:"loadeddata",pause:"pause",play:"play",playing:"playing",seeked:"seeked",seeking:"seeking",timeupdate:"timeupdate",volumechange:"volumechange",waiting:"waiting",downloadbitratechanged:"downloadbitratechanged",playbackbitratechanged:"playbackbitratechanged",sourceset:"sourceset",ratechange:"ratechange",disposing:"disposing",splicewaiting:"splicewaiting",emsgAvailable:"emsgAvailable",start:"start",firstquartile:"firstquartile",midpoint:"midpoint",thirdquartile:"thirdquartile",complete:"complete",mute:"mute",unmute:"unmute",rewind:"rewind",resume:"resume",fullscreen:"fullscreen",exitfullscreen:"exitfullscreen",click:"tech-click",skip:"skip",errorInPlayingAd:"errorInPlayingAd",livestartupretry:"livestartupretry",embeddedcaptionsfound:"embeddedcaptionsfound",decryptorInitialized:"decryptorInitialized"};c.eventName=g;var h={menuadded:"menuadded",currentTimeChanging:"currentTimeChanging",playingAtLiveDVREdge:"playingAtLiveDVREdge",playingAtStartDVREdge:"playingAtStartDVREdge",playingInDVR:"playingInDVR"};c.internalEventName=h;var i={trackselected:"trackselected"};c.streamEventName=i;var j={streamselected:"streamselected",streamindexinvalid:"streamindexinvalid",streamselectnotsupported:"streamselectnotsupported"};c.streamListEventName=j;var k={abortedErrStart:1048576,abortedErrUnknown:1048576,abortedErrNotImplemented:1048577,abortedErrHttpMixedContentBlocked:1048578,abortedErrEnd:2097151,networkErrStart:2097152,networkErrUnknown:2097152,networkErrHttpResponseBegin:2097552,networkErrHttpBadUrlFormat:2097552,networkErrHttpUserAuthRequired:2097553,networkErrHttpUserForbidden:2097555,networkErrHttpUrlNotFound:2097556,networkErrHttpNotAllowed:2097557,networkErrHttpGone:2097562,networkErrHttpPreconditionFailed:2097564,networkErrHttpInternalServerFailure:2097652,networkErrHttpBadGateway:2097654,networkErrHttpServiceUnavailable:2097655,networkErrHttpGatewayTimeout:2097656,networkErrHttpResponseEnd:2097751,networkErrTimeout:2097752,networkErrError:2097753,networkErrAbort:2097754,networkErrNoInternet:2097755,networkErrEnd:3145727,decodeErrStart:3145728,decodeErrUnknown:3145728,decodeErrEnd:4194303,srcErrStart:4194304,srcErrUnknown:4194304,srcErrParsePresentation:4194305,srcErrParseSegment:4194306,srcErrUnsupportedPresentation:4194307,srcErrInvalidSegment:4194308,srcErrLiveNoSegments:4194309,srcErrEnd:5242879,encryptErrStart:5242880,encryptErrUnknown:5242880,encryptErrDecrypterNotFound:5242881,encryptErrDecrypterInit:5242882,encryptErrDecrypterNotSupported:5242883,encryptErrKeyAcquire:5242884,encryptErrDecryption:5242885,encryptErrLicenseAcquire:5242886,encryptErrEnd:6291455,srcPlayerMismatchStart:6291456,srcPlayerMismatchUnknown:6291456,srcPlayerMismatchFlashNotInstalled:6291457,srcPlayerMismatchSilverlightNotInstalled:6291458,srcPlayerMismatchEnd:7340031,errUnknown:267386880};c.errorCode=k;var l={400:k.networkErrHttpBadUrlFormat,401:k.networkErrHttpUserAuthRequired,403:k.networkErrHttpUserForbidden,404:k.networkErrHttpUrlNotFound,405:k.networkErrHttpNotAllowed,410:k.networkErrHttpGone,412:k.networkErrHttpPreconditionFailed,500:k.networkErrHttpInternalServerFailure,502:k.networkErrHttpBadGateway,503:k.networkErrHttpServiceUnavailable,504:k.networkErrHttpGatewayTimeout};c.httpErrorCode=l;var m={downloadrequested:"downloadrequested",downloadcompleted:"downloadcompleted",downloaddecrypted:"downloaddecrypted",downloadfailed:"downloadfailed"};c.bufferDataEventName=m;var n={video:"video",videoWithCC:"videoWithCC",audio:"audio",transcript:"transcript"};c.downloadableMediaType=n},{}],12:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){for(var b=[{name:g["default"].HeuristicProfile.Hybrid,preRollInWallClockSec:4,maxBufferInWallClockSec:30,livePlaybackOffsetInWallClockSec:8,windowSizeHeuristics:!0},{name:g["default"].HeuristicProfile.QuickStart,preRollInWallClockSec:2,maxBufferInWallClockSec:30,livePlaybackOffsetInWallClockSec:8,windowSizeHeuristics:!0},{name:g["default"].HeuristicProfile.HighQuality,preRollInWallClockSec:8,maxBufferInWallClockSec:30,livePlaybackOffsetInWallClockSec:15,windowSizeHeuristics:!1},{name:g["default"].HeuristicProfile.LowLatency,preRollInWallClockSec:2,maxBufferInWallClockSec:30,livePlaybackOffsetInWallClockSec:2,windowSizeHeuristics:!0}],c=0;c<b.length;c++)if(b[c].name===a)return b[c];return b[0]}c.__esModule=!0,c.findProfile=e;var f=a("./video.js/src/js/player"),g=d(f);g["default"].HeuristicProfile={Hybrid:"Hybrid",QuickStart:"QuickStart",HighQuality:"HighQuality",LowLatency:"LowLatency"}},{"./video.js/src/js/player":124}],13:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.ar={Play:"تشغيل",Pause:"إيقاف مؤقت","Current Time":"الوقت الحالي","Duration Time":"المدة","Remaining Time":"الوقت المتبقي","Stream Type":"نوع البث",LIVE:"مباشر",Loaded:"تم التحميل",Progress:"مستوى التقدم",Fullscreen:"ملء الشاشة","Non-Fullscreen":"ليس في وضع ملء الشاشة",Mute:"كتم الصوت",Unmute:"إلغاء كتم الصوت","Playback Rate":"معدل التشغيل",Subtitles:"ترجمة نصية","Subtitles Off":"تم إيقاف عرض الترجمة النصية",Captions:"تسميات توضيحية","Captions Off":"تم إيقاف عرض التسميات التوضيحية",Chapters:"فصول",Off:"إيقاف التشغيل",Quality:"الجودة",Auto:"تلقائي","Audio Tracks":"مقاطع صوتية","default":"افتراضي","Cast To Device":"إرسال إلى الجهاز",Share:"مشاركة",Volume:"مستوى الصوت","Playback Speed":"سرعة التشغيل","Video Quality":"جودة الفيديو","Closed Captioning":"إضافة نص مصاحب","Share Video":"مشاركة الفيديو","Next Track":"المقطع الصوتي التالي","Previous Track":"المقطع الصوتي السابق","Skip Forward":"تخطي للأمام","Skip Backward":"تخطي للخلف","Fast Forward":"تقديم سريع",Rewind:"إرجاع","Next Frame":"الإطار التالي","Previous Frame":"الإطار السابق",Settings:"إعدادات",Options:"خيارات","More Options":"خيارات إضافية",Zoom:"تكبير/تصغير","Zoom In":"تكبير","Zoom Out":"تصغير","Audio Only":"الصوت فقط","Picture in Picture":"صورة داخل صورة","Camera Angle":"زاوية الكاميرا",MEDIA_ERR_ABORTED:"تم إيقاف تشغيل الفيديو.",MEDIA_ERR_NETWORK:"أدى خطأ في الشبكة إلى إيقاف تنزيل الفيديو في وسطه. يرجى التحقق من اتصال الشبكة أو المحاولة مرة أخرى لاحقاً.",MEDIA_ERR_DECODE:"تعذر تحميل الفيديو بسبب عطل في الخادم أو في الشبكة أو لأن التنسيق غير معتمد.",MEDIA_ERR_SRC_NOT_SUPPORTED:"تم إيقاف تشغيل الفيديو لأنه تالف أو لأنه يستخدم ميزات لا يعتمدها المستعرض.",MEDIA_ERR_ENCRYPTED:"تعذّر فكّ تشفير مصدر الفيديو المشفّر.",SRC_PLAYER_MISMATCH:"لم يتم العثور على مصدر متوافق لبيئة المستعرض الحالية.",MEDIA_ERR_UNKNOWN:"حدث خطأ غير معروف",SKIP_AD_COUNTDOWN_FORMAT:"تخطي الإعلان خلال {0}...",SKIP:"تخطي",AD_TIMING_INFO:"الإعلان {0} من الثواني","Media Player":"Media Player","Play Video":"تشغيل الفيديو",Foreground:"الواجهة الأمامية",White:"أبيض",Black:"أسود",Red:"أحمر",Green:"أخضر",Blue:"أزرق",Yellow:"أصفر",Magenta:"أرجواني",Cyan:"سماوي",Opaque:"معتم","Semi-Opaque":"شبه معتم",Transparent:"شفاف",Window:"نافذة","Font Size":"حجم الخط","Text Edge Style":"نمط حافة النص",None:"بلا",Raised:"مرفوع",Depressed:"منخفض",Uniform:"منتظم",Dropshadow:"إسقاط ظل","Font Family":"عائلة الخطوط","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"غير منتظم",Script:"نص","Small Caps":"أحرف صغيرة",Defaults:"الإعدادات الافتراضية",Done:"تم",Link:"الارتباط",Embed:"تضمين",Close:"إغلاق",Copy:"نسخ","Copy Url":"نسخ عنوان Url","Embed Code":"تضمين تعليمات برمجية",English:"الإنجليزية","volume level":"مستوى الصوت","video progress bar":"شريط تقدم الفيديو","playback speed level":"مستوى سرعة التشغيل","Dolby Digital":"Dolby Digital",Stereo:"ستريو","Captions Menu":"قائمة التسميات التوضيحية","Subtitles Menu":"قائمة شرائط الترجمة","Need Text":"بحاجة إلى نص",Download:"تنزيل","Go to live":"انتقال إلى البث المباشر","End Time":"وقت الانتهاء"},d["default"].prototype.options_.languages["ar-sa"]=d["default"].prototype.options_.languages.ar,d["default"].prototype.options_.languages["ar-ab"]=d["default"].prototype.options_.languages.ar,d["default"].prototype.options_.languages["ar-xm"]=d["default"].prototype.options_.languages.ar,d["default"].prototype.options_.languages["ar-ma"]=d["default"].prototype.options_.languages.ar},{"../video.js/src/js/player.js":124}],14:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.bg={Play:"Възпроизвеждане",Pause:"Пауза","Current Time":"Текущ час","Duration Time":"Времетраене","Remaining Time":"Оставащо време","Stream Type":"Тип поток",LIVE:"НА ЖИВО",Loaded:"Заредена",Progress:"Напредък",Fullscreen:"Цял екран","Non-Fullscreen":"Не на цял екран",Mute:"Изключи звука",Unmute:"Включи звука","Playback Rate":"Скорост на възпроизвеждане",Subtitles:"Субтитри","Subtitles Off":"изкл. на субтитри",Captions:"Надписи","Captions Off":"изкл. на надписи",Chapters:"Глави",Off:"Изкл.",Quality:"Качество",Auto:"Автоматично","Audio Tracks":"Аудиозаписи","default":"по подразбиране","Cast To Device":"Прехвърляне към устройство",Share:"Споделяне",Volume:"Сила на звука","Playback Speed":"Скорост на възпроизвеждане","Video Quality":"Качество на видеото","Closed Captioning":"Скрити надписи","Share Video":"Споделяне на видео","Next Track":"Следващ запис","Previous Track":"Предишен запис","Skip Forward":"Пропусни напред","Skip Backward":"Пропусни назад","Fast Forward":"Бързо напред",Rewind:"Пренавий","Next Frame":"Следващ кадър","Previous Frame":"Предишен кадър",Settings:"Настройки",Options:"Опции","More Options":"Още опции",Zoom:"Мащабиране","Zoom In":"Увеличаване на мащаба","Zoom Out":"Намаляване на мащаба","Audio Only":"Само аудио","Picture in Picture":"Картина в картина","Camera Angle":"Ъгъл на камерата",MEDIA_ERR_ABORTED:"Възпроизвеждането на видеото е прекратено.",MEDIA_ERR_NETWORK:"Грешка в мрежата доведе до неуспешно изтегляне на част от видеото. Проверете мрежовата връзка или опитайте отново по-късно.",MEDIA_ERR_DECODE:"Видеото не може да се зареди, защото сървърът или мрежата дават грешка или защото форматът не се поддържа.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Възпроизвеждането на видео е прекратено поради проблем с повреда или защото видеото използва функции, които не се поддържат от вашия браузър.",MEDIA_ERR_ENCRYPTED:"Не може да се дешифрира шифрованият видеоизточник.",SRC_PLAYER_MISMATCH:"Не е намерен съвместим източник за текущата среда на браузъра.",MEDIA_ERR_UNKNOWN:"Възникна неизвестна грешка",SKIP_AD_COUNTDOWN_FORMAT:"Пропускане на реклама след {0}…",SKIP:"Пропускане",AD_TIMING_INFO:"Реклама: {0} секунди","Media Player":"Мултимедиен плейър","Play Video":"Възпроизвеждане на видео",Foreground:"Преден план",White:"Бял",Black:"Черен",Red:"Червен",Green:"Зелен",Blue:"Син",Yellow:"Жълт",Magenta:"Магента",Cyan:"Циан",Opaque:"Непрозрачен","Semi-Opaque":"Полупрозрачен",Transparent:"Прозрачен",Window:"Прозорец","Font Size":"Размер на шрифта","Text Edge Style":"Стил за край на текст",None:"Няма",Raised:"Повдигат",Depressed:"Плосък",Uniform:"Постоянен",Dropshadow:"Хвърлящ сянка","Font Family":"Семейство на шрифта","Monospace Serif":"Серифен с еднаква ширина","Proportional Serif":"Пропорционален серифен","Monospace Sans-Serif":"Несерифен с еднаква ширина","Proportional Sans-Serif":"Пропорционален несерифен",Casual:"Обикновен",Script:"Скрипт","Small Caps":"Умалени главни букви",Defaults:"По подразбиране",Done:"Готово",Link:"Връзка",Embed:"Вграждане",Close:"Затваряне",Copy:"Копиране","Copy Url":"Копиране на URL адреса","Embed Code":"Вграждане на код",English:"Английски","volume level":"сила на звука","video progress bar":"лентата за напредъка на видео","playback speed level":"ниво на скорост на възпроизвеждане","Dolby Digital":"Dolby Digital",Stereo:"Стерео","Captions Menu":"меню за надписи","Subtitles Menu":"меню за субтитри","Need Text":"Трябва текст",Download:"Изтеглям","Go to live":"Обратно на живо","End Time":"Край"}},{"../video.js/src/js/player.js":124}],15:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.ca={Play:"Reprodueix",Pause:"Pausa","Current Time":"Hora actual","Duration Time":"Durada","Remaining Time":"Temps restant","Stream Type":"Tipus de seqüència",LIVE:"EN DIRECTE",Loaded:"Carregat",Progress:"Progrés",Fullscreen:"Pantalla sencera","Non-Fullscreen":"Mida normal",Mute:"Silencia",Unmute:"Activa el so","Playback Rate":"Velocitat de reproducció",Subtitles:"Subtítols","Subtitles Off":"Subtítols desactivats",Captions:"Llegendes","Captions Off":"Llegendes desactivades",Chapters:"Capítols",Off:"Desactivat",Quality:"Qualitat",Auto:"Automàtic","Audio Tracks":"Pistes d'àudio","default":"per defecte","Cast To Device":"Emetre al dispositiu",Share:"Comparteix",Volume:"Volum","Playback Speed":"Velocitat de reproducció","Video Quality":"Qualitat de vídeo","Closed Captioning":"Subtitulat ocult","Share Video":"Comparteix el vídeo","Next Track":"Pista següent","Previous Track":"Pista anterior","Skip Forward":"Salta endavant","Skip Backward":"Salta enrere","Fast Forward":"Avança ràpidament",Rewind:"Rebobina","Next Frame":"Fotograma següent","Previous Frame":"Fotograma anterior",Settings:"Configuració",Options:"Opcions","More Options":"Més opcions",Zoom:"Zoom","Zoom In":"Amplia","Zoom Out":"Redueix","Audio Only":"Només àudio","Picture in Picture":"Imatge a la imatge","Camera Angle":"Angle de càmera",MEDIA_ERR_ABORTED:"S'ha avortat la reproducció de vídeo.",MEDIA_ERR_NETWORK:"Un error de xarxa ha provocat que la baixada del vídeo no es pogués completar. Comproveu la connexió de xarxa o torneu-ho a provar més tard.",MEDIA_ERR_DECODE:"El vídeo no s'ha pogut carregar a causa d'un error del servidor o de la xarxa o bé perquè el format no és compatible.",MEDIA_ERR_SRC_NOT_SUPPORTED:"S'ha avortat la reproducció del vídeo a causa d'un problema de danys o bé perquè el vídeo feia servir característiques no admeses pel navegador.",MEDIA_ERR_ENCRYPTED:"No es pot desencriptar la font del vídeo encriptat.",SRC_PLAYER_MISMATCH:"No s'ha trobat cap font compatible per a l'entorn actual del navegador.",MEDIA_ERR_UNKNOWN:"S'ha produït un error desconegut.",SKIP_AD_COUNTDOWN_FORMAT:"Omet l'anunci d'aquí a {0}...",SKIP:"Omet",AD_TIMING_INFO:"Anunci: {0} segons",Download:"Baixar","Go to live":"Ves al contingut en directe","End Time":"Hora de finalización"},d["default"].prototype.options_.languages["ca-es"]=d["default"].prototype.options_.languages.ca},{"../video.js/src/js/player.js":124}],16:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.cs={Play:"Přehrát",Pause:"Pozastavit","Current Time":"Aktuální čas","Duration Time":"Doba trvání","Remaining Time":"Zbývající čas","Stream Type":"Typ streamu",LIVE:"ŽIVĚ",Loaded:"Načtené",Progress:"Průběh",Fullscreen:"Celá obrazovka","Non-Fullscreen":"Normální zobrazení",Mute:"Ztlumit",Unmute:"Zrušit ztlumení","Playback Rate":"Rychlost přehrávání (snímky)",Subtitles:"Titulky","Subtitles Off":"vypnuté titulky",Captions:"Titulky","Captions Off":"vypnuté titulky",Chapters:"Kapitoly",Off:"Vypnuto",Quality:"Kvalita",Auto:"Automaticky","Audio Tracks":"Zvukové stopy","default":"výchozí","Cast To Device":"Přetypovat na zařízení",Share:"Sdílet",Volume:"Hlasitost","Playback Speed":"Rychlost přehrávání","Video Quality":"Kvalita videa","Closed Captioning":"Skryté titulky","Share Video":"Sdílet video","Next Track":"Další stopa","Previous Track":"Předchozí stopa","Skip Forward":"Přeskočit vpřed","Skip Backward":"Přeskočit zpět","Fast Forward":"Převinout vpřed",Rewind:"Převinout zpět","Next Frame":"Další snímek","Previous Frame":"Předchozí snímek",Settings:"Nastavení",Options:"Možnosti","More Options":"Další možnosti",Zoom:"Lupa","Zoom In":"Přiblížit","Zoom Out":"Oddálit","Audio Only":"Jenom zvuk","Picture in Picture":"Obraz v obraze","Camera Angle":"Úhel kamery",MEDIA_ERR_ABORTED:"Přehrávání videa se přerušilo.",MEDIA_ERR_NETWORK:"Během stahování videa došlo k chybě kvůli problému se sítí. Zkontrolujte prosím připojení k síti nebo to zkuste znova později.",MEDIA_ERR_DECODE:"Video se nedalo načíst, buď kvůli chybě serveru nebo sítě, nebo nemá podporovaný formát.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Přehrávání videa se přerušilo, protože je video poškozené nebo používá funkce, které váš prohlížeč nepodporuje.",MEDIA_ERR_ENCRYPTED:"Nedá se dešifrovat zašifrovaný zdroj videa.",SRC_PLAYER_MISMATCH:"Nenašel se žádný kompatibilní zdroj pro aktuální prostředí prohlížeče.",MEDIA_ERR_UNKNOWN:"Došlo k neznámé chybě.",SKIP_AD_COUNTDOWN_FORMAT:"Přeskočit reklamu za {0}...",SKIP:"Přeskočit",AD_TIMING_INFO:"Reklama {0} s","Media Player":"Media Player","Play Video":"Přehrát video",Foreground:"Popředí",White:"Bílé",Black:"Černé",Red:"Červené",Green:"Zelené",Blue:"Modré",Yellow:"Žluté",Magenta:"Purpurové",Cyan:"Azurové",Opaque:"Neprůhledné","Semi-Opaque":"Poloprůhledné",Transparent:"Průhledné",Window:"Okno","Font Size":"Velikost písma","Text Edge Style":"Styl okraje textu",None:"Žádný",Raised:"Vystouplý",Depressed:"Vmáčknutý",Uniform:"Jednotný",Dropshadow:"Stín","Font Family":"Rodina písem","Monospace Serif":"Neproporciální Serif","Proportional Serif":"Proporcionální Serif","Monospace Sans-Serif":"Neproporciální Sans-Serif","Proportional Sans-Serif":"Proporcionální Sans-Serif",Casual:"Neformální",Script:"Skript","Small Caps":"Kapitálky",Defaults:"Výchozí",Done:"Hotovo",Link:"Odkaz",Embed:"Vložit",Close:"Zavřít",Copy:"Kopírovat","Copy Url":"Zkopírovat adresu Url","Embed Code":"Kód pro vložení",English:"Angličtina","volume level":"úroveň hlasitosti","video progress bar":"indikátor průběhu přehrávání videa","playback speed level":"úroveň rychlosti  přehrávání","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Nabídka skrytých titulků","Subtitles Menu":"Nabídka titulků","Need Text":"Je nutné zadat text.",Download:"Stáhnout","Go to live":"Přejít na živé vysílání","End Time":"Koncový čas"},d["default"].prototype.options_.languages["cs-cz"]=d["default"].prototype.options_.languages.cs},{"../video.js/src/js/player.js":124}],17:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.da={Play:"Afspil",Pause:"Pause","Current Time":"Aktuelt klokkeslæt","Duration Time":"Varighed","Remaining Time":"Resterende tid","Stream Type":"Streamtype",LIVE:"LIVE",Loaded:"Indlæst",Progress:"Status",Fullscreen:"Fuld skærm","Non-Fullscreen":"Ikke fuldskærm",Mute:"Slå lyd fra",Unmute:"Slå lyd til","Playback Rate":"Afspilningshastighed",Subtitles:"Undertekster","Subtitles Off":"Undertekster fra",Captions:"Billedtekster","Captions Off":"Billedtekster fra",Chapters:"Kapitler",Off:"Fra",Quality:"Kvalitet",Auto:"Auto","Audio Tracks":"Lydspor",
"default":"standard","Cast To Device":"Vis på enhed",Share:"Del",Volume:"Lydstyrke","Playback Speed":"Afspilningshastighed","Video Quality":"Videokvalitet","Closed Captioning":"Undertekster","Share Video":"Del video","Next Track":"Næste spor","Previous Track":"Forrige spor","Skip Forward":"Spring frem","Skip Backward":"Spring tilbage","Fast Forward":"Spol hurtigt frem",Rewind:"Spol tilbage","Next Frame":"Næste billede","Previous Frame":"Forrige billede",Settings:"Indstillinger",Options:"Indstillinger","More Options":"Flere indstillinger",Zoom:"Zoom","Zoom In":"Zoom ind","Zoom Out":"Zoom ud","Audio Only":"Kun lyd","Picture in Picture":"Billede i billede","Camera Angle":"Kameravinkel",MEDIA_ERR_ABORTED:"Afspilning af video blev afbrudt. ",MEDIA_ERR_NETWORK:"På grund af en netværksfejl blev videoen ikke downloadet helt. Kontrollér din netværksforbindelse, eller prøv igen senere.",MEDIA_ERR_DECODE:"Videoen kunne ikke indlæses. Det skyldes en server- eller netværksfejl, eller at formatet ikke er understøttet.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Afspilning af video blev afbrudt. Det skyldes, at videoen er ødelagt, eller at videoen bruger funktioner, der ikke understøttes af din browser.",MEDIA_ERR_ENCRYPTED:"Den krypterede videokilde kunne ikke dekrypteres.",SRC_PLAYER_MISMATCH:"Der blev ikke fundet en kompatibel kilde til det aktuelle browsermiljø.",MEDIA_ERR_UNKNOWN:"Der opstod en ukendt fejl",SKIP_AD_COUNTDOWN_FORMAT:"Spring reklame over om {0}…",SKIP:"Spring over",AD_TIMING_INFO:"Reklame på {0} sekunder","Media Player":"Medieafspiller","Play Video":"Afspil video",Foreground:"Forgrund",White:"Hvid",Black:"Sort",Red:"Rød",Green:"Grøn",Blue:"Blå",Yellow:"Gul",Magenta:"Magenta",Cyan:"Cyan",Opaque:"Uigennemsigtige","Semi-Opaque":"Næsten uigennemsigtig",Transparent:"Gennemsigtig",Window:"Vindue","Font Size":"Skriftstørrelse","Text Edge Style":"Typografi for tekstkant",None:"Ingen",Raised:"Hævet",Depressed:"Nedsænket",Uniform:"Ensartet",Dropshadow:"Skyggeeffekt","Font Family":"Skrifttypefamilie","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Tilfældig",Script:"Script","Small Caps":"Kapitæler",Defaults:"Standarder",Done:"Udført",Link:"Link",Embed:"Integrer",Close:"Luk",Copy:"Copy","Copy Url":"Kopiér URL-adresse","Embed Code":"Integrere kode",English:"Engelsk","volume level":"lydstyrke","video progress bar":"statuslinje for video","playback speed level":"niveau for afspilningshastighed","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Menu for billedtekster","Subtitles Menu":"Menuen for undertitler","Need Text":"Har du brug for tekst",Download:"Downloade","Go to live":"Gå til livestreaming","End Time":"Sluttidspunkt"},d["default"].prototype.options_.languages["da-dk"]=d["default"].prototype.options_.languages.da},{"../video.js/src/js/player.js":124}],18:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.de={Play:"Wiedergeben",Pause:"Anhalten","Current Time":"Aktuelle Zeit","Duration Time":"Dauer","Remaining Time":"Verbleibende Zeit","Stream Type":"Streamtyp",LIVE:"LIVE",Loaded:"Geladen",Progress:"Status",Fullscreen:"Vollbild","Non-Fullscreen":"Vollbildmodus beenden",Mute:"Ton aus",Unmute:"Ton ein","Playback Rate":"Wiedergabegeschwindigkeit",Subtitles:"Untertitel","Subtitles Off":"Untertitel aus",Captions:"Beschriftungen","Captions Off":"Beschriftungen aus",Chapters:"Kapitel",Off:"Aus",Quality:"Qualität",Auto:"Automatisch","Audio Tracks":"Audiotitel","default":"Standard","Cast To Device":"Für Gerät umwandeln",Share:"Freigeben",Volume:"Lautstärke","Playback Speed":"Wiedergabegeschwindigkeit","Video Quality":"Videoqualität","Closed Captioning":"Untertitelung","Share Video":"Video freigeben","Next Track":"Nächster Titel","Previous Track":"Vorheriger Titel","Skip Forward":"Rückwärts","Skip Backward":"Vorwärts","Fast Forward":"Vorlauf",Rewind:"Zurückspulen","Next Frame":"Nächstes Bild","Previous Frame":"Vorheriges Bild",Settings:"Einstellungen",Options:"Optionen","More Options":"Weitere Optionen",Zoom:"Zoom","Zoom In":"Vergrößern","Zoom Out":"Verkleinern","Audio Only":"Nur Audio","Picture in Picture":"Bild-im-Bild","Camera Angle":"Kamerawinkel",MEDIA_ERR_ABORTED:"Videowiedergabe abgebrochen.",MEDIA_ERR_NETWORK:"Beim Herunterladen des Videos ist aufgrund eines Netzwerkfehlers ein Fehler aufgetreten. Prüfen Sie Ihre Internetverbindung, oder versuchen Sie es später erneut.",MEDIA_ERR_DECODE:"Das Video konnte nicht geladen werden. Entweder ist ein Server- oder Netzwerkfehler aufgetreten ist, oder das Format wird nicht unterstützt.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Die Videowiedergabe wurde abgebrochen. Möglicherweise ist das Video beschädigt, oder es verwendet Funktionen, die in Ihrem Browser nicht unterstützt werden.",MEDIA_ERR_ENCRYPTED:"Die verschlüsselte Videoquelle konnte nicht entschlüsselt werden.",SRC_PLAYER_MISMATCH:"Keine kompatible Quelle für die aktuelle Browserumgebung gefunden.",MEDIA_ERR_UNKNOWN:"Unbekannter Fehler.",SKIP_AD_COUNTDOWN_FORMAT:"Werbung in {0} überspringen...",SKIP:"Überspringen",AD_TIMING_INFO:"{0} Sekunden Werbung","Media Player":"Media Player","Play Video":"Video wiedergeben",Foreground:"Vordergrund",White:"Weiß",Black:"Schwarz",Red:"Rot",Green:"Grün",Blue:"Blau",Yellow:"Gelb",Magenta:"Magenta",Cyan:"Zyan",Opaque:"Undurchsichtig","Semi-Opaque":"Halb deckend",Transparent:"Transparent",Window:"Fenster","Font Size":"Schriftgrad","Text Edge Style":"Kanten-Formatvorlage",None:"Keine",Raised:"Erhöht",Depressed:"Gedrückt",Uniform:"Einheitlich",Dropshadow:"Schlagschatten","Font Family":"Schriftfamilie","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Casual",Script:"Script","Small Caps":"Kapitälchen",Defaults:"Standard",Done:"Erledigt",Link:"Link",Embed:"Einbetten",Close:"Schließen",Copy:"Kopieren","Copy Url":"URL kopieren","Embed Code":"Einbindungscode",English:"Englisch","volume level":"Lautstärkeregler","video progress bar":"Videostatusanzeige","playback speed level":"Stufe der Wiedergabegeschwindigkeit","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Menü Bildtite","Subtitles Menu":"Menü Untertitel","Need Text":"Text erforderlich",Download:"Herunterladen","Go to live":"Zu Livestream wechseln","End Time":"Endzeit"},d["default"].prototype.options_.languages["de-at"]=d["default"].prototype.options_.languages.de,d["default"].prototype.options_.languages["de-ch"]=d["default"].prototype.options_.languages.de},{"../video.js/src/js/player.js":124}],19:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.el={Play:"Αναπαραγωγή",Pause:"Παύση","Current Time":"Τρέχουσα ώρα","Duration Time":"Χρονική διάρκεια","Remaining Time":"Χρόνος που απομένει ","Stream Type":"Τύπος ροής",LIVE:"LIVE",Loaded:"  Φορτώθηκε ",Progress:"Πρόοδος",Fullscreen:"Πλήρης οθόνη","Non-Fullscreen":"Εκτός πλήρους οθόνης",Mute:"Σίγαση",Unmute:"Κατάργηση σίγασης","Playback Rate":"Ρυθμός αναπαραγωγής",Subtitles:"Υπότιτλοι","Subtitles Off":"Απενεργοποίηση υποτίτλων",Captions:"Λεζάντες","Captions Off":"απενεργοποίηση λεζάντων",Chapters:"Κεφάλαια",Off:"Απενεργοποίηση",Quality:"Ποιότητα",Auto:"Αυτόματα","Audio Tracks":"Κομμάτια ήχου","default":"προεπιλογή","Cast To Device":"Διανομή σε συσκευή",Share:"Κοινή χρήση",Volume:"Ένταση ήχου","Playback Speed":"Ταχύτητα αναπαραγωγής","Video Quality":"Ποιότητα βίντεο","Closed Captioning":"Κλειστη λεζαντα","Share Video":"Κοινή χρήση βίντεο","Next Track":"Επόμενο κομμάτι","Previous Track":"Προηγούμενο κομμάτι","Skip Forward":"Μεταπήδηση εμπρός","Skip Backward":"Μεταπήδηση πίσω","Fast Forward":"Γρήγορη προώθηση",Rewind:"Επαναφορά","Next Frame":"Επόμενο καρέ","Previous Frame":"Προηγούμενο καρέ",Settings:"Ρυθμίσεις",Options:"Επιλογές","More Options":"Περισσότερες επιλογές",Zoom:"Ζουμ","Zoom In":"Μεγέθυνση","Zoom Out":"Σμίκρυνση","Audio Only":"Μόνο ήχος","Picture in Picture":"Εικόνα μέσα σε εικόνα","Camera Angle":"Γωνία κάμερας",MEDIA_ERR_ABORTED:"Η αναπαραγωγή βίντεο ματαιώθηκε.",MEDIA_ERR_NETWORK:"Η διαδικασία λήψης του βίντεο διακόπηκε στη μέση λόγω σφάλματος δικτύου. Ελέγξτε τη σύνδεση δικτύου ή δοκιμάστε ξανά αργότερα.",MEDIA_ERR_DECODE:"Δεν ήταν δυνατή η φόρτωση του βίντεο λόγω σφάλματος διακομιστή ή δικτύου ή λόγω μη υποστηριζόμενης μορφής.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Η αναπαραγωγή βίντεο ματαιώθηκε λόγω προβλήματος ή επειδή το βίντεο περιλαμβάνει δυνατότητες που δεν υποστηρίζει το πρόγραμμα περιήγησης.",MEDIA_ERR_ENCRYPTED:"Δεν είναι δυνατή η αποκρυπτογράφηση της κρυπτογραφημένης προέλευσης βίντεο. ",SRC_PLAYER_MISMATCH:"Δεν βρέθηκε συμβατή προέλευση για το τρέχον περιβάλλον του προγράμματος περιήγησης.",MEDIA_ERR_UNKNOWN:"Παρουσιάστηκε άγνωστο σφάλμα.",SKIP_AD_COUNTDOWN_FORMAT:"Παράβλεψη διαφήμισης σε {0}...",SKIP:"Παράβλεψη",AD_TIMING_INFO:"{0} δευτερολέπτα διαφήμισης","Media Player":"Media Player","Play Video":"Αναπαραγωγή βίντεο",Foreground:"Πρώτο πλάνο",White:"Λευκό",Black:"Μαύρο",Red:"Κόκκινο",Green:"Πράσινο",Blue:"Μπλε",Yellow:"Κίτρινο",Magenta:"Ματζέντα",Cyan:"Γαλάζιο",Opaque:"Αδιαφανές","Semi-Opaque":"Ημι-αδιαφανές",Transparent:"Διαφανές",Window:"Παράθυρο","Font Size":"Μέγεθος γραμματοσειράς","Text Edge Style":"Στυλ άκρων κειμένου",None:"Κανένα",Raised:"Υπερυψωμένο",Depressed:"Πεπλατυσμένο",Uniform:"Ομοιόμορφο",Dropshadow:"Σκιά","Font Family":"Οικογένεια γραμματοσειρών","Monospace Serif":"Serif σταθερού πλάτους","Proportional Serif":"Αναλογική serif","Monospace Sans-Serif":"Sans Serif σταθερού πλάτους","Proportional Sans-Serif":"Αναλογική sans serif",Casual:"Ανεπίσημη",Script:"Δέσμη ενεργειών","Small Caps":"Μικρά κεφαλαία",Defaults:"Προεπιλογές",Done:"Ολοκληρώθηκε",Link:"Σύνδεση",Embed:"Eνσωμάτωση",Close:"Κλείσιμο",Copy:"Αντιγραφή","Copy Url":"Αντιγραφή διεύθυνσης URL","Embed Code":"Κώδικας ενσωμάτωσης",English:"Αγγλικά","volume level":"ένταση ήχου","video progress bar":"γραμμή προόδου βίντεο","playback speed level":"επίπεδο ταχύτητας αναπαραγωγής","Dolby Digital":"Dolby Digital",Stereo:"Στερεοφωνικό","Captions Menu":"Μενού λεζαντών","Subtitles Menu":"Μενού υποτίτλων","Need Text":"Κείμενο απαραίτητο",Download:"Λήψη","Go to live":"Μετάβαση σε ζωντανή μετάδοση","End Time":"Χρόνος λήξης"},d["default"].prototype.options_.languages["el-gr"]=d["default"].prototype.options_.languages.el},{"../video.js/src/js/player.js":124}],20:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.en={"Non-Fullscreen":"Exit Fullscreen","captions off":"Captions off","Media Download Description":"Beginning of Media Download Dialog. Escape will cancel and close the window.",MEDIA_ERR_ABORTED:"Video playback aborted.",MEDIA_ERR_NETWORK:"A network error caused the video download to fail part-way. Please check your network connection or try again later.",MEDIA_ERR_DECODE:"The video could not be loaded, either because the server or network failed or because the format is not supported.",MEDIA_ERR_SRC_NOT_SUPPORTED:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",MEDIA_ERR_ENCRYPTED:"Unable to decrypt the encrypted video source.",SRC_PLAYER_MISMATCH:"No compatible source found for the current browser environment.",MEDIA_ERR_UNKNOWN:"An unknown error occurred.",LEVEL2_ERR_CONTENT_NOT_AVAIL_YET:"Video playback cannot start because video content is not available yet. Please retry it shortly.",SKIP_AD_COUNTDOWN_FORMAT:"Skip ad in {0}...",SKIP:"Skip",AD_TIMING_INFO:"Ad {0} seconds"}},{"../video.js/src/js/player.js":124}],21:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.es={Play:"Reproducir",Pause:"Pausa","Current Time":"Hora actual","Duration Time":"Duración","Remaining Time":"Tiempo restante","Stream Type":"Tipo de secuencia",LIVE:"DIRECTO",Loaded:"Cargado",Progress:"Progreso",Fullscreen:"Pantalla completa","Non-Fullscreen":"Tamaño normal",Mute:"Silenciar",Unmute:"Reactivar audio","Playback Rate":"Tasa de reproducción",Subtitles:"Subtítulos","Subtitles Off":"subtítulos desactivados",Captions:"Subtítulos","Captions Off":"subtítulos desactivados",Chapters:"Capítulos",Off:"Desactivado",Quality:"Calidad",Auto:"Automático","Audio Tracks":"Pistas de audio","default":"predeterminado","Cast To Device":"Emitir en el dispositivo",Share:"Compartir",Volume:"Volumen","Playback Speed":"Velocidad de reproducción","Video Quality":"Calidad de vídeo","Closed Captioning":"Subtítulos (CC)","Share Video":"Compartir vídeo","Next Track":"Pista siguiente","Previous Track":"Pista anterior","Skip Forward":"Saltar adelante","Skip Backward":"Saltar atrás","Fast Forward":"Avanzar rápidamente",Rewind:"Rebobinar","Next Frame":"Fotograma siguiente","Previous Frame":"Fotograma anterior",Settings:"Configuración",Options:"Opciones","More Options":"Más opciones",Zoom:"Zoom","Zoom In":"Acercar","Zoom Out":"Alejar","Audio Only":"Solo audio","Picture in Picture":"Imagen en imagen","Camera Angle":"Ángulo de cámara",MEDIA_ERR_ABORTED:"La reproducción de vídeo se canceló.",MEDIA_ERR_NETWORK:"Un error de red provocó que la descarga de vídeo no se pudiera realizar. Compruebe la conexión de red o inténtelo de nuevo más tarde.",MEDIA_ERR_DECODE:"No se pudo cargar el vídeo porque hubo un error en la red o en el servidor o porque el formato no es compatible.",MEDIA_ERR_SRC_NOT_SUPPORTED:"La reproducción de vídeo se canceló debido a un problema con algún elemento o porque el vídeo contiene características que no son compatibles con el explorador.",MEDIA_ERR_ENCRYPTED:"La fuente de vídeo cifrada no se puede descifrar.",SRC_PLAYER_MISMATCH:"No se encontró ninguna fuente compatible con el entorno de explorador actual.",MEDIA_ERR_UNKNOWN:"Error desconocido.",SKIP_AD_COUNTDOWN_FORMAT:"Omitir anuncio en {0}...",SKIP:"Omitir",AD_TIMING_INFO:"Anuncio {0} segundos","Media Player":"Reproductor multimedia","Play Video":"Reproducir vídeo",Foreground:"Primer plano",White:"Blanco",Black:"Negro",Red:"Rojo",Green:"Verde",Blue:"Azul",Yellow:"Amarillo",Magenta:"Magenta",Cyan:"Cian",Opaque:"Opaco","Semi-Opaque":"Semiopaco",Transparent:"Transparente",Window:"Ventana","Font Size":"Tamaño de fuente","Text Edge Style":"Estilo de borde de texto",None:"Ninguno",Raised:"Elevado",Depressed:"Pulsado",Uniform:"Uniforme",Dropshadow:"Sombra","Font Family":"Familia de fuentes","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Ocasional",Script:"Script","Small Caps":"Versalitas",Defaults:"Valores predeterminados",Done:"Listo",Link:"Vínculo",Embed:"Insertar",Close:"Cerrar",Copy:"Copiar","Copy Url":"Copiar URL","Embed Code":"Código de inserción",English:"Inglés","volume level":"volumen","video progress bar":"barra de progreso de vídeo","playback speed level":"velocidad de reproducción","Dolby Digital":"Dolby Digital",Stereo:"Estéreo","Captions Menu":"Menú de leyendas","Subtitles Menu":"Menú de subtítulos","Need Text":"Necesita texto",Download:"Descargar","Go to live":"Ir al directo","End Time":"Tiempo de finalización"},d["default"].prototype.options_.languages["es-ar"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-cl"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-co"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-cr"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-do"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-ec"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-us"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-gt"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-hn"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-xl"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-mx"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-ni"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-pa"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-py"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-pe"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-pr"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-us"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-uy"]=d["default"].prototype.options_.languages.es,d["default"].prototype.options_.languages["es-ve"]=d["default"].prototype.options_.languages.es},{"../video.js/src/js/player.js":124}],22:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.et={Play:"Esita",Pause:"Peata","Current Time":"Praegune kellaaeg","Duration Time":"Kestus","Remaining Time":"Järelejäänud aeg","Stream Type":"Voo tüüp",LIVE:"OTSE",Loaded:"Laaditud",Progress:"Edenemine",Fullscreen:"Täisekraanvaade","Non-Fullscreen":"Mittetäisekraanvaade",Mute:"Vaigista",Unmute:"Lülita vaigistus välja","Playback Rate":"Taasesituse kiirus",Subtitles:"Subtiitrid","Subtitles Off":"subtiitrid väljas",Captions:"Tiitrid","Captions Off":"tiitrid väljas",Chapters:"Peatükid",Off:"Väljas",Quality:"Kvaliteet",Auto:"Automaatne","Audio Tracks":"Heliribad","default":"vaikesäte","Cast To Device":"Esita seadmes",Share:"Jaga",Volume:"Helitugevus","Playback Speed":"Taasesituse kiirus","Video Quality":"Video kvaliteet","Closed Captioning":"Subtiitrid vaegkuuljatele","Share Video":"Jaga videot","Next Track":"Järgmine pala","Previous Track":"Eelmine pala","Skip Forward":"Keri edasi","Skip Backward":"Keri tagasi","Fast Forward":"Edasi",Rewind:"Tagasi","Next Frame":"Järgmine kaader","Previous Frame":"Eelmine kaader",Settings:"Sätted",Options:"Suvandid","More Options":"Rohkem suvandeid",Zoom:"Suum","Zoom In":"Suurenda","Zoom Out":"Vähenda","Audio Only":"Ainult heli","Picture in Picture":"Pilt pildis","Camera Angle":"Vaatenurk",MEDIA_ERR_ABORTED:"Video taasesitamine katkestati.",MEDIA_ERR_NETWORK:"Video allalaadimine nurjus võrgutõrke tõttu poole pealt. Kontrollige võrguühendust või proovige hiljem uuesti.",MEDIA_ERR_DECODE:"Videot ei saanud laadida, kuna serveri- või võrguühendus nurjus või vormingut ei toetata.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Video taasesitamine katkes failirikke tõttu või kuna teie brauser ei toeta videos kasutatud funktsioone.",MEDIA_ERR_ENCRYPTED:"Krüptitud videoallikat ei saa dekrüptida.",SRC_PLAYER_MISMATCH:"Praeguse brauserikeskkonna jaoks ei leitud ühilduvat allikat.",MEDIA_ERR_UNKNOWN:"Ilmnes tundmatu tõrge",SKIP_AD_COUNTDOWN_FORMAT:"Jäta reklaam vahele {0} sekundi pärast …",SKIP:"Jäta vahele",AD_TIMING_INFO:"Reklaam kestab {0} sekundit","Media Player":"Meediumipleier","Play Video":"Esita video",Foreground:"Esiplaan",White:"Valge",Black:"Must",Red:"Punane",Green:"Roheline",Blue:"Sinine",Yellow:"kollane",Magenta:"Magenta",Cyan:"Tsüaan",Opaque:"Läbipaistmatu","Semi-Opaque":"Pooleldi läbipaistmatu",Transparent:"Läbipaistev",Window:"Aken","Font Size":"Fondi suurus","Text Edge Style":"Tekstiserva laad",None:"Pole",Raised:"Tõstetud",Depressed:"Süvendatud",Uniform:"Ühtlane",Dropshadow:"Langev vari","Font Family":"Fondipere","Monospace Serif":"Seriifidega püsisammkiri","Proportional Serif":"Seriifidega proportsionaalkiri","Monospace Sans-Serif":"Seriifideta püsisammkiri","Proportional Sans-Serif":"Seriifideta proportsionaalkiri",Casual:"Sidumata kiri",Script:"Script","Small Caps":"Kapiteelkiri",Defaults:"Vaikesätted",Done:"Valmis",Link:"Link",Embed:"Manussisu",Close:"Sule",Copy:"Kopeeri","Copy Url":"Kopeeri URL","Embed Code":"Manustamiskood",English:"Inglise","volume level":"Helitugevus","video progress bar":"video edenemisriba","playback speed level":"taasesituse kiirus","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Tiitrimenüü","Subtitles Menu":"Subtiitrimenüü","Need Text":"Vajalik tekst",Download:"Alla laadima","Go to live":"Mine reaalaega","End Time":"Lõppaeg"},d["default"].prototype.options_.languages["et-ee"]=d["default"].prototype.options_.languages.et},{"../video.js/src/js/player.js":124}],23:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.eu={Play:"Erreproduzitu",Pause:"Pausatu","Current Time":"Uneko ordua","Duration Time":"Iraupena","Remaining Time":"Gelditzen den denbora","Stream Type":"Erreprodukzio mota",LIVE:"ZUZENEAN",Loaded:"Kargatuta",Progress:"Aurrerapena",Fullscreen:"Pantaila osoa","Non-Fullscreen":"Pantaila osoa ez",Mute:"Desaktibatu audioa",Unmute:"Aktibatu audioa","Playback Rate":"Erreprodukzio-abiadura",Subtitles:"Azpitituluak","Subtitles Off":"azpitituluak desaktibatuta",Captions:"Epigrafeak","Captions Off":"epigrafeak desaktibatuta",Chapters:"Atalak",Off:"Desaktibatuta",Quality:"Kalitatea",Auto:"Automatikoa","Audio Tracks":"Audio-pistak","default":"lehenetsia","Cast To Device":"Igorri gailura",Share:"Partekatu",Volume:"Bolumena","Playback Speed":"Erreprodukzio-abiadura","Video Quality":"Bideoaren kalitatea","Closed Captioning":"Epigrafeak","Share Video":"Partekatu bideoa","Next Track":"Hurrengo pista","Previous Track":"Aurreko pista","Skip Forward":"Saltatu aurrera","Skip Backward":"Saltatu atzera","Fast Forward":"Aurreratu",Rewind:"Atzeratu","Next Frame":"Hurrengo fotograma","Previous Frame":"Aurreko fotograma",Settings:"Ezarpenak",Options:"Aukerak","More Options":"Aukera gehiago",Zoom:"Zooma","Zoom In":"Handitu","Zoom Out":"Txikitu","Audio Only":"Audioa soilik","Picture in Picture":"Irudia irudiaren barnean","Camera Angle":"Kamera-angelua",MEDIA_ERR_ABORTED:"Bideo-erreprodukzioa utzi egin da",MEDIA_ERR_NETWORK:"Sare-errore bat gertatu da eta ezin izan da bideo osoa deskargatu. Egiaztatu sarera konektatuta zaudela edo saiatu berriro geroago.",MEDIA_ERR_DECODE:"Ezin izan da kargatu bideoa, zerbitzariak edo sareak huts egin duelako edo formatua onartzen ez delako.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Bideo-erreprodukzioa utzi egin da hondatuta dagoelako edo arakatzaileak onartzen ez dituen eginbideak erabiltzen dituelako bideoak.",MEDIA_ERR_ENCRYPTED:"Ezin da desenkriptatu enkriptatutako bideo-iturburua.",SRC_PLAYER_MISMATCH:"Ez da aurkitu iturburu bateragarririk uneko arakatzaile-ingurunerako.",MEDIA_ERR_UNKNOWN:"Errore ezezagun bat gertatu da",SKIP_AD_COUNTDOWN_FORMAT:"Saltatu iragarkia: {0}...",SKIP:"Saltatu",AD_TIMING_INFO:"Iragarkia: {0} segundo",Download:"Deskargatu","Go to live":"Zuzeneko erreprodukzioak","End Time":"Amaiera-ordua"},d["default"].prototype.options_.languages["eu-es"]=d["default"].prototype.options_.languages.eu},{"../video.js/src/js/player.js":124}],24:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.fa={Play:"پخش",Pause:"مکث","Current Time":"زمان فعلی","Duration Time":"‏‏مدت زمان","Remaining Time":"زمان باقیمانده","Stream Type":"نوع پخش جریانی",LIVE:"زنده",Loaded:"بارگیری شده",Progress:"پیشرفت",Fullscreen:"تمام صفحه","Non-Fullscreen":"غیر تمام صفحه",Mute:"بی‌صدا کردن",Unmute:"وصل مجدد صدا","Playback Rate":"نرخ پخش",Subtitles:"زیرنویس","Subtitles Off":"زیرنویس غیرفعال",Captions:"عناوین توضیحی","Captions Off":"عناوین توضیحی غیرفعال",Chapters:"فصل ها",Off:"غیرفعال",Quality:"کیفیت",Auto:"خودکار","Audio Tracks":"قطعات صوتی","default":"پیش فرض","Cast To Device":"پخش در دستگاه دیگر",Share:"اشتراک گذاری",Volume:"میزان صدا","Playback Speed":"سرعت پخش","Video Quality":"کیفیت فیلم","Closed Captioning":"عنوان بندی","Share Video":"اشتراک گذاری یک ویدیو","Next Track":"قطعه بعدی","Previous Track":"قطعه قبلی","Skip Forward":"پرش به جلو","Skip Backward":"پرش به عقب","Fast Forward":"حرکت سریع به جلو",Rewind:"به عقب بردن","Next Frame":"فریم بعدی","Previous Frame":"فریم قبلی",Settings:"تنظیمات",Options:"گزینه ها","More Options":"گزینه های بیشتر",Zoom:"بزرگنمایی","Zoom In":"نزدیکنمایی","Zoom Out":"دورنمایی","Audio Only":"فقط صدا","Picture in Picture":"تصویر در تصویر","Camera Angle":"زاویه دوربین",MEDIA_ERR_ABORTED:"پخش ویدیو متوقف شد.",MEDIA_ERR_NETWORK:"بروز یک مشکل شبکه باعث نیمه تمام ماندن دانلود ویدیو شد. لطفاً اتصال شبکه خود را بررسی کرده یا بعداً دوباره امتحان کنید.",MEDIA_ERR_DECODE:"بارگیری ویدیو انجام نشد زیرا یا برقراری ارتباط با سرور یا شبکه امکان پذیر نمی باشد یا قالب ویدیو پشتیبانی نمی شود.",MEDIA_ERR_SRC_NOT_SUPPORTED:"به دلیل مشکل مخدوش بودن فایل یا استفاده ویدیو از ویژگی هایی که مرورگر شما پشتیبانی نمی کند، پخش ویدیو متوقف شد.",MEDIA_ERR_ENCRYPTED:"رمزگشایی منبع ویدیوی رمزگذاری شده امکان پذیر نمی باشد.",SRC_PLAYER_MISMATCH:"هیج منبع سازگاری برای محیط مرورگر فعلی یافت نشد.",MEDIA_ERR_UNKNOWN:"یک خطای نامشخص رخ داده است",SKIP_AD_COUNTDOWN_FORMAT:"رد کردن تبلیغات در {0}...",SKIP:"رد کردن",AD_TIMING_INFO:"تبلیغات {0} ثانیه"},d["default"].prototype.options_.languages["fa-ir"]=d["default"].prototype.options_.languages.fa},{"../video.js/src/js/player.js":124}],25:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.fi={Play:"Toista",Pause:"Keskeytä","Current Time":"Nykyinen aika","Duration Time":"Kesto","Remaining Time":"Jäljellä oleva aika","Stream Type":"Suoratoistotyyppi",LIVE:"LIVE",Loaded:"Ladattu",Progress:"Edistyminen",Fullscreen:"Koko näyttö","Non-Fullscreen":"Muu kuin koko näyttö",Mute:"Mykistä",Unmute:"Poista mykistys","Playback Rate":"Toistonopeus",Subtitles:"Tekstitys","Subtitles Off":"Ei tekstitystä",Captions:"Kuvatekstit","Captions Off":"Ei kuvatekstejä",Chapters:"Kohtaukset",Off:"Ei käytössä",Quality:"Laatu",Auto:"Automaattinen","Audio Tracks":"Ääniraidat","default":"oletus","Cast To Device":"Lähetä laitteeseen",Share:"Jaa",Volume:"Äänenvoimakkuus","Playback Speed":"Toistonopeus","Video Quality":"Videon laatu","Closed Captioning":"Tekstitys","Share Video":"Jaa video","Next Track":"Seuraava raita","Previous Track":"Edellinen raita","Skip Forward":"Siirry eteenpäin","Skip Backward":"Siirry taaksepäin","Fast Forward":"Kelaa eteenpäin",Rewind:"Kelaa taaksepäin","Next Frame":"Seuraava kuva","Previous Frame":"Edellinen kuva",Settings:"Asetukset",Options:"Asetukset","More Options":"Lisäasetukset",Zoom:"Zoomaus","Zoom In":"Lähennä ","Zoom Out":"Loitonna","Audio Only":"Vain ääni","Picture in Picture":"Kuva kuvassa","Camera Angle":"Kamerakulma",MEDIA_ERR_ABORTED:"Videotoisto keskeytetty.",MEDIA_ERR_NETWORK:"Verkkovirhe keskeytti videon lataamisen. Tarkista verkkoyhteys tai yritä myöhemmin uudelleen.",MEDIA_ERR_DECODE:"Videota ei voitu ladata verkko- tai palvelinvirheen takia tai koska muotoa ei tueta.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Videon toisto keskeytettiin vioittumisen takia tai sen takia, että selaimesi ei tue kaikkia videon käyttämiä toimintoja.",MEDIA_ERR_ENCRYPTED:"Salatun videolähteen salausta ei voida purkaa.",SRC_PLAYER_MISMATCH:"Nykyisen selainympäristön kanssa yhteensopivaa lähdettä ei löytynyt.",MEDIA_ERR_UNKNOWN:"Ilmeni tuntematon virhe",SKIP_AD_COUNTDOWN_FORMAT:"Ohita mainos, kun on kulunut {0}...",SKIP:"Ohita",AD_TIMING_INFO:"Mainos – {0} sekuntia","Media Player":"Media Player","Play Video":"Katso video",Foreground:"Edusta",White:"Valkoinen",Black:"Musta",Red:"Punainen",Green:"Vihreä",Blue:"Sininen",Yellow:"Keltainen",Magenta:"Magenta",Cyan:"Syaani",Opaque:"Läpinäkymätön","Semi-Opaque":"Puoliksi läpinäkyvä",Transparent:"Läpinäkyvä",Window:"Ikkuna","Font Size":"Fonttikoko","Text Edge Style":"Tekstin reunatyyli",None:"Ei mitään",Raised:"Korotettuna",Depressed:"Kokoon painettuna",Uniform:"Yhtenäinen",Dropshadow:"Varjo","Font Family":"Fonttiperhe","Monospace Serif":"Suhteuttamaton Serif","Proportional Serif":"Suhteellinen Serif","Monospace Sans-Serif":"Suhteuttamaton Sans Serif","Proportional Sans-Serif":"Suhteellinen Sans Serif",Casual:"Rento",Script:"Komentosarja","Small Caps":"Kapiteelit",Defaults:"Oletusasetukset",Done:"Valmis",Link:"Linkki",Embed:"Liitä",Close:"Sulje",Copy:"Kopioi","Copy Url":"Kopioi URL-osoite","Embed Code":"Liittämiskoodi",English:"englanti","volume level":"äänenvoimakkuuden taso","video progress bar":"videon tilanneilmaisin","playback speed level":"toiston parantaminen tasolle","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Kuvatekstien valikko","Subtitles Menu":"Tekstitys-valikko","Need Text":"On tekstiä",Download:"Ladata","Go to live":"Siirry live-tilaan","End Time":"Päättymisaika"}},{"../video.js/src/js/player.js":124}],26:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.fr={Play:"Lecture",Pause:"Pause","Current Time":"Heure actuelle","Duration Time":"Durée","Remaining Time":"Temps restant","Stream Type":"Type de flux",LIVE:"EN DIRECT",Loaded:"Chargé",Progress:"Progression",Fullscreen:"Plein écran","Non-Fullscreen":"Plein écran désactivé",Mute:"Volume muet",Unmute:"Réactiver le son","Playback Rate":"Flux de lecture",Subtitles:"Sous-titres","Subtitles Off":"sous-titres désactivés",Captions:"Sous-titrage","Captions Off":"sous-titrage désactivé",Chapters:"Chapitres",Off:"Désactivé",Quality:"Qualité",Auto:"Auto","Audio Tracks":"Pistes audio","default":"par défaut","Cast To Device":"Projeter sur un appareil",Share:"Partager",Volume:"Volume","Playback Speed":"Vitesse de lecture","Video Quality":"Qualité vidéo","Closed Captioning":"Sous-titrage","Share Video":"Partager la vidéo","Next Track":"Piste suivante","Previous Track":"Piste précédente","Skip Forward":"Avance rapide","Skip Backward":"Retour rapide","Fast Forward":"Avance rapide",Rewind:"Retour rapide","Next Frame":"Image suivante","Previous Frame":"Image précédente",Settings:"Paramètres",Options:"Options","More Options":"Autres options",Zoom:"Zoom","Zoom In":"Zoom avant","Zoom Out":"Zoom arrière","Audio Only":"Audio seul","Picture in Picture":"Image dans l'image","Camera Angle":"Angle de caméra",MEDIA_ERR_ABORTED:"Lecture vidéo abandonnée.",MEDIA_ERR_NETWORK:"Une erreur réseau a entraîné l'échec du téléchargement de la vidéo. Vérifiez votre connexion réseau ou réessayez ultérieurement.",MEDIA_ERR_DECODE:"La vidéo n'a pas pu être chargée parce que le serveur ou le réseau ont échoué ou parce que le format n'est pas pris en charge.",MEDIA_ERR_SRC_NOT_SUPPORTED:"La lecture de la vidéo a été abandonnée en raison d'un problème d'endommagement ou parce que la vidéo utilise des fonctionnalités que votre navigateur ne prend pas en charge.",MEDIA_ERR_ENCRYPTED:"Impossible de déchiffrer la source vidéo chiffrée.",SRC_PLAYER_MISMATCH:"Aucune source compatible trouvée dans l'environnement actuel du navigateur.",MEDIA_ERR_UNKNOWN:"Une erreur inconnue s'est produite.",SKIP_AD_COUNTDOWN_FORMAT:"Ignorer la publicité dans {0}...",SKIP:"Ignorer",AD_TIMING_INFO:"{0} secondes de publicité","Media Player":"Lecteur multimédia","Play Video":"Lire la vidéo",Foreground:"Premier plan",White:"Blanc",Black:"Noir",Red:"Rouge",Green:"Vert",Blue:"Bleu",Yellow:"Jaune",Magenta:"Magenta",Cyan:"Cyan",Opaque:"Opaque","Semi-Opaque":"Semi-opaque",Transparent:"Transparent",Window:"Fenêtre","Font Size":"Taille de police","Text Edge Style":"Style de bordure de texte",
None:"Aucun",Raised:"En relief",Depressed:"Embossé",Uniform:"Uniforme",Dropshadow:"Ombre portée","Font Family":"Famille de polices","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Informelle",Script:"Script","Small Caps":"Petites majuscules",Defaults:"Valeurs par défaut",Done:"Terminé",Link:"Lien",Embed:"Incorporer",Close:"Fermer",Copy:"Copy","Copy Url":"Copier l'Url","Embed Code":"Incorporer le code",English:"Anglais","volume level":"Volume","video progress bar":"Barre d'avancement de la vidéo","playback speed level":"Vitesse de lecture","Dolby Digital":"Dolby Digital",Stereo:"Stéréo","Captions Menu":"Menu des transcriptions","Subtitles Menu":"Menu des sous-titres","Need Text":"Need Text",Download:"Télécharger","Go to live":"Accéder au direct","End Time":"Heure de fin"},d["default"].prototype.options_.languages["fr-ab"]=d["default"].prototype.options_.languages.fr,d["default"].prototype.options_.languages["fr-be"]=d["default"].prototype.options_.languages.fr,d["default"].prototype.options_.languages["fr-ca"]=d["default"].prototype.options_.languages.fr,d["default"].prototype.options_.languages["fr-xf"]=d["default"].prototype.options_.languages.fr,d["default"].prototype.options_.languages["fr-ch"]=d["default"].prototype.options_.languages.fr},{"../video.js/src/js/player.js":124}],27:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.gl={Play:"Reproducir",Pause:"Pausar","Current Time":"Hora actual","Duration Time":"Tempo de duración","Remaining Time":"Tempo restante","Stream Type":"Tipo de transmisión",LIVE:"EN DIRECTO",Loaded:"Cargado",Progress:"Progreso",Fullscreen:"Pantalla completa","Non-Fullscreen":"Sen pantalla completa",Mute:"Silenciar",Unmute:"Activar son","Playback Rate":"Velocidade de reprodución",Subtitles:"Subtítulos","Subtitles Off":"Sen subtítulos",Captions:"Lendas","Captions Off":"Sen lendas",Chapters:"Capítulos",Off:"Desactivado",Quality:"Calidade",Auto:"Automático","Audio Tracks":"Pista de audio","default":"predefinido","Cast To Device":"Converter en dispositivo",Share:"Compartir",Volume:"Volume","Playback Speed":"Velocidade de reprodución","Video Quality":"Calidade de vídeo","Closed Captioning":"Subtítulos","Share Video":"Compartir vídeo","Next Track":"Pista seguinte","Previous Track":"Pista anterior","Skip Forward":"Saltar adiante","Skip Backward":"Saltar atrás","Fast Forward":"Avanzar rapidamente",Rewind:"Rebobinar","Next Frame":"Fotograma seguinte","Previous Frame":"Fotograma anterior",Settings:"Configuración",Options:"Opcións","More Options":"Máis opcións",Zoom:"Zoom","Zoom In":"Ampliar","Zoom Out":"Reducir","Audio Only":"Só audio","Picture in Picture":"Imaxe en imaxe","Camera Angle":"Angular da cámara",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_ENCRYPTED:"MEDIA_ERR_ENCRYPTED",SRC_PLAYER_MISMATCH:"SRC_PLAYER_MISMATCH",MEDIA_ERR_UNKNOWN:"MEDIA_ERR_UNKNOWN",SKIP_AD_COUNTDOWN_FORMAT:"Ignorar anuncio en {0}...",SKIP:"Ignorar",AD_TIMING_INFO:"Anuncio {0} segundos",Download:"Descargar","Go to live":"Ir ao contido en directo","End Time":"Hora de finalización"},d["default"].prototype.options_.languages["gl-es"]=d["default"].prototype.options_.languages.gl},{"../video.js/src/js/player.js":124}],28:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.he={Play:"הפעל",Pause:"השהה","Current Time":"זמן נוכחי","Duration Time":"משך זמן","Remaining Time":"זמן נותר","Stream Type":"סוג זרם",LIVE:"חי",Loaded:"נטען",Progress:"התקדמות",Fullscreen:"מסך מלא","Non-Fullscreen":"לא במסך מלא",Mute:"השתק",Unmute:"בטל השתקה","Playback Rate":"קצב הפעלה",Subtitles:"כתוביות","Subtitles Off":"כתוביות מבוטלות",Captions:"כיתובים","Captions Off":"כיתובים מבוטלים",Chapters:"פרקים",Off:"מבוטל",Quality:"איכות",Auto:"אוטומטי","Audio Tracks":"רצועות שמע","default":"ברירת מחדל","Cast To Device":"שדר להתקן",Share:"שתף",Volume:"עוצמת קול","Playback Speed":"מהירות הפעלה","Video Quality":"איכות וידאו","Closed Captioning":"כתוביות מקודדות לכבדי שמיעה","Share Video":"שתף וידאו","Next Track":"הרצועה הבאה","Previous Track":"הרצועה הקודמת","Skip Forward":"דלג קדימה","Skip Backward":"דלג אחורה","Fast Forward":"הרץ קדימה",Rewind:"הרץ אחורה","Next Frame":"התמונה הבאה","Previous Frame":"התמונה הקודמת",Settings:"הגדרות",Options:"אפשרויות","More Options":"אפשרויות נוספות",Zoom:"שנה גודל תצוגה","Zoom In":"הגדל תצוגה","Zoom Out":"הקטן תצוגה","Audio Only":"שמע בלבד","Picture in Picture":"תמונה בתוך תמונה","Camera Angle":"זווית מצלמה",MEDIA_ERR_ABORTED:"הפעלת הווידאו בוטלה",MEDIA_ERR_NETWORK:"שגיאה ברשת גרמה להורדת הווידאו להיכשל בעת התהליך. בדוק את חיבור הרשת או נסה שוב מאוחר יותר.",MEDIA_ERR_DECODE:"לא היתה אפשרות לטעון את הווידאו עקב כשל בשרת או ברשת או משום שהתבנית אינה נתמכת.",MEDIA_ERR_SRC_NOT_SUPPORTED:"הפעלת הווידאו בוטלה עקב בעיית השחתה או משום שהווידאו השתמש בתכונות שבהן הדפדפן שלך אינו תומך.",MEDIA_ERR_ENCRYPTED:"לא ניתן לפענח את מקור הווידאו המוצפן.",SRC_PLAYER_MISMATCH:"לא נמצא מקור תואם עבור סביבת הדפדפן הנוכחית.",MEDIA_ERR_UNKNOWN:"אירעה שגיאה לא ידועה",SKIP_AD_COUNTDOWN_FORMAT:"דלג על מודעה בעוד {0}...",SKIP:"דלג",AD_TIMING_INFO:"מודעה {0} שניות","Media Player":"Media Player","Play Video":"הפעל את הסרטון",Foreground:"קידמה",White:"לבן",Black:"שחור",Red:"אדום",Green:"ירוק",Blue:"כחול",Yellow:"צהוב",Magenta:"מגנטה",Cyan:"תכלת",Opaque:"אטום","Semi-Opaque":"אטום למחצה",Transparent:"שקוף",Window:"חלון","Font Size":"גודל גופן","Text Edge Style":"סגנון קצה טקסט",None:"ללא",Raised:"מוגבה",Depressed:"שקוע",Uniform:"אחיד",Dropshadow:"צל מוטל","Font Family":"משפחת גופנים","Monospace Serif":"Serif ברוחב קבוע","Proportional Serif":"‏‏Serif פרופורציונלי","Monospace Sans-Serif":"Sans Serif ברוחב קבוע","Proportional Sans-Serif":"Sans Serif פרופורציונלי",Casual:"נינוח",Script:"כתב","Small Caps":"רישיות מוקטנות",Defaults:"ברירות מחדל",Done:"בוצע",Link:"קישור",Embed:"הטבע",Close:"סגור",Copy:"העתק","Copy Url":"העתק כתובת URL","Embed Code":"קוד מוטבע",English:"אנגלית","volume level":"רמת עוצמה","video progress bar":"מד התקדמות וידאו","playback speed level":"רמת מהירות הפעלה","Dolby Digital":"Dolby Digital",Stereo:"סטריאו","Captions Menu":"תפריט כיתובים","Subtitles Menu":"תפריט כתוביות","Need Text":"נדרש טקסט",Download:"הורד","Go to live":"	עבור לשידור חי","End Time":"זמן סיום"},d["default"].prototype.options_.languages["he-il"]=d["default"].prototype.options_.languages.he},{"../video.js/src/js/player.js":124}],29:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.hi={Play:"चलाएँ",Pause:"विराम दें","Current Time":"वर्तमान समय","Duration Time":"अवधि समय","Remaining Time":"शेष समय","Stream Type":"स्ट्रीम समय",LIVE:"लाइव",Loaded:"लोडेड",Progress:"प्रगति",Fullscreen:"पूर्ण स्क्रीन","Non-Fullscreen":"गैर पूर्ण स्क्रीन",Mute:"म्यूट करें",Unmute:"अनम्यूट करें","Playback Rate":"प्लेबैक दर",Subtitles:"उपशीर्षक","Subtitles Off":"उपशीर्षक बंद",Captions:"कैप्शन","Captions Off":"कैप्शन बंद",Chapters:"चेप्टर्स",Off:"बंद",Quality:"गुणवत्ता",Auto:"स्वत ","Audio Tracks":"ऑडियो ट्रैक्स","default":"डिफ़ॉल्ट","Cast To Device":"डिवाइस पर कास्ट करें",Share:"साझा करें",Volume:"वॉल्यूम","Playback Speed":"प्लेबैक गति","Video Quality":"वीडियो गुणवत्ता","Closed Captioning":"बंद कैप्शन","Share Video":"वीडियो साझा करें","Next Track":"अगला ट्रैक","Previous Track":"पिछला ट्रैक","Skip Forward":"स्कीप फार्रवर्ड","Skip Backward":"स्कीप बैकवर्ड","Fast Forward":"फास्ट फार्रवर्ड",Rewind:"रिवाइंड","Next Frame":"अगली फ्रेम","Previous Frame":"पिछली फ्रेम",Settings:"सेटिंग्स",Options:"विकल्प","More Options":"अधिक विकल्प",Zoom:"ज़ूम करें","Zoom In":"ज़ूम इन करें","Zoom Out":"ज़ूम आउट करें","Audio Only":"केवल ऑडियो","Picture in Picture":"चित्र में चित्र","Camera Angle":"कैमरा कोण",MEDIA_ERR_ABORTED:"वीडियो प्लेबैक निरस्त किया गया",MEDIA_ERR_NETWORK:"किसी नेटवर्क त्रुटि के कारण वीडियो पूरा डाउनलोड होने से विफल रहा. कृपया अपना नेटवर्क कनेक्शन जांचें या बाद में फिर से प्रयास करें.",MEDIA_ERR_DECODE:"वीडियो लोड नहीं हो सकता, क्योंकि या तो सर्वर या नेटवर्क विफल रहा या स्वरूप समर्थित नहीं है.",MEDIA_ERR_SRC_NOT_SUPPORTED:"किसी दूषित समस्या के कारण वीडियो प्लेबैक निरस्त किया गया या वीडियो ऐसी सुविधा का उपयोग करता है जिसे आपका ब्राउज़र समर्थन नहीं करता है.",MEDIA_ERR_ENCRYPTED:"एन्क्रिप्ट किए गए वीडियो स्रोत को डिक्रिप्ट करने में असमर्थ.",SRC_PLAYER_MISMATCH:"वर्तमान ब्राउज़र वातावरण के लिए कोई भी संगत स्रोत नहीं मिला.",MEDIA_ERR_UNKNOWN:"एक अज्ञात त्रुटि आई",SKIP_AD_COUNTDOWN_FORMAT:"विज्ञापन {0} में छोड़ें...",SKIP:"छोड़ें",AD_TIMING_INFO:"विज्ञापन {0} सेकंड","Media Player":"मीडिया प्लेयर","Play Video":"वीडियो चलाएँ",Foreground:"अग्रभूमि",White:"सफ़ेद",Black:"श्वेत",Red:"लाल",Green:"हरा",Blue:"नीला",Yellow:"पीला",Magenta:"गहरा गुलाबी",Cyan:"हरिताभ नीला",Opaque:"अपारदर्शी","Semi-Opaque":"अर्द्ध-अपारदर्शी",Transparent:"पारदर्शी",Window:"विंडो","Font Size":"फ़ॉन्ट का आकार","Text Edge Style":"पाठ के किनारे की शैली",None:"कुछ नहीं",Raised:"उभरा हुआ",Depressed:"दबाया गया",Uniform:"एक समान",Dropshadow:"ड्रॉपशैडो","Font Family":"फ़ॉन्ट परिवार","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"अनौपचारिक",Script:"स्क्रिप्ट","Small Caps":"स्मॉल कैप्स",Defaults:"डिफ़ॉल्ट",Done:"पूर्ण",Link:"लिंक",Embed:"एम्बेड करें",Close:"बंद करें",Copy:"प्रतिलिपि बनाएँ","Copy Url":"Url की प्रतिलिपि बनाएँ","Embed Code":"एम्बेड कोड",English:"अंग्रेज़ी","volume level":"वॉल्यूम का स्तर","video progress bar":"वीडियो प्रगति पट्टी","playback speed level":"प्लेबैक गति स्तर","Dolby Digital":"डॉल्बी डिजिटल",Stereo:"स्टीरियो","Captions Menu":"कैप्शन मेनू","Subtitles Menu":"उपशीर्षक मेनू","Need Text":"पाठ की आवश्यकता है",Download:"डाउनलोड करें","Go to live":"लाइव देखें","End Time":"खत्म होने का समय"},d["default"].prototype.options_.languages["hi-in"]=d["default"].prototype.options_.languages.hi},{"../video.js/src/js/player.js":124}],30:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.hr={Play:"Reproduciraj",Pause:"Pauziraj","Current Time":"Trenutno vrijeme","Duration Time":"Trajanje","Remaining Time":"Preostalo vrijeme","Stream Type":"Vrsta strujanja",LIVE:"UŽIVO",Loaded:"Učitano",Progress:"Tijek",Fullscreen:"Preko cijelog zaslona","Non-Fullscreen":"Nije preko cijelog zaslona",Mute:"Isključi zvuk",Unmute:"Uključi zvuk","Playback Rate":"Brzina reprodukcije",Subtitles:"Titlovi","Subtitles Off":"titlovi isključeni",Captions:"Titlovi","Captions Off":"titlovi isključeni",Chapters:"Poglavlja",Off:"Isključeno",Quality:"Kvaliteta",Auto:"Automatski","Audio Tracks":"Audiozapisi","default":"zadano","Cast To Device":"Pošalji na uređaj",Share:"Zajednički koristi",Volume:"Glasnoća","Playback Speed":"Brzina reprodukcije","Video Quality":"Kvaliteta videozapisa","Closed Captioning":"Titlanje","Share Video":"Zajednički koristi videozapis","Next Track":"Sljedeći zapis","Previous Track":"Prethodni zapis","Skip Forward":"Skok unaprijed","Skip Backward":"Skok unatrag","Fast Forward":"Brzo naprijed",Rewind:"Premotaj","Next Frame":"Sljedeća slika","Previous Frame":"Prethodna slika",Settings:"Postavke",Options:"Mogućnosti","More Options":"Dodatne mogućnosti",Zoom:"Zumiranje","Zoom In":"Povećavanje","Zoom Out":"Smanjivanje","Audio Only":"Samo zvuk","Picture in Picture":"Slika u slici","Camera Angle":"Kut kamere",MEDIA_ERR_ABORTED:"Prekinuta je reprodukcija videozapisa.",MEDIA_ERR_NETWORK:"Mrežna pogreška uzrokovala je prekid preuzimanja videozapisa. Provjerite mrežnu vezu i pokušajte ponovno.",MEDIA_ERR_DECODE:"Videozapis nije moguće učitati zbog kvara poslužitelja ili mreže ili jer oblik nije podržan.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Reprodukcija videozapisa prekinuta je zbog oštećenja ili jer videozapis sadrži značajke koje preglednik ne podržava.",MEDIA_ERR_ENCRYPTED:"Nije moguće dešifriranje šifriranog videoizvora.",SRC_PLAYER_MISMATCH:"Nije pronađen kompatibilan izvor za trenutno okruženje preglednika.",MEDIA_ERR_UNKNOWN:"Pojavila se nepoznata pogreška.",SKIP_AD_COUNTDOWN_FORMAT:"Preskoči oglas za {0}...",SKIP:"Preskoči",AD_TIMING_INFO:"Oglas {0} s","Media Player":"Media Player","Play Video":"Reproduciraj videozapis",Foreground:"Prednji plan",White:"Bijela",Black:"Crna",Red:"Crvena",Green:"Zelena",Blue:"Plava",Yellow:"Žuta",Magenta:"Magenta",Cyan:"Cijan",Opaque:"Neprozirno","Semi-Opaque":"Djelomice neprozirno",Transparent:"Prozirno",Window:"Prozor","Font Size":"Veličina fonta","Text Edge Style":"Stil ruba teksta",None:"Nema",Raised:"Podignuto",Depressed:"Utisnuto",Uniform:"Jednoobrazno",Dropshadow:"Padajuća sjena","Font Family":"Grupa fontova","Monospace Serif":"Neproporcionalni serif","Proportional Serif":"Proporcionalni serif","Monospace Sans-Serif":"Neproporcionalni sans-serif","Proportional Sans-Serif":"Proporcionalni sans-serif",Casual:"Neformalno",Script:"Skripta","Small Caps":"Smanjena velika slova",Defaults:"Zadane postavke",Done:"Gotovo",Link:"Veza",Embed:"Ugradi",Close:"Zatvori",Copy:"Kopiraj","Copy Url":"Kopiraj URL","Embed Code":"Ugradi kod",English:"Engleski","volume level":"razina glasnoće","video progress bar":"traka prikaza tijeka videozapisa","playback speed level":"brzina reprodukcije","Dolby Digital":"Dolby Digital",Stereo:"Stereozvuk","Captions Menu":"Izbornik s natpisima","Subtitles Menu":"Izbornik s titlovima","Need Text":"Potreban tekst",Download:"Preuzmi","Go to live":"Prijeđi na emitiranje uživo","End Time":"Vrijeme završetka"}},{"../video.js/src/js/player.js":124}],31:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.hu={Play:"Lejátszás",Pause:"Szüneteltetés","Current Time":"Aktuális idő","Duration Time":"Időtartam","Remaining Time":"Hátralévő idő","Stream Type":"Online tartalom típusa",LIVE:"ÉLŐ",Loaded:"Betöltve",Progress:"Állapot",Fullscreen:"Teljes képernyő","Non-Fullscreen":"Nem teljes képernyős mód",Mute:"Elnémítás",Unmute:"Némítás feloldása","Playback Rate":"Lejátszási sebesség",Subtitles:"Feliratok","Subtitles Off":"feliratok kikapcsolva",Captions:"Feliratok","Captions Off":"feliratozás kikapcsolva",Chapters:"Fejezetek",Off:"Kikapcsolva",Quality:"Minőség",Auto:"Automatikus","Audio Tracks":"Zeneszámok","default":"alapértelmezett","Cast To Device":"Átvitel eszközre",Share:"Megosztás",Volume:"Hangerő","Playback Speed":"Lejátszás sebessége","Video Quality":"Videóminőség","Closed Captioning":"Feliratozás","Share Video":"Videó megosztása","Next Track":"Következő szám","Previous Track":"Előző szám","Skip Forward":"Ugrás előre","Skip Backward":"Ugrás vissza","Fast Forward":"Előretekerés",Rewind:"Visszatekerés","Next Frame":"Következő képkocka","Previous Frame":"Előző képkocka",Settings:"Beállítások",Options:"Beállítások","More Options":"További lehetőségek",Zoom:"Nagyítás","Zoom In":"Nagyítás","Zoom Out":"Kicsinyítés","Audio Only":"Csak hang","Picture in Picture":"Kép a képben","Camera Angle":"Kamera látószöge",MEDIA_ERR_ABORTED:"Videolejátszás megszakítva.",MEDIA_ERR_NETWORK:"A videó letöltése hálózati hiba miatt megszakadt. Ellenőrizze a hálózati kapcsolatot, vagy próbálkozzon újra később.",MEDIA_ERR_DECODE:"Nem sikerült betölteni a videót a kiszolgáló vagy a hálózat hibája miatt, vagy mert a formátum nem támogatott.",MEDIA_ERR_SRC_NOT_SUPPORTED:"A videó lejátszása megszakadt adatsérülés miatt, vagy mert a videó olyan funkciókat használ, amelyeket a böngésző nem támogat.",MEDIA_ERR_ENCRYPTED:"Nem lehet visszafejteni a titkosított videoforrást.",SRC_PLAYER_MISMATCH:"Nem található a jelenlegi böngészőkörnyezettel kompatibilis forrás.",MEDIA_ERR_UNKNOWN:"Ismeretlen hiba történt.",SKIP_AD_COUNTDOWN_FORMAT:"Reklám átugrása: {0}…",SKIP:"Átugrás",AD_TIMING_INFO:"Reklám – {0} másodperc","Media Player":"Media Player","Play Video":"Play Video",Foreground:"Előtér",White:"Hétfő",Black:"Fekete",Red:"Vörös",Green:"Zöld",Blue:"Kék",Yellow:"Sárga",Magenta:"Bíbor",Cyan:"Ciánkék",Opaque:"Átlátszatlan","Semi-Opaque":"Félig átlátszó",Transparent:"Átlátszó",Window:"Ablak","Font Size":"Betűméret","Text Edge Style":"Szövegszél stílusa",None:"Nincs",Raised:"Domború",Depressed:"Süllyesztett",Uniform:"Egységes",Dropshadow:"Árnyékolt","Font Family":"Betűkészlet","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Alkalmi",Script:"Parancsfájl","Small Caps":"Kiskapitális",Defaults:"Alapértelmezett",Done:"Kész",Link:"Hivatkozás",Embed:"Beágyazás",Close:"Bezárás",Copy:"Másolás","Copy Url":"URL-cím másolása","Embed Code":"Beágyazási kód",English:"Angol","volume level":"hangerő","video progress bar":"videó folyamatjelző","playback speed level":"lejátszás sebessége","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Képaláírások menü","Subtitles Menu":"Feliratok menü","Need Text":"Szöveg szükséges",Download:"Letöltés","Go to live":"Élő stream megnyitása","End Time":"Záró időpont"}},{"../video.js/src/js/player.js":124}],32:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.id={Play:"Putar",Pause:"Jeda","Current Time":"Waktu Saat Ini","Duration Time":"Waktu Durasi","Remaining Time":"Waktu Tersisa","Stream Type":"Tipe Stream",LIVE:"LANGSUNG",Loaded:"Dimuat",Progress:"Progres",Fullscreen:"Layar Penuh","Non-Fullscreen":"Bukan Layar Penuh",Mute:"Matikan Suara",Unmute:"Nyalakan Suara","Playback Rate":"Laju Pemutaran",Subtitles:"Subjudul","Subtitles Off":"subjudul mati",Captions:"Keterangan","Captions Off":"keterangan mati",Chapters:"Bab",Off:"Mati",Quality:"Kualitas ",Auto:"Otomatis","Audio Tracks":"Trek Audio","default":"default","Cast To Device":"Putar Ke Perangkat",Share:"Bagikan",Volume:"Volume","Playback Speed":"Kecepatan Pemutaran","Video Quality":"Kualitas Video","Closed Captioning":"Judul Tertutup","Share Video":"Bagikan Video","Next Track":"Trek Berikutnya","Previous Track":"Trek Sebelumnya","Skip Forward":"Lewati Maju","Skip Backward":"Lewati Mundur","Fast Forward":"Maju Cepat",Rewind:"Mundur","Next Frame":"Bingkai Berikutnya","Previous Frame":"Bingkai Sebelumnya",Settings:"Pengaturan",Options:"Opsi","More Options":"Opsi Lainnya",Zoom:"Zoom","Zoom In":"Perbersar","Zoom Out":"Perkecil","Audio Only":"Hanya Audio","Picture in Picture":"Gambar dalam Gambar","Camera Angle":"Sudut Kamera",MEDIA_ERR_ABORTED:"Pemutaran video dibatalkan.",MEDIA_ERR_NETWORK:"Kesalahan jaringan menyebabkan unduhan video gagal sebagian. Periksa koneksi jaringan Anda atau coba lagi nanti.",MEDIA_ERR_DECODE:"Video tidak dapat dimuat, karena server atau jaringan gagal, atau karena format tidak didukung.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Pemutaran video dibatalkan karena masalah kerusakan atau video menggunakan fitur yang tidak didukung browser Anda.",MEDIA_ERR_ENCRYPTED:"Tidak dapat mendekripsi sumber video yang dienkripsi.",SRC_PLAYER_MISMATCH:"Sumber yang kompatibel tidak ditemukan untuk lingkungan browser saat ini.",MEDIA_ERR_UNKNOWN:"Terjadi kesalahan tidak diketahui",SKIP_AD_COUNTDOWN_FORMAT:"Lewati iklan dalam {0}…",SKIP:"Lewati",AD_TIMING_INFO:"Iklan {0} detik","Media Player":"Pemutar Media","Play Video":"Putar Video",Foreground:"Latar depan",White:"Putih",Black:"Hitam",Red:"Merah",Green:"Hijau",Blue:"Biru",Yellow:"Kuning",Magenta:"Magenta",Cyan:"Sian",Opaque:"Buram","Semi-Opaque":"Semiburam",Transparent:"Transparan",Window:"Jendela","Font Size":"Ukuran Font","Text Edge Style":"Gaya Teks Edge",None:"Tidak Ada",Raised:"Dinaikkan",Depressed:"Diturunkan",Uniform:"Seragam",Dropshadow:"Bayangan Jatuh","Font Family":"Keluarga Font","Monospace Serif":"Serif Monospace","Proportional Serif":"Serif Proporsional","Monospace Sans-Serif":"Sans Serif Monospace","Proportional Sans-Serif":"Sans Serif Proporsional",Casual:"Kasual",Script:"Skrip","Small Caps":"Huruf Kecil",Defaults:"Default",Done:"Selesai",Link:"Tautan",Embed:"Sematkan",Close:"Tutup",Copy:"Salin","Copy Url":"Salin Url","Embed Code":"Kode Semat",English:"Bahasa Inggris","volume level":"tingkat volume","video progress bar":"bilah progres video","playback speed level":"tingkat kecepatan pemutaran","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Menu Keterangan","Subtitles Menu":"Menu Subjudul","Need Text":"Memerlukan Teks",Download:"Unduh","Go to live":"Mulai Siaran Langsung","End Time":"Waktu Selesai"}},{"../video.js/src/js/player.js":124}],33:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.is={Play:"Spila",Pause:"Bið","Current Time":"Núverandi tími","Duration Time":"Tímalengd","Remaining Time":"Tími eftir","Stream Type":"Gerð straums",LIVE:"Í beinni",Loaded:"Hlaðið",Progress:"Framvinda",Fullscreen:"Heill skjár","Non-Fullscreen":"Ekki heill skjár",Mute:"Taka hljóð af",Unmute:"Setja hljóð á","Playback Rate":"Spilunarhraði",Subtitles:"Skjátextar","Subtitles Off":"Slökkt á skjátexta",Captions:"Myndatextar","Captions Off":"Slökkt á myndatexta",Chapters:"Kaflar",Off:"Af",Quality:"Gæði",Auto:"Sjálfvirkt","Audio Tracks":"Hljóðspor","default":"sjálfvalið","Cast To Device":"Varpa í tæki",Share:"Deila",Volume:"Hljóðstyrkur","Playback Speed":"Afspilunarhraði","Video Quality":"Vídeógæði","Closed Captioning":"Lokaðir myndatextar","Share Video":"Deila vídeói","Next Track":"Næsta spor","Previous Track":"Fyrra spor","Skip Forward":"Hoppa fram á við","Skip Backward":"Hoppa afturábak","Fast Forward":"Hratt áfram",Rewind:"Spóla til baka","Next Frame":"Næsti rammi","Previous Frame":"Fyrri rammi",Settings:"Stillingar",Options:"Valkostir","More Options":"Fleiri valkostir",Zoom:"Súma","Zoom In":"Súma inn","Zoom Out":"Súma út","Audio Only":"Aðeins hljóð","Picture in Picture":"Mynd í mynd","Camera Angle":"Kameruvinkill",MEDIA_ERR_ABORTED:"Hætt við afspilun vídeós",MEDIA_ERR_NETWORK:"Villa í netkerfi olli því að niðurhal vídeós mistókst að hluta. Vinsamlegast athugaðu nettenginguna þína eða reyndu aftur síðar.",MEDIA_ERR_DECODE:"Ekki var hægt að hlaða vídeói, annaðhvort vegna þess að þjónn eða net voru ekki í lagi eða vegna þess að sniðið er ekki studd.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Hætt var við afspilun á vídeó vegna vandamála vegna truflunar eða vegna þess að vídeó notar eiginleika sem vafrinn þinn styður ekki.",MEDIA_ERR_ENCRYPTED:"Gat ekki afkóðað dulkóðaðan uppruna vídeós",SRC_PLAYER_MISMATCH:"Enginn samhæfður uppruni fannst fyrir núverandi umhverfi vafra.",MEDIA_ERR_UNKNOWN:"Óþekkt villa kom upp",SKIP_AD_COUNTDOWN_FORMAT:"Sleppa auglýsingu eftir {0}...",SKIP:"Sleppa",AD_TIMING_INFO:"Auglýsing í {0} sekúndur"}},{"../video.js/src/js/player.js":124}],34:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.it={Play:"Riproduci",Pause:"Pausa","Current Time":"Ora corrente","Duration Time":"Durata","Remaining Time":"Tempo residuo","Stream Type":"Tipo di flusso",LIVE:"LIVE",Loaded:"Caricato",Progress:"Stato",Fullscreen:"Schermo intero","Non-Fullscreen":"Schermo normale",Mute:"Disattiva audio",Unmute:"Attiva audio","Playback Rate":"Frequenza di riproduzione",Subtitles:"Sottotitoli","Subtitles Off":"disattiva sottotitoli",Captions:"Didascalie","Captions Off":"disattiva didascalie",Chapters:"Capitoli",Off:"Disattivato",Quality:"Qualità",Auto:"Automatico","Audio Tracks":"Brani audio","default":"predefinito","Cast To Device":"Cast nel dispositivo",Share:"Condividi",Volume:"Volume","Playback Speed":"Velocità di riproduzione","Video Quality":"Qualità video","Closed Captioning":"Sottotitoli codificati","Share Video":"Condividi video","Next Track":"Brano successivo","Previous Track":"Brano precedente","Skip Forward":"Skip avanti","Skip Backward":"Skip indietro","Fast Forward":"Avanzamento rapido",Rewind:"Riavvolgi","Next Frame":"Fotogramma successivo","Previous Frame":"Fotogramma precedente",Settings:"Impostazioni",Options:"Opzioni","More Options":"Altre opzioni",Zoom:"Zoom","Zoom In":"Zoom avanti","Zoom Out":"Zoom indietro","Audio Only":"Solo audio","Picture in Picture":"Immagine nell'immagine","Camera Angle":"Angolazione",MEDIA_ERR_ABORTED:"Riproduzione video interrotta.",MEDIA_ERR_NETWORK:"Il download del video si è interrotto a causa di un errore di rete. Controllare la connessione di rete o riprovare più tardi.",MEDIA_ERR_DECODE:"Non è stato possibile caricare il video perché si è verificato un errore del server o della rete oppure perché il formato non è supportato.",MEDIA_ERR_SRC_NOT_SUPPORTED:"La riproduzione video è stata interrotta a causa di un problema di danneggiamento oppure perché nel video sono state usate funzionalità non supportate dal browser corrente.",MEDIA_ERR_ENCRYPTED:"Non è possibile decrittografare l'origine video crittografata.",SRC_PLAYER_MISMATCH:"Non sono state trovate origini compatibili per l'ambiente del browser corrente.",MEDIA_ERR_UNKNOWN:"Si è verificato un errore sconosciuto.",SKIP_AD_COUNTDOWN_FORMAT:"Ignora annuncio tra {0}...",SKIP:"Ignora",AD_TIMING_INFO:"Annuncio {0} secondi","Media Player":"Lettore multimediale","Play Video":"Riproduci video",Foreground:"Colore di primo piano",White:"Bianco",Black:"Nero",Red:"Rosso",Green:"Verde",Blue:"Blu",Yellow:"Giallo",Magenta:"Fucsia",Cyan:"Ciano",Opaque:"Opaco","Semi-Opaque":"Semi-opaco",Transparent:"Trasparente",Window:"Finestra","Font Size":"Dimensioni carattere","Text Edge Style":"Stile bordo del testo",None:"Nessuno",Raised:"In rilievo",Depressed:"Incassato",Uniform:"Uniforme",Dropshadow:"Ombra esterna","Font Family":"Famiglia di caratteri","Monospace Serif":"Serif monospazio","Proportional Serif":"Serif proporzionale","Monospace Sans-Serif":"Sans Serif monospazio","Proportional Sans-Serif":"Sans Serif proporzionale",Casual:"Casuale",Script:"Script","Small Caps":"Maiuscoletto",Defaults:"Impostazioni predefinite",Done:"Fine",Link:"Collegamento",Embed:"Incorpora",Close:"Chiudi",Copy:"Copia","Copy Url":"Copia URL","Embed Code":"Codice di incorporamento",English:"Inglese","volume level":"Livello volume","video progress bar":"Indicatore di stato video","playback speed level":"Livello velocità riproduzione","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Menu Didascalie","Subtitles Menu":"Menu Sottotitoli","Need Text":"Testo necessario",Download:"Scaricare","Go to live":"Vai all'evento live","End Time":"Ora di fine"}},{"../video.js/src/js/player.js":124}],35:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.ja={Play:"再生",Pause:"一時停止","Current Time":"現在の時刻","Duration Time":"継続時間","Remaining Time":"残り時間","Stream Type":"ストリーム タイプ",LIVE:"ライブ",Loaded:"読み込まれました",Progress:"前進",Fullscreen:"全画面表示","Non-Fullscreen":"非全画面表示",Mute:"ミュート",Unmute:"ミュート解除","Playback Rate":"再生レート",Subtitles:"サブタイトル","Subtitles Off":"サブタイトル オフ",Captions:"キャプション","Captions Off":"キャプション オフ",Chapters:"チャプター",Off:"オフ",Quality:"品質",Auto:"自動","Audio Tracks":"オーディオ トラック","default":"既定","Cast To Device":"デバイスへのキャスト",Share:"共有",Volume:"音量","Playback Speed":"再生速度","Video Quality":"ビデオ品質","Closed Captioning":"クローズド キャプション","Share Video":"ビデオの共有","Next Track":"次のトラック","Previous Track":"前のトラック","Skip Forward":"前へスキップ","Skip Backward":"後へスキップ","Fast Forward":"早送り",Rewind:"巻き戻し","Next Frame":"次のフレーム","Previous Frame":"前のフレーム",Settings:"設定",Options:"オプション","More Options":"その他のオプション",Zoom:"ズーム","Zoom In":"拡大","Zoom Out":"縮小","Audio Only":"オーディオのみ","Picture in Picture":"ピクチャ イン ピクチャ","Camera Angle":"カメラ アングル",MEDIA_ERR_ABORTED:"ビデオ再生が中断されました。",MEDIA_ERR_NETWORK:"ネットワーク エラーのためにビデオのダウンロードが途中で失敗しました。ネットワーク接続をチェックするか後でもう一度お試しください。",MEDIA_ERR_DECODE:"ビデオを読み込めませんでした。サーバーまたはネットワークの障害のためか、あるいはフォーマットがサポートされていません。",MEDIA_ERR_SRC_NOT_SUPPORTED:"ビデオが破損しているか、ブラウザーがサポートしていない機能をビデオが使用しているため、ビデオの再生が中断しました。",MEDIA_ERR_ENCRYPTED:"暗号化されたビデオ ソースを暗号化解除できません。",SRC_PLAYER_MISMATCH:"現在のブラウザー環境と互換性のあるソースが見つかりません。",MEDIA_ERR_UNKNOWN:"不明なエラーが発生しました。",SKIP_AD_COUNTDOWN_FORMAT:"{0} 後に広告をスキップ...",SKIP:"スキップ",AD_TIMING_INFO:"{0} 秒の広告","Media Player":"メディア プレーヤー","Play Video":"ビデオを再生する",Foreground:"前景",White:"白",Black:"黒",Red:"赤",Green:"緑",Blue:"青",Yellow:"黄",Magenta:"マゼンタ",Cyan:"シアン",Opaque:"不透明","Semi-Opaque":"半不透明",Transparent:"透明",Window:"ウィンドウ","Font Size":"フォント サイズ","Text Edge Style":"文字エッジのスタイル",None:"なし",Raised:"浮き出し",Depressed:"浮き彫り",Uniform:"均一",Dropshadow:"影付き文字","Font Family":"フォント ファミリ","Monospace Serif":"固定幅 Serif","Proportional Serif":"プロポーショナル Serif","Monospace Sans-Serif":"固定幅 Sans-Serif","Proportional Sans-Serif":"プロポーショナル Sans-Serif",Casual:"カジュアル",Script:"下付き文字","Small Caps":"小型英大文字",Defaults:"既定値",Done:"完了",Link:"リンク",Embed:"埋め込み",Close:"閉じる",Copy:"コピー","Copy Url":"URL のコピー","Embed Code":"埋め込みコード",English:"英語","volume level":"ボリューム レベル","video progress bar":"ビデオの進行状況バー","playback speed level":"再生速度レベル","Dolby Digital":"ドルビー デジタル",Stereo:"ステレオ","Captions Menu":"[キャプション] メニュー","Subtitles Menu":"[字幕] メニュー","Need Text":"必要なテキスト",Download:"ダウンロード","Go to live":"ライブを見る","End Time":"終了時間"},d["default"].prototype.options_.languages["ja-jp"]=d["default"].prototype.options_.languages.ja},{"../video.js/src/js/player.js":124}],36:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.kk={Play:"Ойнату",Pause:"Кідірту","Current Time":"Ағымдағы уақыт","Duration Time":"Ұзақтық","Remaining Time":"Қалған уақыт","Stream Type":"Ағын түрі",LIVE:"LIVE",Loaded:"Жүктелді",Progress:"Орындалу барысы",Fullscreen:"Толық экран","Non-Fullscreen":"Толық экран емес",Mute:"Дыбысты өшіру",Unmute:"Дыбысты қосу","Playback Rate":"Ойнату жылдамдығы",Subtitles:"Субтитрлер","Subtitles Off":"субтитрлер өшірулі",Captions:"Тақырыптар","Captions Off":"тақырыптар өшірулі",Chapters:"Тараулар",Off:"Өшірулі",Quality:"Сапа",Auto:"Автоматты","Audio Tracks":"Дыбыс жолшығы","default":"әдепкі","Cast To Device":"Құрылғыға жеткізу",Share:"Ортақ пайдалану",Volume:"Дыбыс деңгейі","Playback Speed":"Ойнату жылдамдығы","Video Quality":"Бейне сапасы","Closed Captioning":"Жабық тақырыптар","Share Video":"Бейнені ортақ пайдалану","Next Track":"Келесі бақылау","Previous Track":"Алдыңғы бақылау","Skip Forward":"Алға өту","Skip Backward":"Артқа өту","Fast Forward":"Алға айналдыру",Rewind:"Қайта айналдыру","Next Frame":"Келесі жақтау","Previous Frame":"Алдыңғы жақтау",Settings:"Параметрлер",Options:"Параметрлер","More Options":"Қосымша параметрлер",Zoom:"Ұлғайту","Zoom In":"Ірілеу","Zoom Out":"Кішілеу","Audio Only":"Тек дыбыс","Picture in Picture":"Суреттегі сурет","Camera Angle":"Камера бұрышы",MEDIA_ERR_ABORTED:"Бейнені ойнату тоқтатылды.",MEDIA_ERR_NETWORK:"Бейненің ішінара сәтсіз жүктелуіне әкелген желі қатесі. Желі байланысын тексеріңіз немесе әрекетті кейін қайталаңыз.",MEDIA_ERR_DECODE:"Сервер немесе желі жұмысының сәтсіз аяқталуы не пішімге қолдау көрсетулмеуі себебінен бейнені жүктеу мүмкін болмады.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Бүліну мәселесіне байланысты немесе бейненің браузеріңіз қолдау көрсетпейтін мүмкіндіктерді пайдалануы себебінен бейнені ойнату тоқтатылды.",MEDIA_ERR_ENCRYPTED:"Шифрланған бейне көзін шифрдан шешу мүмкін емес.",SRC_PLAYER_MISMATCH:"Ағымдағы браузер ортасы үшін үйлесімді бастапқы көз табылмады.",MEDIA_ERR_UNKNOWN:"Белгісіз қате орын алды",SKIP_AD_COUNTDOWN_FORMAT:"Жарнаманы {0} кейін өткізіп жіберу...",SKIP:"Өткізіп жіберу",AD_TIMING_INFO:"Жарнама {0} секунд",
"Media Player":"Мультимедиалық ойнатқыш","Play Video":"Бейнені ойнату",Foreground:"Негізгі түс",White:"Ақ",Black:"Қара",Red:"Қызыл",Green:"Жасыл",Blue:"Көк",Yellow:"Сары",Magenta:"Күлгін",Cyan:"Көгілдір",Opaque:"Мөлдір емес","Semi-Opaque":"Жартылай мөлдір",Transparent:"Мөлдір",Window:"Терезе","Font Size":"Қаріп өлшемі","Text Edge Style":"Мәтін жиегі мәнері",None:"Ешқайсысы",Raised:"Көтерілген",Depressed:"Төмен түсірілген",Uniform:"Біртекті",Dropshadow:"Көлеңке","Font Family":"Қаріптер тобы","Monospace Serif":"Бір енді кертілген","Proportional Serif":"Пропорционалды, кертілген","Monospace Sans-Serif":"Бір енді кертілмеген","Proportional Sans-Serif":"Пропорционалды, кертілмеген",Casual:"Кәдімгі",Script:"Сценарий","Small Caps":"Кіші бас әріптер",Defaults:"Әдепкі параметрлер",Done:"Дайын",Link:"Байланыстыру",Embed:"Ендіру",Close:"Жабу",Copy:"Көшіру","Copy Url":"URL мекенжайын көшіру","Embed Code":"Ендіру коды",English:"Ағылшын","volume level":"дыбыс деңгейі","video progress bar":"бейненің орындалу барысы жолағы","playback speed level":"ойнату жылдамдығының деңгейі","Dolby Digital":"Dolby Digital",Stereo:"Стерео","Captions Menu":"Тақырыптар мәзірі","Subtitles Menu":"Субтитрлер мәзірі","Need Text":"Мәтін қажет",Download:"Жүктеу","Go to live":"Тікелей трансляцияға өту","End Time":"Аяқталу уақыты"},d["default"].prototype.options_.languages["kk-kz"]=d["default"].prototype.options_.languages.kk},{"../video.js/src/js/player.js":124}],37:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.ko={Play:"재생",Pause:"일시 중지","Current Time":"현재 시간","Duration Time":"지속 시간","Remaining Time":"남은 시간","Stream Type":"스트림 형식",LIVE:"라이브",Loaded:"로드됨",Progress:"진행률",Fullscreen:"전체 화면","Non-Fullscreen":"전체 화면이 아님",Mute:"음소거",Unmute:"음소거 해제","Playback Rate":"재생 속도",Subtitles:"자막","Subtitles Off":"자막 끄기",Captions:"캡션","Captions Off":"캡션 끄기",Chapters:"챕터",Off:"해제",Quality:"품질",Auto:"자동","Audio Tracks":"오디오 트랙","default":"기본값","Cast To Device":"장치로 캐스팅",Share:"공유",Volume:"볼륨","Playback Speed":"재생 속도","Video Quality":"비디오 품질","Closed Captioning":"선택 캡션","Share Video":"비디오 공유","Next Track":"다음 트랙","Previous Track":"이전 트랙","Skip Forward":"앞으로 건너뛰기","Skip Backward":"뒤로 건너뛰기","Fast Forward":"빨리 감기",Rewind:"되감기","Next Frame":"다음 프레임","Previous Frame":"이전 프레임",Settings:"설정",Options:"옵션","More Options":"기타 옵션",Zoom:"확대/축소","Zoom In":"확대","Zoom Out":"축소","Audio Only":"오디오만","Picture in Picture":"화면 속 화면","Camera Angle":"카메라 각도",MEDIA_ERR_ABORTED:"비디오 재생이 중단되었습니다.",MEDIA_ERR_NETWORK:"네트워크 오류 때문에 비디오 다운로드가 도중에 실패했습니다. 네트워크 연결을 확인하거나 나중에 다시 시도하세요.",MEDIA_ERR_DECODE:"서버나 네트워크에서 오류가 발생했거나 형식이 지원되지 않기 때문에 비디오를 로드할 수 없습니다.",MEDIA_ERR_SRC_NOT_SUPPORTED:"손상 문제가 발생했거나 브라우저에서 지원하지 않는 기능이 비디오에 사용되었기 때문에 비디오 재생이 중단되었습니다.",MEDIA_ERR_ENCRYPTED:"암호화된 비디오 소스의 암호를 해독할 수 없습니다.",SRC_PLAYER_MISMATCH:"현재 브라우저 환경의 호환되는 소스를 찾을 수 업습니다.",MEDIA_ERR_UNKNOWN:"알 수 없는 오류가 발생했습니다.",SKIP_AD_COUNTDOWN_FORMAT:"{0} 초 후에 광고 건너뛰기...",SKIP:"건너뛰기",AD_TIMING_INFO:"광고 {0} 초","Media Player":"Media Player","Play Video":"비디오 재생",Foreground:"전경",White:"흰색",Black:"검정",Red:"빨간색",Green:"녹색",Blue:"파랑",Yellow:"노란색",Magenta:"자홍",Cyan:"녹청",Opaque:"불투명","Semi-Opaque":"반 불투명",Transparent:"투명",Window:"창","Font Size":"글꼴 크기","Text Edge Style":"텍스트 가장자리 스타일",None:"없음",Raised:"올림",Depressed:"글자 위치 내림",Uniform:"균일",Dropshadow:"그림자 효과","Font Family":"글꼴 패밀리","Monospace Serif":"고정 폭 Serif","Proportional Serif":"가변 Serif","Monospace Sans-Serif":"고정 폭 Sans Serif","Proportional Sans-Serif":"가변 Sans Serif",Casual:"캐주얼",Script:"스크립트","Small Caps":"작은 대문자",Defaults:"기본값",Done:"완료",Link:"링크",Embed:"포함",Close:"닫기",Copy:"복사","Copy Url":"Url 복사","Embed Code":"Embed 태그",English:"영어","volume level":"볼륨 수준","video progress bar":"비디오 진행률 표시줄","playback speed level":"재생 속도 수준","Dolby Digital":"Dolby Digital",Stereo:"스테레오","Captions Menu":"캡션 메뉴","Subtitles Menu":"자막 메뉴","Need Text":"텍스트 필요",Download:"다운로드","Go to live":"라이브 브로드캐스트로 이동","End Time":"종료 시간"},d["default"].prototype.options_.languages["ko-kr"]=d["default"].prototype.options_.languages.ko},{"../video.js/src/js/player.js":124}],38:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}{var c=a("./ar.js"),d=(b(c),a("./bg.js")),e=(b(d),a("./ca.js")),f=(b(e),a("./cs.js")),g=(b(f),a("./da.js")),h=(b(g),a("./de.js")),i=(b(h),a("./el.js")),j=(b(i),a("./en.js")),k=(b(j),a("./es.js")),l=(b(k),a("./et.js")),m=(b(l),a("./eu.js")),n=(b(m),a("./fa.js")),o=(b(n),a("./fi.js")),p=(b(o),a("./fr.js")),q=(b(p),a("./gl.js")),r=(b(q),a("./he.js")),s=(b(r),a("./hi.js")),t=(b(s),a("./hr.js")),u=(b(t),a("./hu.js")),v=(b(u),a("./id.js")),w=(b(v),a("./is.js")),x=(b(w),a("./it.js")),y=(b(x),a("./ja.js")),z=(b(y),a("./kk.js")),A=(b(z),a("./ko.js")),B=(b(A),a("./lt.js")),C=(b(B),a("./lv.js")),D=(b(C),a("./ms.js")),E=(b(D),a("./nb.js")),F=(b(E),a("./nl.js")),G=(b(F),a("./nn.js")),H=(b(G),a("./ph.js")),I=(b(H),a("./pl.js")),J=(b(I),a("./pt-br.js")),K=(b(J),a("./pt-pt.js")),L=(b(K),a("./ro.js")),M=(b(L),a("./ru.js")),N=(b(M),a("./sk.js")),O=(b(N),a("./sl.js")),P=(b(O),a("./sr-cyrl-cs.js")),Q=(b(P),a("./sr-latn-rs.js")),R=(b(Q),a("./sv.js")),S=(b(R),a("./th.js")),T=(b(S),a("./tl.js")),U=(b(T),a("./tr.js")),V=(b(U),a("./uk.js")),W=(b(V),a("./ur.js")),X=(b(W),a("./vi.js")),Y=(b(X),a("./zh-hans.js")),Z=(b(Y),a("./zh-hant.js"));b(Z)}},{"./ar.js":13,"./bg.js":14,"./ca.js":15,"./cs.js":16,"./da.js":17,"./de.js":18,"./el.js":19,"./en.js":20,"./es.js":21,"./et.js":22,"./eu.js":23,"./fa.js":24,"./fi.js":25,"./fr.js":26,"./gl.js":27,"./he.js":28,"./hi.js":29,"./hr.js":30,"./hu.js":31,"./id.js":32,"./is.js":33,"./it.js":34,"./ja.js":35,"./kk.js":36,"./ko.js":37,"./lt.js":39,"./lv.js":40,"./ms.js":41,"./nb.js":42,"./nl.js":43,"./nn.js":44,"./ph.js":45,"./pl.js":46,"./pt-br.js":47,"./pt-pt.js":48,"./ro.js":49,"./ru.js":50,"./sk.js":51,"./sl.js":52,"./sr-cyrl-cs.js":53,"./sr-latn-rs.js":54,"./sv.js":55,"./th.js":56,"./tl.js":57,"./tr.js":58,"./uk.js":59,"./ur.js":60,"./vi.js":61,"./zh-hans.js":62,"./zh-hant.js":63}],39:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.lt={Play:"Leisti",Pause:"Pristabdyti","Current Time":"Dabartinis laikas","Duration Time":"Trukmė","Remaining Time":"Likęs laikas","Stream Type":"Transliavimo tipas",LIVE:"TIESIOGINIS",Loaded:"Įkelta",Progress:"Eiga",Fullscreen:"Per visą ekraną","Non-Fullscreen":"Ne per visą ekraną",Mute:"Nutildyti",Unmute:"Atšaukti nutildymą","Playback Rate":"Leidimo dažnis",Subtitles:"Subtitrai","Subtitles Off":"subtitrai išjungti",Captions:"Vaizdo aprašai","Captions Off":"vaizdo aprašai išjungti",Chapters:"Dalys",Off:"Išjungta",Quality:"Kokybė",Auto:"Automatinis","Audio Tracks":"Garso takeliai","default":"numatytoji reikšmė","Cast To Device":"Parinkti pagal įrenginį",Share:"Bendrinti",Volume:"Garsumas","Playback Speed":"Leidimo greitis","Video Quality":"Vaizdo įrašo kokybė","Closed Captioning":"Paslėptieji titrai","Share Video":"Bendrinti vaizdo įrašą","Next Track":"Kitas takelis","Previous Track":"Ankstesnis takelis","Skip Forward":"Pereiti pirmyn","Skip Backward":"Pereiti atgal","Fast Forward":"Sukti pirmyn",Rewind:"Sukti atgal","Next Frame":"Kitas kadras","Previous Frame":"Ankstesnis kadras",Settings:"Parametrai",Options:"Parinktys","More Options":"Daugiau parinkčių",Zoom:"Mastelio keitimas","Zoom In":"Artinti","Zoom Out":"Tolinti","Audio Only":"Tik garsas","Picture in Picture":"Paveikslėlis paveikslėlyje","Camera Angle":"Kameros kampas",MEDIA_ERR_ABORTED:"Vaizdo įrašo leidimas atmestas.",MEDIA_ERR_NETWORK:"Viso vaizdo įrašo atsisiųsti nepavyko dėl tinklo klaidos. Patikrinkite tinklo ryšį arba bandykite dar kartą vėliau.",MEDIA_ERR_DECODE:"Vaizdo įrašo nepavyko įkelti dėl serverio arba tinklo klaidos arba dėl to, kad nepalaikomas formatas.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Vaizdo įrašo leidimas buvo atmestas dėl gedimo arba dėl to, kad vaizdo įraše buvo naudojamos funkcijos, kurių jūsų naršyklė nepalaiko.",MEDIA_ERR_ENCRYPTED:"Nepavyksta iššifruoti užšifruoto vaizdo įrašo šaltinio.",SRC_PLAYER_MISMATCH:"Šiai naršyklės aplinkai suderinamas šaltinis nerastas.",MEDIA_ERR_UNKNOWN:"Įvyko nežinoma klaida",SKIP_AD_COUNTDOWN_FORMAT:"Praleisti reklamą {0}...",SKIP:"Praleisti",AD_TIMING_INFO:"{0} sek. reklama","Media Player":"Medijos leistuvas","Play Video":"Leisti vaizdo įrašą",Foreground:"Priekinis planas",White:"Balta",Black:"Juoda",Red:"Raudona",Green:"Žalia",Blue:"Mėlyna",Yellow:"geltona",Magenta:"Purpurinė",Cyan:"Žydra",Opaque:"Nepermatoma","Semi-Opaque":"Pusiau nepermatoma",Transparent:"Skaidri",Window:"Langas","Font Size":"Šrifto dydis","Text Edge Style":"Teksto krašto stilius",None:"Nėra",Raised:"Pakeltas",Depressed:"Sumažinta",Uniform:"Universali",Dropshadow:"Šešėlis","Font Family":"Šriftų šeimai","Monospace Serif":"Fiksuoto pločio „Serif“","Proportional Serif":"Proporcingas „Serif“","Monospace Sans-Serif":"Fiksuoto pločio „Sans-Serif“","Proportional Sans-Serif":"Proporcingas „Sans-Serif“",Casual:"Atsitiktinis",Script:"Scenarijus","Small Caps":"Mažos didžiosios raidės",Defaults:"Numatytosios reikšmės",Done:"Atlikta",Link:"Saitas",Embed:"Įdėti",Close:"Uždaryti",Copy:"Kopijuoti","Copy Url":"Kopijuoti URL","Embed Code":"Įdėti kodą",English:"Anglų","volume level":"garsumas","video progress bar":"vaizdo įrašo eigos juosta","playback speed level":"leidimo greitis","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Vaizdo aprašų  meniu","Subtitles Menu":"Subtitrų meniu","Need Text":"Reikia teksto",Download:"Atsisiųsti","Go to live":"Transliuoti tiesiogiai","End Time":"Pabaigos laikas"}},{"../video.js/src/js/player.js":124}],40:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.lv={Play:"Atskaņot",Pause:"Pauze","Current Time":"Pašreizējais laiks","Duration Time":"Ilguma laiks","Remaining Time":"Atlikušais laiks","Stream Type":"Straumes tips",LIVE:"TIEŠSAISTE",Loaded:"Ielādēts",Progress:"Norise",Fullscreen:"Pilnekrāna režīms","Non-Fullscreen":"Ne pilnekrāna režīms",Mute:"Izslēgt skaņu",Unmute:"Ieslēgt skaņu","Playback Rate":"Atskaņošanas ātrums",Subtitles:"Subtitri","Subtitles Off":"Subtitri izslēgti",Captions:"Paraksti","Captions Off":"paraksti izslēgti",Chapters:"Nodaļas",Off:"Izslēgts",Quality:"Kvalitāte",Auto:"Automātiski","Audio Tracks":"Audio ieraksti","default":"noklusējums","Cast To Device":"Pārraidīt uz ierīci",Share:"Koplietot",Volume:"Skaļums","Playback Speed":"Atskaņošanas ātrums","Video Quality":"Video kvalitāte","Closed Captioning":"Slēptie titri","Share Video":"Kopīgot video","Next Track":"Nākamais ieraksts","Previous Track":"Iepriekšējais ieraksts","Skip Forward":"Izlaist uz priekšu","Skip Backward":"Izlaist atpakaļ","Fast Forward":"Patīt",Rewind:"Attīt","Next Frame":"Nākamais kadrs","Previous Frame":"Iepriekšējais kadrs",Settings:"Iestatījumi",Options:"Opcijas","More Options":"Papildu opcijas",Zoom:"Tālummaiņa","Zoom In":"Tuvināšana","Zoom Out":"Tālināšana","Audio Only":"Tikai audio","Picture in Picture":"Attēls attēlā","Camera Angle":"Kameras leņķis",MEDIA_ERR_ABORTED:"Video atskaņošana priekšlaikus pārtraukta.",MEDIA_ERR_NETWORK:"Tīkla kļūdas dēļ video lejupielāde tika pārtraukta pusceļā. Lūdzu, pārbaudiet tīkla savienojumu vai vēlāk mēģiniet vēlreiz.",MEDIA_ERR_DECODE:"Videoklipu neizdevās ielādēt servera vai tīkla kļūmes vai neatbalstīta formāta dēļ.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Video atskaņošana tika priekšlaikus pārtraukta bojājuma problēmas dēļ vai tāpēc, ka videoklipā tika izmantoti līdzekļi, ko jūsu pārlūkprogramma neatbalsta.",MEDIA_ERR_ENCRYPTED:"Nevar atšifrēt šifrēto video avotu.",SRC_PLAYER_MISMATCH:"Pašreizējai pārlūkprogrammas videi nav atrasts saderīgs avots.",MEDIA_ERR_UNKNOWN:"Radās nezināma kļūda",SKIP_AD_COUNTDOWN_FORMAT:"Drīz varēsit izlaist reklāmu: {0}...",SKIP:"Izlaist",AD_TIMING_INFO:"Reklāma – {0} sekundes","Media Player":"Media Player","Play Video":"Atskaņot video",Foreground:"Priekšplāns",White:"Balts",Black:"Melns",Red:"Sarkans",Green:"Zaļš",Blue:"Zils",Yellow:"Dzeltens",Magenta:"Fuksīna",Cyan:"Ciāna",Opaque:"Necaurspīdīgs","Semi-Opaque":"Daļēji necaurspīdīgs",Transparent:"Caurspīdīgs",Window:"Logs","Font Size":"Fonta lielums","Text Edge Style":"Teksta malas stils",None:"Nav",Raised:"Pacelts",Depressed:"Pazemināts",Uniform:"Vienots",Dropshadow:"Nolaižama ēna","Font Family":"Fontu saime","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Parasts",Script:"Skripts","Small Caps":"Kapiteļi",Defaults:"Noklusējuma vērtības",Done:"Gatavs",Link:"Saite",Embed:"Iegult",Close:"Aizvērt",Copy:"Kopēt","Copy Url":"Kopēt URL","Embed Code":"Iegulšanas kods",English:"Angļu","volume level":"skaļuma līmenis","video progress bar":"video norises josla","playback speed level":"atskaņošanas ātruma līmenis","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Parakstu izvēlne","Subtitles Menu":"Subtitru izvēlne","Need Text":"Nepieciešams teksts",Download:"Lejupielādēt","Go to live":"Pāriet uz tiešraidi","End Time":"Beigu laiks"}},{"../video.js/src/js/player.js":124}],41:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.ms={Play:"Main",Pause:"Jeda","Current Time":"Masa Semasa","Duration Time":"Tempoh Semasa","Remaining Time":"Baki Masa","Stream Type":"Jenis Strim",LIVE:"LANGSUNG",Loaded:"Dimuatkan",Progress:"Kemajuan",Fullscreen:"Skrin Penuh","Non-Fullscreen":"Bukan Skrin Penuh",Mute:"Redam",Unmute:"Nyahredam","Playback Rate":"Kadar Main Semula",Subtitles:"Sari kata","Subtitles Off":"sari kata dimatikan",Captions:"Kapsyen","Captions Off":"kapsyen dimatikan",Chapters:"Babak",Off:"Matikan",Quality:"Kualiti",Auto:"Auto","Audio Tracks":"Lagu Audio","default":"lalai","Cast To Device":"Siarkan Pada Peranti",Share:"Kongsi",Volume:"Volum","Playback Speed":"Kelajuan Main Semula","Video Quality":"Kualiti Video","Closed Captioning":"Penyarikataan Tertutup","Share Video":"Kongsi Video","Next Track":"Lagu berikut","Previous Track":"Lagu Sebelumnya","Skip Forward":"Langkau Ke Depan","Skip Backward":"Langkau Ke Belakang","Fast Forward":"Maju Ke Depan",Rewind:"Gulung Semula","Next Frame":"Bingkai Berikut","Previous Frame":"Bingkai Sebelumnya",Settings:"Seting",Options:"Opsyen","More Options":"Opsyen Lain",Zoom:"Zum","Zoom In":"Zum Masuk","Zoom Out":"Zum Keluar","Audio Only":"Audio Sahaja","Picture in Picture":"Gambar dalam Gambar","Camera Angle":"Sudut Kamera",MEDIA_ERR_ABORTED:"Main semula video dihentikan.",MEDIA_ERR_NETWORK:"Ralat rangkaian menyebabkan muat turun video gagal. Sila semak sambungan rangkaian anda atau cuba lagi kemudian.",MEDIA_ERR_DECODE:"Video tidak dapat dimuatkan, sama ada disebabkan kegagalan pelayan atau rangkaian atau disebabkan format tidak disokong.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Main semula video dihentikan atas sebab masalah pencemaran atau disebabkan video menggunakan ciri yang tidak disokong oleh pelayar anda.",MEDIA_ERR_ENCRYPTED:"Tidak dapat menyahsulitkan sumber video yang disulitkan.",SRC_PLAYER_MISMATCH:"Tiada sumber yang serasi ditemui untuk persekitaran pelayar semasa.",MEDIA_ERR_UNKNOWN:"Ralat yang tidak diketahui telah berlaku",SKIP_AD_COUNTDOWN_FORMAT:"Langkau iklan dalam {0}...",SKIP:"Langkau",AD_TIMING_INFO:"Iklan {0} saat","Media Player":"Pemain Media","Play Video":"Mainkan Video",Foreground:"Latar depan",White:"Putih",Black:"Hitam",Red:"Merah",Green:"Hijau",Blue:"Biru",Yellow:"Kuning",Magenta:"Magenta",Cyan:"Sian",Opaque:"Legap","Semi-Opaque":"Separa-Legap",Transparent:"Lutsinar",Window:"Tetingkap","Font Size":"Saiz Fon","Text Edge Style":"Gaya Tepi Teks",None:"Tiada",Raised:"Dinaikkan",Depressed:"Tertekan",Uniform:"Seragam",Dropshadow:"Bayang Jatuh","Font Family":"Keluarga Fon","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Santai",Script:"Skrip","Small Caps":"Huruf Besar Kecil",Defaults:"Lalai",Done:"Selesai",Link:"Pautan",Embed:"Benam",Close:"Tutup",Copy:"Salin","Copy Url":"Salin Url","Embed Code":"Kod Terbenam",English:"Bahasa Inggeris","volume level":"aras volum","video progress bar":"bar kemajuan video","playback speed level":"aras kelajuan main semula","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Menu Kapsyen","Subtitles Menu":"Menu Sari Kata","Need Text":"Perlukan Teks",Download:"Muat turun","Go to live":"Pergi ke secara langsung","End Time":"Waktu Tamat"},d["default"].prototype.options_.languages["ms-my"]=d["default"].prototype.options_.languages.ms},{"../video.js/src/js/player.js":124}],42:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.nb={Play:"Spill av",Pause:"Pause","Current Time":"Tid","Duration Time":"Varighet","Remaining Time":"Gjenstående","Stream Type":"Strømmingstype",LIVE:"LIVE",Loaded:"Lastet inn",Progress:"Fremdrift",Fullscreen:"Fullskjerm","Non-Fullscreen":"Ikke-fullskjerm",Mute:"Demp",Unmute:"Opphev demping","Playback Rate":"Avspillingshyppighet",Subtitles:"Undertekst","Subtitles Off":"undertekst av",Captions:"Bildetekst","Captions Off":"bildetekst av",Chapters:"Kapitler",Off:"Av",Quality:"Kvalitet",Auto:"Auto","Audio Tracks":"Lydspor","default":"standard","Cast To Device":"Spill av på enhet",Share:"Del",Volume:"Volume","Playback Speed":"Avspillingshastighet","Video Quality":"Videokvalitet","Closed Captioning":"Teksting","Share Video":"Del video","Next Track":"Neste spor","Previous Track":"Forrige spor","Skip Forward":"Hopp fremover","Skip Backward":"Hopp bakover","Fast Forward":"Spol fremover",Rewind:"Spol tilbake","Next Frame":"Neste bilde","Previous Frame":"Forrige bilde",Settings:"Innstillinger",Options:"Alternativer","More Options":"Flere alternativer",Zoom:"Zoom","Zoom In":"Zoom inn","Zoom Out":"Zoom ut","Audio Only":"Bare lyd","Picture in Picture":"Bilde i bilde","Camera Angle":"Kameravinkel",MEDIA_ERR_ABORTED:"Videoavspilling avbrutt.",MEDIA_ERR_NETWORK:"En nettverksfeil har forårsaket at nedlastingen av denne videoen mislykkes. Prøv å oppdatere siden.",MEDIA_ERR_DECODE:"Videoen kan ikke lastes inn, enten fordi tilkoblingen til serveren eller nettverket mislyktes, eller fordi formatet ikke støttes.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Videoavspillingen ble avbrutt på grunn skadet programvare eller fordi videoen brukte funksjoner som nettleseren din ikke støtter.",MEDIA_ERR_ENCRYPTED:"Kan ikke dekryptere den krypterte videokilden.",SRC_PLAYER_MISMATCH:"Fant ingen kompatibel kilde for det gjeldende nettlesermiljøet.",MEDIA_ERR_UNKNOWN:"Det oppstod en ukjent feil.",SKIP_AD_COUNTDOWN_FORMAT:"Hopp over annonse om {0} ...",SKIP:"Hopp over",AD_TIMING_INFO:"Annonse {0} sekunder","Media Player":"Media Player","Play Video":"Spill av video",Foreground:"Forgrunn",White:"Hvit",Black:"Svart",Red:"Rød",Green:"Grønn",Blue:"Blå",Yellow:"Gul",Magenta:"Magenta",Cyan:"Cyan",Opaque:"Ugjennomsiktig","Semi-Opaque":"Delvis ugjennomsiktig",Transparent:"Gjennomsiktig",Window:"Vindu","Font Size":"Skriftstørrelse","Text Edge Style":"Tekstkantstil",None:"Ingen",Raised:"Opphøyd",Depressed:"Senket",Uniform:"Ensartet",Dropshadow:"Senket skygge","Font Family":"Skriftfamilie","Monospace Serif":"Serif med fast tegnavstand","Proportional Serif":"Proporsjonal serif","Monospace Sans-Serif":"Sans-serif med fast tegnavstand","Proportional Sans-Serif":"Proporsjonal sans-serif",Casual:"Tilfeldig",Script:"Skript","Small Caps":"Kapitéler",Defaults:"Standarder",Done:"Fullført",Link:"Kobling",Embed:"Bygg inn",Close:"Lukk",Copy:"Kopier","Copy Url":"Kopier nettadresse","Embed Code":"Innebyggingskode",English:"Engelsk","volume level":"volumnivå","video progress bar":"fremdriftsindikator for video","playback speed level":"hastighetsnivå for avspilling","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Bildetekstmeny","Subtitles Menu":"Undertekstmeny","Need Text":"Trenger tekst",Download:"Last ned","Go to live":"Gå til direktesending","End Time":"Sluttid"},d["default"].prototype.options_.languages["nb-no"]=d["default"].prototype.options_.languages.nb},{"../video.js/src/js/player.js":124}],43:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.nl={Play:"Afspelen",Pause:"Onderbreken","Current Time":"Huidige tijd","Duration Time":"Duur","Remaining Time":"Resterende tijd","Stream Type":"Type stream",LIVE:"LIVE",Loaded:"Geladen",Progress:"Voortgang",Fullscreen:"Volledig scherm","Non-Fullscreen":"Niet-volledig scherm",Mute:"Dempen",Unmute:"Dempen opheffen","Playback Rate":"Afspeelsnelheid",Subtitles:"Ondertitels","Subtitles Off":"ondertitels uit",Captions:"Bijschriften","Captions Off":"ondertiteling uit",Chapters:"Hoofdstukken",Off:"Uit",Quality:"Kwaliteit",Auto:"Automatisch","Audio Tracks":"Audionummers","default":"standaard","Cast To Device":"Casten naar apparaat",Share:"Delen",Volume:"Volume","Playback Speed":"Afspeelsnelheid","Video Quality":"Videokwaliteit","Closed Captioning":"Ondertiteling","Share Video":"Video delen","Next Track":"Volgend nummer","Previous Track":"Vorig nummer","Skip Forward":"Vooruit springen","Skip Backward":"Terug springen","Fast Forward":"Vooruitspoelen",Rewind:"Terugspoelen","Next Frame":"Volgende frame","Previous Frame":"Vorige frame",Settings:"Instellingen",Options:"Opties","More Options":"Meer opties",Zoom:"In-/uitzoomen","Zoom In":"Inzoomen","Zoom Out":"Uitzoomen","Audio Only":"Alleen audio","Picture in Picture":"Picture in Picture","Camera Angle":"Camerahoek",MEDIA_ERR_ABORTED:"Video afspelen is afgebroken.",MEDIA_ERR_NETWORK:"De video is vanwege een netwerkfout gedeeltelijk gedownload. Controleer uw netwerkverbinding of probeer het later opnieuw.",MEDIA_ERR_DECODE:"De video kan niet worden geladen, omdat er een probleem is met de server of het netwerk of omdat de indeling niet wordt ondersteund.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Het afspelen van de video is afgebroken, omdat deze mogelijk is beschadigd of omdat de video functies gebruikt die niet worden ondersteund door uw browser.",MEDIA_ERR_ENCRYPTED:"Kan de versleutelde videobron niet ontsleutelen.",SRC_PLAYER_MISMATCH:"Er is geen compatibele bron gevonden voor de huidige browseromgeving.",MEDIA_ERR_UNKNOWN:"Er is een onbekende fout opgetreden.",SKIP_AD_COUNTDOWN_FORMAT:"Advertentie overslaan over {0}...",SKIP:"Overslaan",AD_TIMING_INFO:"Advertentie van {0} seconden","Media Player":"Mediaspeler","Play Video":"Video afspelen",Foreground:"Voorgrond",White:"Wit",Black:"Zwart",Red:"Rood",Green:"Groen",Blue:"Blauw",Yellow:"Geel",Magenta:"Magenta",Cyan:"Cyaan",Opaque:"Ondoorzichtig","Semi-Opaque":"Half ondoorzichtig",Transparent:"Transparant",Window:"Venster","Font Size":"Tekengrootte","Text Edge Style":"Tekstrandstijl",None:"Geen",Raised:"Verhoogd",Depressed:"Verzonken",Uniform:"Gelijkmatig",Dropshadow:"Slagschaduw","Font Family":"Lettertypefamilie","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans Serif","Proportional Sans-Serif":"Proportional Sans Serif",Casual:"Informeel",Script:"Script","Small Caps":"Klein kapitaal",Defaults:"Standaardwaarden",Done:"Gereed",Link:"Koppeling",Embed:"Insluiten",Close:"Sluiten",Copy:"Kopiëren","Copy Url":"URL kopiëren","Embed Code":"Invoegcode",English:"Engels","volume level":"volumeniveau","video progress bar":"voortgangsbalk voor video","playback speed level":"niveau van afspeelsnelheid","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Menu Bijschriften","Subtitles Menu":"Menu Ondertitels","Need Text":"Tekst vereist",Download:"Downloaden","Go to live":"Live kijken","End Time":"Eindtijd"},d["default"].prototype.options_.languages["nl-be"]=d["default"].prototype.options_.languages.nl},{"../video.js/src/js/player.js":124}],44:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.nn={Play:"Spel av",Pause:"Pause","Current Time":"Tid","Duration Time":"Tidslengd","Remaining Time":"Tid att","Stream Type":"Strømmingstype",LIVE:"LIVE",Loaded:"Lasta inn",Progress:"Framdrift",Fullscreen:"Fullskjerm","Non-Fullscreen":"Ikkje fullskjerm",Mute:"Slå av lyd",Unmute:"Slå på lyd","Playback Rate":"Avspelingsfart",Subtitles:"Teksting","Subtitles Off":"teksting av",Captions:"Teksting","Captions Off":"teksting av",Chapters:"Kapittel",Off:"Av",Quality:"Kvalitet",Auto:"Auto","Audio Tracks":"Lydspor","default":"standard","Cast To Device":"Spel av på eining",Share:"Del",Volume:"Volum","Playback Speed":"Avspelingsfart","Video Quality":"Videokvalitet","Closed Captioning":"Teksting for høyrselshemma","Share Video":"Del video","Next Track":"Neste spor","Previous Track":"Førre spor","Skip Forward":"Hopp framover","Skip Backward":"Hopp bakover","Fast Forward":"Spol framover",Rewind:"Spol tilbake","Next Frame":"Neste bilete","Previous Frame":"Førre bilete",Settings:"Innstillingar",Options:"Alternativ","More Options":"Fleire alternativ",Zoom:"Zoom","Zoom In":"Zoom inn","Zoom Out":"Zoom ut","Audio Only":"Berre lyd","Picture in Picture":"Bilete i bilete","Camera Angle":"Kameravinkel",MEDIA_ERR_ABORTED:"Videoavspeling avbroten.",MEDIA_ERR_NETWORK:"Ein nettverksfeil har ført til at nedlastinga av denne videoen mislukkast. Kontroller nettverkstilkoplinga, eller prøv på nytt seinare.",MEDIA_ERR_DECODE:"Videoen kan ikkje lastast ned, anten fordi tilkoplinga til tenaren eller nettverket mislukkast, eller fordi formatet ikkje er støtta.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Videoavspelinga blei avbroten på grunn av skadd programvare eller fordi videoen brukte funksjonar som nettlesaren din ikkje støttar.",MEDIA_ERR_ENCRYPTED:"Kan ikkje dekryptere den krypterte videokjelda.",SRC_PLAYER_MISMATCH:"Finn ikkje noka kompatibel kjelde for det gjeldande nettlesarmiljøet.",MEDIA_ERR_UNKNOWN:"Det oppstod ein ukjent feil",SKIP_AD_COUNTDOWN_FORMAT:"Hopp over annonse om {0} ...",SKIP:"Hopp over",AD_TIMING_INFO:"Annonse {0} sekunder"},d["default"].prototype.options_.languages["nn-no"]=d["default"].prototype.options_.languages.nn},{"../video.js/src/js/player.js":124}],45:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.ph={Play:"I-play",Pause:"I-pause","Current Time":"Kasalukuyang Oras","Duration Time":"Oras ng Tagal","Remaining Time":"Nalalabing Oras","Stream Type":"Uri ng Stream",LIVE:"Live",Loaded:"Loaded",Progress:"Progreso",Fullscreen:"Fullscreen","Non-Fullscreen":"Hindi-Fullscreen",Mute:"I-mute",Unmute:"I-unmute","Playback Rate":"Rate ng Playback",Subtitles:"Mga subtitle","Subtitles Off":"Naka-off ang subtitle",Captions:"Mga Caption","Captions Off":"Naka-off ang Caption",Chapters:"Mga chapter",Off:"I-off",Quality:"Kalidad",Auto:"Awto","Audio Tracks":"Mga Track ng Audio","default":"default","Cast To Device":"I-Cast Sa Device",Share:"Ibahagi",Volume:"Volume","Playback Speed":"Bilis ng Playback","Video Quality":"Kalidad ng Video","Closed Captioning":"Isara ang Captioning","Share Video":"Ibahagi ang Video","Next Track":"Susunod na Track","Previous Track":"Nakaraang Track","Skip Forward":"I-skip Pauna","Skip Backward":"I-skip Pabalik","Fast Forward":"I-fast forward",Rewind:"I-rewind","Next Frame":"Susunod na Frame","Previous Frame":"Nakaraang Frame",Settings:"Mga Setting",Options:"Mga Opsyon","More Options":"Iba Pang Mga Opsyon",Zoom:"I-zoom","Zoom In":"I-zoom in","Zoom Out":"I-zoom out","Audio Only":"Audio Lamang","Picture in Picture":"Larawam sa Larawan","Camera Angle":"Anggulo ng Camera",MEDIA_ERR_ABORTED:"Nahinto ang playback ng video",MEDIA_ERR_NETWORK:"Ang error sa network ang dahilan kung bakit nabigo ang pag-download ng video. Pakitingnan ang konkesyon ng iyong network at subukang muli.",MEDIA_ERR_DECODE:"Hindi mai-load ang video, marahil dahil nabigo ang server o network o dahil hindi suportado ang format.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Nahinto ang playback ng video dahil sa sa pagkasira o dahil hindi suportado ng browser ang video ng ginamit na mga tampok.",MEDIA_ERR_ENCRYPTED:"Hindi ma-decrypt ang source ng naka-encrypt na video.",SRC_PLAYER_MISMATCH:"Walang nakitang tugmang source para sa kasalukuyang browser.",MEDIA_ERR_UNKNOWN:"May nangyaring hindi kilalang error",SKIP_AD_COUNTDOWN_FORMAT:"Laktawan ang ad pagkalipas ng {0}...",SKIP:"Laktawan",AD_TIMING_INFO:"Ad {0} (na) segundo"}},{"../video.js/src/js/player.js":124}],46:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.pl={Play:"Odtwórz",Pause:"Wstrzymaj","Current Time":"Bieżący czas","Duration Time":"Czas trwania","Remaining Time":"Pozostały czas","Stream Type":"Typ strumienia",LIVE:"NA ŻYWO",Loaded:"Załadowane",Progress:"Postęp",Fullscreen:"Pełny ekran","Non-Fullscreen":"Niepełny ekran",Mute:"Wycisz dźwięk",Unmute:"Włącz dźwięk","Playback Rate":"Tempo odtwarzania",Subtitles:"Napisy","Subtitles Off":"napisy wyłączone",Captions:"Podpisy","Captions Off":"podpisy wyłączone",Chapters:"Rozdziały",Off:"Wyłączone",Quality:"Jakość",Auto:"Auto","Audio Tracks":"Ścieżki dźwiękowe","default":"domyślne","Cast To Device":"Rzutuj na urządzenie",Share:"Udostępnij",Volume:"Głośność","Playback Speed":"Szybkość odtwarzania","Video Quality":"Jakość wideo","Closed Captioning":"Podpisy kodowane","Share Video":"Udostępnij wideo","Next Track":"Następna ścieżka","Previous Track":"Poprzednia ścieżka","Skip Forward":"Skocz do tyłu","Skip Backward":"Skocz do przodu","Fast Forward":"Przewiń do przodu",Rewind:"Przewiń do tyłu","Next Frame":"Następna klatka","Previous Frame":"Poprzednia klatka",Settings:"Ustawienia",Options:"Opcje","More Options":"Więcej opcji",Zoom:"Powiększenie","Zoom In":"Powiększ","Zoom Out":"Pomniejsz","Audio Only":"Tylko dźwięk","Picture in Picture":"Obraz w obrazie","Camera Angle":"Kąt kamery",MEDIA_ERR_ABORTED:"Przerwano odtwarzanie wideo.",MEDIA_ERR_NETWORK:"Błąd sieci spowodował, że trwające pobieranie wideo zostało przerwane. Sprawdź połączenie sieciowe i spróbuj ponownie.",MEDIA_ERR_DECODE:"Nie można załadować wideo. Wystąpił błąd serwera lub sieci albo format nie jest obsługiwany.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Odtwarzanie wideo zostało przerwane. Dane są uszkodzone lub wideo korzysta z funkcji, których przeglądarka nie obsługuje.",MEDIA_ERR_ENCRYPTED:"Nie można odszyfrować zaszyfrowanego źródła wideo.",SRC_PLAYER_MISMATCH:"Nie znaleziono zgodnego źródła dla bieżącego środowiska przeglądarki.",MEDIA_ERR_UNKNOWN:"Wystąpił nieznany błąd.",SKIP_AD_COUNTDOWN_FORMAT:"Pomiń reklamę za {0}...",SKIP:"Pomiń",AD_TIMING_INFO:"Reklama: {0} sek.","Media Player":"Odtwarzacz multimediów","Play Video":"Odtwórz klip wideo",Foreground:"Pierwszy plan",White:"Biały",Black:"Czarny",Red:"Czerwony",Green:"Zielony",Blue:"Niebieski",Yellow:"Żółty",Magenta:"Amarantowy",Cyan:"Błękitny",Opaque:"Nieprzezroczysty","Semi-Opaque":"Półprzezroczysty",Transparent:"Przezroczysty",Window:"Okno","Font Size":"Rozmiar czcionki","Text Edge Style":"Styl krawędzi tekstu",None:"Brak",Raised:"Podniesione",Depressed:"Wklęsłe",Uniform:"Jednolite",Dropshadow:"Z cieniem","Font Family":"Rodzina czcionek","Monospace Serif":"Szeryfowa o stałej szerokości","Proportional Serif":"Szeryfowa proporcjonalna","Monospace Sans-Serif":"Bezszeryfowa o stałej szerokości","Proportional Sans-Serif":"Bezszeryfowa proporcjonalna",Casual:"Nieformalna",Script:"Skrypt","Small Caps":"Kapitaliki",Defaults:"Domyślne",Done:"Gotowe",Link:"Link",Embed:"Osadź",Close:"Zamknij",Copy:"Kopiuj","Copy Url":"Kopiuj adres URL","Embed Code":"Kod osadzania",
English:"Angielski","volume level":"poziom głośności","video progress bar":"pasek postępu klipu wideo","playback speed level":"poziom prędkości odtwarzania","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Menu podpisów","Subtitles Menu":"Menu napisów","Need Text":"Potrzebny tekst",Download:"Pobierz","Go to live":"Przejdź do transmisji na żywo","End Time":"Czas zakończenia"}},{"../video.js/src/js/player.js":124}],47:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages["pt-br"]={Play:"Executar",Pause:"Pausar","Current Time":"Tempo atual","Duration Time":"Tempo de duração","Remaining Time":"Tempo restante","Stream Type":"Tipo de fluxo",LIVE:"AO VIVO",Loaded:"Carregado",Progress:"Progresso",Fullscreen:"Tela cheia","Non-Fullscreen":"Sem tela cheia",Mute:"Ativar mudo",Unmute:"Desativar mudo","Playback Rate":"Taxa de reprodução",Subtitles:"Legendas","Subtitles Off":"Desativar legendas",Captions:"Legendas","Captions Off":"desativar legendas",Chapters:"Capítulos",Off:"Desativado",Quality:"Qualidade",Auto:"Automático","Audio Tracks":"Faixas de áudio","default":"padrão","Cast To Device":"Converter para o dispositivo",Share:"Compartilhar",Volume:"Volume","Playback Speed":"Velocidade de reprodução","Video Quality":"Qualidade do vídeo","Closed Captioning":"Legendagem codificada","Share Video":"Compartilhar vídeo","Next Track":"Próxima faixa","Previous Track":"Faixa anterior","Skip Forward":"Próxima faixa","Skip Backward":"Faixa anterior","Fast Forward":"Avançar",Rewind:"Retroceder","Next Frame":"Próximo quadro","Previous Frame":"Quadro anterior",Settings:"Configurações",Options:"Opções","More Options":"Mais Opções",Zoom:"Aplicar zoom","Zoom In":"Ampliar","Zoom Out":"Reduzir","Audio Only":"Apenas áudio","Picture in Picture":"Picture in picture","Camera Angle":"Ângulo da câmera",MEDIA_ERR_ABORTED:"Reprodução de vídeo anulada.",MEDIA_ERR_NETWORK:"Um erro de rede causou a falha do download do vídeo. Verifique sua conexão de rede ou tente novamente mais tarde.",MEDIA_ERR_DECODE:"O vídeo não pôde ser carregado, pois há uma falha na rede ou servidor ou o formato não é suportado.",MEDIA_ERR_SRC_NOT_SUPPORTED:"A reprodução do vídeo foi anulada devido a um problema de corrupção ou porque o vídeo usou recursos que seu navegador não suporta.",MEDIA_ERR_ENCRYPTED:"Não foi possível descriptografar a fonte do vídeo criptogradada.",SRC_PLAYER_MISMATCH:"Nenhuma fonte compatível encontrada para o ambiente do navegador atual.",MEDIA_ERR_UNKNOWN:"Ocorreu um erro desconhecido.",SKIP_AD_COUNTDOWN_FORMAT:"Ignorar anúncio em {0}...",SKIP:"Ignorar",AD_TIMING_INFO:"Anúncio de {0} segundos","Media Player":"Player de Mídia","Play Video":"Reproduzir Vídeo",Foreground:"Primeiro plano",White:"Branco",Black:"Preto",Red:"Vermelho",Green:"Verde",Blue:"Azul",Yellow:"Amarelo",Magenta:"Magenta",Cyan:"Ciano",Opaque:"Opaco","Semi-Opaque":"Semiopaco",Transparent:"Transparente",Window:"Janela","Font Size":"Tamanho da Fonte","Text Edge Style":"Estilo da Borda do Texto",None:"Nenhum",Raised:"Relevo",Depressed:"Baixo relevo",Uniform:"Uniforme",Dropshadow:"Sombra","Font Family":"Família da Fonte","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Casual",Script:"Script","Small Caps":"Versalete",Defaults:"Padrões",Done:"Concluído",Link:"Link",Embed:"Inserir",Close:"Fechar",Copy:"Copiar","Copy Url":"Copiar URL","Embed Code":"Inserir Código",English:"Inglês","volume level":"nível do volume","video progress bar":"barra de progresso do vídeo","playback speed level":"nível de velocidade de reprodução","Dolby Digital":"Dolby Digital",Stereo:"Estéreo","Captions Menu":"Menu de Legendas Ocultas","Subtitles Menu":"Menu de Legendas","Need Text":"Precisa de texto",Download:"Baixar","Go to live":"Ir para a transmissão ao vivo","End Time":"Tempo de término"}},{"../video.js/src/js/player.js":124}],48:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages["pt-pt"]={Play:"Reproduzir",Pause:"Pausa","Current Time":"Tempo Atual","Duration Time":"Tempo de Duração","Remaining Time":"Tempo Restante","Stream Type":"Tipo de Fluxo",LIVE:"EM DIRETO",Loaded:"Carregado",Progress:"Progresso",Fullscreen:"Ecrã Inteiro","Non-Fullscreen":"Sair de Ecrã Inteiro",Mute:"Sem volume",Unmute:"Ativar som","Playback Rate":"Taxa de Reprodução",Subtitles:"Legendas","Subtitles Off":"legendas desativadas",Captions:"Legendas","Captions Off":"legendas desligadas",Chapters:"Capítulos",Off:"Desligado",Quality:"Qualidade",Auto:"Automático","Audio Tracks":"Faixas de Áudio","default":"predefinição","Cast To Device":"Transmitir em Dispositivo",Share:"Partilhar",Volume:"Volume","Playback Speed":"Velocidade de Reprodução","Video Quality":"Qualidade do Vídeo","Closed Captioning":"Legendagem de Áudio","Share Video":"Partilhar Vídeo","Next Track":"Faixa Seguinte","Previous Track":"Faixa Anterior","Skip Forward":"Para a Frente","Skip Backward":"Para Trás","Fast Forward":"Avançar",Rewind:"Recuar","Next Frame":"Fotograma Seguinte","Previous Frame":"Fotograma Anterior",Settings:"Definições",Options:"Opções","More Options":"Mais Opções",Zoom:"Zoom","Zoom In":"Ampliar","Zoom Out":"Reduzir","Audio Only":"Apenas Áudio","Picture in Picture":"Imagem na Imagem","Camera Angle":"Ângulo da Câmara",MEDIA_ERR_ABORTED:"Reprodução de vídeo abortada.",MEDIA_ERR_NETWORK:"A transferência do vídeo parou a meio devido a um erro de rede. Verifique a ligação de rede ou tente novamente mais tarde.",MEDIA_ERR_DECODE:"Não foi possível carregar o vídeo. Ocorreu uma falha no servidor ou na rede ou o formato não é suportado.",MEDIA_ERR_SRC_NOT_SUPPORTED:"A reprodução do vídeo foi abortada devido a um problema de danificação ou porque o vídeo utiliza funcionalidades que o seu browser não suporta.",MEDIA_ERR_ENCRYPTED:"Não é possível desencriptar a origem de vídeo encriptada.",SRC_PLAYER_MISMATCH:"Não foi encontrada uma origem compatível para o ambiente de browser atual.",MEDIA_ERR_UNKNOWN:"Ocorreu um erro desconhecido.",SKIP_AD_COUNTDOWN_FORMAT:"Ignorar anúncio em {0}...",SKIP:"Ignorar",AD_TIMING_INFO:"Anúncio {0} segundos","Media Player":"Leitor de Multimédia","Play Video":"Reproduzir Vídeo",Foreground:"Primeiro Plano",White:"Branco",Black:"Preto",Red:"Vermelho",Green:"Verde",Blue:"Azul",Yellow:"Amarelo",Magenta:"Magenta",Cyan:"Turquesa",Opaque:"Opaco","Semi-Opaque":"Semi-opaco",Transparent:"Transparente",Window:"Janela","Font Size":"Tamanho do Tipo de Letra","Text Edge Style":"Estilo do Contorno do Texto",None:"Nenhum",Raised:"Alto Relevo",Depressed:"Baixo Relevo",Uniform:"Uniforme",Dropshadow:"Sombra","Font Family":"Família de Tipos de Letra","Monospace Serif":"Serif Não Proporcional","Proportional Serif":"Serif Proporcional","Monospace Sans-Serif":"Sans-Serif Não Proporcional","Proportional Sans-Serif":"Sans-Serif Proporcional",Casual:"Casual",Script:"Script","Small Caps":"Maiúsculas Pequenas",Defaults:"Predefinições",Done:"Concluído",Link:"Ligar",Embed:"Incorporar",Close:"Fechar",Copy:"Copiar","Copy Url":"Copiar URL","Embed Code":"Código de Incorporação",English:"Inglês","volume level":"nível do volume","video progress bar":"barra de progresso do vídeo","playback speed level":"nível da velocidade de reprodução","Dolby Digital":"Dolby Digital",Stereo:"Estéreo","Captions Menu":"Menu de Legendas de Áudio","Subtitles Menu":"Menu de Legendas","Need Text":"Necessita de Texto",Download:"Transferir","Go to live":"Ir para transmissão em direto","End Time":"Hora de Fim"},d["default"].prototype.options_.languages.pt=d["default"].prototype.options_.languages["pt-pt"]},{"../video.js/src/js/player.js":124}],49:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.ro={Play:"Redare",Pause:"Pauză","Current Time":"Ora curentă","Duration Time":"Durata de timp","Remaining Time":"Timp rămas","Stream Type":"Tip de flux",LIVE:"LIVE",Loaded:"Încărcat",Progress:"Progres",Fullscreen:"Ecran complet","Non-Fullscreen":"Nu este pe ecran complet",Mute:"Dezactivare sunet",Unmute:"Activare sunet","Playback Rate":"Rată de redare",Subtitles:"Subtitrări","Subtitles Off":"subtitrări dezactivate",Captions:"Legende","Captions Off":"legende dezactivate",Chapters:"Capitole",Off:"Dezactivat",Quality:"Calitate",Auto:"Auto","Audio Tracks":"Piese audio","default":"implicit","Cast To Device":"Difuzare la dispozitiv",Share:"Partajare",Volume:"Volum","Playback Speed":"Viteză de redare","Video Quality":"Calitate video","Closed Captioning":"Subtitrare complexă","Share Video":"Partajare video","Next Track":"Piesa următoare","Previous Track":"Piesa anterioară","Skip Forward":"Salt înainte","Skip Backward":"Salt înapoi","Fast Forward":"Derulare rapidă",Rewind:"Derulare înapoi","Next Frame":"Cadrul următor","Previous Frame":"Cadrul anterior",Settings:"Setări",Options:"Opțiuni","More Options":"Mai multe opțiuni",Zoom:"Zoom","Zoom In":"Mărire","Zoom Out":"Micșorare","Audio Only":"Doar audio","Picture in Picture":"Imagine în imagine","Camera Angle":"Unghi cameră",MEDIA_ERR_ABORTED:"Redare video anulată",MEDIA_ERR_NETWORK:"O eroare de rețea a determinat nereușita parțială a descărcării videoclipului. Verificați conexiunea la rețea sau încercați din nou mai târziu.",MEDIA_ERR_DECODE:"Videoclipul nu a putut fi încărcat din cauza unei erori de server sau rețea sau pentru că formatul nu este acceptat.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Redarea video a fost abandonată din cauza unei probleme de deteriorare sau pentru că videoclipul a utilizat caracteristici pe care browserul nu le acceptă.",MEDIA_ERR_ENCRYPTED:"Nu se poate decripta sursa video criptată.",SRC_PLAYER_MISMATCH:"Nu s-a găsit nicio sursă compatibilă pentru mediul de browser curent.",MEDIA_ERR_UNKNOWN:"Eroare necunoscută",SKIP_AD_COUNTDOWN_FORMAT:"Ignorați publicitatea în {0}...",SKIP:"Ignorați",AD_TIMING_INFO:"Publicitate - {0} secunde","Media Player":"Player media","Play Video":"Redare video",Foreground:"Prim plan",White:"Alb",Black:"Negru",Red:"Roșu",Green:"Verde",Blue:"Albastru",Yellow:"Galben",Magenta:"Fucsia",Cyan:"Bleu",Opaque:"Opac","Semi-Opaque":"Semiopac",Transparent:"Transparent",Window:"Fereastră","Font Size":"Dimensiune font","Text Edge Style":"Stil muchie text",None:"Fără",Raised:"Ridicat",Depressed:"Presat",Uniform:"Uniform",Dropshadow:"Umbră căzută","Font Family":"Familie de fonturi","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Casual",Script:"Script","Small Caps":"Majuscule reduse",Defaults:"Valori implicite",Done:"Gata",Link:"Link",Embed:"Încorporare",Close:"Închidere",Copy:"Copiere","Copy Url":"Copiere URL","Embed Code":"Cod de încorporare",English:"Engleză","volume level":"nivel volum","video progress bar":"bară de progres video","playback speed level":"nivel viteză de redare","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Meniul Legende","Subtitles Menu":"Meniul Subtitrări","Need Text":"Text necesar",Download:"Descărcare","Go to live":"Treceți la transmisiunea în direct","End Time":"Ora de sfârșit"}},{"../video.js/src/js/player.js":124}],50:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.ru={Play:"Воспроизведение",Pause:"Пауза","Current Time":"Текущее время","Duration Time":"Длительность","Remaining Time":"Оставшееся время","Stream Type":"Тип потока",LIVE:"ПРЯМАЯ ТРАНСЛЯЦИЯ",Loaded:"Загружен",Progress:"Прогресс",Fullscreen:"Полный экран","Non-Fullscreen":"Неполный экран",Mute:"Отключить звук",Unmute:"Включить звук","Playback Rate":"Скорость воспроизведения",Subtitles:"Субтитры","Subtitles Off":"отключить субтитры",Captions:"Подписи","Captions Off":"отключить подписи",Chapters:"Части",Off:"Выкл.",Quality:"Качество",Auto:"Авто","Audio Tracks":"Звуковые дорожки","default":"по умолчанию","Cast To Device":"Транслировать на устройство",Share:"Общий доступ",Volume:"Звук","Playback Speed":"Скорость воспроизведения","Video Quality":"Качество видео","Closed Captioning":"Кодированные субтитры","Share Video":"Поделиться видео","Next Track":"Следующая дорожка","Previous Track":"Предыдущая дорожка","Skip Forward":"Переход вперед","Skip Backward":"Переход назад","Fast Forward":"Перемотка вперед",Rewind:"Перемотка назад","Next Frame":"Следующий кадр","Previous Frame":"Предыдущий кадр",Settings:"Параметры",Options:"Параметры","More Options":"Дополнительные параметры",Zoom:"Масштаб","Zoom In":"Увеличить","Zoom Out":"Уменьшить","Audio Only":"Только аудио","Picture in Picture":"Картинка в картинке","Camera Angle":"Расположение камеры",MEDIA_ERR_ABORTED:"Воспроизведение видео прервано.",MEDIA_ERR_NETWORK:"Ошибка сети привела к сбою в процессе загрузки видеозаписи. Проверьте сетевое подключение или повторите попытку позднее.",MEDIA_ERR_DECODE:"Не удается загрузить видеозапись из-за неполадок в работе сервера или сети или из-за неподдерживаемого формата.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Воспроизведение видеозаписи было прервано из-за неполадки или в связи с тем, что видеозапись использует функции, которые не поддерживаются в браузере.",MEDIA_ERR_ENCRYPTED:"Не удается расшифровать зашифрованный источник видео.",SRC_PLAYER_MISMATCH:"Для текущей среды браузера совместимый источник не найден.",MEDIA_ERR_UNKNOWN:"Произошла неизвестная ошибка.",SKIP_AD_COUNTDOWN_FORMAT:"Пропустить рекламу через {0}…",SKIP:"Пропустить",AD_TIMING_INFO:"Реклама: {0} с","Media Player":"Проигрыватель мультимедиа","Play Video":"Воспроизвести видео",Foreground:"Цвет",White:"Белый",Black:"Черный",Red:"Красный",Green:"Зеленый",Blue:"Синий",Yellow:"Желтый",Magenta:"Пурпурный",Cyan:"Голубой",Opaque:"Непрозрачный","Semi-Opaque":"Полупрозрачный",Transparent:"Прозрачный",Window:"Окно","Font Size":"Размер шрифта","Text Edge Style":"Стиль контура текста",None:"Нет",Raised:"Выпуклый",Depressed:"Утопленный",Uniform:"Однородный",Dropshadow:"С тенью","Font Family":"Семейство шрифтов","Monospace Serif":"Моноширинный с засечками","Proportional Serif":"Пропорциональный с засечками","Monospace Sans-Serif":"Моноширинный без засечек","Proportional Sans-Serif":"Пропорциональный без засечек",Casual:"Неформальный",Script:"Текст","Small Caps":"Малые прописные",Defaults:"Настройки по умолчанию",Done:"Готово",Link:"Отправить ссылку",Embed:"Внедрить",Close:"Закрыть",Copy:"Копировать","Copy Url":"Копировать URL-адрес","Embed Code":"Отправить код внедрения",English:"Перевод с английского","volume level":"уровень громкости","video progress bar":"индикатор воспроизведения видео","playback speed level":"скорость воспроизведения","Dolby Digital":"Dolby Digital",Stereo:"Стерео","Captions Menu":"Меню подписей","Subtitles Menu":"Меню субтитров","Need Text":"Требуется текст",Download:"Скачать","Go to live":"Перейти к трансляции","End Time":"Время окончания"}},{"../video.js/src/js/player.js":124}],51:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.sk={Play:"Prehrať",Pause:"Pozastaviť","Current Time":"Aktuálny čas","Duration Time":"Čas trvania","Remaining Time":"Zostávajúci čas","Stream Type":"Typ streamu",LIVE:"NAŽIVO",Loaded:"Načítané",Progress:"Priebeh",Fullscreen:"Na celú obrazovku","Non-Fullscreen":"Nie na celú obrazovku",Mute:"Stlmiť",Unmute:"Zrušiť stlmenie","Playback Rate":"Rýchlosť prehrávania",Subtitles:"Titulky","Subtitles Off":"vypnuté titulky",Captions:"Popisy","Captions Off":"vypnuté popisy",Chapters:"Kapitoly",Off:"Vypnuté",Quality:"Kvalita",Auto:"Automaticky","Audio Tracks":"Zvukové stopy","default":"predvolená hodnota","Cast To Device":"Vysielanie do zariadenia",Share:"Zdieľať",Volume:"Hlasitosť","Playback Speed":"Rýchlosť prehrávania","Video Quality":"Kvalita videa","Closed Captioning":"Skryté titulkovanie","Share Video":"Zdieľať video","Next Track":"Nasledujúca stopa","Previous Track":"Predchádzajúca stopa","Skip Forward":"Preskočiť dopredu","Skip Backward":"Preskočiť dozadu","Fast Forward":"Posunúť dopredu",Rewind:"Posunúť dozadu","Next Frame":"Nasledujúca snímka","Previous Frame":"Predchádzajúca snímka",Settings:"Nastavenia",Options:"Možnosti","More Options":"Ďalšie možnosti",Zoom:"Lupa","Zoom In":"Priblížiť","Zoom Out":"Vzdialiť","Audio Only":"Iba zvuk","Picture in Picture":"Obraz v obraze","Camera Angle":"Uhol kamery",MEDIA_ERR_ABORTED:"Prehrávanie videa bolo prerušené.",MEDIA_ERR_NETWORK:"Chyba siete spôsobila zlyhanie počas sťahovania videa. Skontrolujte sieťové pripojenie alebo to skúste znova neskôr.",MEDIA_ERR_DECODE:"Video sa nepodarilo načítať. Dôvodom je buď zlyhanie servera alebo siete, alebo nepodporovaný formát.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Prehrávanie videa bolo prerušené z dôvodu problému spôsobeného poškodením alebo preto, lebo sa vo videu používali funkcie, ktoré váš prehliadač nepodporoval.",MEDIA_ERR_ENCRYPTED:"Nie je možné dešifrovať zašifrovaný zdroj videa.",SRC_PLAYER_MISMATCH:"Nenašiel sa kompatibilný zdroj pre aktuálne prostredie prehliadača.",MEDIA_ERR_UNKNOWN:"Vyskytla sa neznáma chyba",SKIP_AD_COUNTDOWN_FORMAT:"Preskočiť reklamu o {0}...",SKIP:"Preskočiť",AD_TIMING_INFO:"{0}-sekundová reklama","Media Player":"Prehrávač médií","Play Video":"Prehrať video",Foreground:"Popredie",White:"Biela",Black:"Čierna",Red:"Červená",Green:"Zelená",Blue:"Modrá",Yellow:"Žltá",Magenta:"Purpurová",Cyan:"Azúrová",Opaque:"Nepriehľadné","Semi-Opaque":"Čiastočne priehľadné",Transparent:"Priehľadné",Window:"Okno","Font Size":"Veľkosť písma","Text Edge Style":"Štýly okrajov textu",None:"Žiadny",Raised:"Zvýšený",Depressed:"Znížený",Uniform:"Jednotný",Dropshadow:"Tieňovaný","Font Family":"Séria písiem","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Neformálne",Script:"Skriptové","Small Caps":"Kapitálky",Defaults:"Predvolené",Done:"Hotovo",Link:"Prepojenie",Embed:"Vložiť",Close:"Zavrieť",Copy:"Kopírovať","Copy Url":"Kopírovať URL adresu","Embed Code":"Vložiť kód",English:"Angličtina","volume level":"úroveň hlasitosti","video progress bar":"indikátor priebehu videa","playback speed level":"úroveň rýchlosti prehrávania","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Ponuka popisov","Subtitles Menu":"Ponuka titulkov","Need Text":"Potrebný text",Download:"Stiahnuť","Go to live":"Prejsť na živý stream","End Time":"Koncový čas"}},{"../video.js/src/js/player.js":124}],52:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.sl={Play:"Predvajaj",Pause:"Premor","Current Time":"Trenutni čas","Duration Time":"Čas trajanja","Remaining Time":"Preostali čas","Stream Type":"Vrsta pretoka",LIVE:"V ŽIVO",Loaded:"Naloženo",Progress:"Napredek",Fullscreen:"Celozaslonski način","Non-Fullscreen":"Ni v celozaslonskem načinu",Mute:"Izklopi zvok",Unmute:"Vklopi zvok","Playback Rate":"Hitrost predvajanja",Subtitles:"Podnaslovi","Subtitles Off":"podnaslovi so izklopljeni",Captions:"Napisi","Captions Off":"napisi so izklopljeni",Chapters:"Poglavja",Off:"Izklopljeno",Quality:"Kakovost",Auto:"Samodejno","Audio Tracks":"Zvočni posnetki","default":"privzeto","Cast To Device":"Predvajaj v napravo",Share:"Skupna raba",Volume:"Glasnost","Playback Speed":"Hitrost predvajanja","Video Quality":"Kakovost videa","Closed Captioning":"Razširjeni podnapisi","Share Video":"Skupna raba videa","Next Track":"Naslednja skladba","Previous Track":"Prejšnja skladba","Skip Forward":"Skoči naprej","Skip Backward":"Skoči nazaj","Fast Forward":"Hitro naprej",Rewind:"Hitro nazaj","Next Frame":"Naslednji okvir","Previous Frame":"Prejšnji okvir",Settings:"Nastavitve",Options:"Možnosti","More Options":"Dodatne možnosti",Zoom:"Povečava","Zoom In":"Povečava","Zoom Out":"Pomanjšava","Audio Only":"Samo zvok","Picture in Picture":"Slika v sliki","Camera Angle":"Kot fotoaparata",MEDIA_ERR_ABORTED:"Preklic predvajanja videa.",MEDIA_ERR_NETWORK:"Zaradi napake omrežja je prišlo med prenosom videa do napake. Preverite omrežno povezave ali poskusite znova pozneje.",MEDIA_ERR_DECODE:"Videa ni mogoče naložiti, bodisi zato, ker je prišlo do napake v strežniku ali omrežju, bodisi zato, ker oblika zapisa ni podprta.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Predvajanje videa je bilo prekinjeno, ker je prišlo do težave zaradi ali ker video uporablja funkcije, ki jih brskalnik ne podpira.",MEDIA_ERR_ENCRYPTED:"Šifriranega vira videa ni mogoče dešifrirati.",SRC_PLAYER_MISMATCH:"Ni mogoče najti združljivega vira videa za trenutno okolje brskalnika.",MEDIA_ERR_UNKNOWN:"Prišlo je do neznane napake",SKIP_AD_COUNTDOWN_FORMAT:"Preskoči oglas čez {0} ...",SKIP:"Preskoči",AD_TIMING_INFO:"{0}-sekundni oglas","Media Player":"Media Player","Play Video":"Predvajaj video",Foreground:"Ospredje",White:"Bela",Black:"Črna",Red:"Rdeča",Green:"Zelena",Blue:"Modra",Yellow:"Rumena",Magenta:"Magenta",Cyan:"Cijan",Opaque:"Neprozorno","Semi-Opaque":"Delno neprozorno",Transparent:"Prosojno",Window:"Okno","Font Size":"Velikost pisave","Text Edge Style":"Slog besedila roba",None:"Brez",Raised:"Dvignjeno",Depressed:"Pritisnjeno",Uniform:"Enotno",Dropshadow:"Spustna senca","Font Family":"Družina pisav","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Vsakdanje",Script:"Skript","Small Caps":"Pomanjšane velike črke",Defaults:"Privzete nastavitve",Done:"Dokončano",Link:"Povezava",Embed:"Vdelaj",Close:"Zapri",Copy:"Kopiraj","Copy Url":"Kopiraj URL","Embed Code":"Vdelana koda",English:"angleščina","volume level":"glasnost","video progress bar":"vrstica napredovanja videoposnetka","playback speed level":"hitrost predvajanja","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Meni z napisi","Subtitles Menu":"Meni s podnaslovi","Need Text":"Obvezno besedilo",Download:"Prenesi","Go to live":"Vsebina v živo","End Time":"Končni čas"},d["default"].prototype.options_.languages["sl-si"]=d["default"].prototype.options_.languages.sl},{"../video.js/src/js/player.js":124}],53:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages["sr-cyrl-cs"]={Play:"Репродукуј",Pause:"Паузирај","Current Time":"Тренутно време","Duration Time":"Време трајања","Remaining Time":"Преостало време","Stream Type":"Врста стрима",LIVE:"УЖИВО",Loaded:"Учитано",Progress:"Ток",Fullscreen:"Цео екран","Non-Fullscreen":"Не преко целог екрана",Mute:"Привремено искључи",Unmute:"оново укључи","Playback Rate":"Брзина репродукције",Subtitles:"Титлови","Subtitles Off":"титлови су искључени",Captions:"Натписи","Captions Off":"натписи су искључени",Chapters:"Поглавља",Off:"Искључено",Quality:"Квалитет",Auto:"Аутоматски","Audio Tracks":"Аудио нумере","default":"подразумевано","Cast To Device":"Пребацивање на уређај",Share:"Дели",Volume:"Јачина звука","Playback Speed":"Брзина репродукције","Video Quality":"Квалитет видео записа","Closed Captioning":"Скривени титлови","Share Video":"Дели видео","Next Track":"Следећа нумера","Previous Track":"Претходна нумера","Skip Forward":"Прескочи унапред","Skip Backward":"Прескочи уназад","Fast Forward":"Премотај унапред",Rewind:"Премотај уназад","Next Frame":"Следећа слика ","Previous Frame":"Претходна слика",Settings:"Поставке",Options:"Опције","More Options":"Више опција",Zoom:"Зум","Zoom In":"Увећај","Zoom Out":"Умањи","Audio Only":"Само звук","Picture in Picture":"Слика у слици","Camera Angle":"Угао камере",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_ENCRYPTED:"MEDIA_ERR_ENCRYPTED",SRC_PLAYER_MISMATCH:"SRC_PLAYER_MISMATCH",MEDIA_ERR_UNKNOWN:"MEDIA_ERR_UNKNOWN",SKIP_AD_COUNTDOWN_FORMAT:"Прескочи оглас за {0}...",SKIP:"Прескочи",AD_TIMING_INFO:"Оглас траје секунди: {0}",Download:"Преузми","Go to live":"Пређи на пренос уживо","End Time":"Време завршетка"}},{"../video.js/src/js/player.js":124}],54:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages["sr-latn-rs"]={Play:"Reprodukuj",Pause:"Pauziraj","Current Time":"Trenutno vreme","Duration Time":"Vreme trajanja","Remaining Time":"Preostalo vreme","Stream Type":"Tip toka",LIVE:"UŽIVO",Loaded:"Učitano",Progress:"Tok",Fullscreen:"Preko celog ekrana","Non-Fullscreen":"Nije preko celog ekrana",Mute:"Privremeno isključi",Unmute:"Ponovo uključi","Playback Rate":"Stopa reprodukcije",Subtitles:"Titl","Subtitles Off":"titl je isključen",Captions:"Natpisi","Captions Off":"natpisi su isključeni",Chapters:"Poglavlja",Off:"Isključeno",Quality:"Kvalitet",Auto:"Automatski","Audio Tracks":"Audio zapisi","default":"podrazumevano","Cast To Device":"Prebaci na uređaj",Share:"Deli",Volume:"Jačina zvuka","Playback Speed":"Brzina reprodukcije","Video Quality":"Kvalitet video zapisa","Closed Captioning":"Skriveni titlovi","Share Video":"Deli video","Next Track":"Sledeći zapis","Previous Track":"Prethodni zapis","Skip Forward":"Preskoči unapred","Skip Backward":"Preskoči unazad","Fast Forward":"Premotaj unapred",Rewind:"Premotaj unazad","Next Frame":"Sledeći okvir","Previous Frame":"Prethodni okvir",Settings:"Postavke",Options:"Opcije","More Options":"Još opcija",Zoom:"Zumiraj","Zoom In":"Uvećaj","Zoom Out":"Umanji","Audio Only":"Samo zvuk","Picture in Picture":"Slika u slici","Camera Angle":"Ugao kamere",MEDIA_ERR_ABORTED:"Reprodukcija video zapisa je prekinuta.",MEDIA_ERR_NETWORK:"Usled greške na mreži došlo je do otkazivanja tokom preuzimanja video zapisa. Proverite mrežnu vezu ili pokušajte ponovo kasnije.",MEDIA_ERR_DECODE:"Nije moguće preuzeti video zbog toga što je došlo do otkazivanja na serveru ili mreži ili zbog toga što format nije podržan.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Reprodukcija video zapisa je prekinuta zbog problema sa oštećenjem ili zbog toga što video koristi funkcije koje pregledač ne podržava.",MEDIA_ERR_ENCRYPTED:"Nije moguće dešifrovati šifrovani izvor video zapisa.",SRC_PLAYER_MISMATCH:"Za aktuelno okruženje pregledača nije pronađen nijedan kompatibilan izvor.",MEDIA_ERR_UNKNOWN:"Došlo je do nepoznate greške",SKIP_AD_COUNTDOWN_FORMAT:"Preskoči oglas za {0}...",SKIP:"Preskoči",AD_TIMING_INFO:"Oglas traje sekundi: {0}","Media Player":"Media Player","Play Video":"Reprodukuj video",Foreground:"Prednji plan",White:"Bela",Black:"Crna",Red:"Crvena",Green:"Zelena",Blue:"Plava",Yellow:"Žuta",Magenta:"Magenta",Cyan:"Cijan",Opaque:"Neprozirno","Semi-Opaque":"Poluprozirno",Transparent:"Prozirno",Window:"Prozor","Font Size":"Veličina fonta","Text Edge Style":"Stil ivice teksta",None:"Nijedno",Raised:"Izdignuto",Depressed:"Utisnuto",Uniform:"Podjednako",Dropshadow:"Efekat senke","Font Family":"Porodica fontova","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Casual",Script:"Skripta","Small Caps":"Mala slova",Defaults:"Podrazumevane vrednosti",Done:"Gotovo",Link:"Veza",Embed:"Ugradi",Close:"Zatvori",Copy:"Kopiranje","Copy Url":"Kopiraj Url","Embed Code":"Ugradi kôd",English:"engleski","volume level":"nivo jačine zvuka","video progress bar":"traka toka video snimka","playback speed level":"brzina reprodukcije","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Meni „Natpisi“","Subtitles Menu":"Meni „Titl“","Need Text":"Potreban je tekst",Download:"Preuzmi","Go to live":"Pređi na prenos uživo","End Time":"Vreme završetka"},d["default"].prototype.options_.languages.sr=d["default"].prototype.options_.languages["sr-latn-rs"]},{"../video.js/src/js/player.js":124}],55:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.sv={Play:"Spela upp",Pause:"Pausa","Current Time":"Aktuell tid","Duration Time":"Varaktighet","Remaining Time":"Återstående tid","Stream Type":"Strömtyp",LIVE:"LIVE",Loaded:"Inläst",Progress:"Förlopp",Fullscreen:"Helskärm","Non-Fullscreen":"Ej helskärm",Mute:"Ljud av",Unmute:"Ljud på","Playback Rate":"Uppspelningshastighet",Subtitles:"Textning","Subtitles Off":"Textning av",Captions:"Bildtexter","Captions Off":"Bildtexter av",Chapters:"Kapitel",Off:"Av",Quality:"Kvalitet",Auto:"Auto","Audio Tracks":"Ljudspår","default":"standard","Cast To Device":"Sänd till enhet",Share:"Dela",Volume:"Volym","Playback Speed":"Uppspelningshastighet","Video Quality":"Videokvalitet","Closed Captioning":"Textning","Share Video":"Dela video","Next Track":"Nästa spår","Previous Track":"Föregående spår","Skip Forward":"Hoppa framåt","Skip Backward":"Hoppa bakåt","Fast Forward":"Snabbspola framåt",Rewind:"Bakåt","Next Frame":"Nästa bildruta","Previous Frame":"Föregående bildruta",Settings:"Inställningar",Options:"Alternativ","More Options":"Fler alternativ",Zoom:"Zooma","Zoom In":"Zooma in","Zoom Out":"Zooma ut","Audio Only":"Endast ljud","Picture in Picture":"Bild-i-bild","Camera Angle":"Kameravinkel",MEDIA_ERR_ABORTED:"Videouppspelning avbruten.",MEDIA_ERR_NETWORK:"Ett nätverksfel gjorde att hämtningen av videon avbröts. Kontrollera din nätverksanslutning och försök igen senare.",MEDIA_ERR_DECODE:"Det gick inte att läsa in den här videon. Det kan bero på att servern eller nätverket inte fungerade eller på att formatet inte stöds.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Videouppspelningen avbröts pga att den var skadad eller därför att videon använder funktioner som din webbläsare inte stöder.",MEDIA_ERR_ENCRYPTED:"Det gick inte att dekryptera den krypterade videokällan.",SRC_PLAYER_MISMATCH:"Ingen kompatibel källa har hittats för den aktuella webbläsarmiljön.",MEDIA_ERR_UNKNOWN:"Det har uppstått ett oväntat fel.",SKIP_AD_COUNTDOWN_FORMAT:"Hoppa över reklamen om {0}...",SKIP:"Hoppa över",AD_TIMING_INFO:"Reklam {0} sekunder","Media Player":"Media Player","Play Video":"Spela upp video",Foreground:"Förgrund",White:"Vit",Black:"Svart",Red:"Röd",Green:"Grön",Blue:"Blå",Yellow:"Gul",Magenta:"Magenta",Cyan:"Cyan",Opaque:"Täckande","Semi-Opaque":"Halvtäckande",Transparent:"Transparent",Window:"Fönster","Font Size":"Teckenstorlek","Text Edge Style":"Textkantsformat",None:"Inget",Raised:"Upphöjt",Depressed:"Nedsänkt",Uniform:"Enhetligt",Dropshadow:"Skugga","Font Family":"Teckensnittsfamilj","Monospace Serif":"Fast bredd, serif","Proportional Serif":"Proportionerligt, serif","Monospace Sans-Serif":"Fast bredd, sans-serif","Proportional Sans-Serif":"Proportionerligt, sans-serif",Casual:"Enstaka",Script:"Skript","Small Caps":"Kapitäler",Defaults:"Standard",Done:"Klart",Link:"Länk",Embed:"Bädda in",Close:"Stänga",Copy:"Kopiera","Copy Url":"Kopiera URL","Embed Code":"Bädda in kod",English:"Engelska","volume level":"volymnivå","video progress bar":"förloppsindikator för video","playback speed level":"hastighetsnivå för uppspelning","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Meny för beskrivningar","Subtitles Menu":"Meny för undertexter","Need Text":"Behöver text",Download:"Hämta","Go to live":"Gå live","End Time":"Sluttid"},d["default"].prototype.options_.languages["sv-se"]=d["default"].prototype.options_.languages.sv},{"../video.js/src/js/player.js":124}],56:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.th={
Play:"เล่น",Pause:"หยุดชั่วคราว","Current Time":"เวลาปัจจุบัน","Duration Time":"ระยะเวลา","Remaining Time":"เวลาที่เหลือ","Stream Type":"ประเภทของสตรีม",LIVE:"ถ่ายทอดสด",Loaded:"โหลดแล้ว",Progress:"ความคืบหน้า",Fullscreen:"เต็มหน้าจอ","Non-Fullscreen":"ไม่ใช่แบบเต็มหน้าจอ",Mute:"ปิดเสียง",Unmute:"เปิดเสียง","Playback Rate":"อัตราในการเล่น",Subtitles:"คำบรรยาย","Subtitles Off":"ปิดคำบรรยาย",Captions:"คำอธิบายภาพ","Captions Off":"ปิดคำอธิบายภาพ",Chapters:"บท",Off:"ปิด",Quality:"คุณภาพ",Auto:"อัตโนมัติ","Audio Tracks":"แทร็กเสียง","default":"ค่าเริ่มต้น","Cast To Device":"แปลงไปยังอุปกรณ์",Share:"แชร์",Volume:"ระดับเสียง","Playback Speed":"ความเร็วในการเล่น","Video Quality":"คุณภาพของวิดีโอ","Closed Captioning":"คำอธิบายภาพปิดอยู่","Share Video":"แชร์วิดีโอ","Next Track":"แทร็กถัดไป","Previous Track":"แทร็กก่อนหน้า","Skip Forward":"ข้ามไปข้างหน้า","Skip Backward":"ข้ามไปข้างหลัง","Fast Forward":"กรอไปข้างหน้า",Rewind:"กรอกลับ","Next Frame":"เฟรมถัดไป","Previous Frame":"เฟรมก่อนหน้า",Settings:"การตั้งค่า",Options:"ตัวเลือก","More Options":"ตัวเลือกเพิ่มเติม",Zoom:"ย่อ/ขยาย","Zoom In":"ขยาย","Zoom Out":"ย่อ","Audio Only":"เสียงเท่านั้น","Picture in Picture":"วิดีโอในวิดีโอ","Camera Angle":"มุมกล้อง",MEDIA_ERR_ABORTED:"ยกเลิกการเล่นวิดีโอแล้ว",MEDIA_ERR_NETWORK:"ข้อผิดพลาดของเครือข่ายเป็นสาเหตุให้การดาวน์โหลดวิดีโอล้มเหลว โปรดตรวจสอบการเชื่อมต่อเครือข่ายของคุณหรือลองอีกครั้งในภายหลัง",MEDIA_ERR_DECODE:"ไม่สามารถโหลดวิดีโอได้ อาจเนื่องมาจากเซิร์ฟเวอร์หรือเครือข่ายล้มเหลว หรือเนื่องจากรูปแบบไม่ได้รับการสนับสนุน",MEDIA_ERR_SRC_NOT_SUPPORTED:"การเล่นวิดีโอถูกยกเลิกเนื่องจากปัญหาเกี่ยวกับความเสียหาย หรือเนื่องจากวิดีโอใช้ฟีเจอร์ที่เบราว์เซอร์ของคุณไม่สนับสนุน",MEDIA_ERR_ENCRYPTED:"ไม่สามารถถอดรหัสแหล่งวิดีโอที่เข้ารหัสลับไว้ได้",SRC_PLAYER_MISMATCH:"ไม่พบแหล่งที่เข้ากันได้สำหรับสภาพแวดล้อมเบราว์เซอร์ปัจจุบัน",MEDIA_ERR_UNKNOWN:"มีข้อผิดพลาดที่ไม่รู้จักเกิดขึ้น",SKIP_AD_COUNTDOWN_FORMAT:"ข้ามโฆษณาใน {0}...",SKIP:"ข้าม",AD_TIMING_INFO:"โฆษณา {0} วินาที","Media Player":"โปรแกรมเล่นสื่อ","Play Video":"เล่นวิดีโอ",Foreground:"พื้นหน้า",White:"สีขาว",Black:"สีดำ",Red:"สีแดง",Green:"สีเขียว",Blue:"สีน้ำเงิน",Yellow:"สีเหลือง",Magenta:"สีบางเย็น",Cyan:"สีฟ้า",Opaque:"ทึบ","Semi-Opaque":"กึ่งทึบ",Transparent:"โปร่งใส",Window:"หน้าต่าง","Font Size":"ขนาดฟอนต์","Text Edge Style":"สไตล์ขอบข้อความ",None:"ไม่มี",Raised:"ปัดเศษ",Depressed:"กด",Uniform:"เครื่องแบบ",Dropshadow:"เงาตกกระทบ","Font Family":"ครอบครัวฟอนต์","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Casual",Script:"สคริปต์","Small Caps":"ตัวพิมพ์ใหญ่ขนาดเล็ก",Defaults:"ใช้ค่าเริ่มต้น",Done:"เสร็จสมบูรณ์",Link:"ลิงก์",Embed:"ฝัง",Close:"ปิด",Copy:"คัดลอก","Copy Url":"คัดลอก Url","Embed Code":"โค้ดฝังตัว",English:"อังกฤษ","volume level":"ระดับเสียง","video progress bar":"แถบความคืบหน้าวิดีโอ","playback speed level":"ระดับความเร็วในการเล่น","Dolby Digital":"เสียง Dolby ดิจิทัล",Stereo:"สเตอริโอ","Captions Menu":"เมนูคำอธิบายภาพ","Subtitles Menu":"เมนูคำบรรยาย","Need Text":"ต้องการข้อความ",Download:"ดาวน์โหลด","Go to live":"ไปที่การถ่ายทอดสด","End Time":"เวลาสิ้นสุด"}},{"../video.js/src/js/player.js":124}],57:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.tl={Play:"I-play",Pause:"I-pause","Current Time":"Kasalukuyang Oras","Duration Time":"Oras ng Tagal","Remaining Time":"Nalalabing Oras","Stream Type":"Uri ng Stream",LIVE:"Live",Loaded:"Loaded",Progress:"Progreso",Fullscreen:"Fullscreen","Non-Fullscreen":"Hindi-Fullscreen",Mute:"I-mute",Unmute:"I-unmute","Playback Rate":"Rate ng Playback",Subtitles:"Mga subtitle","Subtitles Off":"Naka-off ang subtitle",Captions:"Mga Caption","Captions Off":"Naka-off ang Caption",Chapters:"Mga chapter",Off:"I-off",Quality:"Kalidad",Auto:"Awto","Audio Tracks":"Mga Track ng Audio","default":"default","Cast To Device":"I-Cast Sa Device",Share:"Ibahagi",Volume:"Volume","Playback Speed":"Bilis ng Playback","Video Quality":"Kalidad ng Video","Closed Captioning":"Isara ang Captioning","Share Video":"Ibahagi ang Video","Next Track":"Susunod na Track","Previous Track":"Nakaraang Track","Skip Forward":"I-skip Pauna","Skip Backward":"I-skip Pabalik","Fast Forward":"I-fast forward",Rewind:"I-rewind","Next Frame":"Susunod na Frame","Previous Frame":"Nakaraang Frame",Settings:"Mga Setting",Options:"Mga Opsyon","More Options":"Iba Pang Mga Opsyon",Zoom:"I-zoom","Zoom In":"I-zoom in","Zoom Out":"I-zoom out","Audio Only":"Audio Lamang","Picture in Picture":"Larawan sa Larawan","Camera Angle":"Anggulo ng Camera",MEDIA_ERR_ABORTED:"Nahinto ang playback ng video",MEDIA_ERR_NETWORK:"Ang error sa network ang dahilan kung bakit nabigo ang pag-download ng video. Pakitingnan ang konkesyon ng iyong network at subukang muli.",MEDIA_ERR_DECODE:"Hindi mai-load ang video, marahil dahil nabigo ang server o network o dahil hindi suportado ang format.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Nahinto ang playback ng video dahil sa sa pagkasira o dahil hindi suportado ng browser ang video ng ginamit na mga tampok.",MEDIA_ERR_ENCRYPTED:"Hindi ma-decrypt ang source ng naka-encrypt na video.",SRC_PLAYER_MISMATCH:"Walang nakitang tugmang source para sa kasalukuyang browser.",MEDIA_ERR_UNKNOWN:"May nangyaring hindi kilalang error"},d["default"].prototype.options_.languages["tl-ph"]=d["default"].prototype.options_.languages.tl},{"../video.js/src/js/player.js":124}],58:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.tr={Play:"Yürüt",Pause:"Duraklat","Current Time":"Geçerli Zaman","Duration Time":"Süre","Remaining Time":"Kalan Süre","Stream Type":"Akış Türü",LIVE:"CANLI",Loaded:"Yüklendi",Progress:"İlerleme Durumu",Fullscreen:"Tam Ekran","Non-Fullscreen":"Tam Ekrandan Çık",Mute:"Sesi Kapat",Unmute:"Sesi Aç","Playback Rate":"Kayıttan Yürütme Hızı",Subtitles:"Alt Yazılar","Subtitles Off":"alt yazılar kapalı",Captions:"Açıklamalı Alt Yazılar","Captions Off":"açıklamalı alt yazılar kapalı",Chapters:"Bölümler",Off:"Kapalı",Quality:"Kalite",Auto:"Otomatik","Audio Tracks":"Ses Parçaları","default":"varsayılan","Cast To Device":"Cihazda Yayınla",Share:"Paylaş",Volume:"Ses Düzeyi","Playback Speed":"Kayıttan Yürütme Hızı","Video Quality":"Video Kalitesi","Closed Captioning":"Kapalı Açıklamalı Alt Yazı","Share Video":"Videoyu Paylaş","Next Track":"Sonraki parça","Previous Track":"Önceki Parça","Skip Forward":"İleri Atla","Skip Backward":"Geri Atla","Fast Forward":"İleri Sar",Rewind:"Geri Sar","Next Frame":"Sonraki Kare","Previous Frame":"Önceki Kare",Settings:"Ayarlar",Options:"Seçenekler","More Options":"Tüm Seçenekler",Zoom:"Yakınlaştır","Zoom In":"Yakınlaştır","Zoom Out":"Uzaklaştır","Audio Only":"Yalnızca Ses","Picture in Picture":"Resim İçinde Resim","Camera Angle":"Kamera Açısı",MEDIA_ERR_ABORTED:"Video kayıttan yürütme durduruldu.",MEDIA_ERR_NETWORK:"Video indirme işlemi bir ağ hatası nedeniyle kısmen başarısız oldu. Lütfen ağ bağlantısını kontrol edin veya daha sonra yeniden deneyin.",MEDIA_ERR_DECODE:"Sunucu veya ağ başarısız olduğundan ya da biçim desteklenmediğinden video yüklenemedi.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Bir bozulma sorunu ya da videoda tarayıcınız tarafından desteklenmeyen özelliklerin kullanılması nedeniyle video kayıttan yürütme durduruldu.",MEDIA_ERR_ENCRYPTED:"Şifreli video kaynağının şifresi çözülemedi.",SRC_PLAYER_MISMATCH:"Geçerli tarayıcı ortamıyla uyumlu kaynak bulunamadı.",MEDIA_ERR_UNKNOWN:"Bilinmeyen bir hata oluştu.",SKIP_AD_COUNTDOWN_FORMAT:"{0} sn içinde reklamı atla",SKIP:"Atla",AD_TIMING_INFO:"Reklam {0} saniye","Media Player":"Media Player","Play Video":"Videoyu Oynat",Foreground:"Ön plan",White:"Beyaz",Black:"Siyah",Red:"Kırmızı",Green:"Yeşil",Blue:"Mavi",Yellow:"Sarı",Magenta:"Eflatun",Cyan:"Camgöbeği",Opaque:"Mat","Semi-Opaque":"Yarı mat",Transparent:"Saydam",Window:"Pencere","Font Size":"Yazı Tipi Boyutu","Text Edge Style":"Metin Kenarı Stili",None:"Hiçbiri",Raised:"Yükseltilmiş",Depressed:"Bastırılmış",Uniform:"Tekdüzen",Dropshadow:"Gölgeli","Font Family":"Yazı Tipi Ailesi","Monospace Serif":"Tek Aralıklı Tırnaklı","Proportional Serif":"Orantılı Tırnaklı","Monospace Sans-Serif":"Tek Aralıklı Tırnaksız","Proportional Sans-Serif":"Orantılı Tırnaksız",Casual:"Günlük",Script:"El Yazısı","Small Caps":"Küçük Büyük Harf",Defaults:"Varsayılanlar",Done:"Bitti",Link:"Bağlantı",Embed:"Ekle",Close:"Kapat",Copy:"Kopyala","Copy Url":"URL’yi Kopyala","Embed Code":"Ekleme Kodu",English:"İngilizce","volume level":"ses düzeyi","video progress bar":"video ilerleme çubuğu","playback speed level":"kayıttan yürütme hızı","Dolby Digital":"Dolby Digital",Stereo:"Stereo","Captions Menu":"Açıklamalı Alt Yazı Menüsü","Subtitles Menu":"Alt Yazı Menüsü","Need Text":"Metin Gerekiyor",Download:"İndir","Go to live":"Canlı yayına git","End Time":"Bitiş Zamanı"}},{"../video.js/src/js/player.js":124}],59:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.uk={Play:"Відтворити",Pause:"Призупинити","Current Time":"Поточний час","Duration Time":"Тривалість","Remaining Time":"Залишок часу","Stream Type":"Тип потоку",LIVE:"LIVE",Loaded:"Завантажено",Progress:"Перебіг виконання",Fullscreen:"Розгорнути","Non-Fullscreen":"Відновити",Mute:"Вимкнути звук",Unmute:"Увімкнути звук","Playback Rate":"Темп відтворення",Subtitles:"Субтитри","Subtitles Off":"вимкнути субтитри",Captions:"Підписи","Captions Off":"вимкнути підписи",Chapters:"Розділи",Off:"Вимкнути",Quality:"Якість",Auto:"Автоматично","Audio Tracks":"Аудіодоріжки","default":"за замовчуванням","Cast To Device":"Перекинути на пристрій",Share:"Спільний доступ",Volume:"Гучність","Playback Speed":"Швидкість відтворення","Video Quality":"Якість відтворення","Closed Captioning":"Приховані субтитри","Share Video":"Спільний доступ до відео","Next Track":"Наступна доріжка","Previous Track":"Попередня доріжка","Skip Forward":"Перейти вперед","Skip Backward":"Перейти назад","Fast Forward":"Перемотати вперед",Rewind:"Перемотати назад","Next Frame":"Наступний кадр","Previous Frame":"Попередній кадр",Settings:"Настройки",Options:"Параметри","More Options":"Додаткові параметри",Zoom:"Масштаб","Zoom In":"Збільшити масштаб","Zoom Out":"Зменшити масштаб","Audio Only":"Тільки аудіо","Picture in Picture":"Кадр у кадрі","Camera Angle":"Кут камери",MEDIA_ERR_ABORTED:"Відтворення відео зупинено.",MEDIA_ERR_NETWORK:"Через помилку мережі завантаження відео не завершено. Перевірте підключення до мережі або спробуйте знову пізніше.",MEDIA_ERR_DECODE:"Не вдалося завантажити відео через помилку сервера чи мережі, або формат не підтримується.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Відтворення відео зупинено через пошкодження, або у відео присутні функції, які не підтримуються у вашому браузері.",MEDIA_ERR_ENCRYPTED:"Не вдалося дешифрувати джерело зашифрованого відео.",SRC_PLAYER_MISMATCH:"Знайдено джерело, несумісне із середовищем поточного браузера.",MEDIA_ERR_UNKNOWN:"Сталася невідома помилка",SKIP_AD_COUNTDOWN_FORMAT:"Рекламу можна пропустити через {0}…",SKIP:"Пропустити",AD_TIMING_INFO:"Реклама: {0} с","Media Player":"Медіапрогравач","Play Video":"Відтворити відео",Foreground:"Активний",White:"Білий",Black:"Чорний",Red:"Червоний",Green:"Зелений",Blue:"Синій",Yellow:"Жовтий",Magenta:"Малиновий",Cyan:"Блакитний",Opaque:"Непрозорий","Semi-Opaque":"Напівпрозорий",Transparent:"Прозорий",Window:"Вікно","Font Size":"Розмір шрифту","Text Edge Style":"Стиль країв тексту",None:"Немає",Raised:"Піднятий",Depressed:"Втиснений",Uniform:"Однорідний",Dropshadow:"Тінь","Font Family":"Сімейство шрифтів","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Неофіційний",Script:"Сценарій","Small Caps":"Зменшені великі букви",Defaults:"За замовчуванням",Done:"Готово",Link:"Посилання",Embed:"Вбудування",Close:"Закрити",Copy:"Копіювати","Copy Url":"Копіювати URL-адресу","Embed Code":"Код вбудовування",English:"Англійська","volume level":"рівень гучності","video progress bar":"панель прокручування відео","playback speed level":"швидкість відтворення","Dolby Digital":"Dolby Digital",Stereo:"Стерео","Captions Menu":"Меню субтитрів (написи)","Subtitles Menu":"Меню субтитрів (звичайні)","Need Text":"Потрібен текст",Download:"Завантажити","Go to live":"Перейти до трансляції","End Time":"Час завершення"},d["default"].prototype.options_.languages["uk-ua"]=d["default"].prototype.options_.languages.uk},{"../video.js/src/js/player.js":124}],60:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.ur={Play:"چلائیں",Pause:"موقوف کریں","Current Time":"موجودہ وقت","Duration Time":"دورانیہ وقت","Remaining Time":"باقی وقت","Stream Type":"سلسلہ کی قسم",LIVE:"لائیو",Loaded:"لوڈ ہوگیا",Progress:"پیشرفت",Fullscreen:"مکمل اسکرین","Non-Fullscreen":"نامکمل اسکرین",Mute:"خاموش کریں",Unmute:"آواز کھولیں","Playback Rate":"پلے بیک کی شرح",Subtitles:"سب ٹائٹلز","Subtitles Off":"سب ٹائٹلز آف",Captions:"کیشنز","Captions Off":"کیشنز آف",Chapters:"ابواب",Off:"آف",Quality:"معیار",Auto:"خودکار","Audio Tracks":"آڈیو ٹریکس","default":"ڈیفالٹ","Cast To Device":"آلہ پر کاسٹ کریں",Share:"اشتراک کریں",Volume:"والیوم","Playback Speed":"پلے بیک رفتار","Video Quality":"ویڈیو کا معیار","Closed Captioning":"بند سرخی","Share Video":"ویڈیو کا اشتراک کریں","Next Track":"اگلا ٹریک","Previous Track":"پچھلا ٹریک","Skip Forward":"فارورڈ پر جائیں","Skip Backward":"پیچھے پر جائیں","Fast Forward":"تیزی سے فارورڈ کریں",Rewind:"ریوائنڈ کریں","Next Frame":"اگلا فریم","Previous Frame":"پچھلا فریم",Settings:"ترتیبات",Options:"اختیارات","More Options":"مزید اختیارات",Zoom:"زوم","Zoom In":"زوم ان","Zoom Out":"زوم آؤٹ","Audio Only":"صرف آڈیو","Picture in Picture":"تصویر در تصویر","Camera Angle":"کیمرا زاویہ",MEDIA_ERR_ABORTED:"ویڈیو پلے بیک کو منسوخ کر دیا گیا۔",MEDIA_ERR_NETWORK:"نیٹ ورک کی خرابی کی وجہ سے ویڈیو ڈاؤن لوڈ ناکام ہوگیا۔ براہ کرم اپنا نیٹ ورک کنکشن چیک کریں یا دوبارہ کوشش کریں۔",MEDIA_ERR_DECODE:"ویڈیو لوڈ نہیں ہو سکی کیونکہ یا تو سرور یا نیٹ ورک ناکام ہوگیا یا فارمیٹ تعاون یافتہ نہیں ہے۔",MEDIA_ERR_SRC_NOT_SUPPORTED:"خرابی کے ایک مسئلہ کی وجہ سے ویڈیو پلے بیک منسوخ کر دیا گیا یا ویڈیو نے ایسی خصوصیات استعمال کیں جن کا آپ کے براؤزر نے تعاون نہیں کیا۔",MEDIA_ERR_ENCRYPTED:"مرموز کردہ ویڈیو ماخذ کی غیر مرموز کاری کرنے سے قاصر۔",SRC_PLAYER_MISMATCH:"موجودہ براؤزر ماحول کیلئے کوئی مطابقت پذیر ماخذ نہیں ملا۔",MEDIA_ERR_UNKNOWN:"ایک نامعلوم خرابی پیش آگئی",SKIP_AD_COUNTDOWN_FORMAT:"اشتہار کو {0}... میں چھوڑیں",SKIP:"چھوڑیں",AD_TIMING_INFO:"اشتہار {0} سیکنڈ"},d["default"].prototype.options_.languages["ur-pk"]=d["default"].prototype.options_.languages.ur},{"../video.js/src/js/player.js":124}],61:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages.vi={Play:"Phát",Pause:"Tạm dừng","Current Time":"Thời gian Hiện tại","Duration Time":"Thời lượng","Remaining Time":"Thời gian Còn lại","Stream Type":"Kiểu Dòng",LIVE:"TRỰC TIẾP",Loaded:"Đã tải",Progress:"Tiến độ",Fullscreen:"Toàn màn hình","Non-Fullscreen":"Thoát Toàn màn hình",Mute:"Tắt tiếng",Unmute:"Bật tiếng","Playback Rate":"Tần suất phát lại",Subtitles:"Phụ đề","Subtitles Off":"tắt phụ đề",Captions:"Phụ đề","Captions Off":"tắt phụ đề",Chapters:"Chương",Off:"Tắt",Quality:"Chất lượng",Auto:"Tự động","Audio Tracks":"Rãnh Âm thanh","default":"mặc định","Cast To Device":"Truyền tới Thiết bị",Share:"Chia sẻ",Volume:"Âm lượng","Playback Speed":"Tốc độ Phát lại","Video Quality":"Chất lượng Video","Closed Captioning":"Phụ đề Chi tiết","Share Video":"Chia sẻ Video","Next Track":"Rãnh Kế","Previous Track":"Rãnh Trước","Skip Forward":"Tiến Nhanh","Skip Backward":"Lùi Nhanh","Fast Forward":"Tiến Nhanh",Rewind:"Tua lại","Next Frame":"Khung Kế","Previous Frame":"Khung Trước",Settings:"Thiết đặt ",Options:"Tùy chọn","More Options":"Xem thêm Tùy chọn",Zoom:"Thu phóng","Zoom In":"Phóng to","Zoom Out":"Thu nhỏ","Audio Only":"Chỉ Âm thanh","Picture in Picture":"Ảnh lồng Ảnh","Camera Angle":"Góc Máy",MEDIA_ERR_ABORTED:"Đã hủy phát lại video.",MEDIA_ERR_NETWORK:"Lỗi mạng gây ra do tải xuống video thất bại một phần. Vui lòng kiểm tra kết nối mạng của bạn hoặc thử lại sau.",MEDIA_ERR_DECODE:"Không thể tải video do lỗi máy chủ hoặc lỗi mạng, hoặc do định dạng không được hỗ trợ.",MEDIA_ERR_SRC_NOT_SUPPORTED:"Đã hủy phát lại video do sự cố hỏng hóc hoặc do video sử dụng các tính năng mà trình duyệt của bạn không hỗ trợ.",MEDIA_ERR_ENCRYPTED:"Không thể giải mã nguồn video được mã hóa.",SRC_PLAYER_MISMATCH:"Không tìm thấy nguồn tương thích với môi trường trình duyệt hiện tại.",MEDIA_ERR_UNKNOWN:"Xuất hiện lỗi chưa xác định",SKIP_AD_COUNTDOWN_FORMAT:"Bỏ qua quảng cáo trong {0}...",SKIP:"Bỏ qua",AD_TIMING_INFO:"Quảng cáo {0} giây","Media Player":"Bộ phát Phương tiện","Play Video":"Phát Video",Foreground:"Mặt trước",White:"Trắng",Black:"Đen",Red:"Đỏ",Green:"Lục",Blue:"Lam",Yellow:"Vàng",Magenta:"Đỏ tươi",Cyan:"Lục lam",Opaque:"Mờ","Semi-Opaque":"Bán Mờ",Transparent:"Trong suốt",Window:"Cửa sổ","Font Size":"Cỡ Phông","Text Edge Style":"Kiểu Cạnh Văn bản",None:"Không có",Raised:"Nổi",Depressed:"Nén",Uniform:"Đồng nhất",Dropshadow:"Bóng thả","Font Family":"Họ Phông","Monospace Serif":"Monospace Serif","Proportional Serif":"Proportional Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Thông thường",Script:"Tập lệnh","Small Caps":"Chữ hoa Nhỏ",Defaults:"Mặc định",Done:"Hoàn tất",Link:"Liên kết",Embed:"Nhúng",Close:"Đóng",Copy:"Sao chép","Copy Url":"Sao chép Url","Embed Code":"Mã Nhúng",English:"Tiếng Anh","volume level":"mức âm lượng","video progress bar":"thanh tiến độ video","playback speed level":"mức tốc độ phát lại","Dolby Digital":"Dolby Digital",Stereo:"Âm thanh nổi","Captions Menu":"Menu Chú thích","Subtitles Menu":"Menu Phụ đề","Need Text":"Cần Văn bản",Download:"Tải xuống","Go to live":"Xem phát trực tiếp","End Time":"Thời gian kết thúc"},d["default"].prototype.options_.languages["vi-vn"]=d["default"].prototype.options_.languages.vi},{"../video.js/src/js/player.js":124}],62:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages["zh-hans"]={Play:"播放",Pause:"暂停","Current Time":"当前时间","Duration Time":"持续时间","Remaining Time":"剩余时间","Stream Type":"流类型",LIVE:"实时",Loaded:"已加载",Progress:"进度",Fullscreen:"全屏","Non-Fullscreen":"非全屏",Mute:"静音",Unmute:"取消静音","Playback Rate":"播放速率",Subtitles:"字幕","Subtitles Off":"关闭字幕",Captions:"描述","Captions Off":"关闭描述",Chapters:"章节",Off:"关闭",Quality:"质量",Auto:"自动","Audio Tracks":"音频轨道","default":"默认","Cast To Device":"转换到设备",Share:"共享",Volume:"音量","Playback Speed":"播放速度","Video Quality":"视频质量","Closed Captioning":"隐藏式字幕","Share Video":"共享视频","Next Track":"下一曲目","Previous Track":"上一曲目","Skip Forward":"快进","Skip Backward":"快退","Fast Forward":"快进",Rewind:"后退","Next Frame":"下一帧","Previous Frame":"上一帧",Settings:"设置",Options:"选项","More Options":"其他选项",Zoom:"缩放","Zoom In":"放大","Zoom Out":"缩小","Audio Only":"仅音频","Picture in Picture":"画中画","Camera Angle":"照相机角度",MEDIA_ERR_ABORTED:"已中止视频播放。",MEDIA_ERR_NETWORK:"网络错误导致视频下载中途失败。请检查你的网络连接，或稍后再试。",MEDIA_ERR_DECODE:"无法加载视频，原因是服务器或网络故障，或者格式不受支持。",MEDIA_ERR_SRC_NOT_SUPPORTED:"视频播放已中止，原因是视频损坏或浏览器不支持视频使用的功能。",MEDIA_ERR_ENCRYPTED:"无法解密加密的视频源。",SRC_PLAYER_MISMATCH:"找不到与当前浏览器环境兼容的源。",MEDIA_ERR_UNKNOWN:"发生未知错误。",SKIP_AD_COUNTDOWN_FORMAT:"{0} 后跳过广告...",SKIP:"跳过",AD_TIMING_INFO:"广告 {0} 秒","Media Player":"媒体播放器","Play Video":"播放视频",Foreground:"前景",White:"白色",Black:"黑色",Red:"红色",Green:"绿色",Blue:"蓝色",Yellow:"黄色",Magenta:"洋红色",Cyan:"蓝绿色",Opaque:"不透明","Semi-Opaque":"半透明",Transparent:"透明",Window:"窗口","Font Size":"字号","Text Edge Style":"文本边缘样式",None:"无",Raised:"凸起",Depressed:"凹陷",Uniform:"统一",Dropshadow:"阴影","Font Family":"字体系列","Monospace Serif":"等宽有衬线","Proportional Serif":"非等宽有衬线","Monospace Sans-Serif":"等宽无衬线","Proportional Sans-Serif":"非等宽无衬线",Casual:"Casual",Script:"上下标​​","Small Caps":"小号大写字母",Defaults:"默认",Done:"完成",Link:"链接",Embed:"嵌入",Close:"关闭",Copy:"复制","Copy Url":"复制 URL","Embed Code":"嵌入代码",English:"英语","volume level":"音量","video progress bar":"视频进度栏","playback speed level":"播放速度","Dolby Digital":"杜比数字",Stereo:"立体声","Captions Menu":"标题菜单","Subtitles Menu":"副标题菜单","Need Text":"需要文本",Download:"下載","Go to live":"转到直播","End Time":"结束时间"},d["default"].prototype.options_.languages.zh=d["default"].prototype.options_.languages["zh-hans"],d["default"].prototype.options_.languages["zh-cn"]=d["default"].prototype.options_.languages["zh-hans"]},{"../video.js/src/js/player.js":124}],63:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/player.js"),d=b(c);d["default"].prototype.options_.languages["zh-hant"]={Play:"播放",Pause:"暫停","Current Time":"目前的時間","Duration Time":"持續時間","Remaining Time":"剩餘時間","Stream Type":"串流類型",LIVE:"現場",Loaded:"已載入",Progress:"進度",Fullscreen:"全螢幕","Non-Fullscreen":"非全螢幕",Mute:"靜音",Unmute:"取消靜音","Playback Rate":"播放速率",Subtitles:"翻譯字幕","Subtitles Off":"關閉翻譯字幕",Captions:"字幕","Captions Off":"關閉字幕",Chapters:"段落",Off:"關閉",Quality:"畫質",Auto:"自動","Audio Tracks":"曲目","default":"預設","Cast To Device":"傳送到裝置",Share:"分享",Volume:"音量","Playback Speed":"播放速度","Video Quality":"視訊畫質","Closed Captioning":"隱藏式字幕","Share Video":"分享視訊","Next Track":"下一首曲目","Previous Track":"上一首曲目","Skip Forward":"快轉跳過","Skip Backward":"倒轉跳過","Fast Forward":"向前快轉",Rewind:"倒轉","Next Frame":"下一個畫面","Previous Frame":"上一個畫面",Settings:"設定",Options:"選項","More Options":"更多選項",Zoom:"縮放","Zoom In":"放大","Zoom Out":"縮小","Audio Only":"僅音訊","Picture in Picture":"子母畫面","Camera Angle":"攝影機角度",MEDIA_ERR_ABORTED:"視訊播放已中止。",MEDIA_ERR_NETWORK:"網路發生錯誤，導致視訊下載中斷。請檢查您的網路連接，然後再試一次。",MEDIA_ERR_DECODE:"視訊無法載入。可能是伺服器或網路失敗，或格式不受支援。",MEDIA_ERR_SRC_NOT_SUPPORTED:"因為發生毀損問題，或瀏覽器不支援視訊所使用的功能，導致播放已中止。",MEDIA_ERR_ENCRYPTED:"無法解密加密的視訊來源。",SRC_PLAYER_MISMATCH:"找不到任何來源與目前的瀏覽器環境相容。",MEDIA_ERR_UNKNOWN:"發生未知的錯誤。",SKIP_AD_COUNTDOWN_FORMAT:"{0} 後跳過廣告…",SKIP:"跳過",AD_TIMING_INFO:"廣告 {0} 秒","Media Player":"媒體播放器","Play Video":"播放影片",Foreground:"前景",White:"白色",Black:"黑色",Red:"紅色",Green:"綠色",Blue:"藍色",Yellow:"黃色",Magenta:"洋紅色",Cyan:"青色",Opaque:"不透明","Semi-Opaque":"半透明",Transparent:"透明​​",Window:"視窗","Font Size":"字型大小","Text Edge Style":"文字邊緣樣式",None:"無",Raised:"凸起",Depressed:"凹下",Uniform:"制式",Dropshadow:"陰影","Font Family":"字型家族","Monospace Serif":"等寬有襯線字型","Proportional Serif":"調和間距有襯線字型","Monospace Sans-Serif":"等寬無襯線字型","Proportional Sans-Serif":"調和間距無襯線字型",Casual:"隨意",Script:"上下標​​","Small Caps":"小型大寫字",Defaults:"預設值",Done:"完成",Link:"連結",Embed:"內嵌",Close:"關閉",Copy:"複製","Copy Url":"複製 Url","Embed Code":"內嵌程式碼",English:"英文","volume level":"音量大小","video progress bar":"影片進度列","playback speed level":"播放速度等級","Dolby Digital":"Dolby Digital",Stereo:"立體聲","Captions Menu":"字幕功能表","Subtitles Menu":"字幕功能表","Need Text":"需要文字",Download:"下載","Go to live":"觀賞直播","End Time":"結束時間"},d["default"].prototype.options_.languages["zh-hk"]=d["default"].prototype.options_.languages["zh-hant"],d["default"].prototype.options_.languages["zh-tw"]=d["default"].prototype.options_.languages["zh-hant"]},{"../video.js/src/js/player.js":124}],64:[function(a){"use strict";function b(a){return a&&a.__esModule?a:{"default":a}}var c=a("../video.js/src/js/tech/tech.js"),d=b(c),e=a("../video.js/src/js/tech/html5.js"),f=b(e);f["default"].prototype.vjsTriggerReady=f["default"].prototype.triggerReady,f["default"].prototype.triggerReady=function(){this.setupTriggers(),this.vjsTriggerReady()},f["default"].prototype.setupTriggers=function(){for(var a=this,b=function(b){a.eventHandler(b)},c=f["default"].Events.length-1;c>=0;c--)this.el_.addEventListener(f["default"].Events[c],b)},f["default"].prototype.eventHandler=function(a){"timeupdate"!==a.type&&"progress"!==a.type&&AMP.Logger.verbose(AMP.Logger.Area.html5,"Event: "+a.type),"error"===a.type&&this.error()&&d["default"].raiseError.call(this,"html5",this.error().code<<20)},f["default"].prototype.presentationTimeOffsetInSec=function(){return void 0},f["default"].prototype.vjsSetSrc=f["default"].prototype.setSrc,f["default"].prototype.setSrc=function(a){AMP.Logger.setLogConfig(this.options_.playerOptions.traceConfig),this.vjsSetSrc(a)},f["default"].prototype.isLiveStartupError=function(){var a=this.error();if(a){var b=a.code<<20;if(0===b)return!0}return!1},f["default"].prototype.currentAudioStreamList=function(){return this.audioStreamList_||(this.audioStreamList_=new AMP.Html5.AudioStreamList(this)),this.audioStreamList_}},{"../video.js/src/js/tech/html5.js":133,"../video.js/src/js/tech/tech.js":136}],65:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){void 0===a&&(a=null);var b=!1;try{var c=null,d=!1;if(g["default"].ActiveXObject)try{c=new g["default"].ActiveXObject("AgControl.AgControl"),null===a?b=!0:c.IsVersionSupported(a)&&(b=!0),c=null}catch(e){d=!0}else d=!0;if(d){var f=g["default"].navigator.plugins["Silverlight Plug-In"];if(f)if(null===a)b=!0;else{var h=f.description;"1.0.30226.2"===h&&(h="2.0.30226.2");for(var i=h.split(".");i.length>3;)i.pop();for(;i.length<4;)i.push(0);for(var j=a.split(".");j.length>4;)j.pop();var k,l,m=0;do k=parseInt(j[m]),l=parseInt(i[m]),m++;while(m<j.length&&k===l);l>=k&&!isNaN(k)&&(b=!0)}}}catch(e){b=!1}return b}c.__esModule=!0,c.isSilverlightInstalled=e;var f=a("global/window"),g=d(f)},{"global/window":251}],66:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=e(h),j=a("object.assign"),k=e(j),l=a("../video.js/src/js/tech/tech.js"),m=e(l),n=a("../video.js/src/js/tech/html5.js"),o=e(n),p=a("../video.js/src/js/component.js"),q=e(p),r=a("../video.js/src/js/player.js"),s=e(r),t=a("../video.js/src/js/video.js"),u=e(t),v=a("../video.js/src/js/utils/dom.js"),w=d(v),x=a("../video.js/src/js/utils/fn.js"),y=d(x),z=a("../video.js/src/js/utils/browser.js"),A=d(z),B=a("../ampDefs.js"),C=d(B),D=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.manualTimeUpdatesOff();var e=void 0,g=void 0;this.featuresPlaybackRate=o["default"].canControlPlaybackRate(),this.fullscreenResize=!0,this.progressEvents=!1,this.volumeControl=!0,e=c.source,this.setControls(!1),AzureHtml5JSTech.Log.setLoggerFunction(AMP.Logger.writeEntry,AMP.Logger.Area.azureHtml5JS),g=AzureHtml5JSTech.CreateAzureHtml5(this.el_.videoTag_,c.playerId),c.staleDataTimeLimitInSec&&g.setStaleDataTimeLimit(c.staleDataTimeLimitInSec),this.mediaPlayer=g,this.options_.muted&&this.setMuted(!0),this.setupTriggers(g),e&&this.src!==e.src&&this.setSrc(e.src),A.TOUCH_ENABLED&&c.nativeControlsForTouch===!0&&this.setControls(!0),this.options_.playerOptions.traceConfig&&AzureHtml5JSTech.Log.setConsoleOutputByLevel(this.options_.playerOptions.traceConfig.maxLogLevel),this.triggerReady()}return g(b,a),b.prototype.dispose=function(){null!==this.mediaPlayer&&(this.mediaPlayer.dispose(),this.mediaPlayer=null),b.disposeMediaElement(this.el_),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=this.options_.tag,c=a;if(!a||this.movingMediaElementInDOM===!1)if(a){var d=a.cloneNode(!0);a.parentNode.insertBefore(d,a),b.disposeMediaElement(a),a=d}else{a=w.createEl("div"),c=w.createEl("video");var e=this.options_.tag&&w.getElAttributes(this.options_.tag),f=k["default"]({},e);w.setElAttributes(c,k["default"](f,{id:this.options_.techId,"class":"vjs-tech"})),a.appendChild(c),a.videoTag_=c}w.setElAttributes(c,{oncontextmenu:"return false;"}),w.setElAttributes(c,{tabindex:"-1"}),w.setElAttributes(c,{"aria-hidden":"true"});for(var g=["preload","loop"],h=g.length-1;h>=0;h--){var i=g[h],j={};"undefined"!=typeof this.options_[i]&&(j[i]=this.options_[i]),w.setElAttributes(c,j)}return a},b.prototype.autoplay=function(){return this.mediaPlayer.autoplay},b.prototype.setAutoplay=function(a){this.options_.autoplay=a},b.prototype.buffered=function(){return this.mediaPlayer.buffered},b.prototype.controls=function(){return this.el_.controls},b.prototype.setControls=function(a){this.el_.controls=!!a},b.prototype.currentSrc=function(){return this.src()},b.prototype.isLive=function(){return this.mediaPlayer.isLive},b.prototype.manifestPlayableWindowLength=function(){return this.mediaPlayer.manifestPlayableWindowLength},b.prototype.currentPlayableWindow=function(){return this.mediaPlayer.currentPlayableWindow},b.prototype.playableWindowEndInSec=function(){return this.mediaPlayer.playableWindowEndInSec},b.prototype.segmentBoundaries=function(){return this.mediaPlayer.segmentBoundaries},b.prototype.setCurrentTime=function(a){this.mediaPlayer.currentTime=a},b.prototype.setCurrentAbsoluteTime=function(a){this.mediaPlayer.currentAbsoluteTime=a},b.prototype.currentTime=function(){return this.mediaPlayer.currentTime},b.prototype.currentAbsoluteTime=function(){return this.mediaPlayer.currentAbsoluteTime},b.prototype.currentMediaTime=function(){return this.mediaPlayer.currentMediaTime},b.prototype.presentationTimeOffsetInSec=function(){return this.mediaPlayer.presentationTimeOffsetInSec},b.prototype.getWallClockTime=function(a,b,c,d,e){return this.mediaPlayer.getWallClockTime(a,b,c,d,e)},b.prototype.presentationTimeFromPercentageOfDvrWindow=function(a){return this.mediaPlayer.presentationTimeFromPercentageOfDvrWindow(a)},b.prototype.currentType=function(){return this.mediaPlayer.type},b.prototype.currentVideoStreamList=function(){return this.mediaPlayer.currentVideoStreamList},b.prototype.currentAudioStreamList=function(){return this.mediaPlayer.currentAudioStreamList},b.prototype.videoBufferData=function(){return this.mediaPlayer.videoBufferData},b.prototype.audioBufferData=function(){return this.mediaPlayer.audioBufferData},b.prototype.currentDownloadBitrate=function(){return this.mediaPlayer.currentDownloadBitrate},b.prototype.currentPlaybackBitrate=function(){return this.mediaPlayer.currentPlaybackBitrate},b.prototype.duration=function(){return this.mediaPlayer.duration},b.prototype.ended=function(){return this.mediaPlayer.ended},b.prototype.isFullScreen=function(){return this.mediaPlayer.isFullScreen},b.prototype.muted=function(){return this.el_.videoTag_.muted||0===this.mediaPlayer.volume},b.prototype.setMuted=function(a){a?(this.el_.videoTag_.muted=!0,this.setVolume(0)):this.el_.videoTag_.muted=!1},b.prototype.paused=function(){return this.mediaPlayer.paused},b.prototype.seeking=function(){return this.mediaPlayer.seeking},b.prototype.src=function(a){return void 0===a?this.mediaPlayer.src:void this.setSrc(a)},b.prototype.volume=function(){return this.mediaPlayer.volume},b.prototype.setVolume=function(a){this.mediaPlayer.volume=a},b.prototype.height=function(a){return void 0===a?this.mediaPlayer.height:void(this.mediaPlayer.height=a)},b.prototype.width=function(a){return void 0===a?this.mediaPlayer.width:void(this.mediaPlayer.width=a)},b.prototype.videoHeight=function(){return this.mediaPlayer.videoHeight},b.prototype.videoWidth=function(){return this.mediaPlayer.videoWidth},b.prototype.play=function(){this.mediaPlayer.play()},b.prototype.pause=function(){
this.mediaPlayer.pause()},b.prototype.setSrc=function(a){var b={type:this.options_.playerOptions.currentType};b=k["default"]({autoPlay:!!this.options_.playerOptions.autoplay},b),b.headers=this.options_.playerOptions.headers,this.updateCurrentPlayerConfigs(),AMP.Logger.setLogConfig(this.options_.playerOptions.traceConfig),this.options_.playerOptions.traceConfig&&AzureHtml5JSTech.Log.setConsoleOutputByLevel(this.options_.playerOptions.traceConfig.maxLogLevel);var c={},d=this.options_.currentPlayerConfigs.currentHeuristicConfigs;c.maxBufferInWallClockSec=d.maxBufferInWallClockSec,c.prerollPercent=d.preRollInWallClockSec/d.maxBufferInWallClockSec,c.livePlaybackOffsetPercent=(d.livePlaybackOffsetInWallClockSec-d.preRollInWallClockSec)/d.maxBufferInWallClockSec,c.windowSizeHeuristicsEnabled=d.windowSizeHeuristics,c.useBrowserWindowForWindowSizeRule=d.useBrowserWindowForWindowSizeRule,c.minFragmentsForBandwidthAverage=d.minFragmentsForBandwidthAverage,c.bandwidthTestWithTimeThresholdDuringLive=d.bandwidthTestWithTimeThresholdDuringLive,c.useVariableFragmentSizeMode=d.useVariableFragmentSizeMode,this.options_.maxSkipSegments&&(c.maxSkipSegments=this.options_.maxSkipSegments),this.options_.maxRetryPerSegment&&(c.maxRetryPerSegment=this.options_.maxRetryPerSegment),this.options_.maxTotalRetries&&(c.maxTotalRetries=this.options_.maxTotalRetries),this.options_.infiniteSegmentRetryForPreconditionFailed&&(c.infiniteSegmentRetryForPreconditionFailed=this.options_.infiniteSegmentRetryForPreconditionFailed),"QuickStart"===this.options_.heuristicProfile&&(c.preFetchDataEnabled=!1),this.options_.maxRetriesForKeyAcquireFailure&&(c.maxRetriesForKeyAcquireFailure=this.options_.maxRetriesForKeyAcquireFailure),this.options_.maxWaitTimeBetweenRetriesForKeyAcquireMS&&(c.maxWaitTimeBetweenRetriesForKeyAcquireMS=this.options_.maxWaitTimeBetweenRetriesForKeyAcquireMS),b.userConfig=c;var e=this.options_.playerOptions.sourceOptions.protectionInfo,f=null;if(e){for(var g=0;g<e.length;g++)e[g].type!==C.protectionType.PlayReady&&e[g].type!==C.protectionType.Widevine&&e[g].type!==C.protectionType.AES||!e[g].authenticationToken||(f||(f={}),f[e[g].type]=e[g].authenticationToken);f&&(b=k["default"]({authenticationTokens:f},b))}this.mediaPlayer.setSrc(a,b)},b.prototype.load=function(){},b.prototype.supportsFullScreen=function(){return!0},b.prototype.enterFullScreen=function(){this.mediaPlayer.requestFullScreen()},b.prototype.exitFullScreen=function(){this.mediaPlayer.exitFullscreen()},b.prototype.setXmlHttpRequestFactory=function(a){this.mediaPlayer.setXmlHttpRequestFactory(a)},b.prototype.playbackRate=function(){return this.mediaPlayer.playbackRate()},b.prototype.setPlaybackRate=function(a){this.mediaPlayer.setPlaybackRate(a)},b.prototype.getAdSignalsAndReset=function(){return this.mediaPlayer.getAdSignalsAndReset()},b.prototype.restartCheckMediaWorkflowIfNeeded=function(){this.mediaPlayer.restartCheckMediaWorkflowIfNeeded()},b}(m["default"]);D.isSupported=function(){return!!i["default"].MediaSource},D.canPlaySource=function(a){return s["default"].canSupportFormats(a,this.supportedFormats)},D.supportedFormats={},D.supportedFormats[C.StreamingFormatMimeType.Dash]=[C.protectionType.AES],D._playReadyKeySystemName="com.microsoft.playready",D._widevineKeySystemName="com.widevine.alpha",D._defaultVideoCodecMime='video/mp4; codecs="avc1.42001E"',D._defaultAudioCodecMime='audio/mp4; codecs="mp4a.40.2"',D.CHECK_PENDING="pending",D.CHECK_DONE="done",D._playReadyCheck=null,D._widevineCheck=null,D.drmSupportCheck=function(a){function b(){D.supportedFormats[C.StreamingFormatMimeType.Dash].push(C.protectionType.PlayReady),D._playReadyCheck=D.CHECK_DONE,AzureHtml5JSTech.Log.verbose(AzureHtml5JSTech.Log.Area.encrypted,"playready resolved")}function c(){D._playReadyCheck=D.CHECK_DONE,AzureHtml5JSTech.Log.verbose(AzureHtml5JSTech.Log.Area.encrypted,"playready rejected")}function d(){D.supportedFormats[C.StreamingFormatMimeType.Dash].push(C.protectionType.Widevine),D._widevineCheck=D.CHECK_DONE,AzureHtml5JSTech.Log.verbose(AzureHtml5JSTech.Log.Area.encrypted,"widevine resolved")}function e(){D._widevineCheck=D.CHECK_DONE,AzureHtml5JSTech.Log.verbose(AzureHtml5JSTech.Log.Area.encrypted,"widevine rejected")}for(var f=0;a&&f<a.length;f++)for(var g=a[f].protectionInfo,h=0;g&&h<g.length;h++){var i=g[h].type;if(A.IS_FIREFOX&&A.FIREFOX_VERSION<47||A.IS_MACWEBVIEW)return D._playReadyCheck=D.CHECK_DONE,void(D._widevineCheck=D.CHECK_DONE);D._playReadyCheck||i!==C.protectionType.PlayReady?D._widevineCheck||i!==C.protectionType.Widevine||(AzureHtml5JSTech.EmeUtil.isTypeSupported(D._widevineKeySystemName,D._defaultAudioCodecMime,D._defaultVideoCodecMime).then(d,e),D._widevineCheck=D.CHECK_PENDING):(AzureHtml5JSTech.EmeUtil.isTypeSupported(D._playReadyKeySystemName,D._defaultAudioCodecMime,D._defaultVideoCodecMime).then(b,c),D._playReadyCheck=D.CHECK_PENDING)}},D.setupDone=function(){return D._playReadyCheck!==D.CHECK_PENDING&&D._widevineCheck!==D.CHECK_PENDING},D.prototype.setupTriggers=function(a){a.addEventListener(AzureHtml5JSTech.EventName.volumechange,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.ended,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.timeupdate,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.pause,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.play,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.playing,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.seeking,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.seeked,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.suspend,y.bind(this,D.onSuspend)),a.addEventListener(AzureHtml5JSTech.EventName.loadstart,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.loadedmetadata,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.loadeddata,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.fullscreenchange,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.waiting,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.canplaythrough,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.error,y.bind(this,D.onError)),a.addEventListener(AzureHtml5JSTech.EventName.durationchange,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.downloadbitratechanged,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.playbackbitratechanged,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.ratechange,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.spliceWaiting,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.emsgAvailable,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.decryptorInitialized,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.aesKeyFetchCompleted,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.decryptionFailed,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.manifestFetchCompleted,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.initialBandwidthEstimationCompleted,y.bind(this,D.onPassthroughHandler)),a.addEventListener(AzureHtml5JSTech.EventName.mediaSourceSrcSetResolved,y.bind(this,D.onPassthroughHandler)),a.addEventListener("saveMemoryLog",y.bind(this,D.onPassthroughHandler)),a.addEventListener("drmselected",y.bind(this,D.onPassthroughHandler))},D.onPassthroughHandler=function(a){this.trigger(a)},D.onSuspend=function(){this.removeClass("vjs-waiting")},D.onError=function(){var a=this.mediaPlayer.error;m["default"].raiseError.call(this,"AzureHtml5JS",a.code,a.message)},D.prototype.isLiveStartupError=function(){var a=this.mediaPlayer.error;return a&&this.isLive()&&a.code===AzureHtml5JSTech.ErrorCode.srcErrLiveNoChunks},D.prototype.movingMediaElementInDOM=!A.IS_IOS,D.disposeMediaElement=function(a){if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);o["default"].disposeMediaElement(a.videoTag_),a.videoTag_=null}},u["default"].options.azureHtml5JS={},q["default"].registerComponent("AzureHtml5JS",D),m["default"].registerTech("AzureHtml5JS",D),c["default"]=D,b.exports=c["default"]},{"../ampDefs.js":11,"../video.js/src/js/component.js":77,"../video.js/src/js/player.js":124,"../video.js/src/js/tech/html5.js":133,"../video.js/src/js/tech/tech.js":136,"../video.js/src/js/utils/browser.js":153,"../video.js/src/js/utils/dom.js":156,"../video.js/src/js/utils/fn.js":158,"../video.js/src/js/video.js":171,"global/window":251,"object.assign":244}],67:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a){var b=a.charAt(0).toUpperCase()+a.slice(1);L["set"+b]=function(a){return this.el_["set"+b]?this.el_["set"+b](a):null}}function i(a){L[a]=function(){var b=a.charAt(0).toUpperCase()+a.slice(1);return this.el_["get"+b]?this.el_["get"+b]():null}}c.__esModule=!0;for(var j=a("global/window"),k=e(j),l=a("global/document"),m=e(l),n=a("object.assign"),o=e(n),p=a("../video.js/src/js/tech/tech.js"),q=e(p),r=a("../video.js/src/js/tech/flash.js"),s=e(r),t=a("../video.js/src/js/component.js"),u=e(t),v=a("../video.js/src/js/player.js"),w=e(v),x=a("../video.js/src/js/video.js"),y=e(x),z=a("../video.js/src/js/utils/time-ranges.js"),A=a("../video.js/src/js/utils/dom.js"),B=d(A),C=a("../video.js/src/js/utils/fn.js"),D=d(C),E=a("../video.js/src/js/utils/browser.js"),F=d(E),G=a("../video.js/src/js/utils/url.js"),H=d(G),I=a("../ampDefs.js"),J=d(I),K=function(a){function b(c,d){var e=this;return f(this,b),a.call(this,c,d),this.manualTimeUpdatesOff(),c.source?(c.startTime&&this.ready(function(){this.load(),this.play(),this.currentTime(c.startTime)}),k["default"].amp=k["default"].amp||{},k["default"].amp.FlashSS=k["default"].amp.FlashSS||{},k["default"].amp.FlashSS.onEvent=b.onEvent,this.ready(this.setupTriggers),void((F.IS_IE||F.IS_EDGE)&&!function(){var a=D.bind(e,e.mouseUp);k["default"].addEventListener("mouseup",a,!1),e.on("dispose",function(){k["default"].removeEventListener("mouseup",a)})}())):(AMP.Logger.setLogConfig(this.options_.playerOptions.traceConfig),void this.triggerReady())}return g(b,a),b.prototype.dispose=function(){a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=this.options_,c=w["default"].getScriptRootURL();!a.swf&&c&&(a.swf=c+"/techs/StrobeMediaPlayback.2.0.swf");var d=a.source,e=a.techId,f=o["default"]({playerId:this.id(),controlBarMode:"none",playButtonOverlay:"false",bufferingOverlay:"false",AdaptiveStreamingPlugin_retryLive:"true",autoPlay:!0,preload:a.preload,loop:a.loop,muted:a.muted,sendRawDataToJS:a.playerOptions.cea708CaptionsSettings&&a.playerOptions.cea708CaptionsSettings.enabled},a.flashVars),g=o["default"]({menu:!1,wmode:"opaque",bgcolor:"#000000"},a.params),h=o["default"]({id:e,name:e,"class":"vjs-tech",tabindex:"-1"},a.attributes);if(this.flashSS=this,this.flashSS.lastSeekTarget_=0/0,this.reset(),d&&(d.src=b.getFullSourceURL(d.src),b._src=d.src,f.src=d.src,d.protectionInfo))for(var i=0;i<d.protectionInfo.length;i++)d.protectionInfo[i].type===J.protectionType.AES&&d.protectionInfo[i].authenticationToken&&(f.AdaptiveStreamingPlugin_encryptionKeyToken=d.protectionInfo[i].authenticationToken);this.updateCurrentPlayerConfigs();var j=a.currentPlayerConfigs.currentHeuristicConfigs;if(f.AdaptiveStreamingPlugin_minimumBufferTimeInSeconds=j.preRollInWallClockSec,f.AdaptiveStreamingPlugin_maximumBufferTimeInSeconds=j.maxBufferInWallClockSec,f.AdaptiveStreamingPlugin_livePlaybackOffsetInSecond=j.livePlaybackOffsetInWallClockSec,b._heuristicSettings.minimumBufferTimeInSeconds=j.preRollInWallClockSec,b._heuristicSettings.maximumBufferTimeInSeconds=j.maxBufferInWallClockSec,b._heuristicSettings.livePlaybackOffsetInSecond=j.livePlaybackOffsetInWallClockSec,b._isTraceEnabled=a.isTraceEnabled,AMP.Logger.setLogConfig(a.playerOptions.traceConfig),a.playerOptions.traceConfig&&a.playerOptions.traceConfig.maxLogLevel)switch(f.AdaptiveStreamingPlugin_enableOSMFLogging=!0,k["default"].org.osmf.player.debug.logs=b.onLogMessage,a.playerOptions.traceConfig.maxLogLevel){case 0:f.AdaptiveStreamingPlugin_minimalLogLevel=0,f.AdaptiveStreamingPlugin_enableOSMFLogging=!1,k["default"].org.osmf.player.debug.logs=void 0;break;case 1:f.AdaptiveStreamingPlugin_minimalLogLevel=2;break;case 2:f.AdaptiveStreamingPlugin_minimalLogLevel=1;break;case 3:f.AdaptiveStreamingPlugin_minimalLogLevel=0;break;default:f.AdaptiveStreamingPlugin_minimalLogLevel=0}else f.AdaptiveStreamingPlugin_enableOSMFLogging=!1,k["default"].org.osmf.player.debug.logs=void 0;return b._traceConfig=a.playerOptions.traceConfig,this.el_=s["default"].embed(a.swf,f,g,h),this.el_.tech=this,this.el_},b.prototype.autoplay=function(){return!!this.options_.playerOptions.autoplay},b.prototype.setAutoplay=function(){},b.prototype.isLive=function(){return this.el_.getStreamType&&"dvr"===this.el_.getStreamType()?!0:!1},b.prototype.buffered=function(){return this.el_.getBufferLength?z.createTimeRange(this.currentTime(),this.currentTime()+this.el_.getBufferLength()):null},b.prototype.setCurrentTime=function(a){this.el_.setCurrentTime&&(a=a<=this.duration()?a:this.duration(),a=a>0?a:0,this.lastSeekTarget_=a,this.el_.setCurrentTime(a))},b.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.getCurrentTime?this.el_.getCurrentTime():null},b.prototype.currentAbsoluteTime=function(){return void 0},b.prototype.currentMediaTime=function(){return this.el_.getCurrentMediaTime?this.el_.getCurrentMediaTime():null},b.prototype.presentationTimeOffsetInSec=function(){return void 0},b.prototype.currentVideoStreamList=function(){return b._currentVideoStreamList},b.prototype.currentAudioStreamList=function(){return b._currentAudioStreamList},b.prototype.videoBufferData=function(){return b._videoBufferData},b.prototype.audioBufferData=function(){return b._audioBufferData},b.prototype.currentDownloadBitrate=function(){if(b._currentVideoStreamList&&this.el_.getCurrentDynamicStreamIndex){var a=this.el_.getCurrentDynamicStreamIndex();return b._currentVideoStreamList.streams[0].tracks[a].bitrate}return void 0},b.prototype.currentPlaybackBitrate=function(){return void 0},b.prototype.ended=function(){return b._ended},b.prototype.isFullscreen=function(){return this.isFullscreen()},b.prototype.src=function(a){return void 0===a?this.currentSrc():void(this.el_.setAutoPlay&&this.el_.setMediaResourceURL&&(this.reset(),a=b.getFullSourceURL(a),b._src=a,this.mediaError=null,this.el_.setAutoPlay(!0),this.el_.setMediaResourceURL(a)))},b.prototype.currentSrc=function(){return b._src?b._src:this.el_.getCurrentSrc?this.el_.getCurrentSrc():null},b.prototype.load=function(){this.el_.load&&this.el_.load()},b.prototype.play=function(){this.el_.play2&&this.el_.play2()},b.prototype.pause=function(){this.el_.pause&&this.el_.pause()},b.prototype.supportsFullScreen=function(){return!1},b.prototype.enterFullScreen=function(){return!1},b.prototype.getWallClockTime=function(){return void 0},b.prototype.restartCheckMediaWorkflowIfNeeded=function(){},b}(q["default"]),L=K.prototype,M="controls,muted,volume".split(","),N="duration,paused,seeking,videoHeight,videoWidth".split(","),O=0;O<M.length;O++)i(M[O]),h(M[O]);for(var O=0;O<N.length;O++)i(N[O]);"undefined"==typeof k["default"].org&&(k["default"].org={}),"undefined"==typeof k["default"].org.osmf&&(k["default"].org.osmf={}),"undefined"==typeof k["default"].org.osmf.player&&(k["default"].org.osmf.player={}),"undefined"==typeof k["default"].org.osmf.player.debug&&(k["default"].org.osmf.player.debug={}),K.onLogMessage=function(a){for(var b=a.split("###"),c=0;c<b.length;c++)AMP.Logger.verbose(AMP.Logger.Area.flashSS,b[c])},K.isSupported=function(){return s["default"].isSupported()},K.isVersionSupported=function(a){return s["default"].isVersionSupported(a)},K.canPlaySource=function(a){return w["default"].canSupportFormats(a,this.supportedFormats)},K.supportedFormats={},K.supportedFormats[J.StreamingFormatMimeType.Smooth]=[J.protectionType.AES],K.prototype.setupTriggers=function(){this.el_.addEventListener("switchingChange","amp.FlashSS.onEvent")},K.prototype.mouseUp=function(a){var b=m["default"].elementFromPoint(a.clientX,a.clientY);b===this.el()?this.el().parentNode.focus():this.el().parentNode.blur()},K.onReady=function(a){AMP.Logger.verbose(AMP.Logger.Area.flashSS,a+" - Ready");var b=B.getEl(a),c=b&&b.tech;c&&c.el()&&K.checkReady(c)},K.checkReady=function(a){return a.el()?a.el().getBufferTime?(a.triggerReady(),K._videoBufferData=new AMP.FlashSS.BufferData(a.el(),AMP.FlashSS.MediaType.video),K._audioBufferData=new AMP.FlashSS.BufferData(a.el(),AMP.FlashSS.MediaType.audio),!0):(this.setTimeout(function(){K.checkReady(a)},50),!1):!1},K._firstReady=!0,K._src=null,K._ended=!1,K._heuristicSettings={},K._currentVideoStreamList=void 0,K._currentAudioStreamList=void 0,K._videoBufferData=void 0,K._audioBufferData=void 0,K._traceConfig=void 0,K._passThroughEvents=["seeking","durationchange","loadstart","waiting","volumechange"],K.prototype.forcePauseToPlayStateTransition=function(){try{!this.stateTransitionForced&&this.currentTime()>.05&&!this.isLive()&&(AMP.Logger.warning(AMP.Logger.Area.flashSS," Forcing a state transition to play by pausing first."),this.pause(),this.play(),this.stateTransitionForced=!0)}catch(a){}},K.onEvent=function(a,b,c){try{var d=B.getEl(a),e=d&&d.tech;if(!e||!e.el())return void AMP.Logger.warning(AMP.Logger.Area.flashSS," Got an event from stale flashSS tech "+a+" - Event:"+b);if(-1!==K._passThroughEvents.indexOf(b)&&e.trigger(b),!e.firstPlayingOccurredWithAutoplayFalse_&&"timeupdate"===b)return void e.forcePauseToPlayStateTransition();switch(b){case"onJavaScriptBridgeCreated":K.onReady(a),e.trigger("javascriptBridgeCreated");break;case"complete":K._ended=!0,e.trigger("ended");break;case"emptied":K._firstReady&&(K._currentVideoStreamList||(K._currentVideoStreamList=new AMP.FlashSS.VideoStreamList(e.el()),K._currentAudioStreamList=new AMP.FlashSS.AudioStreamList(e.el()),0===K._currentAudioStreamList.streams.length&&(K._currentAudioStreamList=void 0)),e.trigger("loadeddata"),e.trigger("loadedmetadata"),K._firstReady=!1,e.el().setAutoDynamicStreamSwitch(!0));break;case"downloadevent":e.downloadEvent(c);break;case"play":e.options_.playerOptions.autoplay||e.firstPlayingOccurredWithAutoplayFalse_?(e.firstPlayingOccurredWithAutoplayFalse_||(e.trigger("canplaythrough"),e.firstPlayingOccurredWithAutoplayFalse_=!0),e.trigger("play"),e.trigger("playing")):(e.pause(),e.trigger("canplaythrough"),e.firstPlayingOccurredWithAutoplayFalse_=!0);break;case"pause":e.firstPlayingOccurredWithAutoplayFalse_&&e.trigger("pause");break;case"seeked":e.firstPlayingOccurredWithAutoplayFalse_&&e.trigger("seeked");break;case"timeupdate":e.firstPlayingOccurredWithAutoplayFalse_&&e.trigger("timeupdate");break;case"error":e.currentSrc()&&(e.mediaError=c.code,q["default"].raiseError.call(e,"flashss",K.getMediaErrorCode(c.code,c.detail),K.getMediaErrorMsg(c.code)),e.firstPlayingOccurredWithAutoplayFalse_=!1);break;case"switchingChange":e.trigger("downloadbitratechanged")}"timeupdate"!==b&&"progress"!==b&&AMP.Logger.verbose(AMP.Logger.Area.flashSS,a+" - Event:"+b)}catch(f){throw AMP.Logger.error(AMP.Logger.Area.flashSS,a+" - Event:"+b+" - error:"+f),f}},K.prototype.downloadEvent=function(a){function b(a,b){!a.isAudio&&a.rawData&&(b.mediaDownload.rawSampleTimeScale=a.rawSampleTimeScale,b.mediaDownload.data=c(a.rawData),a.rawSampleTimeScale&&(b.mediaDownload.presentationTimeOffsetInSec=a.presentationTimeOffset/a.rawSampleTimeScale))}function c(a){for(var b=k["default"].atob(a),c=b.length,d=new Uint8Array(c),e=0;c>e;e++)d[e]=b.charCodeAt(e);return d.buffer}if(a&&a.type){var d=void 0;switch(a.type){case"downloadStarted":d=a.isAudio?K._audioBufferData:K._videoBufferData,d.downloadRequested=d.downloadRequested||{},d.downloadRequested.url=a.url,d.downloadRequested.bitrate=a.bitrate,d.downloadRequested.mediaTime=a.mediaTime,d.dispatchEvent(J.bufferDataEventName.downloadrequested);break;case"downloadCompleted":d=a.isAudio?K._audioBufferData:K._videoBufferData,d.downloadCompleted=d.downloadCompleted||{},d.downloadCompleted.measuredBandwidth=8*a.downloadBytes/a.downloadTime,d.downloadCompleted.totalBytes=a.downloadBytes,d.downloadCompleted.totalDownloadMs=1e3*a.downloadTime,d.downloadCompleted.mediaDownload=d.downloadCompleted.mediaDownload||{},d.downloadCompleted.mediaDownload.url=a.url,d.downloadCompleted.mediaDownload.bitrate=a.bitrate,d.downloadCompleted.mediaDownload.mediaTime=a.mediaTime,b(a,d.downloadCompleted),d.dispatchEvent(J.bufferDataEventName.downloadcompleted);break;case"downloadDecrypted":d=a.isAudio?K._audioBufferData:K._videoBufferData,d.decryptionCompleted=d.decryptionCompleted||{},d.decryptionCompleted.mediaDownload=d.downloadCompleted.mediaDownload||{},d.decryptionCompleted.mediaDownload.mediaTime=a.mediaTime,b(a,d.decryptionCompleted),d.dispatchEvent(J.bufferDataEventName.downloaddecrypted);break;case"mediaError":d=a.isAudio?K._audioBufferData:K._videoBufferData,d.downloadFailed=d.downloadFailed||{},d.downloadFailed.code=a.code,d.downloadFailed.message=a.message,d.downloadFailed.mediaDownload=d.downloadFailed.mediaDownload||{},d.downloadFailed.mediaDownload.url=a.url,d.downloadFailed.mediaDownload.bitrate=a.bitrate,d.downloadFailed.mediaDownload.mediaTime=a.mediaTime,d.dispatchEvent(J.bufferDataEventName.downloadfailed),q["default"].raiseError.call(this,"flashss",K.getMediaErrorCode(a.code,a.detail),K.getMediaErrorMsg(a.code))}}},K.getMediaErrorCode=function(a,b){switch(a){case K.errorCodes.OSMF_HTTP_GET_FAILED:case K.errorCodes.OSMF_NETCONNECTION_REJECTED:case K.errorCodes.OSMF_NETCONNECTION_APPLICATION_INVALID:case K.errorCodes.OSMF_NETCONNECTION_FAILED:case K.errorCodes.FRAGMENT_DOWNLOAD_ERROR:case K.errorCodes.MANIFEST_DOWNLOAD_ERROR:return K.getHttpErrorCode(b);case K.errorCodes.OSMF_NETCONNECTION_TIMEOUT:case K.errorCodes.MANIFEST_DOWNLOAD_TIMEOUT:case K.errorCodes.FRAGMENT_DOWNLOAD_TIMEOUT:return J.errorCode.networkErrTimeout;case K.errorCodes.MANIFEST_NOT_SUPPORTED_ELEMENT:case K.errorCodes.MANIFEST_NOT_SUPPORTED_AUDIO_TRACK:case K.errorCodes.MANIFEST_NOT_SUPPORTED_VIDEO_TRACK:case K.errorCodes.VIDEO_STREAM_MISSING:case K.errorCodes.MANIFEST_LIVE_DVRWINDOWLENGTH_TOO_SMALL:return J.errorCode.srcErrUnsupportedPresentation;case K.errorCodes.TOO_EARLY_TO_JOIN_LIVE_EVENT:return J.errorCode.srcErrLiveNoSegments;case K.errorCodes.MANIFEST_PARSE_TIMEOUT:case K.errorCodes.MANIFEST_MAJOR_VERSION_MISSING:case K.errorCodes.MANIFEST_MINOR_VERSION_MISSING:case K.errorCodes.MANIFEST_STREAMINDEX_MISSING:case K.errorCodes.MANIFEST_UNEXPECTED_ROOT_ELEMENT:case K.errorCodes.MANIFEST_UNEXPECTED_ROOT_ATTRIBUTE:case K.errorCodes.MANIFEST_STREAMINFO_TYPE_MISSING:case K.errorCodes.MANIFEST_STREAMINFO_URL_MISSING:case K.errorCodes.MANIFEST_CHUNK_ATTRIBUTE_MISSING:case K.errorCodes.MANIFEST_INVALID_ATTRIBUTE_VALUE:case K.errorCodes.INVALID_SMOOTH_DYNAMIC_RESOURCE:case K.errorCodes.MANIFEST_AUDIO_QUALITYLEVEL_BITRATE_MISSING:case K.errorCodes.MANIFEST_AUDIO_QUALITYLEVEL_AUDIOTAG_MISSING:case K.errorCodes.MANIFEST_VIDEO_QUALITYLEVEL_BITRATE_MISSING:case K.errorCodes.MANIFEST_VIDEO_QUALITYLEVEL_FOURCC_MISSING:case K.errorCodes.MANIFEST_VIDEO_QUALITYLEVEL_MAXWIDTH_MISSING:case K.errorCodes.MANIFEST_VIDEO_QUALITYLEVEL_MAXHEIGHT_MISSING:case K.errorCodes.MANIFEST_UNEXPECTED_PROTECTION_HEADER:case K.errorCodes.MANIFEST_LIVE_LOOKAHEADFRAGMENTCOUNT_MISSING:return J.errorCode.srcErrParsePresentation;case K.errorCodes.OSMF_NETSTREAM_PLAY_FAILED:case K.errorCodes.OSMF_NETSTREAM_FILE_STRUCTURE_INVALID:case K.errorCodes.OSMF_IO_ERROR:case K.errorCodes.OSMF_SECURITY_ERROR:case K.errorCodes.OSMF_ASYNC_ERROR:case K.errorCodes.OSMF_ARGUMENT_ERROR:case K.errorCodes.OSMF_URL_SCHEME_INVALID:case K.errorCodes.OSMF_MEDIA_LOAD_FAILED:case K.errorCodes.OSMF_PLUGIN_VERSION_INVALID:case K.errorCodes.OSMF_PLUGIN_IMPLEMENTATION_INVALID:case K.errorCodes.OSMF_SOUND_PLAY_FAILED:case K.errorCodes.OSMF_NETSTREAM_STREAM_NOT_FOUND:case K.errorCodes.OSMF_DVRCAST_SUBSCRIBE_FAILED:case K.errorCodes.OSMF_DVRCAST_CONTENT_OFFLINE:case K.errorCodes.OSMF_DVRCAST_STREAM_INFO_RETRIEVAL_FAILED:case K.errorCodes.OSMF_F4M_FILE_INVALID:case K.errorCodes.CANNOT_SET_AUDIO_STREAM_INDEX:case K.errorCodes.PLUGIN_INVALID_PARAM:case K.errorCodes.PLUGIN_NULL_PARAM:return J.errorCode.srcErrUnknown;case K.errorCodes.ENCRYPTIONKEY_DOWNLOAD_ERROR:case K.errorCodes.ENCRYPTIONKEY_DOWNLOAD_AUTH_ERROR:case K.errorCodes.ENCRYPTIONKEY_DOWNLOAD_TIMEOUT:case K.errorCodes.ENCRYPTIONKEYURL_TOKEN_VERIFICATION_ERROR:return J.errorCode.encryptErrKeyAcquire;case K.errorCodes.FRAGMENT_DECRYPT_ERROR:return J.errorCode.encryptErrDecryption;default:return J.errorCode.errUnknown}},K.getHttpErrorCode=function(a){var b=J.errorCode.networkErrUnknown;if(a){var c=a.match(/^httpStatus:([0-9]+)/);2===c.length&&(b=J.httpErrorCode[c[1]]||b)}return b},K.errorCodes={OSMF_IO_ERROR:1,OSMF_SECURITY_ERROR:2,OSMF_ASYNC_ERROR:3,OSMF_ARGUMENT_ERROR:4,OSMF_URL_SCHEME_INVALID:5,OSMF_HTTP_GET_FAILED:6,OSMF_MEDIA_LOAD_FAILED:7,OSMF_PLUGIN_VERSION_INVALID:8,OSMF_PLUGIN_IMPLEMENTATION_INVALID:9,OSMF_SOUND_PLAY_FAILED:10,OSMF_NETCONNECTION_REJECTED:11,OSMF_NETCONNECTION_APPLICATION_INVALID:12,OSMF_NETCONNECTION_FAILED:13,OSMF_NETCONNECTION_TIMEOUT:14,OSMF_NETSTREAM_PLAY_FAILED:15,OSMF_NETSTREAM_STREAM_NOT_FOUND:16,OSMF_NETSTREAM_FILE_STRUCTURE_INVALID:17,OSMF_NETSTREAM_NO_SUPPORTED_TRACK_FOUND:18,OSMF_DRM_SYSTEM_UPDATE_ERROR:19,OSMF_DVRCAST_SUBSCRIBE_FAILED:20,OSMF_DVRCAST_CONTENT_OFFLINE:21,OSMF_DVRCAST_STREAM_INFO_RETRIEVAL_FAILED:22,OSMF_F4M_FILE_INVALID:23,MANIFEST_DOWNLOAD_TIMEOUT:1e3,MANIFEST_PARSE_TIMEOUT:1001,MANIFEST_DOWNLOAD_ERROR:1002,MANIFEST_MAJOR_VERSION_MISSING:1003,MANIFEST_MINOR_VERSION_MISSING:1004,MANIFEST_STREAMINDEX_MISSING:1005,MANIFEST_UNEXPECTED_ROOT_ELEMENT:1006,MANIFEST_UNEXPECTED_ROOT_ATTRIBUTE:1007,MANIFEST_STREAMINFO_TYPE_MISSING:1008,MANIFEST_STREAMINFO_URL_MISSING:1009,MANIFEST_AUDIO_QUALITYLEVEL_BITRATE_MISSING:1010,MANIFEST_AUDIO_QUALITYLEVEL_AUDIOTAG_MISSING:1011,MANIFEST_VIDEO_QUALITYLEVEL_BITRATE_MISSING:1012,MANIFEST_VIDEO_QUALITYLEVEL_FOURCC_MISSING:1013,MANIFEST_VIDEO_QUALITYLEVEL_MAXWIDTH_MISSING:1014,MANIFEST_VIDEO_QUALITYLEVEL_MAXHEIGHT_MISSING:1015,MANIFEST_CHUNK_ATTRIBUTE_MISSING:1016,MANIFEST_NOT_SUPPORTED_ELEMENT:1017,MANIFEST_NOT_SUPPORTED_AUDIO_TRACK:1018,MANIFEST_NOT_SUPPORTED_VIDEO_TRACK:1019,MANIFEST_INVALID_ATTRIBUTE_VALUE:1020,INVALID_SMOOTH_DYNAMIC_RESOURCE:1021,FRAGMENT_DOWNLOAD_TIMEOUT:1022,FRAGMENT_DOWNLOAD_ERROR:1023,CANNOT_SET_AUDIO_STREAM_INDEX:1024,VIDEO_STREAM_MISSING:1025,MANIFEST_LIVE_LOOKAHEADFRAGMENTCOUNT_MISSING:1026,PLUGIN_INVALID_PARAM:1027,PLUGIN_NULL_PARAM:1028,MANIFEST_LIVE_DVRWINDOWLENGTH_TOO_SMALL:1029,TOO_EARLY_TO_JOIN_LIVE_EVENT:1030,MANIFEST_UNEXPECTED_PROTECTION_HEADER:1048,ENCRYPTIONKEY_DOWNLOAD_ERROR:1049,ENCRYPTIONKEY_DOWNLOAD_AUTH_ERROR:1050,ENCRYPTIONKEY_DOWNLOAD_TIMEOUT:1051,ENCRYPTIONKEYURL_TOKEN_VERIFICATION_ERROR:1052,FRAGMENT_DECRYPT_ERROR:1053},K.getMediaErrorMsg=function(a){for(var b in K.errorCodes)if(K.errorCodes.hasOwnProperty(b)&&K.errorCodes[b]===a)return b;return a},K.getFullSourceURL=function(a){return a=H.getAbsoluteURL(a),0===a.indexOf("//")&&(a=k["default"].location.protocol+a),a},K.prototype.reset=function(){K._firstReady=!0,K._ended=!1,K._src=null,K._currentVideoStreamList=void 0,K._currentAudioStreamList=void 0,this.flashSS.firstPlayingOccurredWithAutoplayFalse_=!1,this.stateTransitionForced=!1},K.prototype.setPlaybackRate=function(){},K.prototype.isReloadNeeded=function(){var a=this.options_.currentPlayerConfigs;return null!=K._src&&a&&a.currentHeuristicConfigs&&K._heuristicSettings.minimumBufferTimeInSeconds===a.currentHeuristicConfigs.preRollInWallClockSec&&K._heuristicSettings.maximumBufferTimeInSeconds===a.currentHeuristicConfigs.maxBufferInWallClockSec&&K._heuristicSettings.livePlaybackOffsetInSecond===a.currentHeuristicConfigs.livePlaybackOffsetInWallClockSec&&K._traceConfig===this.options_.traceConfig?!1:!0},K.prototype.isLiveStartupError=function(){return this.mediaError===K.errorCodes.MANIFEST_DOWNLOAD_ERROR||this.mediaError===K.errorCodes.TOO_EARLY_TO_JOIN_LIVE_EVENT?!0:!1},y["default"].options.flashSS={},u["default"].registerComponent("FlashSS",K),q["default"].registerTech("FlashSS",K),c["default"]=K,b.exports=c["default"]},{"../ampDefs.js":11,"../video.js/src/js/component.js":77,"../video.js/src/js/player.js":124,"../video.js/src/js/tech/flash.js":132,"../video.js/src/js/tech/tech.js":136,"../video.js/src/js/utils/browser.js":153,"../video.js/src/js/utils/dom.js":156,"../video.js/src/js/utils/fn.js":158,"../video.js/src/js/utils/time-ranges.js":167,"../video.js/src/js/utils/url.js":170,"../video.js/src/js/video.js":171,"global/document":250,"global/window":251,"object.assign":244}],68:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../video.js/src/js/tech/tech.js"),i=e(h),j=a("../video.js/src/js/tech/html5.js"),k=e(j),l=a("../video.js/src/js/component.js"),m=e(l),n=a("../video.js/src/js/utils/fn.js"),o=d(n),p=a("global/window"),q=e(p),r=a("../ampDefs.js"),s=d(r),t=function(a){function b(c,d){f(this,b),a.call(this,c,d)}return g(b,a),b.prototype.dispose=function(){this.fairplay&&this.fairplay.dispose(),a.prototype.dispose.call(this)},b.prototype.eventHandler=function(a){"timeupdate"!==a.type&&"progress"!==a.type&&AMP.Logger.verbose(AMP.Logger.Area.html5FairplayHLS,"Event: "+a.type),"error"===a.type&&this.error()&&i["default"].raiseError.call(this,"html5FairPlayHLS",this.error().code<<20)},b.prototype.setSrc=function(a){AMP.Logger.setLogConfig(this.options_.playerOptions.traceConfig),this.fairplay&&(this.fairplay.dispose(),this.fairplay=null);var c=[];this.options_&&this.options_.playerOptions&&this.options_.playerOptions.sourceOptions&&this.options_.playerOptions.sourceOptions.protectionInfo&&(c=this.options_.playerOptions.sourceOptions.protectionInfo);for(var d=null,e=0;e<c.length;e++)if("FairPlay"===c[e].type){d=c[e];break}if(d&&b.isFairPlaySupported()){var f=new AMP.Html5Fairplay.SrcInfo(a,this.options_.playerOptions.autoplay,d);this.fairplay=new AMP.Html5Fairplay.FairPlay(this.el_,f,o.bind(this,this.handleFairPlayErrors_),o.bind(this,this.handleFairPlayEvent_))}else this.handleFairPlayErrors_(s.errorCode.srcPlayerMismatchUnknown,"html5FairPlayHLS tech can only be used with FairPlay protected content")},b.prototype.handleFairPlayErrors_=function(a,b){
i["default"].raiseError.call(this,"Html5FairPlayHLS",a,b)},b.prototype.handleFairPlayEvent_=function(a){this.trigger(a)},b.prototype.play=function(){this.fairplay.play()},b.prototype.getWallClockTime=function(){return void 0},b.prototype.restartCheckMediaWorkflowIfNeeded=function(){},b}(k["default"]);t.prototype.fairplay=null,t.nativeSourceHandler={},t.nativeSourceHandler.handleSource=function(a,b){b.setSrc(a.src)},t.nativeSourceHandler.canHandleSource=function(a){function b(a){try{return k["default"].TEST_VID.canPlayType(a)}catch(b){return""}}var c=void 0,d=void 0,e=function(a){if(a.protectionInfo)for(var b=0;b<a.protectionInfo.length;b++)if("FairPlay"===a.protectionInfo[b].type)return!0;return!1},f=e(a)&&t.isFairPlaySupported();return f?"application/vnd.apple.mpegurl"===a.type?b(a.type):a.src?(c=a.src.match(/\.([^.\/\?]+)(\?[^\/]+)?$/i),d=c&&c[1],b("video/"+d)):"":""},t.nativeSourceHandler.dispose=function(){},t.sourceHandlers=null,i["default"].withSourceHandlers(t),t.registerSourceHandler(t.nativeSourceHandler),t.isFairPlaySupported=function(){return q["default"].WebKitMediaKeys&&q["default"].WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4")},t.isSupported=function(){return k["default"].isSupported.call(this)},m["default"].registerComponent("Html5FairPlayHLS",t),i["default"].registerTech("Html5FairPlayHLS",t),c["default"]=t,b.exports=c["default"]},{"../ampDefs.js":11,"../video.js/src/js/component.js":77,"../video.js/src/js/tech/html5.js":133,"../video.js/src/js/tech/tech.js":136,"../video.js/src/js/utils/fn.js":158,"global/window":251}],69:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=e(h),j=a("global/document"),k=e(j),l=a("object.assign"),m=e(l),n=a("../video.js/src/js/tech/tech.js"),o=e(n),p=a("../video.js/src/js/component.js"),q=e(p),r=a("../video.js/src/js/player.js"),s=e(r),t=a("../video.js/src/js/video.js"),u=e(t),v=a("../video.js/src/js/utils/time-ranges.js"),w=a("../video.js/src/js/utils/dom.js"),x=d(w),y=a("../video.js/src/js/utils/fn.js"),z=d(y),A=a("../video.js/src/js/utils/browser.js"),B=d(A),C=a("../ampDefs.js"),D=d(C),E=a("./Silverlight.js"),F={Closed:0,Opening:1,Buffering:2,Playing:3,Paused:4,Stopped:5,Individualizing:6,AcquiringLicense:7},G=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.manualTimeUpdatesOff()}return g(b,a),b.prototype.dispose=function(){a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=this.options_,c=s["default"].getScriptRootURL();!a.xap&&c&&(a.xap=c+"/techs/SmoothStreamingPlayer.xap");var d=this,e=[],f=a.source;this.mediaPlayer=null,this.reset();var g=a.techId,h=a.autoplay;void 0!==h&&e.push("Autoplay="+h);var i=m["default"]({id:g,name:g,"class":"vjs-tech",tabindex:"-1"},a.attributes);silverlightSSLoaded=function(a){var b=k["default"].getElementById(g);d.mediaPlayer=b.content.mainPlayer,f&&d.src(f.src),d.triggerReady(),d.setTriggers(a)},onSilverlightError=function(a,b){var c="";null!=a&&0!==a&&(c=a.getHost().Source);var e=b.ErrorType,f=b.ErrorCode,g="Unhandled Error in Silverlight Application "+c+"\n";g+="Code: "+f+"    \n",g+="Category: "+e+"       \n",g+="Message: "+b.ErrorMessage+"     \n","ParserError"===e?(g+="File: "+b.xamlFile+"     \n",g+="Line: "+b.lineNumber+"     \n",g+="Position: "+b.charPosition+"     \n"):"RuntimeError"===e&&(0!==b.lineNumber&&(g+="Line: "+b.lineNumber+"     \n",g+="Position: "+b.charPosition+"     \n"),g+="MethodName: "+b.methodName+"     \n"),o["default"].raiseError.call(d,"silverlightss",D.errorCode.errUnknown,g)};var j=m["default"]({source:a.xap,onError:"onSilverlightError",minRuntimeVersion:"5.0.61118.0",onload:"silverlightSSLoaded",enableHtmlAccess:!0,width:"100%",height:"100%",windowless:"true",wmode:"opaque",bgcolor:"#000000"},a.params);return e.push("ScriptableName=mainPlayer"),e.push("IsControlStripVisible=false"),this.el_=b.embed(i,j,e),this.el_.tech=this,this.el_},b.prototype.autoplay=function(){return this.mediaPlayer.AutoPlay},b.prototype.setAutoplay=function(a){this.mediaPlayer.AutoPlay=a},b.prototype.isLive=function(){return this.mediaPlayer.IsLive},b.prototype.buffered=function(){return v.createTimeRange(this.currentTime(),this.currentTime())},b.prototype.currentSrc=function(){return b._srcSet?this.mediaPlayer.MediaSource:void 0},b.prototype.setCurrentTime=function(a){try{b._seeking=!0,this.trigger(D.eventName.seeking),this.mediaPlayer.SeekToPosition(a)}catch(c){o["default"].raiseError.call(this,"silverlightss",D.errorCode.srcErrUnknown,c.message)}},b.prototype.currentTime=function(){return this.mediaPlayer.PlaybackPositionSeconds},b.prototype.currentAbsoluteTime=function(){return void 0},b.prototype.currentMediaTime=function(){return void 0},b.prototype.presentationTimeOffsetInSec=function(){return void 0},b.prototype.currentVideoStreamList=function(){return void 0},b.prototype.currentAudioStreamList=function(){return void 0},b.prototype.videoBufferData=function(){return void 0},b.prototype.audioBufferData=function(){return void 0},b.prototype.currentDownloadBitrate=function(){return b._downloadBitrate},b.prototype.currentPlaybackBitrate=function(){return b._playbackBitrate},b.prototype.duration=function(){return this.mediaPlayer.EndPositionSeconds-this.mediaPlayer.StartPositionSeconds},b.prototype.ended=function(){return b._ended},b.prototype.isFullscreen=function(){return this.mediaPlayer.isFullscreen},b.prototype.muted=function(){return this.mediaPlayer.IsMuted},b.prototype.setMuted=function(a){this.mediaPlayer.IsMuted=a},b.prototype.paused=function(){return this.mediaPlayer.PlayState===F.Paused||this.mediaPlayer.PlayState===F.Buffering},b.prototype.seeking=function(){return b._seeking},b.prototype.src=function(a){return void 0===a?this.currentSrc():(0===a.indexOf("//")&&(a=i["default"].location.protocol+a),void this.setSrc(a))},b.prototype.volume=function(){return this.mediaPlayer.GetVolume()},b.prototype.setVolume=function(a){this.mediaPlayer.SetVolume(a)},b.prototype.height=function(a){return void 0===a?this.mediaPlayer.height:void(this.mediaPlayer.height=a)},b.prototype.width=function(a){return void 0===a?this.mediaPlayer.width:void(this.mediaPlayer.width=a)},b.prototype.videoHeight=function(){return this.mediaPlayer.VideoHeight},b.prototype.videoWidth=function(){return this.mediaPlayer.VideoWidth},b.prototype.play=function(){b._errored||this.mediaPlayer.Play()},b.prototype.pause=function(){b._errored||this.mediaPlayer.Pause()},b.prototype.setSrc=function(a){this.reset(),this.mediaPlayer.AutoPlay=!!this.options_.playerOptions.autoplay,this.updateCurrentPlayerConfigs();var c=this.options_.currentPlayerConfigs.currentHeuristicConfigs;this.mediaPlayer.BufferingTime=c.preRollInWallClockSec,this.mediaPlayer.LivePlaybackOffset=c.livePlaybackOffsetInWallClockSec,AMP.Logger.setLogConfig(this.options_.playerOptions.traceConfig),this.mediaPlayer.IsTraceEnabled=this.options_.playerOptions.traceConfig&&this.options_.playerOptions.traceConfig.maxLogLevel&&this.options_.playerOptions.traceConfig.maxLogLevel>0;var d=this.mediaPlayer.CreatePlaylist(),e=this.mediaPlayer.CreatePlaylistItem(a,"","","");e.DeliveryMethod="AdaptiveStreaming";var f=this.options_.playerOptions.sourceOptions.protectionInfo;if(f)for(var g=0;g<f.length;g++)f[g].type===D.protectionType.PlayReady&&f[g].authenticationToken&&(e.BearerToken=f[g].authenticationToken);d.AddPlaylistItem(e),this.mediaPlayer.SetPlaylist(d),b._srcSet=!0},b.prototype.load=function(){},b.prototype.supportsFullscreen=function(){return!1},b.prototype.enterFullscreen=function(){},b.prototype.exitFullscreen=function(){},b.prototype.getWallClockTime=function(){return void 0},b.prototype.restartCheckMediaWorkflowIfNeeded=function(){},b}(o["default"]);G.embed=function(a,b,c){var d=G.getEmbedCode(a,b,c),e=x.createEl("div",{innerHTML:d}).childNodes[0];return e},G.getEmbedCode=function(a,b,c){var d='<object  data="data:application/x-silverlight-2," type="application/x-silverlight-2" ';return a&&Object.getOwnPropertyNames(a).forEach(function(b){d+=encodeURIComponent(b)+'="'+encodeURIComponent(a[b])+'" '}),d+=">",b=m["default"]({InitParams:c.join(",")},b),Object.getOwnPropertyNames(b).forEach(function(a){d+='<param name="'+encodeURIComponent(a)+'" value="'+encodeURI(b[a])+'" />'}),d+="</object>"},G.isSupported=function(){return E.isSilverlightInstalled("5.0")},G.canPlaySource=function(a){return s["default"].canSupportFormats(a,this.supportedFormats)},G.supportedFormats={},G.supportedFormats[D.StreamingFormatMimeType.Smooth]=[D.protectionType.PlayReady],G._srcSet=!1,G._errored=!1,G._seeking=!1,G._ended=!1,G._opening=!0,G._firstTimeUpdateOccuredAfterOpening=!1,G._adaptiveStreamingError=null,G._networkError="Failed to download",G._licenseError="Unable to acquire license due to a network or protocol error",G._tokenError="Unable to complete operation due to a service specific error coming from a network response",G._parseSegmentError="Too many consecutive chunk parse errors",G._parsePresentationError="Manifest file error",G._unsupportedPresentation="Unrecognized manifest",G._licenseAcquisitionErrorCode="6002",G._licenseAcquisitionServiceSpecificErrorCode="6007",G._downloadBitrate,G._playbackBitrate,G.prototype.setTriggers=function(){var a=this;this.mediaPlayer.addEventListener("PlayStateChanged",z.bind(this,this.playStateChangedHandler)),this.mediaPlayer.addEventListener("MediaOpened",z.bind(this,this.onMediaOpened)),this.mediaPlayer.addEventListener("SeekCompleted",z.bind(this,this.onSeekCompleted)),this.mediaPlayer.addEventListener("MediaEnded",z.bind(this,this.onMediaEnded)),this.mediaPlayer.addEventListener("PlaybackPositionChanged",z.bind(this,this.onTimeUpdate)),this.mediaPlayer.addEventListener("VolumeLevelChanged",z.bind(this,this.onVolumeChanged)),this.mediaPlayer.addEventListener("MuteChanged",z.bind(this,this.onVolumeChanged)),this.mediaPlayer.addEventListener("MediaFailed",z.bind(this,this.onMediaFailed)),this.mediaPlayer.addEventListener("AdaptiveStreamingErrorOccurred",z.bind(this,this.onAdaptiveStreamingErrorOccurred)),this.mediaPlayer.addEventListener("ReportDiagTrace",z.bind(this,this.onReportDiagTrace)),this.mediaPlayer.addEventListener("DownloadBitrateChanged",z.bind(this,this.onVideoDownloadBitrateChanged)),this.mediaPlayer.addEventListener("PlaybackBitrateChanged",z.bind(this,this.onVideoPlaybackBitrateChanged)),this.mediaPlayer.addEventListener("FullScreenChanged",z.bind(this,this.onFullScreenChanged));var b=void 0;this.mediaPlayer.addEventListener("PlaybackPositionChanged",z.bind(this,function(){this.duration()!==b&&(b=this.duration(),this.trigger(D.eventName.durationchange)),G._firstTimeUpdateOccuredAfterOpening||G._opening||(this.trigger(D.eventName.play),this.trigger(D.eventName.playing),G._firstTimeUpdateOccuredAfterOpening=!0)})),B.IS_IE&&!function(){var b=z.bind(a,a.onMouseUp);i["default"].addEventListener("mouseup",b,!1),a.on("dispose",function(){i["default"].removeEventListener("mouseup",b)})}()},G.prototype.playStateChangedHandler=function(){switch(this.mediaPlayer.PlayState){case F.Playing:G._firstTimeUpdateOccuredAfterOpening&&(this.trigger(D.eventName.play),this.trigger(D.eventName.playing));break;case F.Paused:this.trigger(D.eventName.pause);break;case F.Buffering:G._firstTimeUpdateOccuredAfterOpening||this.trigger(D.eventName.waiting)}},G.prototype.onMediaOpened=function(){G._opening=!1,this.trigger(D.eventName.durationchange),this.trigger(D.eventName.loadstart),this.trigger(D.eventName.loadedmetadata),this.trigger(D.eventName.loadeddata),this.trigger(D.eventName.canplaythrough)},G.prototype.onMediaFailed=function(a,b){var c=b.Result.Message,d=b.Result.Message;G._adaptiveStreamingError&&(c+=": "+G._adaptiveStreamingError.Message,d=G._adaptiveStreamingError.Message);var e=D.errorCode.errUnknown;-1!==d.indexOf(G._networkError)?e=D.errorCode.networkErrUnknown:-1!==d.indexOf(G._licenseError)||-1!==d.indexOf(G._licenseAcquisitionErrorCode)||-1!==d.indexOf(G._tokenError)||-1!==d.indexOf(G._licenseAcquisitionServiceSpecificErrorCode)?e=D.errorCode.encryptErrLicenseAcquire:-1!==d.indexOf(G._parseSegmentError)?e=D.errorCode.srcErrParseSegment:-1!==d.indexOf(G._parsePresentationError)?e=D.errorCode.srcErrParsePresentation:-1!==d.indexOf(G._unsupportedPresentation)&&(e=D.errorCode.srcErrUnsupportedPresentation),G._errored=!0,o["default"].raiseError.call(this,"silverlightss",e,c)},G.prototype.onAdaptiveStreamingErrorOccurred=function(a,b){G._adaptiveStreamingError=b.Result},G.prototype.onSeekCompleted=function(){G._seeking=!1,this.trigger(D.eventName.seeked)},G.prototype.onMediaEnded=function(){G._ended=!0,this.trigger(D.eventName.ended)},G.prototype.onTimeUpdate=function(){this.trigger(D.eventName.timeupdate)},G.prototype.onFullScreenChanged=function(){this.trigger(D.eventName.fullscreenchange)},G.prototype.onVolumeChanged=function(){this.trigger(D.eventName.volumechange)},G.prototype.onReportDiagTrace=function(a,b){AMP.Logger.verbose(AMP.Logger.Area.silverlightSS,b.Result)},G.prototype.onVideoDownloadBitrateChanged=function(a,b){G._downloadBitrate=b.Result,this.trigger(D.eventName.downloadbitratechanged)},G.prototype.onVideoPlaybackBitrateChanged=function(a,b){G._playbackBitrate=b.Result,this.trigger(D.eventName.playbackbitratechanged)},G.prototype.onMouseUp=function(a){var b=k["default"].elementFromPoint(a.clientX,a.clientY);b===this.el()?this.el().parentNode.focus():this.el().parentNode.blur()},G.prototype.reset=function(){G._srcSet=!1,G._seeking=!1,G._ended=!1,G._opening=!0,G._firstTimeUpdateOccuredAfterOpening=!1,G._adaptiveStreamingError=null,G._errored=!1},u["default"].options.silverlightSS={},q["default"].registerComponent("SilverlightSS",G),o["default"].registerTech("SilverlightSS",G),c["default"]=G,b.exports=c["default"]},{"../ampDefs.js":11,"../video.js/src/js/component.js":77,"../video.js/src/js/player.js":124,"../video.js/src/js/tech/tech.js":136,"../video.js/src/js/utils/browser.js":153,"../video.js/src/js/utils/dom.js":156,"../video.js/src/js/utils/fn.js":158,"../video.js/src/js/utils/time-ranges.js":167,"../video.js/src/js/video.js":171,"./Silverlight.js":65,"global/document":250,"global/window":251,"object.assign":244}],70:[function(a,b,c){"use strict";c.__esModule=!0;var d="2.3.9.1";c.ampVersion=d},{}],71:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./component"),h=d(g),i=a("object.assign"),j=d(i),k=function(a){function b(c,d){e(this,b),a.call(this,c,d)}return f(b,a),b.prototype.createEl=function(){var a=arguments.length<=0||void 0===arguments[0]?"div":arguments[0],b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return b=j["default"]({className:this.buildCSSClass()},b),h["default"].prototype.createEl.call(this,a,b,c)},b.prototype.buildCSSClass=function(){return"vjs-fullscreen-outline "+a.prototype.buildCSSClass.call(this)},b}(h["default"]);h["default"].registerComponent("FullscreenOutline",k),c["default"]=k,b.exports=c["default"]},{"./component":77,"object.assign":244}],72:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./component"),i=e(h),j=a("./utils/dom.js"),k=d(j),l=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,["removeSpinner","canplaythrough","canplay","playing","pause","seeked","error"],this.updatePlaying),this.on(c,["sourceset","waiting","seeking"],this.updateWaiting),this.on(c,"fullscreenchange",this.handleFullscreenChange),this.on("focus",this.handleFocus)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"p",{className:"vjs-screen-reader-text",id:"player-use-for-screen-reader-alert-only"+Math.random()});return b.setAttribute("role","alert"),b.setAttribute("aria-atomic","true"),b},b.prototype.updateWaiting=function(){var a=this;setTimeout(function(){null!=a.el_&&(a.el_.innerHTML=a.htmlEncode(a.localize("video buffering")))},0)},b.prototype.updatePlaying=function(){var a=this;setTimeout(function(){null!=a.el_&&(a.el_.innerHTML="")},0)},b.prototype.switchFocusToLastControlForSelectorInControlBar=function(a){for(var b=a+" .vjs-control",c=this.player_.controlBar.el().querySelectorAll(b),d=c.length,e=d-1;e>=0;e--){var f=c[e].getAttribute("tabIndex"),g=k.isVisible(c[e]);if(f>=0&&g)return c[e].focus(),!0}return!1},b.prototype.reverseFocus=function(){for(var a=[".amp-controlbaricons-right",".amp-cotnrolbaricons-middle",".amp-controlbaricons-left"],b=0;b<a.length;b++)if(this.switchFocusToLastControlForSelectorInControlBar(a[b]))return},b.prototype.handleFocus=function(){this.player_.isFullscreen()&&setTimeout(function(a){a.player_.el().focus()},200,this)},b.prototype.handleFullscreenChange=function(){this.player_.isFullscreen()?this.el_.setAttribute("tabIndex",0):this.el_.setAttribute("tabIndex",-1)},b}(i["default"]);i["default"].registerComponent("AriaAlerts",l),c["default"]=l,b.exports=c["default"]},{"./component":77,"./utils/dom.js":156}],73:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./button.js"),h=d(g),i=a("./component.js"),j=d(i),k=function(a){function b(c,d){e(this,b),a.call(this,c,d)}return f(b,a),b.prototype.buildCSSClass=function(){return this.options_.playerOptions.overrideDisabledForBigPlayButton?"vjs-big-play-button override-controls-disabled ":"vjs-big-play-button "},b.prototype.handleClick=function(){this.player_.play()},b}(h["default"]);k.prototype.controlText_="Play Video",j["default"].registerComponent("BigPlayButton",k),c["default"]=k,b.exports=c["default"]},{"./button.js":74,"./component.js":77}],74:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./tooltip-clickable"),i=e(h),j=a("./component"),k=e(j),l=a("./utils/events.js"),m=(d(l),a("./utils/fn.js")),n=(d(m),a("./utils/log.js")),o=e(n),p=a("global/document"),q=(e(p),a("object.assign")),r=e(q),s=a("./utils/close-other-menu.js"),t=e(s),u=function(a){function b(c,d){f(this,b),a.call(this,c,d)}return g(b,a),b.prototype.createEl=function(){var a=arguments.length<=0||void 0===arguments[0]?"button":arguments[0],b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];b=r["default"]({className:this.buildCSSClass()},b),"button"!==a&&(o["default"].warn("Creating a Button with an HTML element of "+a+" is deprecated; use ClickableComponent instead."),b=r["default"]({tabIndex:0},b),c=r["default"]({role:"button"},c)),c=r["default"]({type:"button","aria-live":"off"},c);var d=k["default"].prototype.createEl.call(this,a,b,c);return this.createControlTextEl(d),d},b.prototype.addChild=function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=this.constructor.name;return o["default"].warn("Adding an actionable (user controllable) child to a Button ("+c+") is not supported; use a ClickableComponent instead."),k["default"].prototype.addChild.call(this,a,b)},b.prototype.handleKeyPress=function(b){this.clearKeyboardTooltip(),32===b.which||13===b.which||a.prototype.handleKeyPress.call(this,b)},b.prototype.clearOtherMenus=function(){t["default"](this),this.clearKeyboardTooltip()},b}(i["default"]);k["default"].registerComponent("Button",u),c["default"]=u,b.exports=c["default"]},{"./component":77,"./tooltip-clickable":137,"./utils/close-other-menu.js":155,"./utils/events.js":157,"./utils/fn.js":158,"./utils/log.js":164,"global/document":250,"object.assign":244}],75:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./component"),i=e(h),j=a("./utils/dom.js"),k=d(j),l=a("./utils/events.js"),m=d(l),n=a("./utils/fn.js"),o=d(n),p=a("./utils/log.js"),q=e(p),r=a("global/document"),s=e(r),t=a("object.assign"),u=e(t),v=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.emitTapEvents(),this.on("tap",this.handleClick),this.on("click",this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur)}return g(b,a),b.prototype.createEl=function(){var b=arguments.length<=0||void 0===arguments[0]?"div":arguments[0],c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];c=u["default"]({className:this.buildCSSClass(),tabIndex:0},c),"button"===b&&q["default"].error("Creating a ClickableComponent with an HTML element of "+b+" is not supported; use a Button instead."),d=u["default"]({role:"button","aria-live":"off"},d);var e=a.prototype.createEl.call(this,b,c,d);return this.createControlTextEl(e),e},b.prototype.createControlTextEl=function(a){return this.options_.needTextControl&&this.options_.needTextControl===!1?a:(this.controlTextEl_=k.createEl("span",{className:"vjs-control-text"}),a&&a.appendChild(this.controlTextEl_),this.controlText(this.controlText_,a),this.controlTextEl_)},b.prototype.controlText=function(a){arguments.length<=1||void 0===arguments[1]?this.el():arguments[1];if(void 0===this.options_.needTextControl||this.options_.needTextControl!==!1){if(!a)return this.controlText_||"Need Text";var b=this.localize(a);this.controlText_=a,this.controlTextEl_.innerHTML=this.htmlEncode(b)}return this},b.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+a.prototype.buildCSSClass.call(this)},b.prototype.addChild=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return a.prototype.addChild.call(this,b,c)},b.prototype.enable=function(){return this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),this},b.prototype.disable=function(){return this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),this},b.prototype.handleClick=function(){},b.prototype.handleFocus=function(){m.on(s["default"],"keydown",o.bind(this,this.handleKeyPress)),this.el().setAttribute("aria-live","polite")},b.prototype.handleKeyPress=function(b){32===b.which||13===b.which?(b.preventDefault(),this.handleClick(b)):a.prototype.handleKeyPress&&a.prototype.handleKeyPress.call(this,b)},b.prototype.handleBlur=function(){m.off(s["default"],"keydown",o.bind(this,this.handleKeyPress)),this.el().setAttribute("aria-live","off")},b}(i["default"]);i["default"].registerComponent("ClickableComponent",v),c["default"]=v,b.exports=c["default"]},{"./component":77,"./utils/dom.js":156,"./utils/events.js":157,"./utils/fn.js":158,"./utils/log.js":164,"global/document":250,"object.assign":244}],76:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./button"),h=d(g),i=a("./component"),j=d(i),k=function(a){function b(c,d){e(this,b),a.call(this,c,d),this.controlText(d&&d.controlText||this.localize("Close"))}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-close-button "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(){this.trigger({type:"close",bubbles:!1})},b}(h["default"]);j["default"].registerComponent("CloseButton",k),c["default"]=k,b.exports=c["default"]},{"./button":74,"./component":77}],77:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var g=a("global/window"),h=e(g),i=a("./utils/dom.js"),j=d(i),k=a("./utils/fn.js"),l=d(k),m=a("./utils/guid.js"),n=d(m),o=a("./utils/events.js"),p=d(o),q=a("./utils/log.js"),r=e(q),s=a("./utils/to-title-case.js"),t=e(s),u=a("./utils/merge-options.js"),v=e(u),w=a("./utils/browser.js"),x=d(w),y=function(){function a(b,c,d){if(f(this,a),this.player_=!b&&this.play?b=this:b,this.options_=v["default"]({},this.options_),c=this.options_=v["default"](this.options_,c),this.id_=c.id||c.el&&c.el.id,!this.id_){var e=b&&b.id&&b.id()||"no_player";this.id_=e+"_component_"+n.newGUID()}this.name_=c.name||null,c.el?this.el_=c.el:c.createEl!==!1&&(this.el_=this.createEl()),this.children_=[],this.childIndex_={},this.childNameIndex_={},c.initChildren!==!1&&this.initChildren(),this.ready(d),c.reportTouchActivity!==!1&&this.enableTouchActivity()}return a.prototype.dispose=function(){if(this.el_&&this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var a=this.children_.length-1;a>=0;a--){this.children_[a].dispose&&this.children_[a].dispose();var b=this.children_[a].name_;b&&this[b]&&delete this[b]}this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&this.off(),this.el_&&this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),this.contentEl_&&this.contentEl_.parentNode&&this.contentEl_.parentNode.removeChild(this.contentEl_),this.el_&&j.removeElData(this.el_),this.contentEl_&&j.removeElData(this.contentEl_),this.el_=null,this.contentEl_=null,this.player_=null,this.options_=null},a.prototype.player=function(){return this.player_},a.prototype.options=function(a){return r["default"].warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),a?(this.options_=v["default"](this.options_,a),this.options_):this.options_},a.prototype.el=function(){return this.el_},a.prototype.createEl=function(a,b,c){return j.createEl(a,b,c)},a.prototype.localize=function(a){var b=this.player_.language&&this.player_.language(),c=this.player_.languages&&this.player_.languages();if(!b||!c)return a;var d=c[b];if(d&&d[a])return d[a];var e=b.split("-")[0],f=c[e];return f&&f[a]?f[a]:a},a.prototype.htmlEncode=function(a){if(!a)return"";for(var b=a.length,c=[],d=0;b>d;d++){var e=a.charAt(d);switch(e){case"<":c.push("&lt;");break;case">":c.push("&gt;");break;case"&":c.push("&amp;");break;case'"':c.push("&quot;");break;case"'":c.push("&#39;");break;default:c.push(e)}}return c.join("")},a.prototype.contentEl=function(){return this.contentEl_||this.el_},a.prototype.id=function(){return this.id_},a.prototype.name=function(){return this.name_},a.prototype.children=function(){return this.children_},a.prototype.getChildById=function(a){return this.childIndex_[a]},a.prototype.getChild=function(a){return this.childNameIndex_[a]},a.prototype.addChild=function(b){var c=this,d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],e=arguments.length<=2||void 0===arguments[2]?this.children_.length:arguments[2],f=void 0,g=void 0;if("string"==typeof b){g=b,d||(d={}),d===!0&&(r["default"].warn("Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`."),d={});var i=d.componentClass||t["default"](g);d.name=g;var j=a.getComponent(i);if(!j)throw new Error("Component "+i+" does not exist");if("function"!=typeof j)return null;f=new j(this.player_||this,d)}else f=b;if(this.children_.splice(e,0,f),"function"==typeof f.id&&(this.childIndex_[f.id()]=f),g=g||f.name&&f.name(),g&&(this.childNameIndex_[g]=f),"function"==typeof f.el&&f.el()){var k;!function(){var a=c.contentEl().children,b=a[e]||null;x.IS_MSAPPHOST&&h["default"].MSApp&&h["default"].MSApp.execUnsafeLocalFunction?(k=c.contentEl(),h["default"].MSApp.execUnsafeLocalFunction(function(){k.insertBefore(f.el(),b)})):c.contentEl().insertBefore(f.el(),b)}()}return f},a.prototype.removeChild=function(a){if("string"==typeof a&&(a=this.getChild(a)),a&&this.children_){for(var b=!1,c=this.children_.length-1;c>=0;c--)if(this.children_[c]===a){b=!0,this.children_.splice(c,1);break}if(b){this.childIndex_[a.id()]=null,this.childNameIndex_[a.name()]=null;var d=a.el();d&&d.parentNode===this.contentEl()&&this.contentEl().removeChild(a.el())}}},a.prototype.initChildren=function(){var b=this,c=this.options_.children;c&&!function(){var d=b.options_,e=function(a){var c=a.name,e=a.opts;if(void 0!==d[c]&&(e=d[c]),e!==!1){e===!0&&(e={}),e.playerOptions=b.options_.playerOptions;var f=b.addChild(c,e);f&&(b[c]=f)}},f=void 0,g=a.getComponent("Tech");f=Array.isArray(c)?c:Object.keys(c),f.concat(Object.keys(b.options_).filter(function(a){return!f.some(function(b){return"string"==typeof b?a===b:a===b.name})})).map(function(a){var d=void 0,e=void 0;return"string"==typeof a?(d=a,e=c[d]||b.options_[d]||{}):(d=a.name,e=a),{name:d,opts:e}}).filter(function(b){var c=a.getComponent(b.opts.componentClass||t["default"](b.name));return c&&!g.isTech(c)}).forEach(e)}()},a.prototype.buildCSSClass=function(){return""},a.prototype.on=function(a,b,c){var d=this;return"string"==typeof a||Array.isArray(a)?p.on(this.el_,a,l.bind(this,b)):!function(){
var e=a,f=b,g=l.bind(d,c),h=function(){return d.off(e,f,g)};h.guid=g.guid,d.on("dispose",h);var i=function(){return d.off("dispose",h)};i.guid=g.guid,a.nodeName?(p.on(e,f,g),p.on(e,"dispose",i)):"function"==typeof a.on&&(e.on(f,g),e.on("dispose",i))}(),this},a.prototype.off=function(a,b,c){if(!a||"string"==typeof a||Array.isArray(a))p.off(this.el_,a,b);else{var d=a,e=b,f=l.bind(this,c);this.off("dispose",f),a.nodeName?(p.off(d,e,f),p.off(d,"dispose",f)):(d.off(e,f),d.off("dispose",f))}return this},a.prototype.one=function(a,b,c){var d=this,e=arguments;return"string"==typeof a||Array.isArray(a)?p.one(this.el_,a,l.bind(this,b)):!function(){var f=a,g=b,h=l.bind(d,c),i=function j(){d.off(f,g,j),h.apply(null,e)};i.guid=h.guid,d.on(f,g,i)}(),this},a.prototype.trigger=function(a,b){return p.trigger(this.el_,a,b),this},a.prototype.ready=function(a){var b=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];return a&&(this.isReady_?b?a.call(this):this.setTimeout(a,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(a))),this},a.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var a=this.readyQueue_;this.readyQueue_=[],a&&a.length>0&&a.forEach(function(a){a.call(this)},this),this.trigger("ready")},1)},a.prototype.$=function(a,b){return j.$(a,b||this.contentEl())},a.prototype.$$=function(a,b){return j.$$(a,b||this.contentEl())},a.prototype.hasClass=function(a){return j.hasElClass(this.el_,a)},a.prototype.addClass=function(a){return j.addElClass(this.el_,a),this},a.prototype.removeClass=function(a){return j.removeElClass(this.el_,a),this},a.prototype.toggleClass=function(a,b){return j.toggleElClass(this.el_,a,b),this},a.prototype.show=function(){return this.removeClass("vjs-hidden"),this},a.prototype.hide=function(){return this.addClass("vjs-hidden"),this},a.prototype.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},a.prototype.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},a.prototype.width=function(a,b){return this.dimension("width",a,b)},a.prototype.height=function(a,b){return this.dimension("height",a,b)},a.prototype.dimensions=function(a,b){return this.width(a,!0).height(b)},a.prototype.dimension=function(a,b,c){if(void 0!==b)return(null===b||b!==b)&&(b=0),this.el_.style[a]=-1!==(""+b).indexOf("%")||-1!==(""+b).indexOf("px")?b:"auto"===b?"":b+"px",c||this.trigger("resize"),this;if(!this.el_)return 0;var d=this.el_.style[a],e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(this.el_["offset"+t["default"](a)],10)},a.prototype.currentDimension=function(a){var b=0;if("width"!==a&&"height"!==a)throw new Error("currentDimension only accepts width or height value");if("function"==typeof h["default"].getComputedStyle){var c=h["default"].getComputedStyle(this.el_);b=c.getPropertyValue(a)||c[a]}else if(this.el_.currentStyle){var d="offset"+t["default"](a);b=this.el_[d]}return b=parseFloat(b)},a.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},a.prototype.currentWidth=function(){return this.currentDimension("width")},a.prototype.currentHeight=function(){return this.currentDimension("height")},a.prototype.emitTapEvents=function(){var a=0,b=null,c=10,d=200,e=void 0;this.on("touchstart",function(c){1===c.touches.length&&(b={pageX:c.touches[0].pageX,pageY:c.touches[0].pageY},a=(new Date).getTime(),e=!0)}),this.on("touchmove",function(a){if(a.touches.length>1)e=!1;else if(b){var d=a.touches[0].pageX-b.pageX,f=a.touches[0].pageY-b.pageY,g=Math.sqrt(d*d+f*f);g>c&&(e=!1)}});var f=function(){e=!1};this.on("touchleave",f),this.on("touchcancel",f),this.on("touchend",function(c){if(b=null,e===!0){var f=(new Date).getTime()-a;d>f&&(c.preventDefault(),this.trigger("tap"))}})},a.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var a=l.bind(this.player(),this.player().reportUserActivity),b=void 0;this.on("touchstart",function(){a(),this.clearInterval(b),b=this.setInterval(a,250)});var c=function(){a(),this.clearInterval(b)};this.on("touchmove",a),this.on("touchend",c),this.on("touchcancel",c)}},a.prototype.setTimeout=function(a,b){a=l.bind(this,a);var c=h["default"].setTimeout(a,b),d=function(){this.clearTimeout(c)};return d.guid="vjs-timeout-"+c,this.on("dispose",d),c},a.prototype.clearTimeout=function(a){h["default"].clearTimeout(a);var b=function(){};return b.guid="vjs-timeout-"+a,this.off("dispose",b),a},a.prototype.setInterval=function(a,b){a=l.bind(this,a);var c=h["default"].setInterval(a,b),d=function(){this.clearInterval(c)};return d.guid="vjs-interval-"+c,this.on("dispose",d),c},a.prototype.clearInterval=function(a){h["default"].clearInterval(a);var b=function(){};return b.guid="vjs-interval-"+a,this.off("dispose",b),a},a.registerComponent=function(b,c){return a.components_||(a.components_={}),a.components_[b]=c,c},a.getComponent=function(b){return a.components_&&a.components_[b]?a.components_[b]:h["default"]&&h["default"].videojs&&h["default"].videojs[b]?(r["default"].warn("The "+b+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),h["default"].videojs[b]):void 0},a.extend=function(b){b=b||{},r["default"].warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var c=b.init||b.init||this.prototype.init||this.prototype.init||function(){},d=function(){c.apply(this,arguments)};d.prototype=Object.create(this.prototype),d.prototype.constructor=d,d.extend=a.extend;for(var e in b)b.hasOwnProperty(e)&&(d.prototype[e]=b[e]);return d},a}();y.registerComponent("Component",y),c["default"]=y,b.exports=c["default"]},{"./utils/browser.js":153,"./utils/dom.js":156,"./utils/events.js":157,"./utils/fn.js":158,"./utils/guid.js":161,"./utils/log.js":164,"./utils/merge-options.js":165,"./utils/to-title-case.js":169,"global/window":251}],78:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../track-button.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=(d(l),a("./audio-track-menu-item.js")),n=e(m),o=function(a){function b(c){var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];f(this,b),d.tracks=c.audioTracks&&c.audioTracks(),a.call(this,c,d),this.el_.setAttribute("aria-label","Audio Menu")}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-audio-button "+a.prototype.buildCSSClass.call(this)},b.prototype.createItems=function(){var a=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],b=this.player_.audioTracks&&this.player_.audioTracks();if(!b)return a;for(var c=0;c<b.length;c++){var d=b[c];a.push(new n["default"](this.player_,{selectable:!0,track:d}))}return a},b}(i["default"]);k["default"].registerComponent("AudioTrackButton",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":77,"../../utils/fn.js":158,"../track-button.js":109,"./audio-track-menu-item.js":79}],79:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-item.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=function(a){function b(c,d){var e=this;f(this,b);var g=d.track,h=c.audioTracks();d.label=g.label||g.language||"Unknown",d.selected=g.enabled,a.call(this,c,d),this.track=g,h&&!function(){var a=m.bind(e,e.handleTracksChange);h.addEventListener("change",a),e.on("dispose",function(){h.removeEventListener("change",a)})}()}return g(b,a),b.prototype.handleClick=function(b){var c=this.player_.audioTracks();if(a.prototype.handleClick.call(this,b),c)for(var d=0;d<c.length;d++){var e=c[d];e===this.track&&(e.enabled=!0)}},b.prototype.handleTracksChange=function(){this.selected(this.track.enabled)},b}(i["default"]);k["default"].registerComponent("AudioTrackMenuItem",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":77,"../../menu/menu-item.js":121,"../../utils/fn.js":158}],80:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../component.js"),h=d(g),i=a("./play-toggle.js"),j=(d(i),a("./time-controls/current-time-display.js")),k=(d(j),a("./time-controls/duration-display.js")),l=(d(k),a("./time-controls/time-divider.js")),m=(d(l),a("./time-controls/remaining-time-display.js")),n=(d(m),a("./live-display.js")),o=(d(n),a("./progress-control/progress-control.js")),p=(d(o),a("./fullscreen-toggle.js")),q=(d(p),a("./volume-control/volume-control.js")),r=(d(q),a("./volume-menu-button.js")),s=(d(r),a("./mute-toggle.js")),t=(d(s),a("./text-track-controls/chapters-button.js")),u=(d(t),a("./text-track-controls/descriptions-button.js")),v=(d(u),a("./text-track-controls/subtitles-button.js")),w=(d(v),a("./text-track-controls/captions-button.js")),x=(d(w),a("./audio-track-controls/audio-track-button.js")),y=(d(x),a("./playback-rate-menu/playback-rate-menu-button.js")),z=(d(y),a("./spacer-controls/custom-control-spacer.js")),A=(d(z),function(a){function b(c,d){e(this,b),a.call(this,c,d),this.hide(),this.on(c,"play",function(){this.show()})}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},b}(h["default"]));A.prototype.options_={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},h["default"].registerComponent("ControlBar",A),c["default"]=A,b.exports=c["default"]},{"../component.js":77,"./audio-track-controls/audio-track-button.js":78,"./fullscreen-toggle.js":81,"./live-display.js":82,"./mute-toggle.js":83,"./play-toggle.js":84,"./playback-rate-menu/playback-rate-menu-button.js":85,"./progress-control/progress-control.js":90,"./spacer-controls/custom-control-spacer.js":94,"./text-track-controls/captions-button.js":97,"./text-track-controls/chapters-button.js":98,"./text-track-controls/descriptions-button.js":100,"./text-track-controls/subtitles-button.js":102,"./time-controls/current-time-display.js":105,"./time-controls/duration-display.js":106,"./time-controls/remaining-time-display.js":107,"./time-controls/time-divider.js":108,"./volume-control/volume-control.js":111,"./volume-menu-button.js":113}],81:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=(e(h),a("../button.js")),j=e(i),k=a("../component.js"),l=e(k),m=a("../utils/browser.js"),n=(d(m),function(a){function b(c,d){f(this,b),d.needTextControl=!1,a.call(this,c,d),this.on(c,"fullscreenchange",this.handleFullscreenChange),this.on("keydown",this.handleKeyPress),this.on("mouseover",this.clearOtherMenus),this.on("focus",this.clearOtherMenus),this.el_.setAttribute("style","cursor:pointer"),this.el_.setAttribute("title",this.localize("Fullscreen")),this.player_&&this.player_.options_.disableFullscreenButton===!0&&this.addClass("vjs-hidden")}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleFullscreenChange=function(){this.player_.isFullscreen()?(this.el_.setAttribute("aria-label","Non-Fullscreen"),this.el_.setAttribute("title",this.localize("Non-Fullscreen"))):(this.el_.setAttribute("aria-label","Fullscreen"),this.el_.setAttribute("title",this.localize("Fullscreen"))),this.el_.focus()},b.prototype.handleClick=function(){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},b}(j["default"]));l["default"].registerComponent("FullscreenToggle",n),c["default"]=n,b.exports=c["default"]},{"../button.js":74,"../component.js":77,"../utils/browser.js":153,"global/window":251}],82:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../clickable-component.js"),i=e(h),j=a("../component.js"),k=e(j),l=a("../utils/dom.js"),m=d(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateShowing(),this.on(this.player(),"durationchange",this.updateShowing)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=m.createEl("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.htmlEncode(this.localize("Stream Type"))+"</span>"+this.htmlEncode(this.localize("LIVE"))},{"aria-live":"off"}),b.appendChild(this.contentEl_),b.setAttribute("aria-label",this.htmlEncode(this.localize("LIVE"))),b.setAttribute("style","cursor:pointer"),b.setAttribute("title",this.localize("Go to live")),b},b.prototype.updateShowing=function(){this.player().duration()===1/0?this.show():this.hide()},b.prototype.handleClick=function(){this.clickHandler&&this.clickHandler()},b.prototype.setClickHandler=function(a){this.clickHandler=a},b}(i["default"]);k["default"].registerComponent("LiveDisplay",n),c["default"]=n,b.exports=c["default"]},{"../clickable-component.js":75,"../component.js":77,"../utils/dom.js":156}],83:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../button"),i=e(h),j=a("../component"),k=e(j),l=a("../utils/dom.js"),m=d(l),n=function(a){function b(c,d){f(this,b),d.needTextControl=!1,a.call(this,c,d),this.on(c,"volumechange",this.update),c.tech_&&c.tech_.featuresVolumeControl===!1&&this.addClass("vjs-hidden"),this.on(c,"loadstart",function(){this.update(),c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),this.on("focus",this.clearOtherMenus),this.el_.setAttribute("aria-label","Mute")}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(){this.player_.muted(this.player_.muted()?!1:!0)},b.prototype.update=function(){var a=this.player_.volume(),b=3;0===a||this.player_.muted()?b=0:.33>a?b=1:.67>a&&(b=2),this.el_.setAttribute("aria-label",this.player_.muted()?"Unmute":"Mute");for(var c=0;4>c;c++)m.removeElClass(this.el_,"vjs-vol-"+c);m.addElClass(this.el_,"vjs-vol-"+b)},b}(i["default"]);k["default"].registerComponent("MuteToggle",n),c["default"]=n,b.exports=c["default"]},{"../button":74,"../component":77,"../utils/dom.js":156}],84:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=(e(h),a("../button.js")),j=e(i),k=a("../component.js"),l=e(k),m=a("../utils/browser.js"),n=(d(m),function(a){function b(c,d){f(this,b),d.needTextControl=!1,a.call(this,c,d),this.on(c,"play",this.handlePlay),this.on(c,"pause",this.handlePause),this.on("keydown",this.handleKeyPress),this.on("mouseover",this.clearOtherMenus),this.on("focus",this.clearOtherMenus),this.el_.setAttribute("style","cursor:pointer")}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-play-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},b.prototype.handlePlay=function(){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.el_.setAttribute("title",this.localize("Pause"))},b.prototype.handlePause=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.el_.setAttribute("title",this.localize("Play"))},b}(j["default"]));l["default"].registerComponent("PlayToggle",n),c["default"]=n,b.exports=c["default"]},{"../button.js":74,"../component.js":77,"../utils/browser.js":153,"global/window":251}],85:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-button.js"),i=e(h),j=a("../../menu/menu.js"),k=e(j),l=a("./playback-rate-menu-item.js"),m=e(l),n=a("../../component.js"),o=e(n),p=a("../../utils/dom.js"),q=d(p),r=function(a){function b(c,d){f(this,b),d.needTextControl=!1,a.call(this,c,d),this.updateVisibility(),this.updateLabel(),this.on(c,"loadstart",this.updateVisibility),this.on(c,"ratechange",this.updateLabel)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this);return this.labelEl_=q.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1}),b.appendChild(this.labelEl_),b},b.prototype.buildCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildCSSClass.call(this)},b.prototype.createMenu=function(){var a=new k["default"](this.player()),b=this.playbackRates();if(b)for(var c=b.length-1;c>=0;c--)a.addChild(new m["default"](this.player(),{rate:b[c]+"x"}));return a},b.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},b.prototype.handleClick=function(){for(var a=this.player().playbackRate(),b=this.playbackRates(),c=b[0],d=0;d<b.length;d++)if(b[d]>a){c=b[d];break}this.player().playbackRate(c)},b.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},b.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},b.prototype.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},b.prototype.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.htmlEncode(this.player().playbackRate())+"x")},b}(i["default"]);o["default"].registerComponent("PlaybackRateMenuButton",r),c["default"]=r,b.exports=c["default"]},{"../../component.js":77,"../../menu/menu-button.js":120,"../../menu/menu.js":122,"../../utils/dom.js":156,"./playback-rate-menu-item.js":86}],86:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../menu/menu-item.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b);var f=d.rate,g=parseFloat(f,10);d.label=f,d.selected=1===g,a.call(this,c,d),this.label=f,this.rate=g,this.on(c,"ratechange",this.update)}return f(b,a),b.prototype.handleClick=function(){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},b.prototype.update=function(){this.selected(this.player().playbackRate()===this.rate)},b}(h["default"]);k.prototype.contentElType="button",j["default"].registerComponent("PlaybackRateMenuItem",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":77,"../../menu/menu-item.js":121}],87:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"progress",this.update)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-load-progress ",innerHTML:'<span class="vjs-control-text"><span>'+this.htmlEncode(this.localize("Loaded"))+"</span>: 0%</span>"});return b},b.prototype.update=function(){var a=this.player_.buffered(),b=this.player_.duration(),c=this.player_.bufferedEnd(),d=this.el_.children,e=function(a,b){var c=a/b||0;return 100*(c>=1?1:c)+"%"};this.el_.style.width=e(c,b);for(var f=0;f<a.length;f++){var g=a.start(f),h=a.end(f),i=d[f];i||(i=this.el_.appendChild(k.createEl())),i.style.left=e(g,c),i.style.width=e(h-g,c)}for(var f=d.length;f>a.length;f--)this.el_.removeChild(d[f-1])},b}(i["default"]);i["default"].registerComponent("LoadProgressBar",l),c["default"]=l,b.exports=c["default"]},{"../../component.js":77,"../../utils/dom.js":156}],88:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/dom.js"),m=d(l),n=a("../../utils/fn.js"),o=d(n),p=a("../../utils/format-time.js"),q=e(p),r=a("lodash-compat/function/throttle"),s=e(r),t=function(a){function b(c,d){var e=this;f(this,b),a.call(this,c,d),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),this.keepTooltipsInside&&(this.tooltip=m.createEl("div",{className:"vjs-time-tooltip"}),this.el().appendChild(this.tooltip),this.addClass("vjs-keep-tooltips-inside")),this.tooltipSpan=m.createEl("span",{className:"amp-time-tooltip"}),this.el().appendChild(this.tooltipSpan),this.update(0,0),c.on("ready",function(){e.on(c.controlBar.progressControl.el(),"mousemove",s["default"](o.bind(e,e.handleMouseMove),25))}),this.wallClockTimeDisplaySettings=d.playerOptions.wallClockTimeDisplaySettings,this.showWallClockTime=this.wallClockTimeDisplaySettings?this.wallClockTimeDisplaySettings.enabled:!1}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},b.prototype.handleMouseMove=function(a){var b=this.player_.duration(),c=this.calculateDistance(a)*b,d=a.pageX-m.findElPosition(this.el().parentNode).left;this.update(c,d)},b.prototype.update=function(a,b){var c=q["default"](a,this.player_.duration());if(this.showWallClockTime){var d=a/this.player_.duration(),e=this.player_.presentationTimeFromPercentageOfDvrWindow(d),f=this.player_.getWallClockTime(e,this.wallClockTimeDisplaySettings.useLocalTimeZone,this.wallClockTimeDisplaySettings.timezone,this.wallClockTimeDisplaySettings.controlBar12HourFormat,!0);c=f||c}if(this.el().style.left=b+"px",this.tooltipSpan.innerHtml=this.tooltipSpan.innerText=c,this.clampAmpTooltipPosition_(b),this.keepTooltipsInside){var g=this.clampPosition_(b),h=b-g+1,j=parseFloat(i["default"].getComputedStyle(this.tooltip).width),k=j/2;this.tooltip.innerHTML=c,this.tooltip.style.right="-"+(k-h)+"px"}},b.prototype.calculateDistance=function(a){return m.getPointerPosition(this.el().parentNode,a).x},b.prototype.clampPosition_=function(a){if(!this.keepTooltipsInside)return a;var b=parseFloat(i["default"].getComputedStyle(this.player().el()).width),c=parseFloat(i["default"].getComputedStyle(this.tooltip).width),d=c/2,e=a;return d>a?e=Math.ceil(d):a>b-d&&(e=Math.floor(b-d)),e},b.prototype.clampAmpTooltipPosition_=function(a){var b=parseFloat(i["default"].getComputedStyle(this.player().el()).width),c=this.tooltipSpan.offsetWidth/2,d=a;d=c>a?Math.ceil(this.tooltipSpan.offsetWidth-a):a>b-c?Math.floor(b-a):c,this.tooltipSpan.style.right=-d+"px"},b}(k["default"]);k["default"].registerComponent("MouseTimeDisplay",t),c["default"]=t,b.exports=c["default"]},{"../../component.js":77,"../../utils/dom.js":156,"../../utils/fn.js":158,"../../utils/format-time.js":160,"global/window":251,"lodash-compat/function/throttle":200}],89:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/fn.js"),k=d(j),l=a("../../utils/dom.js"),m=(d(l),a("../../utils/format-time.js")),n=e(m),o=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateDataAttr(),this.on(c,"timeupdate",this.updateDataAttr),c.ready(k.bind(this,this.updateDataAttr)),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),this.keepTooltipsInside&&this.addClass("vjs-keep-tooltips-inside")}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar ",innerHTML:'<span class="vjs-control-text"><span>'+this.htmlEncode(this.localize("Progress"))+"</span>: 0%</span>"});return b},b.prototype.updateDataAttr=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("data-current-time",n["default"](a,this.player_.duration()))},b}(i["default"]);i["default"].registerComponent("PlayProgressBar",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":77,"../../utils/dom.js":156,"../../utils/fn.js":158,"../../utils/format-time.js":160}],90:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=a("./seek-bar.js"),j=(d(i),a("./mouse-time-display.js")),k=(d(j),function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control",tabIndex:-1})},b}(h["default"]));k.prototype.options_={children:["seekBar"]},h["default"].registerComponent("ProgressControl",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":77,"./mouse-time-display.js":88,"./seek-bar.js":91}],91:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){
return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=e(h),j=a("../../slider/slider.js"),k=e(j),l=a("../../component.js"),m=e(l),n=a("./load-progress-bar.js"),o=(e(n),a("./play-progress-bar.js")),p=(e(o),a("./tooltip-progress-bar.js")),q=(e(p),a("./seek-handle.js")),r=(e(q),a("../../utils/fn.js")),s=(d(r),a("../../utils/format-time.js")),t=e(s),u=a("object.assign"),v=(e(u),a("../../utils/browser.js")),w=d(v),x=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.timeInterval=8e3,this.isIntervalEnabled=!0,this.timerFunction,this.videoWasPlaying=null,this.on(c,"timeupdate",this.updateProgress),this.on(c,"ended",this.playEnded),this.on(c,"play",this.enableAriaUpdate),this.on(c,"pause",this.handlePause),this.on(c,"seeked",this.handleManualSeeked),this.on(c,"playing",this.handlePlaying),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),this.keepTooltipsInside&&(this.tooltipProgressBar=this.addChild("TooltipProgressBar"))}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},b.prototype.playEnded=function(){this.isIntervalEnabled=!1,clearTimeout(this.timerFunction),this.updateProgress()},b.prototype.handleManualSeeked=function(){null!==this.videoWasPlaying&&(this.videoWasPlaying?this.player_.play():this.videoWasPlaying=null)},b.prototype.handlePause=function(){clearTimeout(this.timerFunction),this.isIntervalEnabled=!0,this.updateAriaAttributes(this.el_)},b.prototype.handlePlaying=function(){this.videoWasPlaying=null},b.prototype.enableAriaUpdate=function(){var a=this;this.timerFunction=this.setTimeout(function(){a.isIntervalEnabled=!a.isIntervalEnabled,a.enableAriaUpdate()},this.timeInterval,this)},b.prototype.updateProgress=function(){if(this.updateAriaAttributes(this.el_),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.el_),this.tooltipProgressBar.el_.style.width=this.bar.el_.style.width;var a=parseFloat(i["default"].getComputedStyle(this.player().el()).width),b=parseFloat(i["default"].getComputedStyle(this.tooltipProgressBar.tooltip).width),c=this.tooltipProgressBar.el().style;c.maxWidth=Math.floor(a-b/2)+"px",c.minWidth=Math.ceil(b/2)+"px",c.right="-"+b/2+"px"}},b.prototype.updateAriaAttributes=function(a){if(this.isIntervalEnabled){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();if(a.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),0===b)a.setAttribute("aria-valuetext","0");else if(w.IS_SAFARI)a.setAttribute("aria-valuetext",t["default"](b,this.player_.duration()));else{for(var c=t["default"](b,this.player_.duration()),d=c.split(":"),e=0;e<d.length;e++)parseInt(d[e])<10&&(d[e]="0"+parseInt(d[e]));c=2===d.length?"00:"+d[0]+":"+d[1]:d[0]+":"+d[1]+":"+d[2],a.setAttribute("aria-valuetext",c)}this.isIntervalEnabled=!1}},b.prototype.getPercent=function(){var a=this.player_.duration(),b=0===a?0:this.player_.currentTime()/a;return b>=1?1:b},b.prototype.handleMouseDown=function(b){this.player_.scrubbing(!0),null===this.videoWasPlaying&&(this.videoWasPlaying=!this.player_.paused()),this.player_.pause(),a.prototype.handleMouseDown.call(this,b)},b.prototype.handleMouseMove=function(a){var b=this.calculateDistance(a)*this.player_.duration();b===this.player_.duration()&&(b-=.1),this.player_.currentTime(b)},b.prototype.handleMouseUp=function(b){a.prototype.handleMouseUp.call(this,b),this.player_.scrubbing(!1),this.isIntervalEnabled=!0,this.updateAriaAttributes(this.el_)},b.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5),this.isIntervalEnabled=!0,this.updateAriaAttributes(this.el_)},b.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5),this.isIntervalEnabled=!0,this.updateAriaAttributes(this.el_)},b}(k["default"]);x.prototype.options_={children:["loadProgressBar","mouseTimeDisplay","playProgressBar","seekHandle"],barName:"playProgressBar",handleName:"seekHandle"},x.prototype.playerEvent="timeupdate",m["default"].registerComponent("SeekBar",x),c["default"]=x,b.exports=c["default"]},{"../../component.js":77,"../../slider/slider.js":130,"../../utils/browser.js":153,"../../utils/fn.js":158,"../../utils/format-time.js":160,"./load-progress-bar.js":87,"./play-progress-bar.js":89,"./seek-handle.js":92,"./tooltip-progress-bar.js":93,"global/window":251,"object.assign":244}],92:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/fn.js"),k=d(j),l=a("../../utils/dom.js"),m=(d(l),function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"timeupdate",this.update),c.ready(k.bind(this,this.update))}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-slider-handle ",innerHTML:'<span class="vjs-control-text">Seekbar Handle</span>'});return b},b.prototype.update=function(){this.player_.controlBar&&this.player_.controlBar.progressControl&&this.player_.controlBar.progressControl.seekBar&&this.player_.controlBar.progressControl.seekBar.playProgressBar&&(this.el().style.left=this.player_.controlBar.progressControl.seekBar.playProgressBar.el_.style.width)},b}(i["default"]));i["default"].registerComponent("SeekHandle",m),c["default"]=m,b.exports=c["default"]},{"../../component.js":77,"../../utils/dom.js":156,"../../utils/fn.js":158}],93:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/fn.js"),k=d(j),l=a("../../utils/dom.js"),m=(d(l),a("../../utils/format-time.js")),n=e(m),o=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateDataAttr(),this.on(c,"timeupdate",this.updateDataAttr),c.ready(k.bind(this,this.updateDataAttr))}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar",innerHTML:'<div class="vjs-time-tooltip"></div>\n        <span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"});return this.tooltip=b.querySelector(".vjs-time-tooltip"),b},b.prototype.updateDataAttr=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),b=n["default"](a,this.player_.duration());this.el_.setAttribute("data-current-time",b),this.tooltip.innerHTML=b},b}(i["default"]);i["default"].registerComponent("TooltipProgressBar",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":77,"../../utils/dom.js":156,"../../utils/fn.js":158,"../../utils/format-time.js":160}],94:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./spacer.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,{className:this.buildCSSClass()});return b.innerHTML="&nbsp;",b},b}(h["default"]);j["default"].registerComponent("CustomControlSpacer",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":77,"./spacer.js":95}],95:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b}(h["default"]);h["default"].registerComponent("Spacer",i),c["default"]=i,b.exports=c["default"]},{"../../component.js":77}],96:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-menu-item.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b),d.track={kind:d.kind,player:c,label:"Settings",selectable:!1,"default":!1,mode:"disabled"},d.selectable=!1,a.call(this,c,d),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+d.kind+" settings dialog")}return f(b,a),b.prototype.handleClick=function(){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").el_.focus()},b}(h["default"]);j["default"].registerComponent("CaptionSettingsMenuItem",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":77,"./text-track-menu-item.js":104}],97:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-button.js"),h=d(g),i=a("../../component.js"),j=d(i),k=a("./caption-settings-menu-item.js"),l=d(k),m=function(a){function b(c,d,f){e(this,b),a.call(this,c,d,f),this.el_.setAttribute("aria-label","Captions Menu"),this.el_.setAttribute("title",this.localize("Captions Menu")),this.el_.setAttribute("role","presentation")}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-captions-button "+a.prototype.buildCSSClass.call(this)},b.prototype.update=function(){var b=2;a.prototype.update.call(this),this.player().tech_&&this.player().tech_.featuresNativeTextTracks&&(b=1),this.items&&this.items.length>b?this.show():this.hide()},b.prototype.createItems=function(){var b=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||b.push(new l["default"](this.player_,{kind:this.kind_})),a.prototype.createItems.call(this,b)},b}(h["default"]);m.prototype.kind_="captions",j["default"].registerComponent("CaptionsButton",m),c["default"]=m,b.exports=c["default"]},{"../../component.js":77,"./caption-settings-menu-item.js":96,"./text-track-button.js":103}],98:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./text-track-button.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("./text-track-menu-item.js"),m=e(l),n=a("./chapters-track-menu-item.js"),o=e(n),p=a("../../menu/menu.js"),q=e(p),r=a("../../utils/dom.js"),s=d(r),t=a("../../utils/fn.js"),u=(d(t),a("../../utils/to-title-case.js")),v=e(u),w=a("global/window"),x=(e(w),function(a){function b(c,d,e){f(this,b),a.call(this,c,d,e),this.el_.setAttribute("aria-label","Chapters Menu"),this.el_.setAttribute("title",this.localize("Chapters Menu"))}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-chapters-button "+a.prototype.buildCSSClass.call(this)},b.prototype.createItems=function(){var a=[],b=this.player_.textTracks();if(!b)return a;for(var c=0;c<b.length;c++){var d=b[c];d.kind===this.kind_&&a.push(new m["default"](this.player_,{track:d}))}return a},b.prototype.createMenu=function(){for(var a=this,b=this.player_.textTracks()||[],c=void 0,d=this.items||[],e=b.length-1;e>=0;e--){var f=b[e];if(f.kind===this.kind_){c=f;break}}var g=new q["default"](this.player_),h=s.createEl("li",{className:"vjs-menu-title",innerHTML:v["default"](this.kind_),tabIndex:-1});if(g.children_.unshift(h),s.insertElFirst(h,g.contentEl()),c&&null==c.cues){c.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(c);i&&i.addEventListener("load",function(){return a.update()})}if(c&&c.cues&&c.cues.length>0)for(var j=c.cues,k=void 0,e=0,l=j.length;l>e;e++){k=j[e];var m=new o["default"](this.player_,{track:c,cue:k});d.push(m),g.addChild(m)}return d.length>0&&this.show(),this.items=d,g},b}(i["default"]));x.prototype.kind_="chapters",k["default"].registerComponent("ChaptersButton",x),c["default"]=x,b.exports=c["default"]},{"../../component.js":77,"../../menu/menu.js":122,"../../utils/dom.js":156,"../../utils/fn.js":158,"../../utils/to-title-case.js":169,"./chapters-track-menu-item.js":99,"./text-track-button.js":103,"./text-track-menu-item.js":104,"global/window":251}],99:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-item.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=function(a){function b(c,d){f(this,b);var e=d.track,g=d.cue,h=c.currentTime();d.label=g.text,d.selected=g.startTime<=h&&h<g.endTime,a.call(this,c,d),this.track=e,this.cue=g,e.addEventListener("cuechange",m.bind(this,this.update))}return g(b,a),b.prototype.handleClick=function(){a.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},b.prototype.update=function(){var a=this.cue,b=this.player_.currentTime();this.selected(a.startTime<=b&&b<a.endTime)},b}(i["default"]);k["default"].registerComponent("ChaptersTrackMenuItem",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":77,"../../menu/menu-item.js":121,"../../utils/fn.js":158}],100:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./text-track-button.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=function(a){function b(c,d,e){var g=this;f(this,b),a.call(this,c,d,e),this.el_.setAttribute("aria-label","Descriptions Menu"),this.el_.setAttribute("title",this.localize("Descriptions Menu"));var h=c.textTracks();h&&!function(){var a=m.bind(g,g.handleTracksChange);h.addEventListener("change",a),g.on("dispose",function(){h.removeEventListener("change",a)})}()}return g(b,a),b.prototype.handleTracksChange=function(){for(var a=this.player().textTracks(),b=!1,c=0,d=a.length;d>c;c++){var e=a[c];if(e.kind!==this.kind_&&"showing"===e.mode){b=!0;break}}b?this.disable():this.enable()},b.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildCSSClass.call(this)},b}(i["default"]);n.prototype.kind_="descriptions",k["default"].registerComponent("DescriptionsButton",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":77,"../../utils/fn.js":158,"./text-track-button.js":103}],101:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-menu-item.js"),h=d(g),i=a("../../component.js"),j=d(i),k=a("../../utils/to-title-case.js"),l=d(k),m=function(a){function b(c,d){e(this,b),d.track={kind:d.kind,player:c,label:l["default"](d.kind)+" Off","default":!1,mode:"disabled"},d.selectable=!0,a.call(this,c,d),this.selected(!0)}return f(b,a),b.prototype.handleTracksChange=function(){for(var a=this.player().textTracks(),b=!0,c=0,d=a.length;d>c;c++){var e=a[c];if(e.kind===this.track.kind&&"showing"===e.mode){b=!1;break}}this.selected(b)},b}(h["default"]);j["default"].registerComponent("OffTextTrackMenuItem",m),c["default"]=m,b.exports=c["default"]},{"../../component.js":77,"../../utils/to-title-case.js":169,"./text-track-menu-item.js":104}],102:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-button.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d,f){e(this,b),a.call(this,c,d,f),this.el_.setAttribute("aria-label","Subtitles Menu"),this.el_.setAttribute("title",this.localize("Subtitles Menu")),this.el_.setAttribute("role","presentation")}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+a.prototype.buildCSSClass.call(this)},b.prototype.update=function(){a.prototype.update.call(this);var b=1;this.items&&this.items.length>b?this.show():this.hide()},b}(h["default"]);k.prototype.kind_="subtitles",j["default"].registerComponent("SubtitlesButton",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":77,"./text-track-button.js":103}],103:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../track-button.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=(d(l),a("./text-track-menu-item.js")),n=e(m),o=a("./off-text-track-menu-item.js"),p=e(o),q=function(a){function b(c){var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];f(this,b),d.tracks=c.textTracks(),d.needTextControl=!1,a.call(this,c,d)}return g(b,a),b.prototype.createItems=function(){var a=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];a.push(new p["default"](this.player_,{kind:this.kind_}));var b=this.player_.textTracks();if(!b)return a;for(var c=0;c<b.length;c++){var d=b[c];d.kind===this.kind_&&a.push(new n["default"](this.player_,{selectable:!0,track:d}))}return a},b}(i["default"]);k["default"].registerComponent("TextTrackButton",q),c["default"]=q,b.exports=c["default"]},{"../../component.js":77,"../../utils/fn.js":158,"../track-button.js":109,"./off-text-track-menu-item.js":101,"./text-track-menu-item.js":104}],104:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-item.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=a("global/window"),o=e(n),p=a("global/document"),q=e(p),r=function(a){function b(c,d){var e=this;f(this,b);var g=d.track,h=c.textTracks();d.label=g.label||g.language||"Unknown",d.selected=g["default"]||"showing"===g.mode,a.call(this,c,d),this.track=g,h&&!function(){var a=m.bind(e,e.handleTracksChange,e.id_);h.addEventListener("change",a),e.on("dispose",function(){h.removeEventListener("change",a)})}(),h&&void 0===h.onchange&&!function(){var a=void 0;e.on(["tap","click"],function(){if("object"!=typeof o["default"].Event)try{a=new o["default"].Event("change")}catch(b){}a||(a=q["default"].createEvent("Event"),a.initEvent("change",!0,!0)),h.dispatchEvent(a)})}()}return g(b,a),b.prototype.handleClick=function(b){var c=this.track.kind,d=this.player_.textTracks();if(a.prototype.handleClick.call(this,b),d)for(var e=0;e<d.length;e++){var f=d[e];f.kind===c&&(f.mode=f===this.track?"showing":"disabled")}},b.prototype.handleTracksChange=function(){this.selected("showing"===this.track.mode)},b}(i["default"]);k["default"].registerComponent("TextTrackMenuItem",r),c["default"]=r,b.exports=c["default"]},{"../../component.js":77,"../../menu/menu-item.js":121,"../../utils/fn.js":158,"global/document":250,"global/window":251}],105:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=a("../../utils/format-time.js"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"timeupdate",this.updateContent),this.wallClockTimeDisplaySettings=d.playerOptions.wallClockTimeDisplaySettings,this.showWallClockTime=this.wallClockTimeDisplaySettings?this.wallClockTimeDisplaySettings.enabled:!1}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">'+this.htmlEncode(this.localize("Current Time"))+" </span>0:00"},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();if(a=m["default"](a,this.player_.duration()),this.showWallClockTime){var b=this.player_.getWallClockTime(null,this.wallClockTimeDisplaySettings.useLocalTimeZone,this.wallClockTimeDisplaySettings.timezone,this.wallClockTimeDisplaySettings.controlBar12HourFormat,!0);a=b||a}var c=this.localize("Current Time");a!==this.time_&&(this.time_=a,this.contentEl_.innerHTML='<span class="vjs-control-text">'+this.htmlEncode(c)+"</span> "+a)},b}(i["default"]);i["default"].registerComponent("CurrentTimeDisplay",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":77,"../../utils/dom.js":156,"../../utils/format-time.js":160}],106:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=a("../../utils/format-time.js"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.wallClockTimeDisplaySettings=d.playerOptions.wallClockTimeDisplaySettings,this.showWallClockTime=this.wallClockTimeDisplaySettings?this.wallClockTimeDisplaySettings.enabled:!1,this.showWallClockTime?this.on(c,"timeupdate",this.updateContentWallClockTime):this.on(c,"durationchange",this.updateContent)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.htmlEncode(this.localize("Duration Time"))+"</span> 0:00"},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(){var a=this.player_.duration();if(a&&this.duration_!==a){this.duration_=a;var b=this.localize("Duration Time"),c=m["default"](a);this.contentEl_.innerHTML='<span class="vjs-control-text">'+this.htmlEncode(b)+"</span> "+c}},b.prototype.updateContentWallClockTime=function(){var a=null,b=this.player_.playableWindowEndInSec()||this.player_.duration();if(a=this.player_.getWallClockTime(b,this.wallClockTimeDisplaySettings.useLocalTimeZone,this.wallClockTimeDisplaySettings.timezone,this.wallClockTimeDisplaySettings.controlBar12HourFormat,!0)){if(this.duration_!==a){this.duration_=a;var c=this.localize("End Time");this.contentEl_.innerHTML='<span class="vjs-control-text">'+this.htmlEncode(c)+"</span> "+a}}else this.updateContent()},b}(i["default"]);i["default"].registerComponent("DurationDisplay",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":77,"../../utils/dom.js":156,"../../utils/format-time.js":160}],107:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=a("../../utils/format-time.js"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"timeupdate",this.updateContent),this.on(c,"durationchange",this.updateContent)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.htmlEncode(this.localize("Remaining Time"))+"</span> -0:00"},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(){if(this.player_.duration()){var a=this.localize("Remaining Time"),b=m["default"](this.player_.remainingTime());b!==this.formattedTime_&&(this.formattedTime_=b,this.contentEl_.innerHTML='<span class="vjs-control-text">'+this.htmlEncode(a)+"</span> -"+b)}},b}(i["default"]);i["default"].registerComponent("RemainingTimeDisplay",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":77,"../../utils/dom.js":156,"../../utils/format-time.js":160}],108:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,
configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},b.prototype.blank=function(){this.el().innerHTML="<div><span></span></div>"},b.prototype.unblank=function(){this.el().innerHTML="<div><span>/</span></div>"},b}(h["default"]);h["default"].registerComponent("TimeDivider",i),c["default"]=i,b.exports=c["default"]},{"../../component.js":77}],109:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../menu/menu-button.js"),i=e(h),j=a("../component.js"),k=e(j),l=a("../utils/fn.js"),m=d(l),n=function(a){function b(c,d){f(this,b);var e=d.tracks;if(a.call(this,c,d),this.items.length<=1&&this.hide(),e){var g=m.bind(this,this.update);e.addEventListener("removetrack",g),e.addEventListener("addtrack",g),this.player_.on("dispose",function(){e.removeEventListener("removetrack",g),e.removeEventListener("addtrack",g)})}}return g(b,a),b}(i["default"]);k["default"].registerComponent("TrackButton",n),c["default"]=n,b.exports=c["default"]},{"../component.js":77,"../menu/menu-button.js":120,"../utils/fn.js":158}],110:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../slider/slider.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=a("./volume-level.js"),o=(e(n),function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"volumechange",this.updateARIAAttributes),c.ready(m.bind(this,this.updateARIAAttributes))}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar "},{"aria-label":"volume level"});return b},b.prototype.handleMouseMove=function(a){this.checkMuted(),this.player_.volume(this.calculateDistance(a))},b.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},b.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},b.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},b.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},b.prototype.updateARIAAttributes=function(){var a=(100*this.player_.volume()).toFixed(2);this.el_.setAttribute("aria-valuenow",a),this.el_.setAttribute("aria-valuetext",a+"%")},b}(i["default"]));o.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},o.prototype.playerEvent="volumechange",k["default"].registerComponent("VolumeBar",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":77,"../../slider/slider.js":130,"../../utils/fn.js":158,"./volume-level.js":112}],111:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=a("./volume-bar.js"),j=(d(i),function(a){function b(c,d){e(this,b),a.call(this,c,d),c.tech_&&c.tech_.featuresVolumeControl===!1&&this.addClass("vjs-hidden"),this.on(c,"loadstart",function(){c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},b}(h["default"]));j.prototype.options_={children:["volumeBar"]},h["default"].registerComponent("VolumeControl",j),c["default"]=j,b.exports=c["default"]},{"../../component.js":77,"./volume-bar.js":110}],112:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},b}(h["default"]);h["default"].registerComponent("VolumeLevel",i),c["default"]=i,b.exports=c["default"]},{"../../component.js":77}],113:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../utils/fn.js"),i=e(h),j=a("../component.js"),k=d(j),l=a("../popup/popup.js"),m=d(l),n=a("../popup/popup-button.js"),o=d(n),p=a("./mute-toggle.js"),q=d(p),r=a("./volume-control/volume-bar.js"),s=d(r),t=function(a){function b(c){function d(){c.tech_&&c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];f(this,b),void 0===e.inline&&(e.inline=!0),void 0===e.vertical&&(e.vertical=e.inline?!1:!0),e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=!!e.vertical,a.call(this,c,e),this.on(c,"volumechange",this.volumeUpdate),this.on(c,"loadstart",this.volumeUpdate),d.call(this),this.on(c,"loadstart",d)}return g(b,a),b.prototype.buildCSSClass=function(){var b="";return b=this.options_.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+a.prototype.buildCSSClass.call(this)+" "+b},b.prototype.createPopup=function(){var a=new m["default"](this.player_,{contentElType:"div"}),b=new s["default"](this.player_,this.options_.volumeBar);return a.addChild(b),this.menuContent=a,this.volumeBar=b,this.attachVolumeBarEvents(),a},b.prototype.handleClick=function(){q["default"].prototype.handleClick.call(this),this.buttonPressed_=!this.buttonPressed_,a.prototype.handleClick.call(this)},b.prototype.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],i.bind(this,this.handleMouseDown))},b.prototype.handleMouseDown=function(){this.on(["mousemove","touchmove"],i.bind(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.el_.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},b.prototype.handleMouseUp=function(){this.off(["mousemove","touchmove"],i.bind(this.volumeBar,this.volumeBar.handleMouseMove))},b}(o["default"]);t.prototype.volumeUpdate=q["default"].prototype.update,t.prototype.controlText_="Volume",t.prototype.buttonPressed_=!1,t.prototype.unpressButton=function(){this.menuContent.unlockShowing(),this.el_.setAttribute("aria-expanded","false"),this.buttonPressed_=!1},k["default"].registerComponent("VolumeMenuButton",t),c["default"]=t,b.exports=c["default"]},{"../component.js":77,"../popup/popup-button.js":126,"../popup/popup.js":127,"../utils/fn.js":158,"./mute-toggle.js":83,"./volume-control/volume-bar.js":110}],114:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./component"),i=e(h),j=a("./modal-dialog"),k=e(j),l=a("./utils/dom"),m=d(l),n=a("./utils/merge-options"),o=e(n),p=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.contentEl_.setAttribute("tabIndex",0),this.on(c,"error",this.open)}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-error-display "+a.prototype.buildCSSClass.call(this)},b.prototype.content=function(){var a=this.player().error();return a?this.localize(a.message):""},b.prototype.open=function(){a.prototype.open.call(this),this.opened_&&(m.textContent(this.descEl_,this.content()),this.player_.controlBar&&this.player_.controlBar.hide())},b.prototype.close=function(){this.hasBeenOpened_===!0&&this.player_.controlBar&&this.player_.controlBar.show(),a.prototype.close.call(this)},b}(k["default"]);p.prototype.options_=o["default"](k["default"].prototype.options_,{fillAlways:!0,temporary:!1,uncloseable:!0}),i["default"].registerComponent("ErrorDisplay",p),c["default"]=p,b.exports=c["default"]},{"./component":77,"./modal-dialog":123,"./utils/dom":156,"./utils/merge-options":165}],115:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}c.__esModule=!0;var e=a("./utils/events.js"),f=d(e),g=function(){};g.prototype.allowedEvents_={},g.prototype.on=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},f.on(this,a,b),this.addEventListener=c},g.prototype.addEventListener=g.prototype.on,g.prototype.off=function(a,b){f.off(this,a,b)},g.prototype.removeEventListener=g.prototype.off,g.prototype.one=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},f.one(this,a,b),this.addEventListener=c},g.prototype.trigger=function(a){var b=a.type||a;"string"==typeof a&&(a={type:b}),a=f.fixEvent(a),this.allowedEvents_[b]&&this["on"+b]&&this["on"+b](a),f.trigger(this,a)},g.prototype.dispatchEvent=g.prototype.trigger,c["default"]=g,b.exports=c["default"]},{"./utils/events.js":157}],116:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("./utils/log"),f=d(e),g=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.super_=b)},h=function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=function(){a.apply(this,arguments)},d={};"object"==typeof b?("function"==typeof b.init&&(f["default"].warn("Constructor logic via init() is deprecated; please use constructor() instead."),b.constructor=b.init),b.constructor!==Object.prototype.constructor&&(c=b.constructor),d=b):"function"==typeof b&&(c=b),g(c,a);for(var e in d)d.hasOwnProperty(e)&&(c.prototype[e]=d[e]);return c};c["default"]=h,b.exports=c["default"]},{"./utils/log":164}],117:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;for(var e=a("global/document"),f=d(e),g={},h=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=h[0],j=void 0,k=0;k<h.length;k++)if(h[k][1]in f["default"]){j=h[k];break}if(j)for(var k=0;k<j.length;k++)g[i[k]]=j[k];c["default"]=g,b.exports=c["default"]},{"global/document":250}],118:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./component"),i=e(h),j=a("./utils/dom.js"),k=d(j),l=a("global/document"),m=(e(l),function(a){function b(c,d){f(this,b),a.call(this,c,d)}return g(b,a),b.prototype.createEl=function(){this.contentEl_=k.createEl("span",{});var b=a.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return b.appendChild(this.contentEl_),b},b}(i["default"]));i["default"].registerComponent("LoadingSpinner",m),c["default"]=m,b.exports=c["default"]},{"./component":77,"./utils/dom.js":156,"global/document":250}],119:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("object.assign"),f=d(e),g=function i(a){"number"==typeof a?this.code=a:"string"==typeof a?this.message=a:"object"==typeof a&&f["default"](this,a),this.message||(this.message=i.defaultMessages[this.code]||"")};g.prototype.code=0,g.prototype.message="",g.prototype.status=null,g.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],g.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var h=0;h<g.errorTypes.length;h++)g[g.errorTypes[h]]=h,g.prototype[g.errorTypes[h]]=h;c["default"]=g,b.exports=c["default"]},{"object.assign":244}],120:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../tooltip-clickable.js"),i=e(h),j=a("../component.js"),k=e(j),l=a("./menu.js"),m=e(l),n=a("../utils/dom.js"),o=d(n),p=a("../utils/fn.js"),q=d(p),r=a("../utils/to-title-case.js"),s=e(r),t=a("../utils/browser.js"),u=d(t),v=a("global/window"),w=(e(v),a("../utils/close-other-menu.js")),x=e(w),y=function(a){function b(c){var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];f(this,b),a.call(this,c,d),this.update(),this.enabled_=!0,this.el_.setAttribute("aria-haspopup","true"),this.el_.setAttribute("role","menuitem"),this.on("keydown",this.handleSubmenuKeyPress),this.on("mouseover",this.handleMouseOver),this.on("mouseleave",this.handleMouseLeave),this.on("focus",this.clearOtherMenus),this.on("focusin",this.handleFocusin),this.on("focusout",this.clearKeyboardTooltip);var e=this;c.on("userinactive",function(){e.buttonPressed_&&(e.unpressButton(),e.el_.focus(),e.el_.setAttribute("aria-hidden","true"))})}return g(b,a),b.prototype.update=function(){var a=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=a,this.addChild(a),this.buttonPressed_=!1,this.el_.setAttribute("aria-expanded","false"),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},b.prototype.createMenu=function(){var a=new m["default"](this.player_);if(this.options_.title){var b=o.createEl("li",{className:"vjs-menu-title",innerHTML:this.htmlEncode(s["default"](this.options_.title)),tabIndex:-1});a.children_.unshift(b),o.insertElFirst(b,a.contentEl())}if(this.items=this.createItems(),this.items)for(var c=0;c<this.items.length;c++)a.addItem(this.items[c]);return a},b.prototype.createItems=function(){},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b.prototype.buildCSSClass=function(){var b="vjs-menu-button";return b+=this.options_.inline===!0?"-inline":"-popup","vjs-menu-button "+b+" "+a.prototype.buildCSSClass.call(this)},b.prototype.handleFocusin=function(){this.buttonPressed_||a.prototype.handleFocusin.call(this)},b.prototype.hasJustBeenClicked=function(){return!1},b.prototype.handleClick=function(){this.hasJustBeenClicked()||(this.clearOtherMenus(),this.one(this.menu.contentEl(),"mouseleave",q.bind(this,function(){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton())},b.prototype.handleKeyPress=function(b){27===b.which||9===b.which?(this.buttonPressed_&&this.unpressButton(),9!==b.which&&b.preventDefault()):38===b.which||40===b.which?this.buttonPressed_||(this.pressButton(),b.preventDefault()):a.prototype.handleKeyPress.call(this,b)},b.prototype.handleSubmenuKeyPress=function(a){(27===a.which||9===a.which)&&(this.buttonPressed_&&(this.unpressButton(),27===a.which&&this.el_.focus()),9!==a.which&&a.preventDefault())},b.prototype.handleMouseOver=function(){this.clearOtherMenus(),this.buttonPressed_||this.pressButton(),this.clearKeyboardTooltip()},b.prototype.handleMouseLeave=function(){this.unpressButton()},b.prototype.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.lockShowing(),this.el_.setAttribute("aria-expanded","true"),this.menu.focus())},b.prototype.unpressButton=function(){if(this.enabled_){this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-expanded","false");var a=this.player().getChild("textTrackSettings").el_.className;u.IS_ANDROID&&a.indexOf("vjs-hidden")>=0&&this.el_.focus()}},b.prototype.disable=function(){return this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-expanded","false"),this.enabled_=!1,a.prototype.disable.call(this)},b.prototype.enable=function(){return this.enabled_=!0,a.prototype.enable.call(this)},b.prototype.clearOtherMenus=function(){x["default"](this),this.clearKeyboardTooltip()},b}(i["default"]);k["default"].registerComponent("MenuButton",y),c["default"]=y,b.exports=c["default"]},{"../component.js":77,"../tooltip-clickable.js":137,"../utils/browser.js":153,"../utils/close-other-menu.js":155,"../utils/dom.js":156,"../utils/fn.js":158,"../utils/to-title-case.js":169,"./menu.js":122,"global/window":251}],121:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../clickable-component.js"),h=d(g),i=a("../component.js"),j=d(i),k=a("object.assign"),l=d(k),m=function(a){function b(c,d){e(this,b),a.call(this,c,d),this.selectable=d.selectable,this.selected(d.selected),this.selectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitem")}return f(b,a),b.prototype.createEl=function(b,c,d){return a.prototype.createEl.call(this,"li",l["default"]({className:"vjs-menu-item",innerHTML:this.htmlEncode(this.localize(this.options_.label)),tabIndex:-1},c),d=l["default"]({"aria-label":this.htmlEncode(this.localize(this.options_.label))},d))},b.prototype.handleClick=function(){this.selected(!0)},b.prototype.selected=function(a){this.selectable&&(a?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(" ")))},b}(h["default"]);j["default"].registerComponent("MenuItem",m),c["default"]=m,b.exports=c["default"]},{"../clickable-component.js":75,"../component.js":77,"object.assign":244}],122:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component.js"),i=e(h),j=a("../utils/dom.js"),k=d(j),l=a("../utils/fn.js"),m=d(l),n=a("../utils/events.js"),o=d(n),p=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.focusedChild_=-1,this.on("keydown",this.handleKeyPress)}return g(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",m.bind(this,function(){this.unlockShowing()}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=k.createEl(b,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var c=a.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return c.setAttribute("role","presentation"),c.appendChild(this.contentEl_),o.on(c,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),c},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepForward()):(38===a.which||39===a.which)&&(a.preventDefault(),this.stepBack())},b.prototype.stepForward=function(){var a=0;void 0!==this.focusedChild_&&(a=this.focusedChild_+1),this.focus(a,!0)},b.prototype.stepBack=function(){var a=0;void 0!==this.focusedChild_&&(a=this.focusedChild_-1),this.focus(a,!1)},b.prototype.focus=function(){var a=arguments.length<=0||void 0===arguments[0]?0:arguments[0],b=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],c=this.children().slice(),d=c.length&&c[0].className&&/vjs-menu-title/.test(c[0].className);d&&c.shift(),c.length>0&&(0>a?a=0:a>=c.length&&(a=c.length-1),a=this.getNextVisibleElement(a,c,b),-1!==a&&(this.focusedChild_=a,c[a].el_.focus()))},b.prototype.getNextVisibleElement=function(a,b,c){for(;a>=0&&a<b.length;){if(k.isVisible(b[a].el_))return a;c?a+=1:a-=1}return-1},b}(i["default"]);i["default"].registerComponent("Menu",p),c["default"]=p,b.exports=c["default"]},{"../component.js":77,"../utils/dom.js":156,"../utils/events.js":157,"../utils/fn.js":158}],123:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./utils/dom"),i=e(h),j=a("./utils/fn"),k=e(j),l=a("./utils/log"),m=(d(l),a("./component")),n=d(m),o=a("./close-button"),p=(d(o),"vjs-modal-dialog"),q=27,r=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=i.createEl("div",{className:p+"-content"},{role:"document"}),this.descEl_=i.createEl("p",{className:p+"-description vjs-offscreen",id:this.el().getAttribute("aria-describedby")}),i.textContent(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},b.prototype.buildCSSClass=function(){return p+" vjs-hidden "+a.prototype.buildCSSClass.call(this)},b.prototype.handleKeyPress=function(a){a.which===q&&this.closeable()&&this.close()},b.prototype.label=function(){return this.options_.label||this.localize("Modal Window")},b.prototype.description=function(){var a=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(a+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),a},b.prototype.open=function(){if(!this.opened_){var a=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!a.paused(),this.wasPlaying_&&a.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",k.bind(this,this.handleKeyPress)),this.playerControlsEnabled_=a.controls(),this.playerControlsEnabled_&&a.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}return this},b.prototype.opened=function(a){return"boolean"==typeof a&&this[a?"open":"close"](),this.opened_},b.prototype.close=function(){if(this.opened_){var a=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&a.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",k.bind(this,this.handleKeyPress)),this.playerControlsEnabled_&&a.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.options_.temporary&&this.dispose()}return this},b.prototype.closeable=function c(a){if("boolean"==typeof a){var c=this.closeable_=!!a,b=this.getChild("closeButton");if(c&&!b){var d=this.contentEl_;this.contentEl_=this.el_,b=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=d,this.on(b,"close",this.close)}!c&&b&&(this.off(b,"close",this.close),this.removeChild(b),b.dispose())}return this.closeable_},b.prototype.fill=function(){return this.fillWith(this.content())},b.prototype.fillWith=function(a){var b=this.contentEl(),c=b.parentNode,d=b.nextSibling;return this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,c&&c.removeChild(b),this.empty(),i.insertContent(b,a),this.trigger("modalfill"),c&&(d?c.insertBefore(b,d):c.appendChild(b)),this},b.prototype.empty=function(){return this.trigger("beforemodalempty"),i.emptyEl(this.contentEl()),this.trigger("modalempty"),this},b.prototype.content=function(a){return"undefined"!=typeof a&&(this.content_=a),this.content_},b}(n["default"]);r.prototype.options_={temporary:!0},n["default"].registerComponent("ModalDialog",r),c["default"]=r,b.exports=c["default"]},{"./close-button":76,"./component":77,"./utils/dom":156,"./utils/fn":158,"./utils/log":164}],124:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./component.js"),i=e(h),j=a("global/document"),k=e(j),l=a("global/window"),m=e(l),n=a("./utils/events.js"),o=d(n),p=a("./utils/dom.js"),q=d(p),r=a("./utils/fn.js"),s=d(r),t=a("./utils/guid.js"),u=d(t),v=a("./utils/browser.js"),w=d(v),x=a("./utils/log.js"),y=e(x),z=a("./utils/to-camel-case.js"),A=e(z),B=a("./utils/to-title-case.js"),C=e(B),D=a("./utils/time-ranges.js"),E=a("./utils/buffer.js"),F=a("./utils/stylesheet.js"),G=d(F),H=a("./fullscreen-api.js"),I=e(H),J=a("./media-error.js"),K=e(J),L=a("safe-json-parse/tuple"),M=e(L),N=a("object.assign"),O=e(N),P=a("./utils/merge-options.js"),Q=e(P),R=a("./tracks/text-track-list-converter.js"),S=e(R),T=a("./tracks/audio-track-list.js"),U=e(T),V=a("./tracks/video-track-list.js"),W=e(V),X=a("./tech/loader.js"),Y=(e(X),a("./FullscreenOutline.js")),Z=(e(Y),a("./poster-image.js")),$=(e(Z),a("./tracks/text-track-display.js")),_=(e($),a("./loading-spinner.js")),aa=(e(_),a("./aria-alerts.js")),ba=(e(aa),a("./big-play-button.js")),ca=(e(ba),a("./control-bar/control-bar.js")),da=(e(ca),a("./error-display.js")),ea=(e(da),a("./tracks/text-track-settings.js")),fa=(e(ea),a("./modal-dialog")),ga=e(fa),ha=a("./utils/highContrastCheck.js"),ia=e(ha),ja=a("./utils/font-checker.js"),ka=e(ja),la=a("./tech/tech.js"),ma=e(la),na=a("./tech/html5.js"),oa=(e(na),function(a){function b(c,d,e,g){var h=this;if(f(this,b),c.id=c.id||"vjs_video_"+u.newGUID(),d=O["default"](b.getTagSettings(c),d),AMP.Logger.setLogConfig(d.traceConfig),d.initChildren=!1,d.createEl=!1,d.reportTouchActivity=!1,!d.language)if("function"==typeof c.closest){var i=c.closest("[lang]");i&&(d.language=i.getAttribute("lang"))}else for(var j=c;j&&1===j.nodeType;){if(q.getElAttributes(j).hasOwnProperty("lang")){d.language=j.getAttribute("lang");break}j=j.parentNode}if(a.call(this,null,d,e),this.multiPlayerContainerDiv=null,this.styleEl_=null,
this.sharedStyleAndParentDiv=!1,this.mainPlayer=null,g&&(this.multiPlayerContainerDiv=g.multiPlayerContainerDiv,this.styleEl_=g.styleEl_,this.sharedStyleAndParentDiv=!0,this.mainPlayer=g),!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");this.tag=c,this.tagAttributes=c&&q.getElAttributes(c),this.language(this.options_.language),d.languages?!function(){var a={};Object.getOwnPropertyNames(d.languages).forEach(function(b){a[b.toLowerCase()]=d.languages[b]}),h.languages_=a}():this.languages_=b.prototype.options_.languages,this.cache_={},d.muted&&(this.cache_.muted=!0),this.cache_.volume=1,this.poster_=d.poster||"",c.poster="",this.controls_=!!d.controls,this.adClickEnabled_=!!d.adClickEnabled,c.controls=!1,this.scrubbing_=!1,this.el_=this.createEl();var k=Q["default"](this.options_);this.options_.playerOptions=k,this.initChildren(),this.isAudio("audio"===c.nodeName.toLowerCase()),this.addClass(this.controls()?"vjs-controls-enabled":"vjs-controls-disabled"),this.isAudio()?(this.el_.setAttribute("aria-label",d.ariaLabel||"audio player"),this.el_.setAttribute("title","Press space key to play/pause the audio")):(this.el_.setAttribute("aria-label",d.ariaLabel||"video player"),this.el_.setAttribute("title","Press space key to play/pause the video")),this.isAudio()&&this.addClass("vjs-audio"),this.flexNotSupported_()&&this.addClass("vjs-no-flex"),this.addClass("vjs-player"),w.IS_IOS||this.addClass("vjs-workinghover"),b.players[this.id_]=this,this.userActive(!0),this.reportUserActivity(),this.listenForUserActivity_(),this.on("fullscreenchange",this.handleFullscreenChange_),this.on("stageclick",this.handleStageClick_),this.addThrottledWindowResizeListener(function(){this.updateStyleEl_()},200,this),d.plugins&&!function(){var a=d.plugins;Object.getOwnPropertyNames(a).forEach(function(b){if("function"==typeof this[b])try{this[b](a[b])}catch(c){y["default"].error("plugin "+b+" failed:",c)}else y["default"].error("Unable to find plugin:",b)},h)}(),this.on("keydown",this.handleKeyPress)}return g(b,a),b.prototype.dispose=function(){this.el_&&(this.trigger("disposing"),this.trigger("dispose"),this.off("dispose")),b.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&this.tech_.dispose(),a.prototype.dispose.call(this),this.sharedStyleAndParentDiv||(this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),this.multiPlayerContainerDiv&&this.multiPlayerContainerDiv.parentNode&&this.multiPlayerContainerDiv.parentNode.removeChild(this.multiPlayerContainerDiv),this.multiPlayerContainerDiv&&q.removeElData(this.multiPlayerContainerDiv),this.multiPlayerContainerDiv=null)},b.prototype.createEl=function(){var b=!1;this.multiPlayerContainerDiv||(this.multiPlayerContainerDiv=a.prototype.createEl.call(this,"div"),this.multiPlayerContainerDiv.playerId=this.tag.id,this.multiPlayerContainerDiv.player=this,b=!0);var c=this.el_=a.prototype.createEl.call(this,"div"),d=this.tag;d.removeAttribute("width"),d.removeAttribute("height");var e=q.getElAttributes(d),f=this;if(Object.getOwnPropertyNames(e).forEach(function(a){b&&("class"===a?f.multiPlayerContainerDiv.className=e[a]:f.multiPlayerContainerDiv.setAttribute(a,e[a]))}),null===this.mainPlayer?(this.el_.setAttribute("tabIndex",this.multiPlayerContainerDiv.getAttribute("tabIndex")),this.multiPlayerContainerDiv.setAttribute("tabIndex","-1")):this.el_.setAttribute("tabIndex",this.mainPlayer.el_.getAttribute("tabIndex")),d.playerId=d.id,d.id+="_html5_api",d.className="vjs-tech",d.player=c.player=this,this.addClass("vjs-paused"),m["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0&&null===this.styleEl_){this.styleEl_=G.createStyleElement("vjs-styles-dimensions");var g=q.$(".vjs-styles-defaults"),h=q.$("head");h.insertBefore(this.styleEl_,g?g.nextSibling:h.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var i=d.getElementsByTagName("a"),j=0;j<i.length;j++){var k=i.item(j);q.addElClass(k,"vjs-hidden"),k.setAttribute("hidden","hidden")}return d.initNetworkState_=d.networkState,b&&d.parentNode.insertBefore(this.multiPlayerContainerDiv,d),this.multiPlayerContainerDiv.appendChild(c),q.insertElFirst(d,c),this.children_.unshift(d),this.el_=c,ia["default"](),ka["default"](),c},b.prototype.width=function(a){return this.dimension("width",a)},b.prototype.height=function(a){return this.dimension("height",a)},b.prototype.dimension=function(a,b){var c=a+"_";if(void 0===b)return-1!==(""+this[c]).indexOf("%")?parseInt(this.multiPlayerContainerDiv["offset"+C["default"](a)],10):this[c]||0;if(""===b)this[c]=void 0;else if(-1!==(""+b).indexOf("%"))this.multiPlayerContainerDiv.style[a]=b,this[c]=b;else if("auto"===b)this._autoDimension=a;else{var d=parseFloat(b);if(isNaN(d))return y["default"].error('Improper value "'+b+'" supplied for for '+a),this;this[c]=d}return this.updateStyleEl_(),this},b.prototype.fluid=function(a){return void 0===a?!!this.fluid_:(this.fluid_=!!a,void(a?q.addElClass(this.multiPlayerContainerDiv,"vjs-fluid"):q.removeElClass(this.multiPlayerContainerDiv,"vjs-fluid")))},b.prototype.aspectRatio=function(a){if(void 0===a)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(a))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=a,this.fluid(!0),this.updateStyleEl_()},b.prototype.updateStyleEl_=function(){if(m["default"].VIDEOJS_NO_DYNAMIC_STYLE===!0){var a="number"==typeof this.width_?this.width_:this.options_.width,b="number"==typeof this.height_?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();return void(c&&(a>=0&&(c.width=a),b>=0&&(c.height=b)))}var d=20,e=s.bind(this,function(){var a=void 0,b=void 0,c=void 0,f=void 0;void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?c=this.aspectRatio_:this.videoWidth()?(c=this.videoWidth()+":"+this.videoHeight(),1080===this.videoHeight()&&1920===this.videoWidth()&&d--&&this.setTimeout(e,100)):(c="16:9",d--&&this.setTimeout(e,100));var g=c.split(":"),h=g[1]/g[0];a=void 0!==this.width_?this.dimension("width"):void 0!==this.height_?this.height_/h:this.videoWidth()||300,b=void 0!==this.height_?this.dimension("height"):a*h;var i=q.getElAttributes(this.multiPlayerContainerDiv);f=/^[^a-zA-Z]/.test(i.id)?"dimensions-"+i.id:i.id+"-dimensions",null!==this.mainPlayer&&this.mainPlayer.sizeCal||(q.addElClass(this.multiPlayerContainerDiv,f),G.setTextContent(this.styleEl_,"\n                ."+f+" {\n                        width: "+a+"px;\n                        height: "+b+"px;\n                    }\n\n                ."+f+".vjs-fluid {\n                        padding-top: "+100*h+"%;\n                    }\n            "),this.sizeCal=!0)});e()},b.prototype.loadTech_=function(a,b){var c=this;this.tech_&&this.unloadTech_(),"Html5"!==a&&"Html5FairPlayHLS"!==a&&this.tag&&(ma["default"].getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=a,this.isReady_=!1;var d=this.id()+"_"+a+"_api_"+parseInt(1e4*Math.random()),e=O["default"]({nativeControlsForTouch:this.options_.nativeControlsForTouch,source:b,playerId:this.id(),techId:d,videoTracks:this.videoTracks_,textTracks:this.textTracks_,audioTracks:this.audioTracks_,autoplay:this.options_.autoplay,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),"vtt.js":this.options_["vtt.js"],staleDataTimeLimitInSec:this.options_.staleDataTimeLimitInSec},this.options_[A["default"](a)]);e.playerOptions=O["default"]({},this.options_),this.tag&&(e.tag=this.tag),e.originalTagAttributes=this.tagAttributes,b&&(this.currentType_=b.type,b.src===this.cache_.src&&this.cache_.currentTime>0&&(e.startTime=this.cache_.currentTime),this.cache_.src=b.src);var f=ma["default"].getTech(a);f||(f=i["default"].getComponent(a)),this.tech_=new f(e),this.tech_.ready(s.bind(this,this.handleTechReady_),!0),S["default"].jsonToTextTracks(this.textTracksJson_||[],this.tech_),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"progress",this.handleTechProgress_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"suspend",this.handleTechSuspend_),this.on(this.tech_,"abort",this.handleTechAbort_),this.on(this.tech_,"emptied",this.handleTechEmptied_),this.on(this.tech_,"stalled",this.handleTechStalled_),this.on(this.tech_,"loadedmetadata",this.handleTechLoadedMetaData_),this.on(this.tech_,"loadeddata",this.handleTechLoadedData_),this.on(this.tech_,"timeupdate",this.handleTechTimeUpdate_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.on(this.tech_,"volumechange",this.handleTechVolumeChange_),this.on(this.tech_,"texttrackchange",this.handleTechTextTrackChange_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"sourceset",this.handleTechSourceSet_),this.on(this.tech_,"downloadbitratechanged",this.handleTechDownloadBitrateChanged_),this.on(this.tech_,"playbackbitratechanged",this.handleTechPlaybackBitrateChanged_),this.on(this.tech_,"splicewaiting",this.handleTechSpliceWaiting_),this.on(this.tech_,"emsgAvailable",this.handleTechEmsgAvailable_),this.on(this.tech_,"saveMemoryLog",function(){c.trigger("saveMemoryLog")}),this.on(this.tech_,"drmselected",function(){c.trigger("drmselected")});var g=["aesKeyFetchCompleted","manifestFetchCompleted","initialBandwidthEstimationCompleted","mediaSourceSrcSetResolved","javascriptBridgeCreated"];g.forEach(function(a){var b=this;this.on(this.tech_,a,function(){b.trigger(a)})},this),this.on(this.tech_,"decryptorInitialized",function(a){c.trigger("decryptorInitialized",{type:a.message})}),this.on(this.tech_,"decryptionFailed",function(a){c.trigger("decryptionFailed",{url:a.message})}),this.usingNativeControls(this.techGet_("controls")),(this.controls()&&!this.usingNativeControls()||!this.controls()&&this.adClickEnabled_)&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===a&&this.tag||q.insertElFirst(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},b.prototype.unloadTech_=function(){this.videoTracks_=this.videoTracks(),this.textTracks_=this.textTracks(),this.audioTracks_=this.audioTracks(),this.textTracksJson_=S["default"].textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},b.prototype.tech=function(a){if(a&&a.IWillNotUseThisInPlugins)return this.tech_;var b="\n      Please make sure that you are not using this inside of a plugin.\n      To disable this alert and error, please pass in an object with\n      `IWillNotUseThisInPlugins` to the `tech` method. See\n      https://github.com/videojs/video.js/issues/2617 for more info.\n    ";throw m["default"].alert(b),new Error(b)},b.prototype.addTechControlsListeners_=function(){this.tech_&&(this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_))},b.prototype.removeTechControlsListeners_=function(){this.tech_&&(this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_))},b.prototype.handleTechSourceSet_=function(){this.trigger("sourceset")},b.prototype.handleTechDownloadBitrateChanged_=function(){this.trigger("downloadbitratechanged")},b.prototype.handleTechPlaybackBitrateChanged_=function(){this.trigger("playbackbitratechanged")},b.prototype.handleTechSpliceWaiting_=function(){this.trigger("splicewaiting")},b.prototype.handleTechEmsgAvailable_=function(a){this.trigger("emsgAvailable",{data:a.data})},b.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused()){try{delete this.tag.poster}catch(a){y["default"]("deleting tag.poster throws in some browsers",a)}this.play()}},b.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},b.prototype.hasStarted=function(a){return void 0!==a?(this.hasStarted_!==a&&(this.hasStarted_=a,a?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.hasStarted_},b.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.removeClass("vjs-waiting"),this.hasStarted(!0),this.trigger("play")},b.prototype.handleTechWaiting_=function(){var a=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return a.removeClass("vjs-waiting")})},b.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},b.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},b.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing"),this.el_.setAttribute("title","")},b.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},b.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-waiting"),this.trigger("seeked")},b.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&this.currentTime(this.options_.starttime),this.addClass("vjs-has-started"),this.trigger("firstplay")},b.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause"),this.isAudio()?this.el_.setAttribute("title","Press space key to play/pause the audio"):this.el_.setAttribute("title","Press space key to play/pause the video")},b.prototype.handleTechProgress_=function(){this.trigger("progress")},b.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.currentTime(0),this.options_.loop?this.play():this.paused()||this.pause(),this.trigger("ended"),this.removeControlAriaHidden(this.controlBar)},b.prototype.handleTechDurationChange_=function(){this.duration(Math.round(this.techGet_("duration")));var a=function(a,b){null!=a&&(b?a.show():a.hide())},b=isFinite(this.duration());null!=this.controlBar&&(a(this.controlBar.progressControl,b),a(this.controlBar.currentTimeDisplay,b),a(this.controlBar.durationDisplay,b),a(this.controlBar.remainingTimeDisplay,b),b?this.controlBar.timeDivider.unblank():this.controlBar.timeDivider.blank())},b.prototype.handleTechClick_=function(a){0===a.button&&(this.controls()&&(this.paused()?this.play():this.pause()),this.trigger("tech-click"))},b.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},b.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},b.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},b.prototype.handleTechTouchEnd_=function(a){a.preventDefault()},b.prototype.handleFullscreenChange_=function(){this.isFullscreen()?(q.addElClass(this.multiPlayerContainerDiv,"vjs-fullscreen"),q.removeElClass(this.multiPlayerContainerDiv,"vjs-fluid")):(this.fluid()&&q.addElClass(this.multiPlayerContainerDiv,"vjs-fluid"),q.removeElClass(this.multiPlayerContainerDiv,"vjs-fullscreen"),this.updateStyleEl_())},b.prototype.handleStageClick_=function(){this.reportUserActivity()},b.prototype.handleTechFullscreenChange_=function(a,b){b&&this.isFullscreen(b.isFullscreen),this.trigger("fullscreenchange")},b.prototype.handleTechError_=function(){var a=this.tech_.error();this.error(a)},b.prototype.handleTechSuspend_=function(){this.trigger("suspend")},b.prototype.handleTechAbort_=function(){this.trigger("abort")},b.prototype.handleTechEmptied_=function(){this.trigger("emptied")},b.prototype.handleTechStalled_=function(){this.trigger("stalled")},b.prototype.handleTechLoadedMetaData_=function(){this.error(null),this.trigger("loadedmetadataInternal"),this.trigger("loadedmetadata")},b.prototype.handleTechTextData_=function(){var a=null;arguments.length>1&&(a=arguments[1]),this.trigger("textdata",a)},b.prototype.handleTechLoadedData_=function(){this.trigger("loadeddata")},b.prototype.handleTechTimeUpdate_=function(){if(this.trigger("timeupdate"),"AzureHtml5JS"===this.techName_){var a=this.currentTime(),b=this.duration();a>b&&this.duration(a)}},b.prototype.handleTechRateChange_=function(){this.trigger("ratechange")},b.prototype.handleTechVolumeChange_=function(){this.trigger("volumechange")},b.prototype.handleTechTextTrackChange_=function(){this.trigger("texttrackchange")},b.prototype.getCache=function(){return this.cache_},b.prototype.techCall_=function(a,b){if(this.tech_&&!this.tech_.isReady_)this.tech_.ready(function(){this[a](b)},!0);else try{this.tech_&&this.tech_[a](b)}catch(c){throw y["default"](c),c}},b.prototype.techGet_=function(a){if(this.tech_&&this.tech_.isReady_)try{return this.tech_[a]()}catch(b){throw void 0===this.tech_[a]?y["default"]("Video.js: "+a+" method not defined for "+this.techName_+" playback technology.",b):"TypeError"===b.name?(y["default"]("Video.js: "+a+" unavailable on "+this.techName_+" playback technology element.",b),this.tech_.isReady_=!1):y["default"](b),b}},b.prototype.techGetWithParams_=function(a,b){if(this.tech_&&this.tech_.isReady_)try{var c;return(c=this.tech_)[a].apply(c,b)}catch(d){throw void 0===this.tech_[a]?y["default"]("Video.js: "+a+" method not defined for "+this.techName_+" playback technology.",d):"TypeError"===d.name?(y["default"]("Video.js: "+a+" unavailable on "+this.techName_+" playback technology element.",d),this.tech_.isReady_=!1):y["default"](d),d}},b.prototype.play=function(){return this.src()||this.currentSrc()?this.techCall_("play"):this.tech_.one("loadstart",function(){this.play()}),this},b.prototype.pause=function(){return this.techCall_("pause"),this},b.prototype.paused=function(){return this.techGet_("paused")===!1?!1:!0},b.prototype.scrubbing=function(a){return void 0!==a?(this.scrubbing_=!!a,a?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.scrubbing_},b.prototype.currentTime=function(a){var b=this.techGet_("currentTime")||0;if(void 0!==a){this.trigger("currentTimeChanging",{time:a});var c=this.duration();return 0>=a?a=0:a>=c&&(a=c-.1),this.techCall_("setCurrentTime",a),b>a&&this.trigger("rewind"),this}return this.cache_.currentTime=b},b.prototype.getWallClockTime=function(a,b,c,d,e){return this.techGetWithParams_("getWallClockTime",[a,b,c,d,e])},b.prototype.restartCheckMediaWorkflowIfNeeded=function(){this.techCall_("restartCheckMediaWorkflowIfNeeded")},b.prototype.presentationTimeFromPercentageOfDvrWindow=function(a){return this.techGetWithParams_("presentationTimeFromPercentageOfDvrWindow",[a])},b.prototype.duration=function(a){return void 0===a?this.cache_.duration||0:(a=parseFloat(a)||0,0>a&&(a=1/0),a!==this.cache_.duration&&(this.cache_.duration=a,a===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},b.prototype.remainingTime=function(){return this.duration()-this.currentTime()},b.prototype.buffered=function c(){var c=this.techGet_("buffered");return c&&c.length||(c=D.createTimeRange(0,0)),c},b.prototype.bufferedPercent=function(){return E.bufferedPercent(this.buffered(),this.duration())},b.prototype.bufferedEnd=function(){var a=this.buffered(),b=this.duration(),c=a.end(a.length-1);return c>b&&(c=b),c},b.prototype.volume=function(a){var b=void 0;return void 0!==a?(b=Math.max(0,Math.min(1,parseFloat(a))),this.cache_.volume=b,this.techCall_("setVolume",b),this):(b=parseFloat(this.techGet_("volume")),isNaN(b)?1:b)},b.prototype.muted=function(a){return void 0!==a?(a?this.cache_.muted=!0:(this.cache_.muted=!1,void 0!==this.cache_.volume&&this.volume(this.cache_.volume)),this.techCall_("setMuted",a),this.trigger(a?"mute":"unmute"),this):this.techGet_("muted")||!1},b.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},b.prototype.isFullscreen=function(a){return void 0!==a?(this.isFullscreen_=!!a,this):!!this.isFullscreen_},b.prototype.requestFullscreen=function(){var a=I["default"];return this.isFullscreen(!0),a.requestFullscreen?(o.on(k["default"],a.fullscreenchange,s.bind(this,function b(){this.isFullscreen(k["default"][a.fullscreenElement]),this.isFullscreen()===!1&&o.off(k["default"],a.fullscreenchange,b),this.trigger("fullscreenchange")})),this.multiPlayerContainerDiv[a.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},b.prototype.exitFullscreen=function(){var a=I["default"];return this.isFullscreen(!1),a.requestFullscreen?k["default"][a.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},b.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=k["default"].documentElement.style.overflow,o.on(k["default"],"keydown",s.bind(this,this.fullWindowOnEscKey)),k["default"].documentElement.style.overflow="hidden",q.addElClass(k["default"].body,"vjs-full-window"),this.trigger("enterFullWindow")},b.prototype.fullWindowOnEscKey=function(a){27===a.keyCode&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())},b.prototype.exitFullWindow=function(){this.isFullWindow=!1,o.off(k["default"],"keydown",this.fullWindowOnEscKey),k["default"].documentElement.style.overflow=this.docOrigOverflow,q.removeElClass(k["default"].body,"vjs-full-window"),this.trigger("exitFullWindow")},b.prototype.canPlayType=function(a){for(var b=void 0,c=0,d=this.options_.techOrder;c<d.length;c++){var e=C["default"](d[c]),f=ma["default"].getTech(e);if(f||(f=i["default"].getComponent(e)),f){if(f.isSupported()&&(b=f.canPlayType(a)))return b}else y["default"].error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return""},b.prototype.selectSource=function(a){var b=this,c=this.options_.techOrder.map(C["default"]).map(function(a){return[a,ma["default"].getTech(a)||i["default"].getComponent(a)]}).filter(function(a){var b=a[0],c=a[1];return c?c.isSupported():(y["default"].error('The "'+b+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),d=function(a,b,c){var d=void 0;return a.some(function(a){return b.some(function(b){return d=c(a,b),d?!0:void 0})}),d},e=void 0,f=function(a){return function(b,c){return a(c,b)}},g=function(a,c){var d=a[0],e=a[1];return e.canPlaySource(c,b.options_[A["default"](d)])?{source:c,tech:d}:void 0};return e=this.options_.sourceOrder?d(a,c,f(g)):d(c,a,g),e||!1},b.prototype.src=function(a){if(void 0===a)return this.techGet_("src");var b=ma["default"].getTech(this.techName_);return b||(b=i["default"].getComponent(this.techName_)),Array.isArray(a)?this.sourceList_(a):"string"==typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!b.canPlaySource(a,this.options_[A["default"](this.techName_)])?this.sourceList_([a]):(this.cache_.src=a.src,this.currentType_=a.type||"",this.ready(function(){b.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",a):this.techCall_("src",a.src),"auto"===this.options_.preload&&this.load(),this.options_.autoplay&&this.play()},!0))),this},b.prototype.sourceList_=function(a){var b=this.selectSource(a);b?b.tech===this.techName_?this.src(b.source):this.loadTech_(b.tech,b.source):(this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),this.triggerReady())},b.prototype.load=function(){return this.techCall_("load"),this},b.prototype.reset=function(){return this.loadTech_(C["default"](this.options_.techOrder[0]),null),this.techCall_("reset"),this},b.prototype.currentSrc=function(){return this.techGet_("currentSrc")||this.cache_.src||""},b.prototype.currentType=function(){return this.currentType_||""},b.prototype.preload=function(a){return void 0!==a?(this.techCall_("setPreload",a),this.options_.preload=a,this.techCall_("updatePlayerOptions",this.options_),this):this.techGet_("preload")},b.prototype.autoplay=function(a){return void 0!==a?(this.techCall_("setAutoplay",a),this.options_.autoplay=a,this.techCall_("updatePlayerOptions",this.options_),this):this.techGet_("autoplay",a)},b.prototype.loop=function(a){return void 0!==a?(this.techCall_("setLoop",a),this.options_.loop=a,this.techCall_("updatePlayerOptions",this.options_),this):this.techGet_("loop")},b.prototype.poster=function(a){return void 0===a?this.poster_:(a||(a=""),this.poster_=a,this.techCall_("setPoster",a),this.trigger("posterchange"),this)},b.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},b.prototype.controls=function(a){return void 0!==a?(a=!!a,this.controls_!==a&&(this.controls_=a,this.usingNativeControls()&&this.techCall_("setControls",a),a?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_())),this):!!this.controls_},b.prototype.usingNativeControls=function(a){return void 0!==a?(a=!!a,this.usingNativeControls_!==a&&(this.usingNativeControls_=a,a?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.usingNativeControls_},b.prototype.error=function(a){if(void 0===a)return this.error_||null;var b=0;if(null!==a&&(b=a.code||0),null===a)return this.error_=a,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this;if(!this.retryPlayerLoad(b)){this.error_=a instanceof K["default"]?a:new K["default"](a),this.checkWidewineHttpErrorScenario(a),this.addClass("vjs-error"),y["default"].error((this.getFullAmpVersion?this.getFullAmpVersion():"")+" (CODE:"+this.error_.code+" "+K["default"].errorTypes[this.error_.code]+")",this.error_.message,this.error_);var c=this;setTimeout(function(){c.trigger("error")},50)}return this},b.prototype.ended=function(){return this.techGet_("ended")},b.prototype.seeking=function(){return this.techGet_("seeking")},b.prototype.seekable=function(){return this.techGet_("seekable")},b.prototype.reportUserActivity=function(){this.userActivity_=!0},b.prototype.setControlAriaHidden=function(a){if(void 0!==a&&null!==a){void 0!==a.el_&&null!==a.el_&&a.el_.setAttribute("aria-hidden","true");for(var b=a.children(),c=0;c<b.length;c++){var d=b[c];void 0!==d.el_&&null!==d.el_&&(!d.hasClass("vjs-control")&&!d.hasClass("vjs-time-control")||d.hasClass("vjs-hidden")||d.hasClass("amp-control-disabled")?(d.hasClass("amp-controlbaricons-right")||d.hasClass("amp-controlbaricons-left")||d.hasClass("amp-controlbaricons-middle"))&&this.setControlAriaHidden(d):d.el_.setAttribute("aria-hidden","true"))}}},b.prototype.removeControlAriaHidden=function(a){if(void 0!==a&&null!==a){var b=a.children();void 0!==a.el_&&null!==a.el_&&a.el_.removeAttribute("aria-hidden");for(var c=0;c<b.length;c++){var d=b[c];void 0!==d.el_&&null!==d.el_&&(!d.hasClass("vjs-control")&&!d.hasClass("vjs-time-control")||d.hasClass("vjs-hidden")||d.hasClass("amp-control-disabled")?(d.hasClass("amp-controlbaricons-right")||d.hasClass("amp-controlbaricons-left")||d.hasClass("amp-controlbaricons-middle"))&&this.removeControlAriaHidden(d):d.el_.removeAttribute("aria-hidden"))}}},b.prototype.userActive=function(a){var b=q.hasElClass(this.multiPlayerContainerDiv,"vjs-user-active");return void 0!==a?(a=!!a,a!==b&&(a?(this.userActivity_=!0,q.removeElClass(this.multiPlayerContainerDiv,"vjs-user-inactive"),q.addElClass(this.multiPlayerContainerDiv,"vjs-user-active"),this.trigger("useractive"),this.removeControlAriaHidden(this.controlBar)):(this.userActivity_=!1,this.tech_&&this.tech_.one("mousemove",function(a){a.stopPropagation(),a.preventDefault()}),q.removeElClass(this.multiPlayerContainerDiv,"vjs-user-active"),q.addElClass(this.multiPlayerContainerDiv,"vjs-user-inactive"),this.trigger("userinactive"),this.setControlAriaHidden(this.controlBar))),this):b},b.prototype.listenForUserActivity_=function(){var a=void 0,b=void 0,c=void 0,d=s.bind(this,this.reportUserActivity),e=function(a){(a.screenX!==b||a.screenY!==c)&&(b=a.screenX,c=a.screenY,d())},f=function(){d(),this.clearInterval(a),a=this.setInterval(d,250)},g=function(){d(),this.clearInterval(a)};this.on("mousedown",f),this.on("mousemove",e),this.on("mouseup",g),this.on("keydown",d),this.on("keyup",d);{var h=void 0;this.setInterval(function(){if(this.userActivity_&&this.isVisible()){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(h);var a=this.options_.inactivityTimeout;a>0&&(h=this.setTimeout(function(){if(!this.userActivity_&&this.isVisible()){var a;if(null!==this.controlBar&&(void 0!==this.controlBar.audioTracksButton&&void 0!==this.controlBar.audioTracksButton.el_&&(a=this.controlBar.audioTracksButton.el_.getAttribute("aria-expanded")),void 0!==a&&"false"!==a||void 0===this.controlBar.captionsButton||void 0===this.controlBar.captionsButton.el_||(a=this.controlBar.captionsButton.el_.getAttribute("aria-expanded")),void 0!==a&&"false"!==a||void 0===this.controlBar.subtitlesButton||void 0===this.controlBar.subtitlesButton.el_||(a=this.controlBar.subtitlesButton.el_.getAttribute("aria-expanded")),void 0!==a&&"false"!==a||void 0===this.controlBar.moreOptionsButton||void 0===this.controlBar.moreOptionsButton.el_||(a=this.controlBar.moreOptionsButton.el_.getAttribute("aria-expanded")),void 0!==a&&"false"!==a||void 0===this.controlBar.playbackSpeedButton||void 0===this.controlBar.playbackSpeedButton.el_||(a=this.controlBar.playbackSpeedButton.el_.getAttribute("aria-expanded")),void 0!==a&&"false"!==a||void 0===this.controlBar.qualityButton||void 0===this.controlBar.qualityButton.el_||(a=this.controlBar.qualityButton.el_.getAttribute("aria-expanded")),void 0!==a&&"false"!==a||void 0===this.controlBar.volumeControl||void 0===this.controlBar.volumeControl.el_||(a=this.controlBar.volumeControl.el_.getAttribute("aria-expanded"))),void 0!==a&&"true"===a)return;this.userActive(!1)}},a))}},250)}},b.prototype.playbackRate=function(a){return void 0!==a?(this.techCall_("setPlaybackRate",a),this):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},b.prototype.isAudio=function(a){return void 0!==a?(this.isAudio_=!!a,this):!!this.isAudio_;

},b.prototype.handleKeyPress=function(a){if(this.controls()&&this.isFullscreen()&&a.target===this.el_&&a.shiftKey&&9===a.which&&this.controls_){a.preventDefault();var b=this;setTimeout(function(){b.ariaAlerts.reverseFocus()},250)}},b.prototype.networkState=function(){return this.techGet_("networkState")},b.prototype.readyState=function(){return this.techGet_("readyState")},b.prototype.videoTracks=function(){return this.tech_?this.tech_.videoTracks():(this.videoTracks_=this.videoTracks_||new W["default"],this.videoTracks_)},b.prototype.audioTracks=function(){return this.tech_?this.tech_.audioTracks():(this.audioTracks_=this.audioTracks_||new U["default"],this.audioTracks_)},b.prototype.textTracks=function(){return this.tech_&&this.tech_.textTracks()},b.prototype.remoteTextTracks=function(){return this.tech_&&this.tech_.remoteTextTracks()},b.prototype.remoteTextTrackEls=function(){return this.tech_&&this.tech_.remoteTextTrackEls()},b.prototype.addTextTrack=function(a,b,c){return this.tech_&&this.tech_.addTextTrack(a,b,c)},b.prototype.addRemoteTextTrack=function(a){return this.tech_&&this.tech_.addRemoteTextTrack(a)},b.prototype.removeRemoteTextTrack=function(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],b=a.track,c=void 0===b?arguments[0]:b;this.tech_&&this.tech_.removeRemoteTextTrack(c)},b.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},b.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},b.prototype.language=function(a){return void 0===a?this.language_:(this.language_=(""+a).toLowerCase(),this)},b.prototype.languages=function(){return b.prototype.options_.languagesMutated&&(b.prototype.options_.languagesMutated=!1,this.languages_=Q["default"](b.prototype.options_.languages,this.languages_)),this.languages_},b.prototype.toJSON=function(){var a=Q["default"](this.options_),b=a.tracks;a.tracks=[];for(var c=0;c<b.length;c++){var d=b[c];d=Q["default"](d),d.player=void 0,a.tracks[c]=d}return a},b.prototype.createModal=function(a,b){var c=this;b=b||{},b.content=a||"";var d=new ga["default"](c,b);return c.addChild(d),d.on("dispose",function(){c.removeChild(d)}),d.open()},b.getTagSettings=function(a){var b={sources:[],tracks:[]},c=q.getElAttributes(a),d=c["data-setup"];if(null!==d){var e=M["default"](d||"{}"),f=e[0],g=e[1];f&&y["default"].error(f),O["default"](c,g)}if(O["default"](b,c),a.hasChildNodes())for(var h=a.childNodes,i=0,j=h.length;j>i;i++){var k=h[i],l=k.nodeName.toLowerCase(),m=q.getElAttributes(k),n=m["data-setup"];if(null!==n){var o=M["default"](n||"{}"),f=o[0],g=o[1];f&&y["default"].error(f),O["default"](m,g)}"source"===l?b.sources.push(m):"track"===l&&b.tracks.push(m)}return b},b}(i["default"]));oa.players={};var pa=m["default"].navigator;oa.prototype.options_={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:5e3,playbackRates:[],children:["mediaLoader","fullscreenOutline","posterImage","textTrackDisplay","loadingSpinner","bigPauseButton","bigPlayButton","controlBar","errorDisplay","textTrackSettings","ariaAlerts"],language:pa.languages&&pa.languages[0]||pa.userLanguage||pa.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",plugins:{},manifestFetchAutoRetryForLive:!1,maxRetryCountForLive:5,retryIntervalForLiveInMSec:2e3,playerStartupTimeoutInMSec:1e4,playerStartupTimeoutTimer:!1},oa.prototype.handleTechLoadStart_,oa.prototype.handleLoadedMetaData_,oa.prototype.handleTextData_,oa.prototype.handleLoadedData_,oa.prototype.handleUserActive_,oa.prototype.handleUserInactive_,oa.prototype.handleTimeUpdate_,oa.prototype.handleTechEnded_,oa.prototype.handleVolumeChange_,oa.prototype.handleError_,oa.prototype.flexNotSupported_=function(){var a=k["default"].createElement("i");return!("flexBasis"in a.style||"webkitFlexBasis"in a.style||"mozFlexBasis"in a.style||"msFlexBasis"in a.style||"msFlexOrder"in a.style)},i["default"].registerComponent("Player",oa),c["default"]=oa,b.exports=c["default"]},{"./FullscreenOutline.js":71,"./aria-alerts.js":72,"./big-play-button.js":73,"./component.js":77,"./control-bar/control-bar.js":80,"./error-display.js":114,"./fullscreen-api.js":117,"./loading-spinner.js":118,"./media-error.js":119,"./modal-dialog":123,"./poster-image.js":128,"./tech/html5.js":133,"./tech/loader.js":134,"./tech/tech.js":136,"./tracks/audio-track-list.js":138,"./tracks/text-track-display.js":143,"./tracks/text-track-list-converter.js":144,"./tracks/text-track-settings.js":146,"./tracks/video-track-list.js":151,"./utils/browser.js":153,"./utils/buffer.js":154,"./utils/dom.js":156,"./utils/events.js":157,"./utils/fn.js":158,"./utils/font-checker.js":159,"./utils/guid.js":161,"./utils/highContrastCheck.js":162,"./utils/log.js":164,"./utils/merge-options.js":165,"./utils/stylesheet.js":166,"./utils/time-ranges.js":167,"./utils/to-camel-case.js":168,"./utils/to-title-case.js":169,"global/document":250,"global/window":251,"object.assign":244,"safe-json-parse/tuple":247}],125:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("./player.js"),f=d(e),g=function(a,b){f["default"].prototype[a]=b};c["default"]=g,b.exports=c["default"]},{"./player.js":124}],126:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../clickable-component.js"),i=e(h),j=a("../component.js"),k=e(j),l=a("./popup.js"),m=(e(l),a("../utils/dom.js")),n=(d(m),a("../utils/fn.js")),o=(d(n),a("../utils/to-title-case.js")),p=(e(o),function(a){function b(c){var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];f(this,b),a.call(this,c,d),this.update()}return g(b,a),b.prototype.update=function(){var a=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=a,this.addChild(a),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},b.prototype.createPopup=function(){},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b.prototype.buildCSSClass=function(){var b="vjs-menu-button";return b+=this.options_.inline===!0?"-inline":"-popup","vjs-menu-button "+b+" "+a.prototype.buildCSSClass.call(this)},b}(i["default"]));k["default"].registerComponent("PopupButton",p),c["default"]=p,b.exports=c["default"]},{"../clickable-component.js":75,"../component.js":77,"../utils/dom.js":156,"../utils/fn.js":158,"../utils/to-title-case.js":169,"./popup.js":127}],127:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component.js"),i=e(h),j=a("../utils/dom.js"),k=d(j),l=a("../utils/fn.js"),m=d(l),n=a("../utils/events.js"),o=d(n),p=function(a){function b(){f(this,b),a.apply(this,arguments)}return g(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",m.bind(this,function(){this.unlockShowing()}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=k.createEl(b,{className:"vjs-menu-content"});var c=a.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return c.appendChild(this.contentEl_),o.on(c,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),c},b}(i["default"]);i["default"].registerComponent("Popup",p),c["default"]=p,b.exports=c["default"]},{"../component.js":77,"../utils/dom.js":156,"../utils/events.js":157,"../utils/fn.js":158}],128:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./clickable-component.js"),i=e(h),j=a("./component.js"),k=e(j),l=a("./utils/fn.js"),m=d(l),n=a("./utils/dom.js"),o=d(n),p=a("./utils/browser.js"),q=(d(p),a("./utils/url.js")),r=d(q),s=a("./utils/log.js"),t=e(s),u=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.update(),c.on("posterchange",m.bind(this,this.update)),c.on("fullscreenchange",m.bind(this,this.updateCss)),c.addThrottledWindowResizeListener(m.bind(this,this.updateCss),50)}return g(b,a),b.prototype.dispose=function(){this.player().off("fullscreenchange",this.updateCss),this.player().off("posterchange",this.update),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=o.createEl("div",{className:"vjs-poster",tabIndex:-1});return this.span=o.createEl("span",{className:"vjs-poster-span",tabIndex:-1}),a.appendChild(this.span),this.fallbackImg_=o.createEl("img"),a.appendChild(this.fallbackImg_),a},b.prototype.update=function(){var a=this.player().poster();this.setSrc(a),a?this.show():this.hide()},b.prototype.setSrc=function(a){if(a&&(a=r.getAbsoluteURL(a),-1===a.search(/^(https?:)?\/\//i)&&(t["default"].warn("ignoring invalid poster URL"),a="")),this.fallbackImg_){var b=this;this.fallbackImg_.onload=function(){b.updateCss()},this.fallbackImg_.src=a,this.fallbackImg_.style.display="none",this.addCrossOriginPolicy(this.player().options().corsPolicy,this.fallbackImg_),setTimeout(function(){b.updateCss()},500)}else{var c="";a&&(c='url("'+a+'")'),this.el_.style.backgroundImage=c}},b.prototype.updateCss=function(){this.fallbackImg_.style.display="inline";var a="100%",b="auto";if(this.fallbackImg_.naturalHeight&&this.fallbackImg_.naturalWidth&&this.fallbackImg_.parentElement){var c=this.fallbackImg_.parentElement.clientWidth,d=this.fallbackImg_.parentElement.clientHeight;if(d&&c){var e=c/d,f=this.fallbackImg_.naturalWidth/this.fallbackImg_.naturalHeight;e>f&&(b="100%",a="auto")}else this.fallbackImg_.naturalHeight>this.fallbackImg_.naturalWidth&&(b="100%",a="auto")}if(this.player_){var g=this.player_.options_.posterAltString?this.player_.options_.posterAltString:"";o.setElAttributes(this.fallbackImg_,{width:a,height:b,alt:this.player_.htmlEncode(g)}),""===g&&o.setElAttributes(this.fallbackImg_,{role:"presentation"})}},b.prototype.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},b}(i["default"]);k["default"].registerComponent("PosterImage",u),c["default"]=u,b.exports=c["default"]},{"./clickable-component.js":75,"./component.js":77,"./utils/browser.js":153,"./utils/dom.js":156,"./utils/fn.js":158,"./utils/log.js":164,"./utils/url.js":170}],129:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}c.__esModule=!0;var f=a("./utils/events.js"),g=e(f),h=a("global/document"),i=d(h),j=a("global/window"),k=d(j),l=!1,m=void 0,n=function(){var a=i["default"].getElementsByTagName("video"),b=i["default"].getElementsByTagName("audio"),c=[];if(a&&a.length>0)for(var d=0,e=a.length;e>d;d++)c.push(a[d]);if(b&&b.length>0)for(var d=0,e=b.length;e>d;d++)c.push(b[d]);if(c&&c.length>0)for(var d=0,e=c.length;e>d;d++){var f=c[d];if(!f||!f.getAttribute){o(1);break}if(void 0===f.player){var g=f.getAttribute("data-setup");if(null!==g){m(f)}}}else l||o(1)},o=function(a,b){b&&(m=b),setTimeout(n,a)};"complete"===i["default"].readyState?l=!0:g.one(k["default"],"load",function(){l=!0});var p=function(){return l};c.autoSetup=n,c.autoSetupTimeout=o,c.hasLoaded=p},{"./utils/events.js":157,"global/document":250,"global/window":251}],130:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component.js"),i=e(h),j=a("../utils/dom.js"),k=d(j),l=a("object.assign"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.bar=this.getChild(this.options_.barName),this.seekHandle=this.getChild(this.options_.handleName),c.controls_&&this.vertical(!!this.options_.vertical),this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(c,"controlsvisible",this.update),this.on(c,this.playerEvent,this.update)}return g(b,a),b.prototype.createEl=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return c.className=c.className+" vjs-slider",c=m["default"]({tabIndex:0},c),d=m["default"]({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},d),a.prototype.createEl.call(this,b,c,d)},b.prototype.handleMouseDown=function(a){var b=this.bar.el_.ownerDocument;a.preventDefault(),k.blockTextSelection(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(b,"mousemove",this.handleMouseMove),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchmove",this.handleMouseMove),this.on(b,"touchend",this.handleMouseUp),this.handleMouseMove(a)},b.prototype.handleMouseMove=function(){},b.prototype.handleMouseUp=function(){var a=this.bar.el_.ownerDocument;k.unblockTextSelection(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(a,"mousemove",this.handleMouseMove),this.off(a,"mouseup",this.handleMouseUp),this.off(a,"touchmove",this.handleMouseMove),this.off(a,"touchend",this.handleMouseUp),this.update(),this.setFocusOnSlider()},b.prototype.update=function(){if(this.el_){var a=this.getPercent(),b=this.bar;if(b){("number"!=typeof a||a!==a||0>a||a===1/0)&&(a=0);var c=(100*a).toFixed(2)+"%";this.vertical()?b.el().style.height=c:b.el().style.width=c,this.seekHandle&&this.seekHandle.update()}}},b.prototype.calculateDistance=function(a){var b=k.getPointerPosition(this.el_,a);return this.vertical()?b.y:b.x},b.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.setFocusOnSlider=function(){var a=this.el_.ownerDocument.activeElement,b=this.el_;a!==b&&(a.blur(),b.focus())},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepBack()):(38===a.which||39===a.which)&&(a.preventDefault(),this.stepForward())},b.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleClick=function(a){a.stopImmediatePropagation(),a.preventDefault(),this.setFocusOnSlider()},b.prototype.vertical=function(a){return void 0===a?this.vertical_||!1:(this.vertical_=!!a,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal"),this)},b}(i["default"]);i["default"].registerComponent("Slider",n),c["default"]=n,b.exports=c["default"]},{"../component.js":77,"../utils/dom.js":156,"object.assign":244}],131:[function(a,b,c){"use strict";function d(a){return a.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},a.streamFromParts=function(a,b){return a+"&"+b},a.streamToParts=function(a){var b={connection:"",stream:""};if(!a)return b;var c=a.search(/&(?!\w+=)/),d=void 0;return-1!==c?d=c+1:(c=d=a.lastIndexOf("/")+1,0===c&&(c=d=a.length)),b.connection=a.substring(0,c),b.stream=a.substring(d,a.length),b},a.isStreamingType=function(b){return b in a.streamingFormats},a.RTMP_RE=/^rtmp[set]?:\/\//i,a.isStreamingSrc=function(b){return a.RTMP_RE.test(b)},a.rtmpSourceHandler={},a.rtmpSourceHandler.canPlayType=function(b){return a.isStreamingType(b)?"maybe":""},a.rtmpSourceHandler.canHandleSource=function(b){var c=a.rtmpSourceHandler.canPlayType(b.type);return c?c:a.isStreamingSrc(b.src)?"maybe":""},a.rtmpSourceHandler.handleSource=function(b,c){var d=a.streamToParts(b.src);c.setRtmpConnection(d.connection),c.setRtmpStream(d.stream)},a.registerSourceHandler(a.rtmpSourceHandler),a}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],132:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a){var b=a.charAt(0).toUpperCase()+a.slice(1);A["set"+b]=function(b){return this.el_.vjs_setProperty(a,b)}}function i(a){A[a]=function(){return this.el_.vjs_getProperty(a)}}c.__esModule=!0;for(var j=a("./tech"),k=e(j),l=a("../utils/dom.js"),m=d(l),n=a("../utils/url.js"),o=d(n),p=a("../utils/time-ranges.js"),q=a("./swfobject.js"),r=a("./flash-rtmp"),s=e(r),t=a("../component"),u=e(t),v=a("global/window"),w=e(v),x=a("object.assign"),y=e(x),z=(w["default"].navigator,function(a){function b(c,d){f(this,b),a.call(this,c,d),c.source&&this.ready(function(){this.setSource(c.source)},!0),c.startTime&&this.ready(function(){this.load(),this.play(),this.currentTime(c.startTime)},!0),w["default"].videojs=w["default"].videojs||{},w["default"].videojs.Flash=w["default"].videojs.Flash||{},w["default"].videojs.Flash.onReady=b.onReady,w["default"].videojs.Flash.onEvent=b.onEvent,w["default"].videojs.Flash.onError=b.onError,this.on("seeked",function(){this.lastSeekTarget_=void 0})}return g(b,a),b.prototype.createEl=function(){var a=this.options_,c=a.techId,d=y["default"]({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.preload,loop:a.loop,muted:a.muted},a.flashVars),e=y["default"]({wmode:"opaque",bgcolor:"#000000"},a.params),f=y["default"]({id:c,name:c,"class":"vjs-tech"},a.attributes);return this.el_=b.embed(a.swf,d,e,f),this.el_.tech=this,this.el_},b.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},b.prototype.pause=function(){this.el_.vjs_pause()},b.prototype.src=function(a){return void 0===a?this.currentSrc():this.setSrc(a)},b.prototype.setSrc=function(a){if(a=o.getAbsoluteURL(a),this.el_.vjs_src(a),this.autoplay()){var b=this;this.setTimeout(function(){b.play()},0)}},b.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},b.prototype.setCurrentTime=function(b){var c=this.seekable();c.length&&(b=b>c.start(0)?b:c.start(0),b=b<c.end(c.length-1)?b:c.end(c.length-1),this.lastSeekTarget_=b,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",b),a.prototype.setCurrentTime.call(this))},b.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},b.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},b.prototype.duration=function c(){if(0===this.readyState())return 0/0;var c=this.el_.vjs_getProperty("duration");return c>=0?c:1/0},b.prototype.load=function(){this.el_.vjs_load()},b.prototype.poster=function(){this.el_.vjs_getProperty("poster")},b.prototype.setPoster=function(){},b.prototype.seekable=function(){var a=this.duration();return 0===a?p.createTimeRange():p.createTimeRange(0,a)},b.prototype.buffered=function(){var a=this.el_.vjs_getProperty("buffered");return 0===a.length?p.createTimeRange():p.createTimeRange(a[0][0],a[0][1])},b.prototype.supportsFullScreen=function(){return!1},b.prototype.enterFullScreen=function(){return!1},b}(k["default"])),A=z.prototype,B="rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),C="networkState,readyState,initialTime,startOffsetTime,paused,ended,videoWidth,videoHeight".split(","),D=0;D<B.length;D++)i(B[D]),h(B[D]);for(var D=0;D<C.length;D++)i(C[D]);z.isSupported=function(){var a="11.4";return q.swfobject.hasFlashPlayerVersion(a)},z.isVersionSupported=function(a){return q.swfobject.hasFlashPlayerVersion(a)},k["default"].withSourceHandlers(z),z.nativeSourceHandler={},z.nativeSourceHandler.canPlayType=function(a){return a in z.formats?"maybe":""},z.nativeSourceHandler.canHandleSource=function(a){function b(a){var b=o.getFileExtension(a);return b?"video/"+b:""}var c;return c=a.type?a.type.replace(/;.*/,"").toLowerCase():b(a.src),z.nativeSourceHandler.canPlayType(c)},z.nativeSourceHandler.handleSource=function(a,b){b.setSrc(a.src)},z.nativeSourceHandler.dispose=function(){},z.registerSourceHandler(z.nativeSourceHandler),z.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},z.onReady=function(a){var b=m.getEl(a),c=b&&b.tech;c&&c.el()&&z.checkReady(c)},z.checkReady=function(a){a.el()&&(a.el().vjs_getProperty?a.triggerReady():this.setTimeout(function(){z.checkReady(a)},50))},z.onEvent=function(a,b){var c=m.getEl(a).tech;c.trigger(b,Array.prototype.slice.call(arguments,2))},z.onError=function(a,b){var c=m.getEl(a).tech;return"srcnotfound"===b?c.error(4):void c.error("FLASH: "+b)},z.embed=function(a,b,c,d){var e=z.getEmbedCode(a,b,c,d),f=m.createEl("div",{innerHTML:e}).childNodes[0];return f},z.getEmbedCode=function(a,b,c,d){var e='<object type="application/x-shockwave-flash" ',f="",g="",h="";return b&&Object.getOwnPropertyNames(b).forEach(function(a){f+=encodeURIComponent(a)+"="+encodeURIComponent(b[a])+"&amp;"}),delete c.flashvars,c=y["default"]({movie:a,flashvars:f,allowScriptAccess:"always",allowNetworking:"all"},c),Object.getOwnPropertyNames(c).forEach(function(a){g+='<param name="'+encodeURIComponent(a)+'" value="'+("flashvars"!==a?encodeURI(c[a]):c[a])+'" />'}),d=y["default"]({data:a,width:"100%",height:"100%"},d),Object.getOwnPropertyNames(d).forEach(function(a){h+=encodeURIComponent(a)+'="'+encodeURI(d[a])+'" '}),""+e+h+">"+g+"</object>"},s["default"](z),u["default"].registerComponent("Flash",z),k["default"].registerTech("Flash",z),c["default"]=z,b.exports=c["default"]},{"../component":77,"../utils/dom.js":156,"../utils/time-ranges.js":167,"../utils/url.js":170,"./flash-rtmp":131,"./swfobject.js":135,"./tech":136,"global/window":251,"object.assign":244}],133:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a,b){return a.raw=b,a}c.__esModule=!0;var i=h(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used. \n            This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used. \n            This may prevent text tracks from loading."]),j=a("./tech.js"),k=e(j),l=a("../component"),m=e(l),n=a("../utils/dom.js"),o=d(n),p=a("../utils/url.js"),q=d(p),r=a("../utils/fn.js"),s=d(r),t=a("../utils/log.js"),u=e(t),v=a("tsml"),w=e(v),x=a("../../../src/js/tracks/text-track.js"),y=(e(x),a("../utils/browser.js")),z=d(y),A=a("global/document"),B=e(A),C=a("global/window"),D=e(C),E=a("object.assign"),F=e(E),G=a("../utils/merge-options.js"),H=e(G),I=a("../utils/to-title-case.js"),J=e(I),K=a("../utils/guid.js"),L=d(K),M=function(a){function b(c,d){var e=this;f(this,b),a.call(this,c,d);var g=c.source,h=!1;if(g&&(this.el_.currentSrc!==g.src||c.tag&&3===c.tag.initNetworkState_)?this.setSource(g):this.handleLateInit_(this.el_),this.el_.hasChildNodes()){for(var j=this.el_.childNodes,k=j.length,l=[];k--;){var m=j[k],n=m.nodeName.toLowerCase();"track"===n&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(m),this.remoteTextTracks().addTrack_(m.track),h||this.el_.hasAttribute("crossorigin")||!q.isCrossOrigin(m.src)||(h=!0)):l.push(m))}for(var p=0;p<l.length;p++)this.el_.removeChild(l[p])}var r=["audio","video"];r.forEach(function(a){var b=J["default"](a);if(e["featuresNative"+b+"Tracks"]){var c=e.el()[a+"Tracks"];c&&c.addEventListener&&(c.addEventListener("change",s.bind(e,e["handle"+b+"TrackChange_"])),c.addEventListener("addtrack",s.bind(e,e["handle"+b+"TrackAdd_"])),c.addEventListener("removetrack",s.bind(e,e["handle"+b+"TrackRemove_"])),e.on("loadstart",e["removeOld"+b+"Tracks_"]))}}),this.featuresNativeTextTracks&&(h&&u["default"].warn(w["default"](i)),this.handleTextTrackChange_=s.bind(this,this.handleTextTrackChange),this.handleTextTrackAdd_=s.bind(this,this.handleTextTrackAdd),this.handleTextTrackRemove_=s.bind(this,this.handleTextTrackRemove),this.proxyNativeTextTracks_()),(z.TOUCH_ENABLED||z.IS_IPHONE||z.IS_NATIVE_ANDROID)&&c.nativeControlsForTouch===!0&&this.setControls(!0);var t="auto";"auto"!==o.getElAttributes(this.el_).preload&&(t="none"),o.setElAttributes(this.el_,{oncontextmenu:"return false;",preload:t,tabindex:"-1"}),this.setPoster(this.options_.playerOptions.poster||""),this.triggerReady()}return g(b,a),b.prototype.dispose=function(){var c=this;["audio","video","text"].forEach(function(a){var b=J["default"](a),d=c.el_[a+"Tracks"];d&&d.removeEventListener&&(d.removeEventListener("change",c["handle"+b+"TrackChange_"]),d.removeEventListener("addtrack",c["handle"+b+"TrackAdd_"]),d.removeEventListener("removetrack",c["handle"+b+"TrackRemove_"])),d&&c.off("loadstart",c["removeOld"+b+"Tracks_"])}),b.disposeMediaElement(this.el_),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=this.options_.tag;if(!a||this.movingMediaElementInDOM===!1)if(a){var c=a.cloneNode(!0);a.parentNode.insertBefore(c,a),b.disposeMediaElement(a),a=c}else{a=B["default"].createElement("video");var d=this.options_.originalTagAttributes,e=H["default"]({},d);z.TOUCH_ENABLED&&this.options_.nativeControlsForTouch===!0||delete e.controls,o.setElAttributes(a,F["default"](e,{id:this.options_.techId,"class":"vjs-tech"}))}for(var f=["autoplay","preload","loop","muted"],g=f.length-1;g>=0;g--){var h=f[g],i={};"undefined"!=typeof this.options_[h]&&(i[h]=this.options_[h]),o.setElAttributes(a,i)}return a},b.prototype.handleLateInit_=function(a){var b=this;if(0!==a.networkState&&3!==a.networkState){if(0===a.readyState){var c=function(){var a=!1,c=function(){a=!0};b.on("loadstart",c);var d=function(){a||this.trigger("loadstart")};return b.on("loadedmetadata",d),b.ready(function(){this.off("loadstart",c),this.off("loadedmetadata",d),a||this.trigger("loadstart")}),{v:void 0}}();if("object"==typeof c)return c.v}var d=["loadstart"];d.push("loadedmetadata"),a.readyState>=2&&d.push("loadeddata"),a.readyState>=3&&d.push("canplay"),a.readyState>=4&&d.push("canplaythrough"),this.ready(function(){d.forEach(function(a){this.trigger(a)},this)})}},b.prototype.proxyNativeTextTracks_=function(){var a=this.el().textTracks;if(a){for(var b=0;b<a.length;b++)this.textTracks().addTrack_(a[b]);a.addEventListener&&(a.addEventListener("change",this.handleTextTrackChange_),a.addEventListener("addtrack",this.handleTextTrackAdd_),a.addEventListener("removetrack",this.handleTextTrackRemove_)),this.on("loadstart",this.removeOldTextTracks_)}},b.prototype.handleTextTrackChange=function(){var a=this.textTracks();this.textTracks().trigger({type:"change",target:a,currentTarget:a,srcElement:a})},b.prototype.handleTextTrackAdd=function(a){this.textTracks().addTrack_(a.track)},b.prototype.handleTextTrackRemove=function(a){this.textTracks().removeTrack_(a.track)},b.prototype.handleVideoTrackChange_=function(){var a=this.videoTracks();this.videoTracks().trigger({type:"change",target:a,currentTarget:a,srcElement:a})},b.prototype.handleVideoTrackAdd_=function(a){this.videoTracks().addTrack_(a.track)},b.prototype.handleVideoTrackRemove_=function(a){this.videoTracks().removeTrack_(a.track)},b.prototype.handleAudioTrackChange_=function(){var a=this.audioTracks();this.audioTracks().trigger({type:"change",target:a,currentTarget:a,srcElement:a})},b.prototype.handleAudioTrackAdd_=function(a){this.audioTracks().addTrack_(a.track)},b.prototype.handleAudioTrackRemove_=function(a){this.audioTracks().removeTrack_(a.track)},b.prototype.removeOldTracks_=function(a,b){var c=[];if(b){for(var d=0;d<a.length;d++){for(var e=a[d],f=!1,g=0;g<b.length;g++)if(b[g]===e){f=!0;break}f||c.push(e)}for(var d=0;d<c.length;d++){var h=c[d];a.removeTrack_(h)}}},b.prototype.removeOldTextTracks_=function(){var a=this.textTracks(),b=this.el().textTracks;this.removeOldTracks_(a,b)},b.prototype.removeOldAudioTracks_=function(){var a=this.audioTracks(),b=this.el().audioTracks;this.removeOldTracks_(a,b)},b.prototype.removeOldVideoTracks_=function(){var a=this.videoTracks(),b=this.el().videoTracks;this.removeOldTracks_(a,b)},b.prototype.play=function(){var a=this.el_.play();void 0!==a&&"function"==typeof a.then&&a.then(null,function(){})},b.prototype.pause=function(){this.el_.pause()},b.prototype.paused=function(){return this.el_.paused},b.prototype.currentTime=function(){return this.el_.currentTime},b.prototype.currentAbsoluteTime=function(){return void 0},b.prototype.currentMediaTime=function(){return void 0},b.prototype.setCurrentTime=function(a){try{this.el_.currentTime=a}catch(b){u["default"](b,"Video is not ready. (Video.js)")}},b.prototype.currentVideoStreamList=function(){return void 0},b.prototype.currentAudioStreamList=function(){return void 0},b.prototype.videoBufferData=function(){return void 0},b.prototype.audioBufferData=function(){return void 0},b.prototype.currentDownloadBitrate=function(){return void 0},b.prototype.currentPlaybackBitrate=function(){return void 0},b.prototype.duration=function(){return this.el_.duration||0},b.prototype.buffered=function(){return this.el_.buffered},b.prototype.isLive=function(){return this.duration()===1/0||this.duration()===Number.MAX_VALUE?!0:!1},b.prototype.volume=function(){
return this.el_.volume},b.prototype.setVolume=function(a){this.el_.volume=a},b.prototype.muted=function(){return this.el_.muted},b.prototype.setMuted=function(a){this.el_.muted=a},b.prototype.width=function(){return this.el_.offsetWidth},b.prototype.height=function(){return this.el_.offsetHeight},b.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var a=D["default"].navigator.userAgent;if(/Android/.test(a)||!/Chrome|Mac OS X 10.5/.test(a))return!0}return!1},b.prototype.enterFullScreen=function(){var a=this.el_;"webkitDisplayingFullscreen"in a&&this.one("webkitbeginfullscreen",function(){this.one("webkitendfullscreen",function(){this.trigger("fullscreenchange",{isFullscreen:!1})}),this.trigger("fullscreenchange",{isFullscreen:!0})}),a.paused&&a.networkState<=a.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){a.pause(),a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()},b.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},b.prototype.src=function(a){return void 0===a?this.el_.src:void this.setSrc(a)},b.prototype.setSrc=function(a){this.addCrossOriginPolicy(this.options_.playerOptions.corsPolicy),this.setAutoplay(this.options_.playerOptions.autoplay),this.el_.src=a},b.prototype.load=function(){this.el_.load()},b.prototype.reset=function(){b.resetMediaElement(this.el_)},b.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},b.prototype.poster=function(){return this.el_.poster},b.prototype.setPoster=function(a){(void 0===a||""===a)&&this.el_.removeAttribute("poster"),this.trigger("posterchange")},b.prototype.preload=function(){return this.el_.preload},b.prototype.setPreload=function(a){this.el_.preload=a},b.prototype.autoplay=function(){return this.el_.autoplay},b.prototype.setAutoplay=function(a){this.el_.autoplay=a},b.prototype.controls=function(){return this.el_.controls},b.prototype.setControls=function(a){this.el_.controls=!!a},b.prototype.loop=function(){return this.el_.loop},b.prototype.setLoop=function(a){this.el_.loop=a},b.prototype.error=function(b){return void 0===b?this.error_||this.el_.error:void a.prototype.error.call(this,b)},b.prototype.seeking=function(){return this.el_.seeking},b.prototype.seekable=function(){return this.el_.seekable},b.prototype.ended=function(){return this.el_.ended},b.prototype.defaultMuted=function(){return this.el_.defaultMuted},b.prototype.playbackRate=function(){return this.el_.playbackRate},b.prototype.played=function(){return this.el_.played},b.prototype.setPlaybackRate=function(a){this.el_.playbackRate=a},b.prototype.networkState=function(){return this.el_.networkState},b.prototype.readyState=function(){return this.el_.readyState},b.prototype.videoWidth=function(){return this.el_.videoWidth},b.prototype.videoHeight=function(){return this.el_.videoHeight},b.prototype.textTracks=function(){return a.prototype.textTracks.call(this)},b.prototype.addTextTrack=function(b,c,d){return this.featuresNativeTextTracks?this.el_.addTextTrack(b,c,d):a.prototype.addTextTrack.call(this,b,c,d)},b.prototype.addRemoteTextTrack=function(){var b=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(!this.featuresNativeTextTracks)return a.prototype.addRemoteTextTrack.call(this,b);var c=B["default"].createElement("track");return b.kind&&(c.kind=b.kind),b.label&&(c.label=b.label),(b.language||b.srclang)&&(c.srclang=b.language||b.srclang),b["default"]&&(c["default"]=b["default"]),b.id||(b.id="vjs_track_"+L.newGUID()),b.id&&(c.id=b.id),b.src&&(c.src=b.src),this.el().appendChild(c),this.remoteTextTrackEls().addTrackElement_(c),this.remoteTextTracks().addTrack_(c.track),c},b.prototype.removeRemoteTextTrack=function(b){if(!this.featuresNativeTextTracks)return a.prototype.removeRemoteTextTrack.call(this,b);var c=void 0,d=void 0,e=this.remoteTextTrackEls().getTrackElementByTrack_(b);for(this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack_(b),c=this.$$("track"),d=c.length;d--;)(b===c[d]||b===c[d].track)&&this.el().removeChild(c[d])},b}(k["default"]);M.TEST_VID=B["default"].createElement("video");var N=B["default"].createElement("track");N.kind="captions",N.srclang="en",N.label="English",M.TEST_VID.appendChild(N),M.isSupported=function(){try{M.TEST_VID.volume=.5}catch(a){return!1}return!!M.TEST_VID.canPlayType},k["default"].withSourceHandlers(M),M.nativeSourceHandler={},M.nativeSourceHandler.canPlayType=function(a){try{return M.TEST_VID.canPlayType(a)}catch(b){return""}},M.nativeSourceHandler.canHandleSource=function(a){var b;if(a.protectionInfo&&a.protectionInfo.length>0)for(var c=0;c<a.protectionInfo.length;c++)if("PlayReady"===a.protectionInfo[c].type||"Widevine"===a.protectionInfo[c].type||"FairPlay"===a.protectionInfo[c].type)return"";return a.type?M.nativeSourceHandler.canPlayType(a.type):a.src?(b=q.getFileExtension(a.src),M.nativeSourceHandler.canPlayType("video/"+b)):""},M.nativeSourceHandler.handleSource=function(a,b){b.setSrc(a.src)},M.nativeSourceHandler.dispose=function(){},M.registerSourceHandler(M.nativeSourceHandler),M.canControlVolume=function(){try{var a=M.TEST_VID.volume;return M.TEST_VID.volume=a/2+.1,a!==M.TEST_VID.volume}catch(b){return!1}},M.canControlPlaybackRate=function(){try{var a=M.TEST_VID.playbackRate;return M.TEST_VID.playbackRate=a/2+.1,a!==M.TEST_VID.playbackRate}catch(b){return!1}},M.isPreloadSupported=function(){return z.IS_IOS&&z.IS_SAFARI?!1:!0},M.supportsNativeTextTracks=function(){var a;return a=!!M.TEST_VID.textTracks,a&&M.TEST_VID.textTracks.length>0&&(a="number"!=typeof M.TEST_VID.textTracks[0].mode),a&&z.IS_FIREFOX&&(a=!1),!a||"onremovetrack"in M.TEST_VID.textTracks||(a=!1),a},M.supportsNativeVideoTracks=function(){var a=!!M.TEST_VID.videoTracks;return a},M.supportsNativeAudioTracks=function(){var a=!!M.TEST_VID.audioTracks;return a},M.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],M.prototype.featuresVolumeControl=M.canControlVolume(),M.prototype.featuresPlaybackRate=M.canControlPlaybackRate(),M.prototype.featuresPreload=M.isPreloadSupported(),M.prototype.movingMediaElementInDOM=!z.IS_IOS,M.prototype.featuresFullscreenResize=!0,M.prototype.featuresProgressEvents=!0,M.prototype.featuresNativeTextTracks=M.supportsNativeTextTracks(),M.prototype.featuresNativeVideoTracks=M.supportsNativeVideoTracks(),M.prototype.featuresNativeAudioTracks=M.supportsNativeAudioTracks();var O=void 0,P=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Q=/^video\/mp4/i;M.patchCanPlayType=function(){z.ANDROID_VERSION>=4&&(O||(O=M.TEST_VID.constructor.prototype.canPlayType),M.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&P.test(a)?"maybe":O.call(this,a)}),z.IS_OLD_ANDROID&&(O||(O=M.TEST_VID.constructor.prototype.canPlayType),M.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&Q.test(a)?"maybe":O.call(this,a)})},M.unpatchCanPlayType=function(){var a=M.TEST_VID.constructor.prototype.canPlayType;return M.TEST_VID.constructor.prototype.canPlayType=O,O=null,a},M.patchCanPlayType(),M.disposeMediaElement=function(a){if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},M.resetMediaElement=function(a){if(a){for(var b=a.querySelectorAll("source"),c=b.length;c--;)a.removeChild(b[c]);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},m["default"].registerComponent("Html5",M),k["default"].registerTech("Html5",M),c["default"]=M,b.exports=c["default"]},{"../../../src/js/tracks/text-track.js":147,"../component":77,"../utils/browser.js":153,"../utils/dom.js":156,"../utils/fn.js":158,"../utils/guid.js":161,"../utils/log.js":164,"../utils/merge-options.js":165,"../utils/to-title-case.js":169,"../utils/url.js":170,"./tech.js":136,"global/document":250,"global/window":251,"object.assign":244,tsml:248}],134:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../component.js"),h=d(g),i=a("./tech.js"),j=d(i),k=a("global/window"),l=(d(k),a("../utils/to-title-case.js")),m=d(l),n=function(a){function b(c,d,f){if(e(this,b),a.call(this,c,d,f),d.playerOptions.sources&&0!==d.playerOptions.sources.length)c.src(d.playerOptions.sources);else for(var g=0,i=d.playerOptions.techOrder;g<i.length;g++){var k=m["default"](i[g]),l=j["default"].getTech(k);if(k||(l=h["default"].getComponent(k)),l&&l.isSupported()){c.loadTech_(k);break}}}return f(b,a),b}(h["default"]);h["default"].registerComponent("MediaLoader",n),c["default"]=n,b.exports=c["default"]},{"../component.js":77,"../utils/to-title-case.js":169,"./tech.js":136,"global/window":251}],135:[function(a,b,c){/*!    SWFObject v2.3.20130521 <http://github.com/swfobject/swfobject>
    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/window"),f=d(e),g=a("global/document"),h=d(g),i=function(){function a(a){return parseInt(a,10)}function b(b){b+="";var c=n.pv,d=b.split(".");return d[0]=a(d[0]),d[1]=a(d[1])||0,d[2]=a(d[2])||0,d[3]=a(d[3])||0,c[0]>d[0]||c[0]===d[0]&&c[1]>d[1]||c[0]===d[0]&&c[1]===d[1]&&c[2]>d[2]||c[0]===d[0]&&c[1]===d[1]&&c[2]===d[2]&&c[3]>=d[3]?!0:!1}var c="undefined",d="object",e="Shockwave Flash",g="ShockwaveFlash.ShockwaveFlash",i="application/x-shockwave-flash",j=f["default"],k=h["default"],l=f["default"].navigator,m=!1,n=function(){var b=typeof k.getElementById!==c&&typeof k.getElementsByTagName!==c&&typeof k.createElement!==c,f=l.userAgent.toLowerCase(),h=l.platform.toLowerCase(),n=/win/.test(h?h:f),o=/mac/.test(h?h:f),p=/webkit/.test(f)?parseFloat(f.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,q="Microsoft Internet Explorer"===l.appName,r=[0,0,0,145],s=null;if(typeof l.plugins!==c&&typeof l.plugins[e]===d)if(s=l.plugins[e].version,s&&typeof l.mimeTypes!==c&&l.mimeTypes[i]&&l.mimeTypes[i].enabledPlugin){m=!0,q=!1;var t=s.split(".");r[0]=a(t[0]),r[1]=a(t[1]),r[2]=a(t[2]),r[3]=a(t[3])}else s=l.plugins[e].description,s&&typeof l.mimeTypes!==c&&l.mimeTypes[i]&&l.mimeTypes[i].enabledPlugin&&(m=!0,q=!1,s=s.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),r[0]=a(s.replace(/^(.*)\..*$/,"$1")),r[1]=a(s.replace(/^.*\.(.*)\s.*$/,"$1")),r[2]=/[a-zA-Z]/.test(s)?a(s.replace(/^.*[a-zA-Z]+(.*)$/,"$1")):0);else if(typeof j.ActiveXObject!==c)try{var u=new j.ActiveXObject(g);u&&(s=u.GetVariable("$version"),s&&(q=!0,s=s.split(" ")[1].split(","),r=[a(s[0]),a(s[1]),a(s[2])]))}catch(v){}return{w3:b,pv:r,wk:p,ie:q,win:n,mac:o}}();return{ua:n,hasFlashPlayerVersion:b}}();c.swfobject=i},{"global/document":250,"global/window":251}],136:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component"),i=e(h),j=a("../tracks/html-track-element"),k=e(j),l=a("../tracks/html-track-element-list"),m=e(l),n=a("../utils/merge-options.js"),o=e(n),p=a("../tracks/text-track"),q=e(p),r=a("../tracks/text-track-list"),s=e(r),t=a("../tracks/video-track"),u=(e(t),a("../tracks/video-track-list")),v=e(u),w=a("../tracks/audio-track-list"),x=e(w),y=a("../tracks/audio-track"),z=(e(y),a("../utils/fn.js")),A=d(z),B=a("../utils/log.js"),C=e(B),D=a("../utils/time-ranges.js"),E=a("../utils/buffer.js"),F=a("../media-error.js"),G=e(F),H=a("global/window"),I=e(H),J=a("global/document"),K=e(J),L=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1];f(this,b),c.reportTouchActivity=!1,a.call(this,null,c,d),this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),this.textTracks_=c.textTracks,this.videoTracks_=c.videoTracks,this.audioTracks_=c.audioTracks,this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),(c.nativeCaptions===!1||c.nativeTextTracks===!1)&&(this.featuresNativeTextTracks=!1),this.featuresNativeTextTracks||this.on("ready",this.emulateTextTracks),this.initTextTrackListeners(),this.initTrackListeners(),this.emitTapEvents()}/*! Time Tracking -------------------------------------------------------------- */
return g(b,a),b.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},b.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},b.prototype.trackProgress=function(){this.stopTrackingProgress(),this.progressInterval=this.setInterval(A.bind(this,function(){var a=this.bufferedPercent();this.bufferedPercent_!==a&&this.trigger("progress"),this.bufferedPercent_=a,1===a&&this.stopTrackingProgress()}),500)},b.prototype.onDurationChange=function(){this.duration_=this.duration()},b.prototype.buffered=function(){return D.createTimeRange(0,0)},b.prototype.bufferedPercent=function(){return E.bufferedPercent(this.buffered(),this.duration_)},b.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},b.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime),this.one("timeupdate",function(a){a.manuallyTriggered||(this.featuresTimeupdateEvents=!0,this.manualTimeUpdatesOff())})},b.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},b.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},b.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},b.prototype.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),a.prototype.dispose.call(this)},b.prototype.clearTracks=function(a){var b=this;a=[].concat(a),a.forEach(function(a){for(var c=b[a+"Tracks"]()||[],d=c.length;d--;){var e=c[d];"text"===a&&b.removeRemoteTextTrack(e),c.removeTrack_(e)}})},b.prototype.reset=function(){},b.prototype.error=function(a){return void 0!==a&&(this.error_=a instanceof G["default"]?a:new G["default"](a),this.trigger("error")),this.error_},b.prototype.played=function(){return this.hasStarted_?D.createTimeRange(0,0):D.createTimeRange()},b.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},b.prototype.initTextTrackListeners=function(){var a=A.bind(this,function(){this.trigger("texttrackchange")}),b=this.textTracks();b&&(b.addEventListener("removetrack",a),b.addEventListener("addtrack",a),this.on("dispose",A.bind(this,function(){b.removeEventListener("removetrack",a),b.removeEventListener("addtrack",a)})))},b.prototype.initTrackListeners=function(){var a=this,b=["video","audio"];b.forEach(function(b){var c=function(){a.trigger(b+"trackchange")},d=a[b+"Tracks"]();d.addEventListener("removetrack",c),d.addEventListener("addtrack",c),a.on("dispose",function(){d.removeEventListener("removetrack",c),d.removeEventListener("addtrack",c)})})},b.prototype.emulateTextTracks=function(){var a=this,b=this.textTracks();if(b){I["default"].WebVTT||null==this.el().parentNode||!function(){var b=K["default"].createElement("script");b.src=a.options_["vtt.js"]||"../node_modules/videojs-vtt.js/dist/vtt.js",b.onload=function(){a.trigger("vttjsloaded")},b.onerror=function(){a.trigger("vttjserror")},a.on("dispose",function(){b.onload=null,b.onerror=null}),I["default"].WebVTT=!0,a.el().parentNode.appendChild(b)}();var c=function(){return a.trigger("texttrackchange")},d=function(){c();for(var a=0;a<b.length;a++){var d=b[a];d.removeEventListener("cuechange",c),"showing"===d.mode&&d.addEventListener("cuechange",c)}};d(),b.addEventListener("change",d),this.on("dispose",function(){b.removeEventListener("change",d)})}},b.prototype.videoTracks=function(){return this.videoTracks_=this.videoTracks_||new v["default"],this.videoTracks_},b.prototype.audioTracks=function(){return this.audioTracks_=this.audioTracks_||new x["default"],this.audioTracks_},b.prototype.textTracks=function(){return this.textTracks_=this.textTracks_||new s["default"],this.textTracks_},b.prototype.remoteTextTracks=function(){return this.remoteTextTracks_=this.remoteTextTracks_||new s["default"],this.remoteTextTracks_},b.prototype.remoteTextTrackEls=function(){return this.remoteTextTrackEls_=this.remoteTextTrackEls_||new m["default"],this.remoteTextTrackEls_},b.prototype.addTextTrack=function(a,b,c){if(!a)throw new Error("TextTrack kind is required but was not provided");return M(this,a,b,c)},b.prototype.addRemoteTextTrack=function(a){var b=o["default"](a,{tech:this}),c=new k["default"](b);return this.remoteTextTrackEls().addTrackElement_(c),this.remoteTextTracks().addTrack_(c.track),this.textTracks().addTrack_(c.track),c},b.prototype.removeRemoteTextTrack=function(a){this.textTracks().removeTrack_(a);var b=this.remoteTextTrackEls().getTrackElementByTrack_(a);this.remoteTextTrackEls().removeTrackElement_(b),this.remoteTextTracks().removeTrack_(a)},b.prototype.setPoster=function(){},b.prototype.canPlayType=function(){return""},b.isTech=function(a){return a.prototype instanceof b||a instanceof b||a===b},b.registerTech=function(a,c){if(b.techs_||(b.techs_={}),!b.isTech(c))throw new Error("Tech "+a+" must be a Tech");return b.techs_[a]=c,c},b.getTech=function(a){return b.techs_&&b.techs_[a]?b.techs_[a]:I["default"]&&I["default"].videojs&&I["default"].videojs[a]?(C["default"].warn("The "+a+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),I["default"].videojs[a]):void 0},b}(i["default"]);L.prototype.textTracks_,L.prototype.audioTracks_,L.prototype.videoTracks_;var M=function(a,b,c,d){var e=arguments.length<=4||void 0===arguments[4]?{}:arguments[4],f=a.textTracks();e.kind=b,c&&(e.label=c),d&&(e.language=d),e.tech=a;var g=new q["default"](e);return f.addTrack_(g),g};L.prototype.featuresVolumeControl=!0,L.prototype.featuresFullscreenResize=!1,L.prototype.featuresPlaybackRate=!1,L.prototype.featuresPreload=!0,L.prototype.featuresProgressEvents=!1,L.prototype.featuresTimeupdateEvents=!1,L.prototype.featuresNativeTextTracks=!1,L.withSourceHandlers=function(a){a.registerSourceHandler=function(b,c){var d=a.sourceHandlers;d||(d=a.sourceHandlers=[]),void 0===c&&(c=d.length),d.splice(c,0,b)},a.canPlayType=function(b){for(var c=a.sourceHandlers||[],d=void 0,e=0;e<c.length;e++)if(d=c[e].canPlayType(b))return d;return""},a.selectSourceHandler=function(b,c){for(var d=a.sourceHandlers||[],e=void 0,f=0;f<d.length;f++)if(e=d[f].canHandleSource(b,c))return d[f];return null},a.canPlaySource=function(b,c){var d=a.selectSourceHandler(b,c);return d?d.canHandleSource(b,c):""};var b=["seekable","duration"];b.forEach(function(a){var b=this[a];"function"==typeof b&&(this[a]=function(){return this.sourceHandler_&&this.sourceHandler_[a]?this.sourceHandler_[a].apply(this.sourceHandler_,arguments):b.apply(this,arguments)})},a.prototype),a.prototype.setSource=function(b){var c=a.selectSourceHandler(b,this.options_);return c||(a.nativeSourceHandler?c=a.nativeSourceHandler:C["default"].error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),c!==a.nativeSourceHandler&&(this.currentSource_=b,this.off(this.el_,"loadstart",a.prototype.firstLoadStartListener_),this.off(this.el_,"loadstart",a.prototype.successiveLoadStartListener_),this.one(this.el_,"loadstart",a.prototype.firstLoadStartListener_)),this.sourceHandler_=c.handleSource(b,this,this.options_),this.on("dispose",this.disposeSourceHandler),this},a.prototype.firstLoadStartListener_=function(){this.one(this.el_,"loadstart",a.prototype.successiveLoadStartListener_)},a.prototype.successiveLoadStartListener_=function(){this.currentSource_=null,this.disposeSourceHandler(),this.one(this.el_,"loadstart",a.prototype.successiveLoadStartListener_)},a.prototype.disposeSourceHandler=function(){this.sourceHandler_&&this.sourceHandler_.dispose&&(this.off(this.el_,"loadstart",a.prototype.firstLoadStartListener_),this.off(this.el_,"loadstart",a.prototype.successiveLoadStartListener_),this.sourceHandler_.dispose(),this.sourceHandler_=null)}},i["default"].registerComponent("Tech",L),i["default"].registerComponent("MediaTechController",L),L.registerTech("Tech",L),c["default"]=L,b.exports=c["default"]},{"../component":77,"../media-error.js":119,"../tracks/audio-track":139,"../tracks/audio-track-list":138,"../tracks/html-track-element":141,"../tracks/html-track-element-list":140,"../tracks/text-track":147,"../tracks/text-track-list":145,"../tracks/video-track":152,"../tracks/video-track-list":151,"../utils/buffer.js":154,"../utils/fn.js":158,"../utils/log.js":164,"../utils/merge-options.js":165,"../utils/time-ranges.js":167,"global/document":250,"global/window":251}],137:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./clickable-component.js"),i=e(h),j=a("./component"),k=e(j),l=a("./utils/dom.js"),m=d(l),n=function(a){function b(c,d){f(this,b);var e=this;a.call(this,c,d),this.lastClickedTime_=Date.now(),this.on("keydown",this.clearKeyboardTooltip),this.on("mouseover",this.clearKeyboardTooltip),this.on("focusout",this.clearKeyboardTooltip),this.on("click",function(){this.lastClickedTime_=Date.now(),this.clearKeyboardTooltip(),a.prototype.handleClick.call(e)}),this.on("focusin",this.handleFocusin)}return g(b,a),b.prototype.handleFocusin=function(){Date.now()-this.lastClickedTime_>500&&this.showKeyboardTooltip()},b.prototype.showKeyboardTooltip=function(){var a=this.el_.getAttribute("title");a&&void 0!==a&&(this.buttonTooltipEl_&&void 0!==this.buttonTooltipEl_||(this.buttonTooltipEl_=m.createEl("span",{className:"vjs-button-tooltip"}),this.el_.appendChild(this.buttonTooltipEl_),this.buttonTooltipEl_.innerHtml=this.buttonTooltipEl_.innerText=a))},b.prototype.clearKeyboardTooltip=function(){this.buttonTooltipEl_&&void 0!==this.buttonTooltipEl_&&(this.buttonTooltipEl_.innerHtml=this.buttonTooltipEl_.innerText=null,this.el_.removeChild(this.buttonTooltipEl_),this.buttonTooltipEl_=null)},b}(i["default"]);k["default"].registerComponent("TooltipClickable",n),c["default"]=n,b.exports=c["default"]},{"./clickable-component.js":75,"./component":77,"./utils/dom.js":156}],138:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./track-list"),i=e(h),j=a("../utils/browser.js"),k=d(j),l=a("global/document"),m=e(l),n=function(a,b){for(var c=0;c<a.length;c++)b.id!==a[c].id&&(a[c].enabled=!1)},o=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];f(this,b);for(var d=void 0,e=c.length-1;e>=0;e--)if(c[e].enabled){n(c,c[e]);break}if(k.IS_IE8){d=m["default"].createElement("custom");for(var g in i["default"].prototype)"constructor"!==g&&(d[g]=i["default"].prototype[g]);for(var g in b.prototype)"constructor"!==g&&(d[g]=b.prototype[g])}return d=a.call(this,c,d),d.changing_=!1,d}return g(b,a),b.prototype.addTrack_=function(b){var c=this;b.enabled&&n(this,b),a.prototype.addTrack_.call(this,b),b.addEventListener&&b.addEventListener("enabledchange",function(){c.changing_||(c.changing_=!0,n(c,b),c.changing_=!1,c.trigger("change"))})},b.prototype.addTrack=function(a){this.addTrack_(a)},b.prototype.removeTrack=function(b){a.prototype.removeTrack_.call(this,b)},b}(i["default"]);c["default"]=o,b.exports=c["default"]},{"../utils/browser.js":153,"./track-list":149,"global/document":250}],139:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./track-enums"),i=a("./track"),j=e(i),k=a("../utils/merge-options"),l=e(k),m=a("../utils/browser.js"),n=d(m),o=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f(this,b);var d=l["default"](c,{kind:h.AudioTrackKind[c.kind]||""}),e=a.call(this,d),g=!1;if(n.IS_IE8)for(var i in b.prototype)"constructor"!==i&&(e[i]=b.prototype[i]);return Object.defineProperty(e,"enabled",{get:function(){return g},set:function(a){"boolean"==typeof a&&a!==g&&(g=a,this.trigger("enabledchange"))}}),d.enabled&&(e.enabled=d.enabled),e.loaded_=!0,e}return g(b,a),b}(j["default"]);c["default"]=o,b.exports=c["default"]},{"../utils/browser.js":153,"../utils/merge-options":165,"./track":150,"./track-enums":148}],140:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var g=a("../utils/browser.js"),h=e(g),i=a("global/document"),j=d(i),k=function(){function a(){var b=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];f(this,a);var c=this;if(h.IS_IE8){c=j["default"].createElement("custom");for(var d in a.prototype)"constructor"!==d&&(c[d]=a.prototype[d])}c.trackElements_=[],Object.defineProperty(c,"length",{get:function(){return this.trackElements_.length}});for(var e=0,g=b.length;g>e;e++)c.addTrackElement_(b[e]);return h.IS_IE8?c:void 0}return a.prototype.addTrackElement_=function(a){this.trackElements_.push(a)},a.prototype.getTrackElementByTrack_=function(a){for(var b=void 0,c=0,d=this.trackElements_.length;d>c;c++)if(a===this.trackElements_[c].track){b=this.trackElements_[c];break}return b},a.prototype.removeTrackElement_=function(a){for(var b=0,c=this.trackElements_.length;c>b;b++)if(a===this.trackElements_[b]){this.trackElements_.splice(b,1);break}},a}();c["default"]=k,b.exports=c["default"]},{"../utils/browser.js":153,"global/document":250}],141:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../utils/browser.js"),i=e(h),j=a("global/document"),k=d(j),l=a("../event-target"),m=d(l),n=a("../tracks/text-track"),o=d(n),p=0,q=1,r=2,s=3,t=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f(this,b),a.call(this);var d=void 0,e=this;if(i.IS_IE8){e=k["default"].createElement("custom");for(var g in b.prototype)"constructor"!==g&&(e[g]=b.prototype[g])}var h=new o["default"](c);return e.kind=h.kind,e.src=h.src,e.srclang=h.language,e.label=h.label,e["default"]=h["default"],Object.defineProperty(e,"readyState",{get:function(){return d}}),Object.defineProperty(e,"track",{get:function(){return h}}),d=p,h.addEventListener("loadeddata",function(){d=r,e.trigger({type:"load",target:e})}),i.IS_IE8?e:void 0}return g(b,a),b}(m["default"]);t.prototype.allowedEvents_={load:"load"},t.NONE=p,t.LOADING=q,t.LOADED=r,t.ERROR=s,c["default"]=t,b.exports=c["default"]},{"../event-target":115,"../tracks/text-track":147,"../utils/browser.js":153,"global/document":250}],142:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var g=a("../utils/browser.js"),h=e(g),i=a("global/document"),j=d(i),k=function(){function a(b){f(this,a);var c=this;if(h.IS_IE8){c=j["default"].createElement("custom");for(var d in a.prototype)"constructor"!==d&&(c[d]=a.prototype[d])}return a.prototype.setCues_.call(c,b),Object.defineProperty(c,"length",{get:function(){return this.length_}}),h.IS_IE8?c:void 0}return a.prototype.setCues_=function(a){var b=this.length||0,c=0,d=a.length;this.cues_=a,this.length_=a.length;var e=function(a){""+a in this||Object.defineProperty(this,""+a,{get:function(){return this.cues_[a]}})};if(d>b)for(c=b;d>c;c++)e.call(this,c)},a.prototype.getCueById=function(a){for(var b=null,c=0,d=this.length;d>c;c++){var e=this[c];if(e.id===a){b=e;break}}return b},a}();c["default"]=k,b.exports=c["default"]},{"../utils/browser.js":153,"global/document":250}],143:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a,b){var c=[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];return b?"rgba("+c.join(",")+","+b+")":"rgb("+c.join(",")+")"}function i(a,b,c){try{a.style[b]=c}catch(d){}}function j(a,b,c,d){try{for(var e=0;e<a.length;e++){var f=a[e];(!d||d(f))&&f.style.setProperty(b,c,"important")}}catch(g){}}function k(a,b,c,d){function e(a){return x["default"].getComputedStyle?x["default"].getComputedStyle(a,""):a.currentStyle}function f(a){var b=[parseInt(a[1]+a[2],16),parseInt(a[3]+a[4],16),parseInt(a[5]+a[6],16)];return"rgb("+b.join(",")+")"}for(var g=0;g<a.length;g++){var h=a[g];if(!d||d(h)){var i=e(h)[b];i.indexOf("rgb")<0&&(i=f(i));var j=l(i);if(!j)return;j[3]=c;var k="rgba("+j.join(",")+")";try{h.style.setProperty(b,k,"important")}catch(m){}}}}function l(a){var b=/rgba?\((\d+,\s*\d+,\s*\d+(?:,\s*[\d\.]+)?)\)/,c=/,\s*/,d=b.exec(a);return!d||d.length<2?null:d[1].split(c)}function m(a,b){for(var c=l(a),d=l(b),e=3,f=0;e>f;f++)if(c[f]!==d[f])return!1;return!0}function n(a){return a&&a.className&&a.className.indexOf("bg_")>=0}c.__esModule=!0;var o=a("../component"),p=e(o),q=a("../menu/menu.js"),r=(e(q),a("../menu/menu-item.js")),s=(e(r),a("../menu/menu-button.js")),t=(e(s),a("../utils/fn.js")),u=d(t),v=a("global/document"),w=(e(v),a("global/window")),x=e(w),y="#222",z="#ccc",A={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},B=function(a){function b(c,d,e){f(this,b),a.call(this,c,d,e),c.on("loadstart",u.bind(this,this.toggleDisplay)),c.on("texttrackchange",u.bind(this,this.updateDisplay)),c.ready(u.bind(this,function(){if(c.tech_&&c.tech_.featuresNativeTextTracks)return void this.hide();c.on("fullscreenchange",u.bind(this,this.updateDisplay));for(var a=this.options_.playerOptions.tracks||[],b=0;b<a.length;b++){var d=a[b];this.player_.addRemoteTextTrack(d)}var e={captions:1,subtitles:1},f=this.player_.textTracks(),g=void 0,h=void 0;if(f){for(var b=0;b<f.length;b++){var d=f[b];d["default"]&&("descriptions"!==d.kind||g?d.kind in e&&!h&&(h=d):g=d)}h?h.mode="showing":g&&(g.mode="showing")}}))}return g(b,a),b.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"assertive","aria-atomic":"true",role:"region","aria-label":"Text Track Display"})},b.prototype.clearDisplay=function(){"function"==typeof x["default"].WebVTT&&x["default"].WebVTT.processCues(x["default"],[],this.el_)},b.prototype.updateDisplay=function(){var a=this.player_.textTracks();if(this.clearDisplay(),a){for(var b=null,c=null,d=a.length;d--;){var e=a[d];"showing"===e.mode&&("descriptions"===e.kind?b=e:c=e)}c?this.updateForTrack(c):b&&this.updateForTrack(b)}},b.prototype.updateForTrack=function(a){if("function"==typeof x["default"].WebVTT&&a.activeCues){for(var b=this.player_.textTrackSettings.getValues(),c=[],d=0;d<a.activeCues.length;d++)c.push(a.activeCues[d]);x["default"].WebVTT.processCues(x["default"],c,this.el_);for(var e=c.length;e--;){var f=c[e];if(f){var g=f.displayState,l=this.changedByUser?g.firstChild.querySelectorAll("span"):[];if(b.color){var o=g.firstChild.style.color;g.firstChild.style.color=b.color,this.changedByUser&&!m(h(b.color),o)&&j(l,"color",b.color)}b.textOpacity&&(i(g.firstChild,"color",h(b.color||"#fff",b.textOpacity)),this.changedByUser&&k(l,"color",b.textOpacity));var p=g.firstChild.style.backgroundColor;if(b.backgroundColor&&(g.firstChild.style.backgroundColor=b.backgroundColor,this.changedByUser&&!m(h(b.backgroundColor),p)&&j(l,"background-color",b.backgroundColor,n)),b.backgroundOpacity){var q=h(b.backgroundColor||"#000",b.backgroundOpacity);if(i(g.firstChild,"backgroundColor",q),this.changedByUser){var r=!m(h(b.backgroundColor),p),s=r?0:b.backgroundOpacity;k(l,"background-color",s,n)}}if(b.windowColor&&(b.windowOpacity?i(g,"backgroundColor",h(b.windowColor,b.windowOpacity)):g.style.backgroundColor=b.windowColor),b.edgeStyle&&("dropshadow"===b.edgeStyle?g.firstChild.style.textShadow="2px 2px 3px "+y+", 2px 2px 4px "+y+", 2px 2px 5px "+y:"raised"===b.edgeStyle?g.firstChild.style.textShadow="1px 1px "+y+", 2px 2px "+y+", 3px 3px "+y:"depressed"===b.edgeStyle?g.firstChild.style.textShadow="1px 1px "+z+", 0 1px "+z+", -1px -1px "+y+", 0 -1px "+y:"uniform"===b.edgeStyle&&(g.firstChild.style.textShadow="0 0 4px "+y+", 0 0 4px "+y+", 0 0 4px "+y+", 0 0 4px "+y)),b.fontPercent&&1!==b.fontPercent){var t=x["default"].parseFloat(g.style.fontSize);g.style.fontSize=t*b.fontPercent+"px",g.style.height="auto",g.style.top="auto",g.style.bottom="2px"}b.fontFamily&&"default"!==b.fontFamily&&("small-caps"===b.fontFamily?g.firstChild.style.fontVariant="small-caps":g.firstChild.style.fontFamily=A[b.fontFamily]),b.justification&&(g.style.textAlign=b.justification),b.padding&&(g.style.padding=b.padding),b.textPadding&&(g.firstChild.style.padding=b.textPadding),b.boxShadow&&(g.firstChild.style.boxShadow=b.boxShadow,g.firstChild.style.webkitBoxShadow=b.boxShadow)}}}},b.prototype.setAsChangedByUser=function(){this.changedByUser=!0},b}(p["default"]);p["default"].registerComponent("TextTrackDisplay",B),c["default"]=B,b.exports=c["default"]},{"../component":77,"../menu/menu-button.js":120,"../menu/menu-item.js":121,"../menu/menu.js":122,"../utils/fn.js":158,"global/document":250,"global/window":251}],144:[function(a,b,c){"use strict";c.__esModule=!0;var d=function(a){var b=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(b,c){return a[c]&&(b[c]=a[c]),b},{cues:a.cues&&Array.prototype.map.call(a.cues,function(a){return{startTime:a.startTime,endTime:a.endTime,text:a.text,id:a.id}})});return b},e=function(a){var b=a.$$("track"),c=Array.prototype.map.call(b,function(a){return a.track}),e=Array.prototype.map.call(b,function(a){var b=d(a.track);return a.src&&(b.src=a.src),b});return e.concat(Array.prototype.filter.call(a.textTracks(),function(a){return-1===c.indexOf(a)}).map(d))},f=function(a,b){return a.forEach(function(a){var c=b.addRemoteTextTrack(a).track;!a.src&&a.cues&&a.cues.forEach(function(a){return c.addCue(a)})}),b.textTracks()};c["default"]={textTracksToJson:e,jsonToTextTracks:f,trackToJson_:d},b.exports=c["default"]},{}],145:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./track-list"),i=e(h),j=a("../utils/fn.js"),k=d(j),l=a("../utils/browser.js"),m=d(l),n=a("global/document"),o=e(n),p=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];f(this,b);var d=void 0;if(m.IS_IE8){d=o["default"].createElement("custom");for(var e in i["default"].prototype)"constructor"!==e&&(d[e]=i["default"].prototype[e]);for(var e in b.prototype)"constructor"!==e&&(d[e]=b.prototype[e])}return d=a.call(this,c,d)}return g(b,a),b.prototype.addTrack_=function(b){a.prototype.addTrack_.call(this,b),b.addEventListener("modechange",k.bind(this,function(){this.trigger("change")}))},b.prototype.removeTrack_=function(a){for(var b=void 0,c=0,d=this.length;d>c;c++)if(this[c]===a){b=this[c],b.off&&b.off(),this.tracks_.splice(c,1);break}b&&this.trigger({track:b,type:"removetrack"})},b.prototype.getTrackById=function(a){for(var b=null,c=0,d=this.length;d>c;c++){var e=this[c];if(e.id===a){b=e;break}}return b},b}(i["default"]);c["default"]=p,b.exports=c["default"]},{"../utils/browser.js":153,"../utils/fn.js":158,"./track-list":149,"global/document":250}],146:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a){var b=void 0;return a.selectedOptions?b=a.selectedOptions[0]:a.options&&(b=a.options[a.options.selectedIndex]),b.value}function i(a,b){if(b){var c=void 0;for(c=0;c<a.options.length;c++){var d=a.options[c];if(d.value===b)break}a.selectedIndex=c}}function j(a,b,c){var d='\n    <div role="document">\n      <div role="heading" aria-level="1" id="'+b+'" class="vjs-control-text">Captions Settings Dialog</div>\n      <div id="'+c+'" class="vjs-control-text">Beginning of dialog window. Escape will cancel and close the window.</div>\n      <div class="vjs-tracksettings">\n        <div class="vjs-tracksettings-colors">\n          <fieldset class="vjs-fg-color vjs-tracksetting">\n            <legend>'+this.htmlEncode(this.localize("Text"))+'</legend>\n            <label class="vjs-label" for="captions-foreground-color-'+a+'">'+this.htmlEncode(this.localize("Text color"))+'</label>\n            <select id="captions-foreground-color-'+a+'">\n              <option value="#FFF" selected>'+this.htmlEncode(this.localize("White"))+'</option>\n              <option value="#000">'+this.htmlEncode(this.localize("Black"))+'</option>\n              <option value="#F00">'+this.htmlEncode(this.localize("Red"))+'</option>\n              <option value="#0F0">'+this.htmlEncode(this.localize("Green"))+'</option>\n              <option value="#00F">'+this.htmlEncode(this.localize("Blue"))+'</option>\n              <option value="#FF0">'+this.htmlEncode(this.localize("Yellow"))+'</option>\n              <option value="#F0F">'+this.htmlEncode(this.localize("Magenta"))+'</option>\n              <option value="#0FF">'+this.htmlEncode(this.localize("Cyan"))+'</option>\n            </select>\n            <span class="vjs-text-opacity vjs-opacity">\n             <label class="vjs-label" for="captions-foreground-opacity-'+a+'">'+this.htmlEncode(this.localize("Text opacity"))+'</label>\n              <select id="captions-foreground-opacity-'+a+'">\n                <option value="1" selected>'+this.htmlEncode(this.localize("Opaque"))+'</option>\n                <option value="0.5">'+this.htmlEncode(this.localize("Semi-Opaque"))+'</option>\n              </select>\n            </span>\n          </fieldset>\n          <fieldset class="vjs-bg-color vjs-tracksetting">\n            <legend>'+this.htmlEncode(this.localize("Background"))+'</legend>\n            <label class="vjs-label" for="captions-background-color-'+a+'">'+this.htmlEncode(this.localize("Background Color"))+'</label>\n            <select id="captions-background-color-'+a+'">\n              <option value="#000" selected>'+this.htmlEncode(this.localize("Black"))+'</option>\n              <option value="#FFF">'+this.htmlEncode(this.localize("White"))+'</option>\n              <option value="#F00">'+this.htmlEncode(this.localize("Red"))+'</option>\n              <option value="#0F0">'+this.htmlEncode(this.localize("Green"))+'</option>\n              <option value="#00F">'+this.htmlEncode(this.localize("Blue"))+'</option>\n              <option value="#FF0">'+this.htmlEncode(this.localize("Yellow"))+'</option>\n              <option value="#F0F">'+this.htmlEncode(this.localize("Magenta"))+'</option>\n              <option value="#0FF">'+this.htmlEncode(this.localize("Cyan"))+'</option>\n            </select>\n            <span class="vjs-bg-opacity vjs-opacity">\n              <label class="vjs-label" for="captions-background-opacity-'+a+'">'+this.htmlEncode(this.localize("Background opacity"))+'</label>\n              <select id="captions-background-opacity-'+a+'">\n                <option value="1" selected>'+this.htmlEncode(this.localize("Opaque"))+'</option>\n                <option value="0.5">'+this.htmlEncode(this.localize("Semi-Transparent"))+'</option>\n                <option value="0">'+this.htmlEncode(this.localize("Transparent"))+'</option>\n              </select>\n            </span>\n          </fieldset>\n          <fieldset class="window-color vjs-tracksetting">\n            <legend>'+this.htmlEncode(this.localize("Window"))+'</legend>\n            <label class="vjs-label" for="captions-window-color-'+a+'">'+this.htmlEncode(this.localize("Window Color"))+'</label>\n            <select id="captions-window-color-'+a+'">\n              <option value="#000" selected>'+this.htmlEncode(this.localize("Black"))+'</option>\n              <option value="#FFF">'+this.htmlEncode(this.localize("White"))+'</option>\n              <option value="#F00">'+this.htmlEncode(this.localize("Red"))+'</option>\n              <option value="#0F0">'+this.htmlEncode(this.localize("Green"))+'</option>\n              <option value="#00F">'+this.htmlEncode(this.localize("Blue"))+'</option>\n              <option value="#FF0">'+this.htmlEncode(this.localize("Yellow"))+'</option>\n              <option value="#F0F">'+this.htmlEncode(this.localize("Magenta"))+'</option>\n              <option value="#0FF">'+this.htmlEncode(this.localize("Cyan"))+'</option>\n            </select>\n            <span class="vjs-window-opacity vjs-opacity">\n              <label class="vjs-label" for="captions-window-opacity-'+a+'">'+this.htmlEncode(this.localize("Transparency"))+'</label>\n              <select id="captions-window-opacity-'+a+'">\n                <option value="0" selected>'+this.htmlEncode(this.localize("Transparent"))+'</option>\n                <option value="0.5">'+this.htmlEncode(this.localize("Semi-Transparent"))+'</option>\n                <option value="1">'+this.htmlEncode(this.localize("Opaque"))+'</option>\n              </select>\n            </span>\n          </fieldset>\n        </div> <!-- vjs-tracksettings-colors -->\n        <div class="vjs-tracksettings-font">\n          <div class="vjs-font-percent vjs-tracksetting">\n            <label class="vjs-label" for="captions-font-size-'+a+'">'+this.htmlEncode(this.localize("Font Size"))+'</label>\n            <select id="captions-font-size-'+a+'">\n              <option value="0.50">50%</option>\n              <option value="0.75">75%</option>\n              <option value="1.00" selected>100%</option>\n              <option value="1.25">125%</option>\n              <option value="1.50">150%</option>\n              <option value="1.75">175%</option>\n              <option value="2.00">200%</option>\n              <option value="3.00">300%</option>\n              <option value="4.00">400%</option>\n            </select>\n          </div>\n          <div class="vjs-edge-style vjs-tracksetting">\n            <label class="vjs-label" for="captions-edge-style-'+a+'">'+this.htmlEncode(this.localize("Text Edge Style"))+'</label>\n            <select id="captions-edge-style-'+a+'">\n              <option value="none" selected>'+this.htmlEncode(this.localize("None"))+'</option>\n              <option value="raised">'+this.htmlEncode(this.localize("Raised"))+'</option>\n              <option value="depressed">'+this.htmlEncode(this.localize("Depressed"))+'</option>\n              <option value="uniform">'+this.htmlEncode(this.localize("Uniform"))+'</option>\n              <option value="dropshadow">'+this.htmlEncode(this.localize("Dropshadow"))+'</option>\n            </select>\n          </div>\n          <div class="vjs-font-family vjs-tracksetting">\n            <label class="vjs-label" for="captions-font-family-'+a+'">'+this.htmlEncode(this.localize("Font Family"))+'</label>\n            <select id="captions-font-family-'+a+'">\n              <option value="proportionalSansSerif" selected>'+this.htmlEncode(this.localize("Proportional Sans-Serif"))+'</option>\n              <option value="monospaceSansSerif">'+this.htmlEncode(this.localize("Monospace Sans-Serif"))+'</option>\n              <option value="proportionalSerif">'+this.htmlEncode(this.localize("Proportional Serif"))+'</option>\n              <option value="monospaceSerif">'+this.htmlEncode(this.localize("Monospace Serif"))+'</option>\n              <option value="casual">'+this.htmlEncode(this.localize("Casual"))+'</option>\n              <option value="script">'+this.htmlEncode(this.localize("Script"))+'</option>\n              <option value="small-caps">'+this.htmlEncode(this.localize("Small Caps"))+'</option>\n            </select>\n          </div>\n        </div> <!-- vjs-tracksettings-font -->\n        <div class="vjs-tracksettings-controls">\n          <button class="vjs-default-button">'+this.htmlEncode(this.localize("Defaults"))+'</button>\n          <button class="vjs-done-button">'+this.htmlEncode(this.localize("Done"))+'</button>\n        </div>\n      </div> <!-- vjs-tracksettings -->\n    </div> <!--  role="document" -->';

return d}c.__esModule=!0;var k=a("../component"),l=e(k),m=a("../utils/fn.js"),n=d(m),o=a("../utils/log.js"),p=e(o),q=a("safe-json-parse/tuple"),r=e(q),s=a("global/window"),t=e(s),u=function(a){function b(c,d){var e=this;f(this,b),a.call(this,c,d),this.hide(),void 0===d.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings);var g="center";this.hiddenSettings={justification:g},this.on(this.$(".vjs-done-button"),"click",function(){e.saveSettings(),e.hide(),e.returnFocusBack()}),this.on(this.$(".vjs-done-button"),"keydown",this.handleKeyPress_DoneBtn),this.on(this.$(".vjs-fg-color"),"keydown",this.handleKeyPress_FgColor),this.on(this.$(".vjs-default-button"),"click",function(){e.$(".vjs-fg-color > select").selectedIndex=0,e.$(".vjs-bg-color > select").selectedIndex=0,e.$(".window-color > select").selectedIndex=0,e.$(".vjs-text-opacity > select").selectedIndex=0,e.$(".vjs-bg-opacity > select").selectedIndex=0,e.$(".vjs-window-opacity > select").selectedIndex=0,e.$(".vjs-edge-style select").selectedIndex=0,e.$(".vjs-font-family select").selectedIndex=0,e.$(".vjs-font-percent select").selectedIndex=2,e.updateDisplay()}),this.on(this.$(".vjs-fg-color > select"),"change",this.updateDisplay),this.on(this.$(".vjs-bg-color > select"),"change",this.updateDisplay),this.on(this.$(".window-color > select"),"change",this.updateDisplay),this.on(this.$(".vjs-text-opacity > select"),"change",this.updateDisplay),this.on(this.$(".vjs-bg-opacity > select"),"change",this.updateDisplay),this.on(this.$(".vjs-window-opacity > select"),"change",this.updateDisplay),this.on(this.$(".vjs-font-percent select"),"change",this.updateDisplay),this.on(this.$(".vjs-edge-style select"),"change",this.updateDisplay),this.on(this.$(".vjs-font-family select"),"change",this.updateDisplay),this.on(this.el_.ownerDocument,"keydown",n.bind(this,this.handleKeyPress)),this.options_.persistTextTrackSettings&&this.restoreSettings()}return g(b,a),b.prototype.createEl=function(){var b=this.id_,c="TTsettingsDialogLabel-"+b,d="TTsettingsDialogDescription-"+b;return a.prototype.createEl.call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:j.call(this,b,c,d),tabIndex:-1},{role:"dialog","aria-labelledby":c,"aria-describedby":d})},b.prototype.getValues=function(){var a=h(this.$(".vjs-edge-style select")),b=h(this.$(".vjs-font-family select")),c=h(this.$(".vjs-fg-color > select")),d=h(this.$(".vjs-text-opacity > select")),e=h(this.$(".vjs-bg-color > select")),f=h(this.$(".vjs-bg-opacity > select")),g=h(this.$(".window-color > select")),i=h(this.$(".vjs-window-opacity > select")),j=t["default"].parseFloat(h(this.$(".vjs-font-percent > select"))),k={backgroundOpacity:f,textOpacity:d,windowOpacity:i,edgeStyle:a,fontFamily:b,color:c,backgroundColor:e,windowColor:g,fontPercent:j,justification:this.hiddenSettings.justification};for(var l in k)(""===k[l]||"none"===k[l]||"fontPercent"===l&&1===k[l])&&delete k[l];return k},b.prototype.setValues=function(a){i(this.$(".vjs-edge-style select"),a.edgeStyle),i(this.$(".vjs-font-family select"),a.fontFamily),i(this.$(".vjs-fg-color > select"),a.color),i(this.$(".vjs-text-opacity > select"),a.textOpacity),i(this.$(".vjs-bg-color > select"),a.backgroundColor),i(this.$(".vjs-bg-opacity > select"),a.backgroundOpacity),i(this.$(".window-color > select"),a.windowColor),i(this.$(".vjs-window-opacity > select"),a.windowOpacity);var b=a.fontPercent;b&&(b=b.toFixed(2)),i(this.$(".vjs-font-percent > select"),b),a.justification&&(this.hiddenSettings.justification=a.justification)},b.prototype.restoreSettings=function(){var a=void 0,b=void 0;try{var c=r["default"](t["default"].localStorage.getItem("vjs-text-track-settings"));a=c[0],b=c[1],a&&p["default"].error(a)}catch(d){p["default"].warn(d)}b&&this.setValues(b)},b.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var a=this.getValues();try{Object.getOwnPropertyNames(a).length>0?t["default"].localStorage.setItem("vjs-text-track-settings",JSON.stringify(a)):t["default"].localStorage.removeItem("vjs-text-track-settings")}catch(b){p["default"].warn(b)}}},b.prototype.updateDisplay=function(){var a=this.player_.getChild("textTrackDisplay");a&&(a.updateDisplay(),a.setAsChangedByUser())},b.prototype.returnFocusBack=function(){var a=this.player_.controlBar.captionsButton.el().getElementsByClassName("vjs-lock-showing"),b=this.player_.controlBar.captionsButton.el().getElementsByClassName("vjs-texttrack-settings");null!==a&&void 0!==a&&a.length>0&&null!==b&&void 0!==b&&b.length>0?b[0].focus():this.player_.controlBar.captionsButton.el().focus()},b.prototype.handleKeyPress=function(a){this.hasClass("vjs-hidden")||27!==a.which||(this.hide(),this.returnFocusBack())},b.prototype.handleKeyPress_DoneBtn=function(a){a.shiftKey||9!==a.which||this.el().focus()},b.prototype.handleKeyPress_FgColor=function(a){if(a.shiftKey&&9===a.which&&this.el_.ownerDocument.activeElement.id.startsWith("captions-foreground-color-")){var b=this.el().getElementsByClassName("vjs-done-button");b[0].focus()}},b}(l["default"]);l["default"].registerComponent("TextTrackSettings",u),c["default"]=u,b.exports=c["default"]},{"../component":77,"../utils/fn.js":158,"../utils/log.js":164,"global/window":251,"safe-json-parse/tuple":247}],147:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./text-track-cue-list"),i=e(h),j=a("../utils/fn.js"),k=d(j),l=a("./track-enums"),m=a("../utils/log.js"),n=e(m),o=a("global/document"),p=(e(o),a("global/window")),q=e(p),r=a("./track.js"),s=e(r),t=a("../utils/url.js"),u=a("xhr"),v=e(u),w=a("../utils/merge-options"),x=e(w),y=a("../utils/browser.js"),z=d(y),A=function(a,b){var c=new q["default"].WebVTT.Parser(q["default"],q["default"].vttjs,q["default"].WebVTT.StringDecoder()),d=[];c.oncue=function(a){b.addCue(a)},c.onparsingerror=function(a){d.push(a)},c.onflush=function(){b.trigger({type:"loadeddata",target:b})},c.parse(a),d.length>0&&(console.groupCollapsed,d.forEach(function(a){return n["default"].error(a)}),console.groupEnd),c.flush()},B=function(a,b,c){if(!b.loadding_){b.loadding_=!0;var d={uri:a},e=t.isCrossOrigin(a);e&&(d.withCredentials=c),v["default"](d,k.bind(this,function(a,c,d){return a?n["default"].error(a,c):(b.loaded_=!0,void("function"!=typeof q["default"].WebVTT?b.tech_&&!function(){var a=function(){return A(d,b)};b.tech_.on("vttjsloaded",a),b.tech_.on("vttjserror",function(){n["default"].error("vttjs failed to load, stopping trying to process "+b.src),b.tech_.off("vttjsloaded",a)})}():A(d,b)))}))}},C=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(f(this,b),!c.tech)throw new Error("A tech was not provided.");var d=x["default"](c,{kind:l.TextTrackKind[c.kind]||"subtitles",language:c.language||c.srclang||""}),e=l.TextTrackMode[d.mode]||"disabled",g=d["default"];("metadata"===d.kind||"chapters"===d.kind)&&(e="hidden");var h=a.call(this,d);if(h.tech_=d.tech,z.IS_IE8)for(var j in b.prototype)"constructor"!==j&&(h[j]=b.prototype[j]);h.cues_=[],h.activeCues_=[];var m=new i["default"](h.cues_),n=new i["default"](h.activeCues_),o=!1,p=k.bind(h,function(){this.activeCues,o&&(this.trigger("cuechange"),o=!1)});return"disabled"!==e&&h.tech_.on("timeupdate",p),Object.defineProperty(h,"default",{get:function(){return g},set:function(){}}),Object.defineProperty(h,"mode",{get:function(){return e},set:function(a){l.TextTrackMode[a]&&(e=a,"showing"===e&&this.tech_.on("timeupdate",p),this.trigger("modechange"))}}),Object.defineProperty(h,"cues",{get:function(){return this.loaded_?m:(B(this.src,this,this.withCredentials),null)},set:function(){}}),Object.defineProperty(h,"activeCues",{get:function(){if(!this.loaded_)return B(this.src,this,this.withCredentials),null;if(0===this.cues.length)return n;for(var a=this.tech_.currentAbsoluteTime()||this.tech_.currentTime(),b=[],c=0,d=this.cues.length;d>c;c++){var e=this.cues[c];e.startTime<=a&&e.endTime>=a?b.push(e):e.startTime===e.endTime&&e.startTime<=a&&e.startTime+.5>=a&&b.push(e)}if(o=!1,b.length!==this.activeCues_.length)o=!0;else for(var c=0;c<b.length;c++)-1===this.activeCues_.indexOf(b[c])&&(o=!0);return this.activeCues_=b,n.setCues_(this.activeCues_),n},set:function(){}}),d.src?(h.src=d.src,h.withCredentials=d.tech.options_.playerOptions.corsPolicy===q["default"].videojs.CorsConfig.UseCredentials):h.loaded_=!0,h}return g(b,a),b.prototype.addCue=function(a){var b=this.tech_.textTracks();if(b)for(var c=0;c<b.length;c++)b[c]!==this&&b[c].removeCue(a);this.cues_.push(a),this.cues.setCues_(this.cues_)},b.prototype.removeCue=function(a){for(var b=!1,c=0,d=this.cues_.length;d>c;c++){var e=this.cues_[c];e===a&&(this.cues_.splice(c,1),b=!0)}b&&this.cues.setCues_(this.cues_)},b}(s["default"]);C.prototype.allowedEvents_={cuechange:"cuechange"},c["default"]=C,b.exports=c["default"]},{"../utils/browser.js":153,"../utils/fn.js":158,"../utils/log.js":164,"../utils/merge-options":165,"../utils/url.js":170,"./text-track-cue-list":142,"./track-enums":148,"./track.js":150,"global/document":250,"global/window":251,xhr:256}],148:[function(a,b,c){"use strict";c.__esModule=!0;var d={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},e={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},f={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},g={disabled:"disabled",hidden:"hidden",showing:"showing"};c["default"]={VideoTrackKind:d,AudioTrackKind:e,TextTrackKind:f,TextTrackMode:g},b.exports=c["default"]},{}],149:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../event-target"),i=e(h),j=a("../utils/fn.js"),k=(d(j),a("../utils/browser.js")),l=d(k),m=a("global/document"),n=e(m),o=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],d=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(f(this,b),a.call(this),!d&&(d=this,l.IS_IE8)){d=n["default"].createElement("custom");for(var e in b.prototype)"constructor"!==e&&(d[e]=b.prototype[e])}d.tracks_=[],Object.defineProperty(d,"length",{get:function(){return this.tracks_.length}});for(var g=0;g<c.length;g++)d.addTrack_(c[g]);return d}return g(b,a),b.prototype.addTrack_=function(a){var b=this.tracks_.length;""+b in this||Object.defineProperty(this,b,{get:function(){return this.tracks_[b]}}),-1===this.tracks_.indexOf(a)&&(this.tracks_.push(a),this.trigger({track:a,type:"addtrack"}))},b.prototype.removeTrack_=function(a){for(var b=void 0,c=0,d=this.length;d>c;c++)if(this[c]===a){b=this[c],b.off&&b.off(),this.tracks_.splice(c,1);break}b&&this.trigger({track:b,type:"removetrack"})},b.prototype.getTrackById=function(a){for(var b=null,c=0,d=this.length;d>c;c++){var e=this[c];if(e.id===a){b=e;break}}return b},b}(i["default"]);o.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var p in o.prototype.allowedEvents_)o.prototype["on"+p]=null;c["default"]=o,b.exports=c["default"]},{"../event-target":115,"../utils/browser.js":153,"../utils/fn.js":158,"global/document":250}],150:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../utils/browser.js"),i=e(h),j=a("global/document"),k=d(j),l=a("../utils/guid.js"),m=e(l),n=a("../event-target"),o=d(n),p=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f(this,b),a.call(this);var d=this;if(i.IS_IE8){d=k["default"].createElement("custom");for(var e in b.prototype)"constructor"!==e&&(d[e]=b.prototype[e])}var g={id:c.id||"vjs_track_"+m.newGUID(),kind:c.kind||"",label:c.label||"",language:c.language||""},h=function(a){Object.defineProperty(d,a,{get:function(){return g[a]},set:function(){}})};for(var j in g)h(j);return d}return g(b,a),b}(o["default"]);c["default"]=p,b.exports=c["default"]},{"../event-target":115,"../utils/browser.js":153,"../utils/guid.js":161,"global/document":250}],151:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./track-list"),i=e(h),j=a("../utils/browser.js"),k=d(j),l=a("global/document"),m=e(l),n=function(a,b){for(var c=0;c<a.length;c++)b.id!==a[c].id&&(a[c].selected=!1)},o=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];f(this,b);for(var d=void 0,e=c.length-1;e>=0;e--)if(c[e].selected){n(c,c[e]);break}if(k.IS_IE8){d=m["default"].createElement("custom");for(var g in i["default"].prototype)"constructor"!==g&&(d[g]=i["default"].prototype[g]);for(var g in b.prototype)"constructor"!==g&&(d[g]=b.prototype[g])}return d=a.call(this,c,d),d.changing_=!1,Object.defineProperty(d,"selectedIndex",{get:function(){for(var a=0;a<this.length;a++)if(this[a].selected)return a;return-1},set:function(){}}),d}return g(b,a),b.prototype.addTrack_=function(b){var c=this;b.selected&&n(this,b),a.prototype.addTrack_.call(this,b),b.addEventListener&&b.addEventListener("selectedchange",function(){c.changing_||(c.changing_=!0,n(c,b),c.changing_=!1,c.trigger("change"))})},b.prototype.addTrack=function(a){this.addTrack_(a)},b.prototype.removeTrack=function(b){a.prototype.removeTrack_.call(this,b)},b}(i["default"]);c["default"]=o,b.exports=c["default"]},{"../utils/browser.js":153,"./track-list":149,"global/document":250}],152:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./track-enums"),i=a("./track"),j=e(i),k=a("../utils/merge-options"),l=e(k),m=a("../utils/browser.js"),n=d(m),o=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f(this,b);var d=l["default"](c,{kind:h.VideoTrackKind[c.kind]||""}),e=a.call(this,d),g=!1;if(n.IS_IE8)for(var i in b.prototype)"constructor"!==i&&(e[i]=b.prototype[i]);return Object.defineProperty(e,"selected",{get:function(){return g},set:function(a){"boolean"==typeof a&&a!==g&&(g=a,this.trigger("selectedchange"))}}),d.selected&&(e.selected=d.selected),e}return g(b,a),b}(j["default"]);c["default"]=o,b.exports=c["default"]},{"../utils/browser.js":153,"../utils/merge-options":165,"./track":150,"./track-enums":148}],153:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/document"),f=d(e),g=a("global/window"),h=d(g),i=h["default"].navigator.userAgent,j=/AppleWebKit\/([\d.]+)/i.exec(i),k=j?parseFloat(j.pop()):null,l=/iPad/i.test(i);c.IS_IPAD=l;var m=/iPhone/i.test(i)&&!l;c.IS_IPHONE=m;var n=/iPod/i.test(i);c.IS_IPOD=n;var o=m||l||n;c.IS_IOS=o;var p=function(){var a=i.match(/OS (\d+)_/i);return a&&a[1]?a[1]:void 0}();c.IOS_VERSION=p;var q=/Android/i.test(i);c.IS_ANDROID=q;var r=function(){var a,b,c=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return c?(a=c[1]&&parseFloat(c[1]),b=c[2]&&parseFloat(c[2]),a&&b?parseFloat(c[1]+"."+c[2]):a?a:null):null}();c.ANDROID_VERSION=r;var s=q&&/webkit/i.test(i)&&2.3>r;c.IS_OLD_ANDROID=s;var t=q&&5>r&&537>k;c.IS_NATIVE_ANDROID=t;var u=/Edge/i.test(i);c.IS_EDGE=u;var v=!!f["default"].documentMode;c.IS_IE=v;var w=/MSIE\s8\.0/.test(i);c.IS_IE8=w;var x=/MSIE\s9\.0/.test(i);c.IS_IE9=x;var y=!!h["default"].MSInputMethodContext&&!!f["default"].documentMode;c.IS_IE11=y;var z=/IEMobile\/([0-9.]*)/.test(i);c.IS_IEMOBILE=z;var A=function(a){return a&&parseFloat(a[1])}(/MSIE\s(\d+)\.\d/.exec(i));c.IE_VERSION=A;var B=/Firefox/i.test(i);c.IS_FIREFOX=B;var C=function(){var a=i.match(/Firefox\/([0-9.]*)/i);return a&&a[1]?a[1]:void 0}();c.FIREFOX_VERSION=C;var D=!u&&/Chrome/i.test(i);c.IS_CHROME=D;var E=/Safari/i.test(i)&&!D&&!u&&!z;c.IS_SAFARI=E;var F=/Macintosh/i.test(i)&&/AppleWebKit/i.test(i)&&!E&&!B&&!D;c.IS_MACWEBVIEW=F;var G=!!("ontouchstart"in h["default"]||h["default"].DocumentTouch&&f["default"]instanceof h["default"].DocumentTouch);c.TOUCH_ENABLED=G;var H="backgroundSize"in f["default"].createElement("video").style;c.BACKGROUND_SIZE_SUPPORTED=H;var I=/android|webos|windows phone|iphone|ipad|ipod|blackBerry|iemobile|opera mini/i.test(i.toLowerCase());c.IS_MOBILE=I;var J=/MSAppHost/.test(i);c.IS_MSAPPHOST=J},{"global/document":250,"global/window":251}],154:[function(a,b,c){"use strict";function d(a,b){var c,d,f=0;if(!b)return 0;a&&a.length||(a=e.createTimeRange(0,0));for(var g=0;g<a.length;g++)c=a.start(g),d=a.end(g),d>b&&(d=b),f+=d-c;return f/b}c.__esModule=!0,c.bufferedPercent=d;var e=a("./time-ranges.js")},{"./time-ranges.js":167}],155:[function(a,b,c){"use strict";function d(a){var b=a,c=a.player_.controlBar;c&&Object.getOwnPropertyNames(c).forEach(function(a){c[a]!==b&&c[a].el_&&c[a].el_.className&&(-1!==c[a].el_.className.indexOf("vjs-menu-button")||-1!==c[a].el_.className.indexOf("vjs-volume-control"))&&c[a].buttonPressed_&&c[a].unpressButton()})}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],156:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){return a.raw=b,a}function g(a){return"hidden"===M["default"].getComputedStyle(a).visibility?!1:!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function h(a){return"string"==typeof a&&/\S/.test(a)}function i(a){if(/\s/.test(a))throw new Error("class has illegal whitespace characters")}function j(a){return new RegExp("(^|\\s)"+a+"($|\\s)")}function k(a){return function(b,c){return h(b)?(h(c)&&(c=K["default"].querySelector(c)),(C(c)?c:K["default"])[a](b)):K["default"][a](null)}}function l(a){return 0===a.indexOf("#")&&(a=a.slice(1)),K["default"].getElementById(a)}function m(){var a=arguments.length<=0||void 0===arguments[0]?"div":arguments[0],b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=K["default"].createElement(a);return Object.getOwnPropertyNames(b).forEach(function(a){var c=b[a];-1!==a.indexOf("aria-")||"role"===a||"type"===a?(Q["default"].warn(S["default"](I,a,c)),d.setAttribute(a,c)):d[a]=c}),Object.getOwnPropertyNames(c).forEach(function(a){c[a];d.setAttribute(a,c[a])}),d}function n(a,b){"undefined"==typeof a.textContent?a.innerText=b:a.textContent=b}function o(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)}function p(a){var b=a[U];return b||(b=a[U]=O.newGUID()),T[b]||(T[b]={}),T[b]}function q(a){var b=a[U];return b?!!Object.getOwnPropertyNames(T[b]).length:!1}function r(a){var b=a[U];if(b){delete T[b];try{delete a[U]}catch(c){a.removeAttribute?a.removeAttribute(U):a[U]=null}}}function s(a,b){return a.classList?a.classList.contains(b):(i(b),j(b).test(a.className))}function t(a,b){return"undefined"!=typeof b&&null!==b&&b.length>0&&(a.classList?a.classList.add(b):s(a,b)||(a.className=(a.className+" "+b).trim())),a}function u(a,b){return a.classList?a.classList.remove(b):(i(b),a.className=a.className.split(/\s+/).filter(function(a){return a!==b}).join(" ")),a}function v(a,b,c){var d=s(a,b);return"function"==typeof c&&(c=c(a,b)),"boolean"!=typeof c&&(c=!d),c!==d?(c?t(a,b):u(a,b),a):void 0}function w(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];null===d||"undefined"==typeof d||d===!1?a.removeAttribute(c):a.setAttribute(c,d===!0?"":d)})}function x(a){var b,c,d,e,f;if(b={},c=",autoplay,controls,loop,muted,default,",a&&a.attributes&&a.attributes.length>0){d=a.attributes;for(var g=d.length-1;g>=0;g--)e=d[g].name,f=d[g].value,("boolean"==typeof a[e]||-1!==c.indexOf(","+e+","))&&(f=null!==f?!0:!1),b[e]=f}return b}function y(){K["default"].body.focus(),K["default"].onselectstart=function(){return!1}}function z(){K["default"].onselectstart=function(){return!0}}function A(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode&&(b=a.getBoundingClientRect()),!b)return{left:0,top:0};var c=K["default"].documentElement,d=K["default"].body,e=c.clientLeft||d.clientLeft||0,f=M["default"].pageXOffset||d.scrollLeft,g=c.clientTop||d.clientTop||0,h=M["default"].pageYOffset||d.scrollTop,i=b.top+h-g,j=void 0,k=c.msContentZoomFactor;return j=k&&k>1?b.left-e:b.left+f-e,{left:Math.round(j),top:Math.round(i)}}function B(a,b){var c={},d=A(a),e=a.offsetWidth,f=a.offsetHeight,g=d.top,h=d.left,i=b.pageY,j=b.pageX;return b.changedTouches&&(j=b.changedTouches[0].pageX,i=b.changedTouches[0].pageY),c.y=Math.max(0,Math.min(1,(g-i+f)/f)),c.x=Math.max(0,Math.min(1,(j-h)/e)),c}function C(a){return!!a&&"object"==typeof a&&1===a.nodeType}function D(a){return!!a&&"object"==typeof a&&3===a.nodeType}function E(a){for(;a.firstChild;)a.removeChild(a.firstChild);return a}function F(a){return"function"==typeof a&&(a=a()),(Array.isArray(a)?a:[a]).map(function(a){return"function"==typeof a&&(a=a()),C(a)||D(a)?a:"string"==typeof a&&/\S/.test(a)?K["default"].createTextNode(a):void 0}).filter(function(a){return a})}function G(a,b){return F(b).forEach(function(b){return a.appendChild(b)}),a}function H(a,b){return G(E(a),b)}c.__esModule=!0,c.isVisible=g,c.getEl=l,c.createEl=m,c.textContent=n,c.insertElFirst=o,c.getElData=p,c.hasElData=q,c.removeElData=r,c.hasElClass=s,c.addElClass=t,c.removeElClass=u,c.toggleElClass=v,c.setElAttributes=w,c.getElAttributes=x,c.blockTextSelection=y,c.unblockTextSelection=z,c.findElPosition=A,c.getPointerPosition=B,c.isEl=C,c.isTextNode=D,c.emptyEl=E,c.normalizeContent=F,c.appendContent=G,c.insertContent=H;var I=f(["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."]),J=a("global/document"),K=e(J),L=a("global/window"),M=e(L),N=a("./guid.js"),O=d(N),P=a("./log.js"),Q=e(P),R=a("tsml"),S=e(R),T={},U="vdata"+(new Date).getTime(),V=k("querySelector");c.$=V;var W=k("querySelectorAll");c.$$=W},{"./guid.js":161,"./log.js":164,"global/document":250,"global/window":251,tsml:248}],157:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b,c){if(Array.isArray(b))return l(f,a,b,c);var d=n.getElData(a);d.handlers||(d.handlers={}),d.handlers[b]||(d.handlers[b]=[]),c.guid||(c.guid=p.newGUID()),d.handlers[b].push(c),d.dispatcher||(d.disabled=!1,d.dispatcher=function(b,c){if(!d.disabled){b=j(b);var e=d.handlers[b.type];if(e)for(var f=e.slice(0),g=0,h=f.length;h>g&&!b.isImmediatePropagationStopped();g++)f[g].call(a,b,c)}}),1===d.handlers[b].length&&(a.addEventListener?a.addEventListener(b,d.dispatcher):a.attachEvent&&a.attachEvent("on"+b,d.dispatcher))}function g(a,b,c){if(n.hasElData(a)){var d=n.getElData(a);if(d.handlers){if(Array.isArray(b))return l(g,a,b,c);var e=function(b){d.handlers[b]=[],k(a,b)};if(b){var f=d.handlers[b];if(f){if(!c)return void e(b);if(c.guid)for(var h=0;h<f.length;h++)f[h].guid===c.guid&&f.splice(h--,1);k(a,b)}}else for(var i in d.handlers)e(i)}}}function h(a,b,c,d,e){var f=n.hasElData(a)?n.getElData(a):{},g=a.parentNode||a.ownerDocument;if("string"==typeof b&&(b={type:b,target:a,clip:d,time:e}),b=j(b),f.dispatcher&&f.dispatcher.call(a,b,c),g&&!b.isPropagationStopped()&&b.bubbles===!0)h.call(null,g,b,c);else if(!g&&!b.defaultPrevented){var i=n.getElData(b.target);b.target[b.type]&&(i.disabled=!0,"function"==typeof b.target[b.type]&&b.target[b.type](),i.disabled=!1)}return!b.defaultPrevented}function i(a,b,c){if(Array.isArray(b))return l(i,a,b,c);var d=function e(){g(a,b,e),c.apply(this,arguments)};d.guid=c.guid=c.guid||p.newGUID(),f(a,b,d)}function j(a){function b(){return!0}function c(){return!1}if(!a||!a.isPropagationStopped){var d=a||r["default"].event;a={};for(var e in d)"layerX"!==e&&"layerY"!==e&&"keyLocation"!==e&&"webkitMovementX"!==e&&"webkitMovementY"!==e&&("returnValue"===e&&d.preventDefault||(a[e]=d[e]));if(a.target||(a.target=a.srcElement||t["default"]),a.relatedTarget||(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement),a.preventDefault=function(){d.preventDefault&&d.preventDefault(),a.returnValue=!1,d.returnValue=!1,a.defaultPrevented=!0},a.defaultPrevented=!1,a.stopPropagation=function(){d.stopPropagation&&d.stopPropagation(),a.cancelBubble=!0,d.cancelBubble=!0,a.isPropagationStopped=b},a.isPropagationStopped=c,a.stopImmediatePropagation=function(){d.stopImmediatePropagation&&d.stopImmediatePropagation(),a.isImmediatePropagationStopped=b,a.stopPropagation()},a.isImmediatePropagationStopped=c,null!=a.clientX){var f=t["default"].documentElement,g=t["default"].body;a.pageX=a.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=a.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)}a.which=a.charCode||a.keyCode,null!=a.button&&(a.button=1&a.button?0:4&a.button?1:2&a.button?2:0)}return a}function k(a,b){var c=n.getElData(a);0===c.handlers[b].length&&(delete c.handlers[b],a.removeEventListener?a.removeEventListener(b,c.dispatcher,!1):a.detachEvent&&a.detachEvent("on"+b,c.dispatcher)),Object.getOwnPropertyNames(c.handlers).length<=0&&(delete c.handlers,delete c.dispatcher,delete c.disabled),0===Object.getOwnPropertyNames(c).length&&n.removeElData(a)}function l(a,b,c,d){c.forEach(function(c){a(b,c,d)})}c.__esModule=!0,c.on=f,c.off=g,c.trigger=h,c.one=i,c.fixEvent=j;var m=a("./dom.js"),n=e(m),o=a("./guid.js"),p=e(o),q=a("global/window"),r=d(q),s=a("global/document"),t=d(s)},{"./dom.js":156,"./guid.js":161,"global/document":250,"global/window":251}],158:[function(a,b,c){"use strict";c.__esModule=!0;var d=a("./guid.js"),e=function(a,b,c){b.guid||(b.guid=d.newGUID());var e=function(){return b.apply(a,arguments)};return e.guid=c?c+"_"+b.guid:b.guid,e};c.bind=e},{"./guid.js":161}],159:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){var a=["monospace","sans-serif","serif"],b="Segoe UI",c="mmmmmmmmmmlli",d="72px",e=g["default"].document.getElementsByTagName("body")[0],f=g["default"].document.createElement("span");f.style.fontSize=d,f.style.position="absolute",f.style.top="-9999px",f.style.left="-9999px",f.innerHTML=c;var h={},j={};for(var k in a)f.style.fontFamily=a[k],e.appendChild(f),h[a[k]]=f.offsetWidth,j[a[k]]=f.offsetHeight,e.removeChild(f);var l=!1;for(var k in a){f.style.fontFamily=b+","+a[k],e.appendChild(f);var m=f.offsetWidth!==h[a[k]]||f.offsetHeight!==j[a[k]];e.removeChild(f),l=l||m}if(!l){var n=g["default"].document.createElement("style"),o=g["default"].document.getElementsByTagName("head")[0],p="/skins/amp-default/assets/fonts/segoeui/",q=i["default"].getScriptRootURL();n.appendChild(g["default"].document.createTextNode('@font-face{font-family:"Segoe UI";src: url("'+q+p+'segoeui.eot");src: url("'+q+p+'segoeui.eot?#iefix") format("embedded-opentype"),url("'+q+p+'segoeui.woff") format("woff"), url("'+q+p+'segoeui.ttf") format("truetype"), url("'+q+p+'segoeui.svg#Segoe") format("svg");font-weight: normal;font-style: normal;}')),o.appendChild(n)}}c.__esModule=!0;var f=a("global/window"),g=d(f),h=a("../player.js"),i=d(h);c["default"]=e,b.exports=c["default"]},{"../player.js":124,"global/window":251}],160:[function(a,b,c){"use strict";function d(a){var b=arguments.length<=1||void 0===arguments[1]?a:arguments[1];return function(){a=0>a?0:a;var c=Math.floor(a%60),d=Math.floor(a/60%60),e=Math.floor(a/3600),f=Math.floor(b/60%60),g=Math.floor(b/3600);return(isNaN(a)||a===1/0)&&(e=d=c="-"),e=e>0||g>0?e+":":"",d=((e||f>=10)&&10>d?"0"+d:d)+":",c=10>c?"0"+c:c,e+d+c}()}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],161:[function(a,b,c){"use strict";function d(){return e++}c.__esModule=!0,c.newGUID=d;var e=1},{}],162:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){var a=void 0,b=void 0;a=g["default"].document.createElement("div"),a.style.color="rgb(31, 41, 59)",g["default"].document.body.appendChild(a),b=g["default"].document.defaultView?g["default"].document.defaultView.getComputedStyle(a,null).color:a.currentStyle.color,b=b.replace(/ /g,""),g["default"].document.body.removeChild(a),String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)});var c="rgb(31,41,59)"!==b;c&&!g["default"].document.body.className.includes("high-contrast-enabled")?g["default"].document.body.className=g["default"].document.body.className+" high-contrast-enabled ":c||(g["default"].document.body.className=g["default"].document.body.className.replace("high-contrast-enabled",""))}c.__esModule=!0;var f=a("global/window"),g=d(f);c["default"]=e,b.exports=c["default"]},{"global/window":251}],163:[function(a,b,c){"use strict";function d(){return{ab:{name:"Abkhaz",nativeName:"аҧсуа"},aa:{name:"Afar",
nativeName:"Afaraf"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},sq:{name:"Albanian",nativeName:"Shqip"},am:{name:"Amharic",nativeName:"አማርኛ"},ar:{name:"Arabic",nativeName:"العربية"},an:{name:"Aragonese",nativeName:"Aragonés"},hy:{name:"Armenian",nativeName:"Հայերեն"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ, магӀарул мацӀ"},ae:{name:"Avestan",nativeName:"avesta"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},bm:{name:"Bambara",nativeName:"bamanankan"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},eu:{name:"Basque",nativeName:"euskara, euskera"},be:{name:"Belarusian",nativeName:"Беларуская"},bn:{name:"Bangla",nativeName:"বাংলা"},bh:{name:"Bihari",nativeName:"भोजपुरी"},bi:{name:"Bislama",nativeName:"Bislama"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},br:{name:"Breton",nativeName:"brezhoneg"},bg:{name:"Bulgarian",nativeName:"български език"},my:{name:"Burmese",nativeName:"ဗမာစာ"},ca:{name:"Catalan; Valencian",nativeName:"Català"},ch:{name:"Chamorro",nativeName:"Chamoru"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ny:{name:"Chichewa; Chewa; Nyanja",nativeName:"chiCheŵa, chinyanja"},zh:{name:"Chinese",nativeName:"中文 (Zhōngwén), 汉语, 漢語"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},kw:{name:"Cornish",nativeName:"Kernewek"},co:{name:"Corsican",nativeName:"corsu, lingua corsa"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},hr:{name:"Croatian",nativeName:"hrvatski"},cs:{name:"Czech",nativeName:"čeština"},da:{name:"Danish",nativeName:"dansk"},dv:{name:"Divehi; Dhivehi; Maldivian;",nativeName:"ދިވެހި"},nl:{name:"Dutch",nativeName:"Nederlands"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},et:{name:"Estonian",nativeName:"eesti"},ee:{name:"Ewe",nativeName:"Eʋegbe"},fo:{name:"Faroese",nativeName:"føroyskt"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fi:{name:"Finnish",nativeName:"suomi"},fr:{name:"French",nativeName:"français"},ff:{name:"Fula; Fulah; Pulaar; Pular",nativeName:"Fulfulde, Pulaar, Pular"},gl:{name:"Galician",nativeName:"Galego"},ka:{name:"Georgian",nativeName:"ქართული"},de:{name:"German",nativeName:"Deutsch"},el:{name:"Greek, Modern",nativeName:"Ελληνικά"},gn:{name:"Guaraní",nativeName:"Avañeẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},ht:{name:"Haitian; Haitian Creole",nativeName:"Kreyòl ayisyen"},ha:{name:"Hausa",nativeName:"Hausa, هَوُسَ"},he:{name:"Hebrew (modern)",nativeName:"עברית"},hz:{name:"Herero",nativeName:"Otjiherero"},hi:{name:"Hindi",nativeName:"हिन्दी, हिंदी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hu:{name:"Hungarian",nativeName:"Magyar"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ga:{name:"Irish",nativeName:"Gaeilge"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},kl:{name:"Kalaallisut, Greenlandic",nativeName:"kalaallisut, kalaallit oqaasii"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी, كشميري‎"},kk:{name:"Kazakh",nativeName:"Қазақ тілі"},km:{name:"Khmer",nativeName:"ភាសាខ្មែរ"},ki:{name:"Kikuyu, Gikuyu",nativeName:"Gĩkũyũ"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},ky:{name:"Kirghiz, Kyrgyz",nativeName:"кыргыз тили"},kv:{name:"Komi",nativeName:"коми кыв"},kg:{name:"Kongo",nativeName:"KiKongo"},ko:{name:"Korean",nativeName:"한국어 (韓國語), 조선말 (朝鮮語)"},ku:{name:"Kurdish",nativeName:"كوردی‎"},kj:{name:"Kwanyama, Kuanyama",nativeName:"Kuanyama"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish, Letzeburgesch",nativeName:"Lëtzebuergesch"},lg:{name:"Luganda",nativeName:"Luganda"},li:{name:"Limburgish, Limburgan, Limburger",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:""},lv:{name:"Latvian",nativeName:"latviešu valoda"},gv:{name:"Manx",nativeName:"Gaelg, Gailck"},mk:{name:"Macedonian",nativeName:"македонски јазик"},mg:{name:"Malagasy",nativeName:"Malagasy fiteny"},ms:{name:"Malay",nativeName:"bahasa Melayu, بهاس ملايو‎"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mt:{name:"Maltese",nativeName:"Malti"},mi:{name:"Māori",nativeName:"te reo Māori"},mr:{name:"Marathi (Marāṭhī)",nativeName:"मराठी"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mn:{name:"Mongolian",nativeName:"монгол"},na:{name:"Nauru",nativeName:"Ekakairũ Naoero"},nv:{name:"Navajo, Navaho",nativeName:"Diné bizaad, Dinékʼehǰí"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"North Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},nr:{name:"South Ndebele",nativeName:"isiNdebele"},oc:{name:"Occitan",nativeName:"Occitan"},oj:{name:"Ojibwe, Ojibwa",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},cu:{name:"Old Church Slavonic, Church Slavic, Church Slavonic, Old Bulgarian, Old Slavonic",nativeName:"ѩзыкъ словѣньскъ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Odia",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian, Ossetic",nativeName:"ирон æвзаг"},pa:{name:"Panjabi, Punjabi",nativeName:"ਪੰਜਾਬੀ, پنجابی‎"},pi:{name:"Pāli",nativeName:"पाऴि"},fa:{name:"Persian",nativeName:"فارسی"},pl:{name:"Polish",nativeName:"polski"},ps:{name:"Pashto, Pushto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi, Kichwa"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"kiRundi"},ro:{name:"Romanian, Moldovans, Moldovan",nativeName:"română"},ru:{name:"Russian",nativeName:"русский"},sa:{name:"Sanskrit (Saṁskṛta)",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी, سنڌي، سندھی‎"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sm:{name:"Samoan",nativeName:"gagana faa Samoa"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},sr:{name:"Serbian",nativeName:"српски језик"},gd:{name:"Scottish Gaelic; Gaelic",nativeName:"Gàidhlig"},sn:{name:"Shona",nativeName:"chiShona"},si:{name:"Sinhala, Sinhalese",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovene",nativeName:"slovenščina"},so:{name:"Somali",nativeName:"Soomaaliga, af Soomaali"},st:{name:"Southern Sotho",nativeName:"Sesotho"},es:{name:"Spanish",nativeName:"español"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sw:{name:"Swahili",nativeName:"Kiswahili"},ss:{name:"Swati",nativeName:"SiSwati"},sv:{name:"Swedish",nativeName:"svenska"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"تاجیکی‎"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},bo:{name:"Tibetan Standard, Tibetan, Central",nativeName:"བོད་ཡིག"},tk:{name:"Turkmen",nativeName:"Türkmen"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga (Tonga Islands)",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"تاتارچا‎"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uighur, Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"zbek, Ўзбек, أۇزبېك‎"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"Walon"},cy:{name:"Welsh",nativeName:"Cymraeg"},wo:{name:"Wolof",nativeName:"Wollof"},fy:{name:"Western Frisian",nativeName:"Frysk"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang, Chuang",nativeName:"Saɯ cueŋƅ, Saw cuengh"},mis:{name:"uncoded languages",nativeName:"uncoded languages"},mul:{name:"multiple languages",nativeName:"multiple languages"},und:{name:"undetermined",nativeName:"undetermined"},zxx:{name:"no linguistic content/not applicable",nativeName:"no linguistic content/not applicable"}}}function e(a){var b={aar:"aa",abk:"ab",ave:"ae",afr:"af",aka:"ak",amh:"am",ara:"ar",asm:"as",ava:"av",aym:"ay",aze:"az",bak:"ba",bel:"be",bul:"bg",bih:"bh",bis:"bi",bam:"bm",ben:"bn",bod:"bo",tib:"bo",bre:"br",bos:"bs",cat:"ca",che:"ce",cha:"ch",cos:"co",cre:"cr",ces:"cs",cze:"cs",chu:"cu",chv:"cv",cym:"cy",wel:"cy",dan:"da",deu:"de",ger:"de",div:"dv",dzo:"dz",ewe:"ee",ell:"el",gre:"el",eng:"en",epo:"eo",spa:"es",est:"et",baq:"eu",eus:"eu",fas:"fa",per:"fa",ful:"ff",fin:"fi",fij:"fj",fao:"fo",fre:"fr",fra:"fr",fry:"fy",gle:"ga",gla:"gd",glg:"gl",grn:"gn",glv:"gv",guj:"gu",hau:"ha",heb:"he",hin:"hi",hmo:"ho",hrv:"hr",hat:"ht",hun:"hu",arm:"hy",hye:"hy",her:"hz",ina:"ia",ind:"id",ile:"ie",ibo:"ig",iii:"ii",ipk:"ik",ido:"io",ice:"is",isl:"is",ita:"it",iku:"iu",jpn:"ja",jav:"jv",geo:"ka",kat:"ka",kon:"kg",kik:"ki",kua:"kj",kaz:"kk",kal:"kl",khm:"km",kan:"kn",kor:"ko",kau:"kr",kas:"ks",kur:"ku",kom:"kv",cor:"kw",kir:"ky",lat:"la",ltz:"lb",lug:"lg",lim:"li",lin:"ln",lao:"lo",lit:"lt",lub:"lu",lav:"lv",mlg:"mg",mah:"mh",mao:"mi",mri:"mi",mac:"mk",mkd:"mk",mal:"ml",mon:"mn",mar:"mr",may:"ms",msa:"ms",mlt:"mt",bur:"my",mya:"my",nau:"na",nob:"nb",nde:"nd",nep:"ne",ndo:"ng",dut:"nl",nld:"nl",nno:"nn",nor:"no",nbl:"nr",nav:"nv",nya:"ny",oci:"oc",oji:"oj",orm:"om",ori:"or",oss:"os",pan:"pa",pli:"pi",pol:"pl",pus:"ps",por:"pt",que:"qu",roh:"rm",run:"rn",ron:"ro",rum:"ro",rus:"ru",kin:"rw",san:"sa",srd:"sc",snd:"sd",sme:"se",sag:"sg",sin:"si",slk:"sk",slo:"sk",slv:"sl",smo:"sm",sna:"sn",som:"so",alb:"sq",sqi:"sq",srp:"sr",ssw:"ss",sot:"st",sun:"su",swe:"sv",swa:"sw",tam:"ta",tel:"te",tgk:"tg",tha:"th",tir:"ti",tuk:"tk",tgl:"tl",tsn:"tn",ton:"to",tur:"tr",tso:"ts",tat:"tt",twi:"tw",tah:"ty",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",chi:"zh",zho:"zh",zul:"zu"};return b[a]}c.__esModule=!0,c.getIsoLangs=d,c.get2LetterLangCode=e},{}],164:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];i.logByType("log",b)}c.__esModule=!0;var f=a("global/window"),g=d(f),h=a("./browser"),i={};c.Log=i,i.logByType=function(a,b){var c=arguments.length<=2||void 0===arguments[2]?!!h.IE_VERSION&&h.IE_VERSION<11:arguments[2],d=g["default"].console,f=d&&d[a]||function(){};"log"!==a&&b.unshift(a.toUpperCase()+":"),e.history.push(b),b.unshift("VIDEOJS:"),c&&(b=b.map(function(a){if(a&&"object"==typeof a||Array.isArray(a))try{return JSON.stringify(a)}catch(b){}return String(a)}).join(" ")),f.apply?f[Array.isArray(b)?"apply":"call"](d,b):f(b)},e.history=[],e.error=function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return i.logByType("error",b)},e.warn=function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return i.logByType("warn",b)},c["default"]=e},{"./browser":153,"global/window":251}],165:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){return!!a&&"object"==typeof a&&"[object Object]"===a.toString()&&a.constructor===Object}function f(){var a=Array.prototype.slice.call(arguments);return a.unshift({}),a.push(i),h["default"].apply(null,a),a[0]}c.__esModule=!0,c["default"]=f;var g=a("lodash-compat/object/merge"),h=d(g),i=function(a,b){return e(b)?e(a)?void 0:f(b):b};b.exports=c["default"]},{"lodash-compat/object/merge":233}],166:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/document"),f=d(e),g=function(a){var b=f["default"].createElement("style");return b.className=a,b};c.createStyleElement=g;var h=function(a,b){a.styleSheet?a.styleSheet.cssText=b:a.textContent=b};c.setTextContent=h},{"global/document":250}],167:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){return Array.isArray(a)?f(a):void 0===a||void 0===b?f():f([[a,b]])}function f(a){return void 0===a||0===a.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:a.length,start:g.bind(null,"start",0,a),end:g.bind(null,"end",1,a)}}function g(a,b,c,d){return void 0===d&&(j["default"].warn("DEPRECATED: Function '"+a+"' on 'TimeRanges' called without an index argument."),d=0),h(a,d,c.length-1),c[d][b]}function h(a,b,c){if(0>b||b>c)throw new Error("Failed to execute '"+a+"' on 'TimeRanges': The index provided ("+b+") is greater than or equal to the maximum bound ("+c+").")}c.__esModule=!0,c.createTimeRanges=e;var i=a("./log.js"),j=d(i);c.createTimeRange=e},{"./log.js":164}],168:[function(a,b,c){"use strict";function d(a){return a.charAt(0).toLowerCase()+a.slice(1)}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],169:[function(a,b,c){"use strict";function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],170:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/document"),f=d(e),g=a("global/window"),h=d(g),i=function(a){var b=["protocol","hostname","port","pathname","search","hash","host"];a=encodeURI(a);var c=f["default"].createElement("a");c.href=a;var d=""===c.host&&"file:"!==c.protocol,e=void 0;d&&(e=f["default"].createElement("div"),e.innerHTML='<a href="'+a+'"></a>',c=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),f["default"].body.appendChild(e));for(var g={},h=0;h<b.length;h++)g[b[h]]=c[b[h]];return"http:"===g.protocol&&(g.host=g.host.replace(/:80$/,"")),"https:"===g.protocol&&(g.host=g.host.replace(/:443$/,"")),d&&f["default"].body.removeChild(e),g};c.parseUrl=i;var j=/^[=&;\/]{1}/,k=/([=&;\/]{1})/,l=function(a){var b=a.indexOf("?"),c={hierarchical:decodeURI(a),query:[]};if(-1!==b){c.hierarchical=decodeURI(a.slice(0,b));for(var d=a.slice(b+1),e=d.split(k),f=0;f<e.length;f++)c.query.push(e[f].match(j)?e[f]:decodeURIComponent(e[f]))}return c};c.decodeURL=l;var m=function(a){var b="";if(a.query&&a.query.length){b="?";for(var c=0;c<a.query.length;c++)b+=a.query[c].match(j)?a.query[c]:encodeURIComponent(a.query[c])}return encodeURI(a.hierarchical)+b};c.encodeURL=m;var n=function(a){var b=l(a);if(b.hierarchical.match(/^(https?:)?\/\//i))a=m(b);else{var c=f["default"].createElement("div");c.innerHTML='<a href="'+m(b)+'">x</a>',a=c.firstChild.href}return a};c.getAbsoluteURL=n;var o=function(a){if("string"==typeof a){var b=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,c=b.exec(a);if(c)return c.pop().toLowerCase()}return""};c.getFileExtension=o;var p=function(a){var b=h["default"].location,c=i(a),d=":"===c.protocol?b.protocol:c.protocol,e=d+c.host!==b.protocol+b.host;return e};c.isCrossOrigin=p},{"global/document":250,"global/window":251}],171:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b,c){var d=void 0;if("string"==typeof a){if(0===a.indexOf("#")&&(a=a.slice(1)),f.getPlayers()[a])return b&&M["default"].warn('Player "'+a+'" is already initialised. Options will not be applied.'),c&&f.getPlayers()[a].ready(c),f.getPlayers()[a];d=O.getEl(a)}else d=a;if(!d||!d.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return d.player||v["default"].players[d.playerId]||new v["default"](d,b,c)}c.__esModule=!0;{var g=a("global/window"),h=e(g),i=a("global/document"),j=e(i),k=a("./setup"),l=d(k),m=a("./utils/stylesheet.js"),n=d(m),o=a("./component"),p=e(o),q=a("./event-target"),r=e(q),s=a("./utils/events.js"),t=d(s),u=a("./player"),v=e(u),w=a("./plugins.js"),x=e(w),y=a("../../src/js/utils/merge-options.js"),z=e(y),A=a("./utils/fn.js"),B=d(A),C=a("./tracks/text-track.js"),D=e(C),E=a("./tracks/audio-track.js"),F=e(E),G=a("./tracks/video-track.js"),H=e(G),I=a("./utils/time-ranges.js"),J=a("./utils/format-time.js"),K=e(J),L=a("./utils/log.js"),M=e(L),N=a("./utils/dom.js"),O=d(N),P=a("./utils/browser.js"),Q=d(P),R=a("./utils/url.js"),S=d(R),T=a("./extend.js"),U=e(T),V=a("lodash-compat/object/merge"),W=e(V),X=a("xhr"),Y=e(X),Z=a("./tech/tech.js"),$=e(Z),_=a("./tech/html5.js"),aa=(e(_),a("./tech/flash.js"));e(aa)}if("undefined"==typeof HTMLVideoElement&&(j["default"].createElement("video"),j["default"].createElement("audio"),j["default"].createElement("track")),h["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0){var ba=O.$(".vjs-styles-defaults");if(!ba){ba=n.createStyleElement("vjs-styles-defaults");var ca=O.$("head");ca.insertBefore(ba,ca.firstChild),n.setTextContent(ba,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}l.autoSetupTimeout(1,f),f.VERSION="2.1.8.0",f.options=v["default"].prototype.options_,f.getPlayers=function(){return v["default"].players},f.players=v["default"].players,f.getComponent=p["default"].getComponent,f.registerComponent=function(a,b){$["default"].isTech(b)&&M["default"].warn("The "+a+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),p["default"].registerComponent.call(p["default"],a,b)},f.getTech=$["default"].getTech,f.registerTech=$["default"].registerTech,f.browser=Q,f.TOUCH_ENABLED=Q.TOUCH_ENABLED,f.extend=U["default"],f.mergeOptions=z["default"],f.bind=B.bind,f.plugin=x["default"],f.addLanguage=function(a,b){var c;return a=(""+a).toLowerCase(),v["default"].prototype.options_.languagesMutated=!0,W["default"](f.options.languages,(c={},c[a]=b,c))[a]},f.log=M["default"],f.createTimeRange=f.createTimeRanges=I.createTimeRanges,f.formatTime=K["default"],f.parseUrl=S.parseUrl,f.isCrossOrigin=S.isCrossOrigin,f.EventTarget=r["default"],f.on=t.on,f.one=t.one,f.off=t.off,f.trigger=t.trigger,f.xhr=Y["default"],f.TextTrack=D["default"],f.AudioTrack=F["default"],f.VideoTrack=H["default"],f.isEl=O.isEl,f.isTextNode=O.isTextNode,f.createEl=O.createEl,f.hasClass=O.hasElClass,f.addClass=O.addElClass,f.removeClass=O.removeElClass,f.toggleClass=O.toggleElClass,f.setAttributes=O.setElAttributes,f.getAttributes=O.getElAttributes,f.emptyEl=O.emptyEl,f.appendContent=O.appendContent,f.insertContent=O.insertContent,"object"==typeof c&&"object"==typeof b&&(b.exports=f),c["default"]=f,b.exports=c["default"]},{"../../src/js/utils/merge-options.js":165,"./component":77,"./event-target":115,"./extend.js":116,"./player":124,"./plugins.js":125,"./setup":129,"./tech/flash.js":132,"./tech/html5.js":133,"./tech/tech.js":136,"./tracks/audio-track.js":139,"./tracks/text-track.js":147,"./tracks/video-track.js":152,"./utils/browser.js":153,"./utils/dom.js":156,"./utils/events.js":157,"./utils/fn.js":158,"./utils/format-time.js":160,"./utils/log.js":164,"./utils/stylesheet.js":166,"./utils/time-ranges.js":167,"./utils/url.js":170,"global/document":250,"global/window":251,"lodash-compat/object/merge":233,xhr:256}],172:[function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)},{}],173:[function(){},{}],174:[function(a,b,c){(function(b){/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
"use strict";function d(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}function e(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(a){return this instanceof f?(f.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof a?g(this,a):"string"==typeof a?h(this,a,arguments.length>1?arguments[1]:"utf8"):i(this,a)):arguments.length>1?new f(a,arguments[1]):new f(a)}function g(a,b){if(a=p(a,0>b?0:0|q(b)),!f.TYPED_ARRAY_SUPPORT)for(var c=0;b>c;c++)a[c]=0;return a}function h(a,b,c){("string"!=typeof c||""===c)&&(c="utf8");var d=0|s(b,c);return a=p(a,d),a.write(b,c),a}function i(a,b){if(f.isBuffer(b))return j(a,b);if(Y(b))return k(a,b);if(null==b)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(b.buffer instanceof ArrayBuffer)return l(a,b);if(b instanceof ArrayBuffer)return m(a,b)}return b.length?n(a,b):o(a,b)}function j(a,b){var c=0|q(b.length);return a=p(a,c),b.copy(a,0,0,c),a}function k(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function m(a,b){return f.TYPED_ARRAY_SUPPORT?(b.byteLength,a=f._augment(new Uint8Array(b))):a=l(a,new Uint8Array(b)),a}function n(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function o(a,b){var c,d=0;"Buffer"===b.type&&Y(b.data)&&(c=b.data,d=0|q(c.length)),a=p(a,d);for(var e=0;d>e;e+=1)a[e]=255&c[e];return a}function p(a,b){f.TYPED_ARRAY_SUPPORT?(a=f._augment(new Uint8Array(b)),a.__proto__=f.prototype):(a.length=b,a._isBuffer=!0);var c=0!==b&&b<=f.poolSize>>>1;return c&&(a.parent=Z),a}function q(a){if(a>=e())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e().toString(16)+" bytes");return 0|a}function r(a,b){if(!(this instanceof r))return new r(a,b);var c=new f(a,b);return delete c.parent,c}function s(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return R(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return U(a).length;default:if(d)return R(a).length;b=(""+b).toLowerCase(),d=!0}}function t(a,b,c){var d=!1;if(b=0|b,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return F(this,b,c);case"utf8":case"utf-8":return B(this,b,c);case"ascii":return D(this,b,c);case"binary":return E(this,b,c);case"base64":return A(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function u(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function v(a,b,c,d){return V(R(b,a.length-c),a,c,d)}function w(a,b,c,d){return V(S(b),a,c,d)}function x(a,b,c,d){return w(a,b,c,d)}function y(a,b,c,d){return V(U(b),a,c,d)}function z(a,b,c,d){return V(T(b,a.length-c),a,c,d)}function A(a,b,c){return W.fromByteArray(0===b&&c===a.length?a:a.slice(b,c))}function B(a,b,c){c=Math.min(a.length,c);for(var d=[],e=b;c>e;){var f=a[e],g=null,h=f>239?4:f>223?3:f>191?2:1;if(c>=e+h){var i,j,k,l;switch(h){case 1:128>f&&(g=f);break;case 2:i=a[e+1],128===(192&i)&&(l=(31&f)<<6|63&i,l>127&&(g=l));break;case 3:i=a[e+1],j=a[e+2],128===(192&i)&&128===(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j,l>2047&&(55296>l||l>57343)&&(g=l));break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128===(192&i)&&128===(192&j)&&128===(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k,l>65535&&1114112>l&&(g=l))}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return C(d)}function C(a){var b=a.length;if($>=b)return String.fromCharCode.apply(String,a);for(var c="",d=0;b>d;)c+=String.fromCharCode.apply(String,a.slice(d,d+=$));return c}function D(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function E(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function F(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=Q(a[f]);return e}function G(a,b,c){for(var d=a.slice(b,c),e="",f=0;f<d.length;f+=2)e+=String.fromCharCode(d[f]+256*d[f+1]);return e}function H(a,b,c){if(a%1!==0||0>a)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function I(a,b,c,d,e,g){if(!f.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>e||g>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range")}function J(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function K(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function L(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function M(a,b,c,d,e){return e||L(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(a,b,c,d,23,4),c+4}function N(a,b,c,d,e){return e||L(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(a,b,c,d,52,8),c+8}function O(a){if(a=P(a).replace(aa,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function P(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Q(a){return 16>a?"0"+a.toString(16):a.toString(16)}function R(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=(e-55296<<10|c-56320)+65536}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(1114112>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function S(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b}function T(a,b){for(var c,d,e,f=[],g=0;g<a.length&&!((b-=2)<0);g++)c=a.charCodeAt(g),d=c>>8,e=c%256,f.push(e),f.push(d);return f}function U(a){return W.toByteArray(O(a))}function V(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}var W=a("base64-js"),X=a("ieee754"),Y=a("isarray");c.Buffer=f,c.SlowBuffer=r,c.INSPECT_MAX_BYTES=50,f.poolSize=8192;var Z={};f.TYPED_ARRAY_SUPPORT=void 0!==b.TYPED_ARRAY_SUPPORT?b.TYPED_ARRAY_SUPPORT:d(),f.TYPED_ARRAY_SUPPORT?(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array):(f.prototype.length=void 0,f.prototype.parent=void 0),f.isBuffer=function(a){return!(null==a||!a._isBuffer)},f.compare=function(a,b){if(!f.isBuffer(a)||!f.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,e=0,g=Math.min(c,d);g>e&&a[e]===b[e];)++e;return e!==g&&(c=a[e],d=b[e]),d>c?-1:c>d?1:0},f.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(a,b){if(!Y(a))throw new TypeError("list argument must be an Array of Buffers.");if(0===a.length)return new f(0);var c;if(void 0===b)for(b=0,c=0;c<a.length;c++)b+=a[c].length;var d=new f(b),e=0;for(c=0;c<a.length;c++){var g=a[c];g.copy(d,e),e+=g.length}return d},f.byteLength=s,f.prototype.toString=function(){var a=0|this.length;return 0===a?"":0===arguments.length?B(this,0,a):t.apply(this,arguments)},f.prototype.equals=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:0===f.compare(this,a)},f.prototype.inspect=function(){var a="",b=c.INSPECT_MAX_BYTES;return this.length>0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),"<Buffer "+a+">"},f.prototype.compare=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:f.compare(this,a)},f.prototype.indexOf=function(a,b){function c(a,b,c){for(var d=-1,e=0;c+e<a.length;e++)if(a[c+e]===b[-1===d?0:e-d]){if(-1===d&&(d=e),e-d+1===b.length)return c+d}else d=-1;return-1}if(b>2147483647?b=2147483647:-2147483648>b&&(b=-2147483648),b>>=0,0===this.length)return-1;if(b>=this.length)return-1;if(0>b&&(b=Math.max(this.length+b,0)),"string"==typeof a)return 0===a.length?-1:String.prototype.indexOf.call(this,a,b);if(f.isBuffer(a))return c(this,a,b);if("number"==typeof a)return f.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,b):c(this,[a],b);throw new TypeError("val must be string, number or Buffer")},f.prototype.get=function(a){return this.readUInt8(a)},f.prototype.set=function(a,b){return this.writeUInt8(a,b)},f.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(0>c||0>b)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return u(this,a,b,c);case"utf8":case"utf-8":return v(this,a,b,c);case"ascii":return w(this,a,b,c);case"binary":return x(this,a,b,c);case"base64":return y(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;f.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c),0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c),a>b&&(b=a);var d;if(f.TYPED_ARRAY_SUPPORT)d=f._augment(this.subarray(a,b));else{var e=b-a;d=new f(e,void 0);for(var g=0;e>g;g++)d[g]=this[g+a]}return d.length&&(d.parent=this.parent||this),d},f.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return d},f.prototype.readUIntBE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a+--b],e=1;b>0&&(e*=256);)d+=this[a+--b]*e;return d},f.prototype.readUInt8=function(a,b){return b||H(a,1,this.length),this[a]},f.prototype.readUInt16LE=function(a,b){return b||H(a,2,this.length),this[a]|this[a+1]<<8},f.prototype.readUInt16BE=function(a,b){return b||H(a,2,this.length),this[a]<<8|this[a+1]},f.prototype.readUInt32LE=function(a,b){return b||H(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},f.prototype.readUInt32BE=function(a,b){return b||H(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},f.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return e*=128,d>=e&&(d-=Math.pow(2,8*b)),d},f.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},f.prototype.readInt8=function(a,b){return b||H(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},f.prototype.readInt16LE=function(a,b){b||H(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt16BE=function(a,b){b||H(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt32LE=function(a,b){return b||H(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},f.prototype.readInt32BE=function(a,b){return b||H(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},f.prototype.readFloatLE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!0,23,4)},f.prototype.readFloatBE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!1,23,4)},f.prototype.readDoubleLE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!0,52,8)},f.prototype.readDoubleBE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!1,52,8)},f.prototype.writeUIntLE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f<c&&(e*=256);)this[b+f]=a/e&255;return b+c},f.prototype.writeUIntBE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=c-1,f=1;for(this[b+e]=255&a;--e>=0&&(f*=256);)this[b+e]=a/f&255;return b+c},f.prototype.writeUInt8=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,1,255,0),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=255&a,b+1},f.prototype.writeUInt16LE=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeUInt16BE=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeUInt32LE=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=255&a):K(this,a,b,!0),b+4},f.prototype.writeUInt32BE=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=0,g=1,h=0>a?1:0;for(this[b]=255&a;++f<c&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},f.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0>a?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},f.prototype.writeInt8=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,1,127,-128),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),0>a&&(a=255+a+1),this[b]=255&a,b+1},f.prototype.writeInt16LE=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeInt16BE=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeInt32LE=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):K(this,a,b,!0),b+4},f.prototype.writeInt32BE=function(a,b,c){return a=+a,b=0|b,c||I(this,a,b,4,2147483647,-2147483648),0>a&&(a=4294967295+a+1),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeFloatLE=function(a,b,c){return M(this,a,b,!0,c)},f.prototype.writeFloatBE=function(a,b,c){return M(this,a,b,!1,c)},f.prototype.writeDoubleLE=function(a,b,c){return N(this,a,b,!0,c)},f.prototype.writeDoubleBE=function(a,b,c){return N(this,a,b,!1,c)},f.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&c>d&&(d=c),d===c)return 0;if(0===a.length||0===this.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>c||c>=this.length)throw new RangeError("sourceStart out of bounds");if(0>d)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c);var e,g=d-c;if(this===a&&b>c&&d>b)for(e=g-1;e>=0;e--)a[e+b]=this[e+c];else if(1e3>g||!f.TYPED_ARRAY_SUPPORT)for(e=0;g>e;e++)a[e+b]=this[e+c];else a._set(this.subarray(c,c+g),b);return g},f.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=R(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},f.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(f.TYPED_ARRAY_SUPPORT)return new f(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var _=f.prototype;f._augment=function(a){return a.constructor=f,a._isBuffer=!0,a._set=a.set,a.get=_.get,a.set=_.set,a.write=_.write,a.toString=_.toString,a.toLocaleString=_.toString,a.toJSON=_.toJSON,a.equals=_.equals,a.compare=_.compare,a.indexOf=_.indexOf,a.copy=_.copy,a.slice=_.slice,a.readUIntLE=_.readUIntLE,a.readUIntBE=_.readUIntBE,a.readUInt8=_.readUInt8,a.readUInt16LE=_.readUInt16LE,a.readUInt16BE=_.readUInt16BE,a.readUInt32LE=_.readUInt32LE,a.readUInt32BE=_.readUInt32BE,a.readIntLE=_.readIntLE,a.readIntBE=_.readIntBE,a.readInt8=_.readInt8,a.readInt16LE=_.readInt16LE,a.readInt16BE=_.readInt16BE,a.readInt32LE=_.readInt32LE,a.readInt32BE=_.readInt32BE,a.readFloatLE=_.readFloatLE,a.readFloatBE=_.readFloatBE,a.readDoubleLE=_.readDoubleLE,a.readDoubleBE=_.readDoubleBE,a.writeUInt8=_.writeUInt8,a.writeUIntLE=_.writeUIntLE,a.writeUIntBE=_.writeUIntBE,a.writeUInt16LE=_.writeUInt16LE,a.writeUInt16BE=_.writeUInt16BE,a.writeUInt32LE=_.writeUInt32LE,a.writeUInt32BE=_.writeUInt32BE,a.writeIntLE=_.writeIntLE,a.writeIntBE=_.writeIntBE,a.writeInt8=_.writeInt8,a.writeInt16LE=_.writeInt16LE,a.writeInt16BE=_.writeInt16BE,a.writeInt32LE=_.writeInt32LE,a.writeInt32BE=_.writeInt32BE,a.writeFloatLE=_.writeFloatLE,a.writeFloatBE=_.writeFloatBE,a.writeDoubleLE=_.writeDoubleLE,a.writeDoubleBE=_.writeDoubleBE,a.fill=_.fill,a.inspect=_.inspect,a.toArrayBuffer=_.toArrayBuffer,a};var aa=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":172,ieee754:178,isarray:175}],175:[function(a,b){var c={}.toString;b.exports=Array.isArray||function(a){return"[object Array]"==c.call(a)}},{}],176:[function(a,b,c){(function(a){function b(a){return Array.isArray?Array.isArray(a):"[object Array]"===q(a)}function d(a){return"boolean"==typeof a}function e(a){return null===a}function f(a){return null==a}function g(a){return"number"==typeof a}function h(a){return"string"==typeof a}function i(a){return"symbol"==typeof a}function j(a){return void 0===a}function k(a){return"[object RegExp]"===q(a)}function l(a){return"object"==typeof a&&null!==a}function m(a){return"[object Date]"===q(a)}function n(a){return"[object Error]"===q(a)||a instanceof Error}function o(a){return"function"==typeof a}function p(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function q(a){return Object.prototype.toString.call(a)}c.isArray=b,c.isBoolean=d,c.isNull=e,c.isNullOrUndefined=f,c.isNumber=g,c.isString=h,c.isSymbol=i,c.isUndefined=j,c.isRegExp=k,c.isObject=l,c.isDate=m,c.isError=n,c.isFunction=o,c.isPrimitive=p,c.isBuffer=a.isBuffer}).call(this,{isBuffer:a("../../is-buffer/index.js")})},{"../../is-buffer/index.js":180}],177:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];c.apply(this,h)}else if(f(c)){for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];for(j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h)}return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned){var e;e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,"function"==typeof console.trace)}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d(a._events[b])?1:a._events[b].length:0}},{}],178:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<<h)-1,j=i>>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<<j)-1,l=k>>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<<e|h,j+=e;j>0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],179:[function(a,b){b.exports="function"==typeof Object.create?function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],180:[function(a,b){function c(a){return!!a.constructor&&"function"==typeof a.constructor.isBuffer&&a.constructor.isBuffer(a)}function d(a){return"function"==typeof a.readFloatLE&&"function"==typeof a.slice&&c(a.slice(0,0))}/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
b.exports=function(a){return null!=a&&(c(a)||d(a)||!!a._isBuffer)}},{}],181:[function(a,b){b.exports=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)}},{}],182:[function(a,b){function c(){if(!g){g=!0;for(var a,b=f.length;b;){a=f,f=[];for(var c=-1;++c<b;)a[c]();b=f.length}g=!1}}function d(){}var e=b.exports={},f=[],g=!1;e.nextTick=function(a){f.push(a),g||setTimeout(c,0)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=d,e.addListener=d,e.once=d,e.off=d,e.removeListener=d,e.removeAllListeners=d,e.emit=d,e.binding=function(){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},{}],183:[function(a,b){b.exports=a("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":184}],184:[function(a,b){(function(c){function d(a){return this instanceof d?(i.call(this,a),j.call(this,a),a&&a.readable===!1&&(this.readable=!1),a&&a.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,a&&a.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",e)):new d(a)}function e(){this.allowHalfOpen||this._writableState.ended||c.nextTick(this.end.bind(this))}function f(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}b.exports=d;var g=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b},h=a("core-util-is");h.inherits=a("inherits");var i=a("./_stream_readable"),j=a("./_stream_writable");h.inherits(d,i),f(g(j.prototype),function(a){d.prototype[a]||(d.prototype[a]=j.prototype[a])})}).call(this,a("_process"))},{"./_stream_readable":186,"./_stream_writable":188,_process:182,"core-util-is":176,inherits:179}],185:[function(a,b){function c(a){return this instanceof c?void d.call(this,a):new c(a)}b.exports=c;var d=a("./_stream_transform"),e=a("core-util-is");e.inherits=a("inherits"),e.inherits(c,d),c.prototype._transform=function(a,b,c){c(null,a)}},{"./_stream_transform":187,"core-util-is":176,inherits:179}],186:[function(a,b){(function(c){function d(b,c){var d=a("./_stream_duplex");b=b||{};var e=b.highWaterMark,f=b.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!b.objectMode,c instanceof d&&(this.objectMode=this.objectMode||!!b.readableObjectMode),this.defaultEncoding=b.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(C||(C=a("string_decoder/").StringDecoder),this.decoder=new C(b.encoding),this.encoding=b.encoding)}function e(b){a("./_stream_duplex");return this instanceof e?(this._readableState=new d(b,this),this.readable=!0,void A.call(this)):new e(b)}function f(a,b,c,d,e){var f=j(b,c);if(f)a.emit("error",f);else if(B.isNullOrUndefined(c))b.reading=!1,b.ended||k(a,b);else if(b.objectMode||c&&c.length>0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),e||(b.reading=!1),b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&l(a)),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length<a.highWaterMark||0===a.length)}function h(a){if(a>=E)a=E;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:isNaN(a)||B.isNull(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return B.isBuffer(b)||B.isString(b)||B.isNullOrUndefined(b)||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(b.decoder&&!b.ended){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,l(a)}function l(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(D("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?c.nextTick(function(){m(a)}):m(a))}function m(a){D("emit readable"),a.emit("readable"),s(a)}function n(a,b){b.readingMore||(b.readingMore=!0,c.nextTick(function(){o(a,b)}))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length<b.highWaterMark&&(D("maybeReadMore read 0"),a.read(0),c!==b.length);)c=b.length;b.readingMore=!1}function p(a){return function(){var b=a._readableState;D("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,0===b.awaitDrain&&z.listenerCount(a,"data")&&(b.flowing=!0,s(a))}}function q(a,b){b.resumeScheduled||(b.resumeScheduled=!0,c.nextTick(function(){r(a,b)}))}function r(a,b){b.resumeScheduled=!1,a.emit("resume"),s(a),b.flowing&&!b.reading&&a.read(0)}function s(a){var b=a._readableState;if(D("flow",b.flowing),b.flowing)do var c=a.read();while(null!==c&&b.flowing)}function t(a,b){var c,d=b.buffer,e=b.length,f=!!b.decoder,g=!!b.objectMode;if(0===d.length)return null;if(0===e)c=null;else if(g)c=d.shift();else if(!a||a>=e)c=f?d.join(""):y.concat(d,e),d.length=0;else if(a<d[0].length){var h=d[0];c=h.slice(0,a),d[0]=h.slice(a)}else if(a===d[0].length)c=d.shift();else{c=f?"":new y(a);for(var i=0,j=0,k=d.length;k>j&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l<h.length?d[0]=h.slice(l):d.shift(),i+=l}}return c}function u(a){var b=a._readableState;if(b.length>0)throw new Error("endReadable called on non-empty stream");b.endEmitted||(b.ended=!0,c.nextTick(function(){b.endEmitted||0!==b.length||(b.endEmitted=!0,a.readable=!1,a.emit("end"))}))}function v(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function w(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}b.exports=e;var x=a("isarray"),y=a("buffer").Buffer;e.ReadableState=d;var z=a("events").EventEmitter;z.listenerCount||(z.listenerCount=function(a,b){return a.listeners(b).length});var A=a("stream"),B=a("core-util-is");B.inherits=a("inherits");var C,D=a("util");D=D&&D.debuglog?D.debuglog("stream"):function(){},B.inherits(e,A),e.prototype.push=function(a,b){var c=this._readableState;return B.isString(a)&&!c.objectMode&&(b=b||c.defaultEncoding,b!==c.encoding&&(a=new y(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.setEncoding=function(b){return C||(C=a("string_decoder/").StringDecoder),this._readableState.decoder=new C(b),this._readableState.encoding=b,this};var E=8388608;e.prototype.read=function(a){D("read",a);var b=this._readableState,c=a;if((!B.isNumber(a)||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return D("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?u(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&u(this),null;var d=b.needReadable;D("need readable",d),(0===b.length||b.length-a<b.highWaterMark)&&(d=!0,D("length less than watermark",d)),(b.ended||b.reading)&&(d=!1,D("reading or ended",d)),d&&(D("do read"),b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1),d&&!b.reading&&(a=i(c,b));var e;return e=a>0?t(a,b):null,B.isNull(e)&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&u(this),B.isNull(e)||this.emit("data",e),e},e.prototype._read=function(){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,b){function d(a){D("onunpipe"),a===l&&f()}function e(){D("onend"),a.end()}function f(){D("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function g(b){D("ondata");var c=a.write(b);!1===c&&(D("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function h(b){D("onerror",b),k(),a.removeListener("error",h),0===z.listenerCount(a,"error")&&a.emit("error",b)}function i(){a.removeListener("finish",j),k()}function j(){D("onfinish"),a.removeListener("close",i),k()}function k(){D("unpipe"),l.unpipe(a)}var l=this,m=this._readableState;switch(m.pipesCount){case 0:m.pipes=a;break;case 1:m.pipes=[m.pipes,a];break;default:m.pipes.push(a)}m.pipesCount+=1,D("pipe count=%d opts=%j",m.pipesCount,b);var n=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,o=n?e:f;m.endEmitted?c.nextTick(o):l.once("end",o),a.on("unpipe",d);var q=p(l);return a.on("drain",q),l.on("data",g),a._events&&a._events.error?x(a._events.error)?a._events.error.unshift(h):a._events.error=[h,a._events.error]:a.on("error",h),a.once("close",i),a.once("finish",j),a.emit("pipe",l),m.flowing||(D("pipe resume"),l.resume()),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=w(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,b){var d=A.prototype.on.call(this,a,b);if("data"===a&&!1!==this._readableState.flowing&&this.resume(),"readable"===a&&this.readable){var e=this._readableState;if(!e.readableListening)if(e.readableListening=!0,e.emittedReadable=!1,e.needReadable=!0,e.reading)e.length&&l(this,e);else{var f=this;c.nextTick(function(){D("readable nexttick read 0"),f.read(0)})}}return d},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var a=this._readableState;return a.flowing||(D("resume"),a.flowing=!0,a.reading||(D("resume read 0"),this.read(0)),q(this,a)),this},e.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(D("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(D("wrapped data"),b.decoder&&(e=b.decoder.write(e)),e&&(b.objectMode||e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)B.isFunction(a[e])&&B.isUndefined(this[e])&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return v(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){D("wrapped _read",b),c&&(c=!1,a.resume())},d},e._fromList=t}).call(this,a("_process"))},{"./_stream_duplex":184,_process:182,buffer:174,"core-util-is":176,events:177,inherits:179,isarray:181,stream:193,"string_decoder/":194,util:173}],187:[function(a,b){function c(a,b){this.afterTransform=function(a,c){return d(b,a,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function d(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,h.isNullOrUndefined(c)||a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length<f.highWaterMark)&&a._read(f.highWaterMark)}function e(a){if(!(this instanceof e))return new e(a);g.call(this,a),this._transformState=new c(a,this);var b=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){h.isFunction(this._flush)?this._flush(function(a){f(b,a)}):f(b)})}function f(a,b){if(b)return a.emit("error",b);var c=a._writableState,d=a._transformState;if(c.length)throw new Error("calling transform done when ws.length != 0");if(d.transforming)throw new Error("calling transform done when still transforming");return a.push(null)}b.exports=e;var g=a("./_stream_duplex"),h=a("core-util-is");h.inherits=a("inherits"),h.inherits(e,g),e.prototype.push=function(a,b){return this._transformState.needTransform=!1,g.prototype.push.call(this,a,b)},e.prototype._transform=function(){throw new Error("not implemented")},e.prototype._write=function(a,b,c){var d=this._transformState;if(d.writecb=c,d.writechunk=a,d.writeencoding=b,!d.transforming){var e=this._readableState;(d.needTransform||e.needReadable||e.length<e.highWaterMark)&&this._read(e.highWaterMark)}},e.prototype._read=function(){var a=this._transformState;h.isNull(a.writechunk)||!a.writecb||a.transforming?a.needTransform=!0:(a.transforming=!0,this._transform(a.writechunk,a.writeencoding,a.afterTransform))}},{"./_stream_duplex":184,"core-util-is":176,inherits:179}],188:[function(a,b){(function(c){function d(a,b,c){this.chunk=a,this.encoding=b,this.callback=c}function e(b,c){var d=a("./_stream_duplex");b=b||{};var e=b.highWaterMark,f=b.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.objectMode=!!b.objectMode,c instanceof d&&(this.objectMode=this.objectMode||!!b.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var g=b.decodeStrings===!1;this.decodeStrings=!g,this.defaultEncoding=b.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){n(c,a)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function f(b){var c=a("./_stream_duplex");return this instanceof f||this instanceof c?(this._writableState=new e(b,this),this.writable=!0,void x.call(this)):new f(b)}function g(a,b,d){var e=new Error("write after end");a.emit("error",e),c.nextTick(function(){d(e)})}function h(a,b,d,e){var f=!0;if(!(w.isBuffer(d)||w.isString(d)||w.isNullOrUndefined(d)||b.objectMode)){var g=new TypeError("Invalid non-string/buffer chunk");a.emit("error",g),c.nextTick(function(){e(g)}),f=!1}return f}function i(a,b,c){return!a.objectMode&&a.decodeStrings!==!1&&w.isString(b)&&(b=new v(b,c)),b}function j(a,b,c,e,f){c=i(b,c,e),w.isBuffer(c)&&(e="buffer");var g=b.objectMode?1:c.length;b.length+=g;var h=b.length<b.highWaterMark;return h||(b.needDrain=!0),b.writing||b.corked?b.buffer.push(new d(c,e,f)):k(a,b,!1,g,c,e,f),h}function k(a,b,c,d,e,f,g){b.writelen=d,b.writecb=g,b.writing=!0,b.sync=!0,c?a._writev(e,b.onwrite):a._write(e,f,b.onwrite),b.sync=!1}function l(a,b,d,e,f){d?c.nextTick(function(){b.pendingcb--,f(e)}):(b.pendingcb--,f(e)),a._writableState.errorEmitted=!0,a.emit("error",e)}function m(a){a.writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0}function n(a,b){var d=a._writableState,e=d.sync,f=d.writecb;if(m(d),b)l(a,d,e,b,f);else{var g=r(a,d);g||d.corked||d.bufferProcessing||!d.buffer.length||q(a,d),e?c.nextTick(function(){o(a,d,g,f)}):o(a,d,g,f)}}function o(a,b,c,d){c||p(a,b),b.pendingcb--,d(),t(a,b)}function p(a,b){0===b.length&&b.needDrain&&(b.needDrain=!1,a.emit("drain"))}function q(a,b){if(b.bufferProcessing=!0,a._writev&&b.buffer.length>1){for(var c=[],d=0;d<b.buffer.length;d++)c.push(b.buffer[d].callback);b.pendingcb++,k(a,b,!0,b.length,b.buffer,"",function(a){for(var d=0;d<c.length;d++)b.pendingcb--,c[d](a)}),b.buffer=[]}else{for(var d=0;d<b.buffer.length;d++){var e=b.buffer[d],f=e.chunk,g=e.encoding,h=e.callback,i=b.objectMode?1:f.length;if(k(a,b,!1,i,f,g,h),b.writing){d++;break}}d<b.buffer.length?b.buffer=b.buffer.slice(d):b.buffer.length=0}b.bufferProcessing=!1}function r(a,b){return b.ending&&0===b.length&&!b.finished&&!b.writing}function s(a,b){b.prefinished||(b.prefinished=!0,a.emit("prefinish"))}function t(a,b){var c=r(a,b);return c&&(0===b.pendingcb?(s(a,b),b.finished=!0,a.emit("finish")):s(a,b)),c}function u(a,b,d){b.ending=!0,t(a,b),d&&(b.finished?c.nextTick(d):a.once("finish",d)),b.ended=!0}b.exports=f;var v=a("buffer").Buffer;f.WritableState=e;var w=a("core-util-is");w.inherits=a("inherits");var x=a("stream");w.inherits(f,x),f.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},f.prototype.write=function(a,b,c){var d=this._writableState,e=!1;return w.isFunction(b)&&(c=b,b=null),w.isBuffer(a)?b="buffer":b||(b=d.defaultEncoding),w.isFunction(c)||(c=function(){}),d.ended?g(this,d,c):h(this,d,a,c)&&(d.pendingcb++,e=j(this,d,a,b,c)),e},f.prototype.cork=function(){var a=this._writableState;a.corked++},f.prototype.uncork=function(){var a=this._writableState;a.corked&&(a.corked--,a.writing||a.corked||a.finished||a.bufferProcessing||!a.buffer.length||q(this,a))},f.prototype._write=function(a,b,c){c(new Error("not implemented"))},f.prototype._writev=null,f.prototype.end=function(a,b,c){var d=this._writableState;w.isFunction(a)?(c=a,a=null,b=null):w.isFunction(b)&&(c=b,b=null),w.isNullOrUndefined(a)||this.write(a,b),d.corked&&(d.corked=1,this.uncork()),d.ending||d.finished||u(this,d,c)}}).call(this,a("_process"))},{"./_stream_duplex":184,_process:182,buffer:174,"core-util-is":176,inherits:179,stream:193}],189:[function(a,b){b.exports=a("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":185}],190:[function(a,b,c){(function(d){c=b.exports=a("./lib/_stream_readable.js"),c.Stream=a("stream"),c.Readable=c,c.Writable=a("./lib/_stream_writable.js"),c.Duplex=a("./lib/_stream_duplex.js"),c.Transform=a("./lib/_stream_transform.js"),c.PassThrough=a("./lib/_stream_passthrough.js"),d.browser||"disable"!==d.env.READABLE_STREAM||(b.exports=a("stream"))}).call(this,a("_process"))},{"./lib/_stream_duplex.js":184,"./lib/_stream_passthrough.js":185,"./lib/_stream_readable.js":186,"./lib/_stream_transform.js":187,"./lib/_stream_writable.js":188,_process:182,stream:193}],191:[function(a,b){b.exports=a("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":187}],192:[function(a,b){b.exports=a("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":188}],193:[function(a,b){function c(){d.call(this)}b.exports=c;var d=a("events").EventEmitter,e=a("inherits");e(c,d),c.Readable=a("readable-stream/readable.js"),c.Writable=a("readable-stream/writable.js"),c.Duplex=a("readable-stream/duplex.js"),c.Transform=a("readable-stream/transform.js"),c.PassThrough=a("readable-stream/passthrough.js"),c.Stream=c,c.prototype.pipe=function(a,b){function c(b){a.writable&&!1===a.write(b)&&j.pause&&j.pause()}function e(){j.readable&&j.resume&&j.resume()}function f(){k||(k=!0,a.end())}function g(){k||(k=!0,"function"==typeof a.destroy&&a.destroy())}function h(a){if(i(),0===d.listenerCount(this,"error"))throw a}function i(){j.removeListener("data",c),a.removeListener("drain",e),j.removeListener("end",f),j.removeListener("close",g),j.removeListener("error",h),a.removeListener("error",h),j.removeListener("end",i),j.removeListener("close",i),a.removeListener("close",i)}var j=this;j.on("data",c),a.on("drain",e),a._isStdio||b&&b.end===!1||(j.on("end",f),j.on("close",g));var k=!1;return j.on("error",h),a.on("error",h),j.on("end",i),j.on("close",i),a.on("close",i),a.emit("pipe",j),a}},{events:177,inherits:179,"readable-stream/duplex.js":183,"readable-stream/passthrough.js":189,"readable-stream/readable.js":190,"readable-stream/transform.js":191,"readable-stream/writable.js":192}],194:[function(a,b,c){function d(a){if(a&&!i(a))throw new Error("Unknown encoding: "+a)}function e(a){return a.toString(this.encoding)}function f(a){this.charReceived=a.length%2,this.charLength=this.charReceived?2:0}function g(a){this.charReceived=a.length%3,this.charLength=this.charReceived?3:0}var h=a("buffer").Buffer,i=h.isEncoding||function(a){switch(a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},j=c.StringDecoder=function(a){switch(this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,""),d(a),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=f;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=g;break;default:return void(this.write=e)}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};j.prototype.write=function(a){for(var b="";this.charLength;){var c=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived<this.charLength)return"";a=a.slice(c,a.length),b=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var d=b.charCodeAt(b.length-1);if(!(d>=55296&&56319>=d)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&56319>=d){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{buffer:174}],195:[function(a,b,c){function d(a,b){this._id=a,this._clearFn=b}var e=a("process/browser.js").nextTick,f=Function.prototype.apply,g=Array.prototype.slice,h={},i=0;c.setTimeout=function(){return new d(f.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new d(f.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(a){a.close()},d.prototype.unref=d.prototype.ref=function(){},d.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(a,b){clearTimeout(a._idleTimeoutId),a._idleTimeout=b},c.unenroll=function(a){clearTimeout(a._idleTimeoutId),a._idleTimeout=-1},c._unrefActive=c.active=function(a){clearTimeout(a._idleTimeoutId);var b=a._idleTimeout;b>=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},b))},c.setImmediate="function"==typeof setImmediate?setImmediate:function(a){var b=i++,d=arguments.length<2?!1:g.call(arguments,1);return h[b]=!0,e(function(){h[b]&&(d?a.apply(null,d):a.call(null),c.clearImmediate(b))}),b},c.clearImmediate="function"==typeof clearImmediate?clearImmediate:function(a){delete h[a]}},{"process/browser.js":196}],196:[function(a,b){function c(a){if(i===setTimeout)return setTimeout(a,0);try{return i(a,0)}catch(b){try{return i.call(null,a,0)}catch(b){return i.call(this,a,0)}}}function d(a){if(j===clearTimeout)return clearTimeout(a);try{return j(a)}catch(b){try{return j.call(null,a)}catch(b){return j.call(this,a)}}}function e(){n&&l&&(n=!1,l.length?m=l.concat(m):o=-1,m.length&&f())}function f(){if(!n){var a=c(e);n=!0;for(var b=m.length;b;){for(l=m,m=[];++o<b;)l&&l[o].run();o=-1,b=m.length}l=null,n=!1,d(a)}}function g(a,b){this.fun=a,this.array=b}function h(){}var i,j,k=b.exports={};!function(){try{i=setTimeout}catch(a){i=function(){throw new Error("setTimeout is not defined")}}try{j=clearTimeout}catch(a){j=function(){throw new Error("clearTimeout is not defined")}}}();var l,m=[],n=!1,o=-1;k.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var d=1;d<arguments.length;d++)b[d-1]=arguments[d];m.push(new g(a,b)),1!==m.length||n||c(f)},g.prototype.run=function(){this.fun.apply(null,this.array)},k.title="browser",k.browser=!0,k.env={},k.argv=[],k.version="",k.versions={},k.on=h,k.addListener=h,k.once=h,k.off=h,k.removeListener=h,k.removeAllListeners=h,k.emit=h,k.binding=function(){throw new Error("process.binding is not supported")},k.cwd=function(){return"/"},k.chdir=function(){throw new Error("process.chdir is not supported")},k.umask=function(){return 0}},{}],197:[function(a,b){var c=a("../internal/getNative"),d=c(Date,"now"),e=d||function(){return(new Date).getTime()};b.exports=e},{"../internal/getNative":213}],198:[function(a,b){function c(a,b,c){function h(){r&&clearTimeout(r),n&&clearTimeout(n),t=0,n=r=s=void 0}function i(b,c){c&&clearTimeout(c),n=r=s=void 0,b&&(t=e(),o=a.apply(q,m),r||n||(m=q=void 0))}function j(){var a=b-(e()-p);0>=a||a>b?i(s,n):r=setTimeout(j,a)}function k(){i(v,r)}function l(){if(m=arguments,p=e(),q=this,s=v&&(r||!w),u===!1)var c=w&&!r;else{n||w||(t=p);var d=u-(p-t),f=0>=d||d>u;f?(n&&(n=clearTimeout(n)),t=p,o=a.apply(q,m)):n||(n=setTimeout(k,d))}return f&&r?r=clearTimeout(r):r||b===u||(r=setTimeout(j,b)),c&&(f=!0,o=a.apply(q,m)),!f||r||n||(m=q=void 0),o}var m,n,o,p,q,r,s,t=0,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(f);if(b=0>b?0:+b||0,c===!0){var w=!0;v=!1}else d(c)&&(w=!!c.leading,u="maxWait"in c&&g(+c.maxWait||0,b),v="trailing"in c?!!c.trailing:v);return l.cancel=h,l}var d=a("../lang/isObject"),e=a("../date/now"),f="Expected a function",g=Math.max;b.exports=c},{"../date/now":197,"../lang/isObject":226}],199:[function(a,b){function c(a,b){if("function"!=typeof a)throw new TypeError(d);return b=e(void 0===b?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,f=e(c.length-b,0),g=Array(f);++d<f;)g[d]=c[b+d];switch(b){case 0:return a.call(this,g);case 1:return a.call(this,c[0],g);case 2:return a.call(this,c[0],c[1],g)}var h=Array(b+1);for(d=-1;++d<b;)h[d]=c[d];return h[b]=g,a.apply(this,h)}}var d="Expected a function",e=Math.max;b.exports=c},{}],200:[function(a,b){function c(a,b,c){var g=!0,h=!0;if("function"!=typeof a)throw new TypeError(f);return c===!1?g=!1:e(c)&&(g="leading"in c?!!c.leading:g,h="trailing"in c?!!c.trailing:h),d(a,b,{leading:g,maxWait:+b,trailing:h})}var d=a("./debounce"),e=a("../lang/isObject"),f="Expected a function";b.exports=c},{"../lang/isObject":226,"./debounce":198}],201:[function(a,b){function c(a,b){var c=-1,d=a.length;for(b||(b=Array(d));++c<d;)b[c]=a[c];return b}b.exports=c},{}],202:[function(a,b){function c(a,b){for(var c=-1,d=a.length;++c<d&&b(a[c],c,a)!==!1;);return a}b.exports=c},{}],203:[function(a,b){function c(a,b,c){c||(c={});for(var d=-1,e=b.length;++d<e;){var f=b[d];c[f]=a[f]}return c}b.exports=c},{}],204:[function(a,b){var c=a("./createBaseFor"),d=c();b.exports=d},{"./createBaseFor":211}],205:[function(a,b){function c(a,b){return d(a,b,e)}var d=a("./baseFor"),e=a("../object/keysIn");b.exports=c},{"../object/keysIn":232,"./baseFor":204}],206:[function(a,b){function c(a,b,l,m,n){if(!h(a))return a;var o=g(b)&&(f(b)||j(b)),p=o?void 0:k(b);return d(p||b,function(d,f){if(p&&(f=d,d=b[f]),i(d))m||(m=[]),n||(n=[]),e(a,b,f,c,l,m,n);else{var g=a[f],h=l?l(g,d,f,a,b):void 0,j=void 0===h;j&&(h=d),void 0===h&&(!o||f in a)||!j&&(h===h?h===g:g!==g)||(a[f]=h)}}),a}var d=a("./arrayEach"),e=a("./baseMergeDeep"),f=a("../lang/isArray"),g=a("./isArrayLike"),h=a("../lang/isObject"),i=a("./isObjectLike"),j=a("../lang/isTypedArray"),k=a("../object/keys");b.exports=c},{"../lang/isArray":223,"../lang/isObject":226,"../lang/isTypedArray":229,"../object/keys":231,"./arrayEach":202,"./baseMergeDeep":207,"./isArrayLike":214,"./isObjectLike":219}],207:[function(a,b){function c(a,b,c,k,l,m,n){for(var o=m.length,p=b[c];o--;)if(m[o]==p)return void(a[c]=n[o]);var q=a[c],r=l?l(q,p,c,a,b):void 0,s=void 0===r;s&&(r=p,g(p)&&(f(p)||i(p))?r=f(q)?q:g(q)?d(q):[]:h(p)||e(p)?r=e(q)?j(q):h(q)?q:{}:s=!1),m.push(p),n.push(r),s?a[c]=k(r,p,l,m,n):(r===r?r!==q:q===q)&&(a[c]=r)}var d=a("./arrayCopy"),e=a("../lang/isArguments"),f=a("../lang/isArray"),g=a("./isArrayLike"),h=a("../lang/isPlainObject"),i=a("../lang/isTypedArray"),j=a("../lang/toPlainObject");b.exports=c},{"../lang/isArguments":222,"../lang/isArray":223,"../lang/isPlainObject":227,"../lang/isTypedArray":229,"../lang/toPlainObject":230,"./arrayCopy":201,"./isArrayLike":214}],208:[function(a,b){function c(a){return function(b){return null==b?void 0:d(b)[a]}}var d=a("./toObject");b.exports=c},{"./toObject":221}],209:[function(a,b){function c(a,b,c){if("function"!=typeof a)return d;if(void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}var d=a("../utility/identity");b.exports=c},{"../utility/identity":235}],210:[function(a,b){function c(a){return f(function(b,c){var f=-1,g=null==b?0:c.length,h=g>2?c[g-2]:void 0,i=g>2?c[2]:void 0,j=g>1?c[g-1]:void 0;for("function"==typeof h?(h=d(h,j,5),g-=2):(h="function"==typeof j?j:void 0,g-=h?1:0),i&&e(c[0],c[1],i)&&(h=3>g?void 0:h,g=1);++f<g;){var k=c[f];k&&a(b,k,h)}return b})}var d=a("./bindCallback"),e=a("./isIterateeCall"),f=a("../function/restParam");b.exports=c},{"../function/restParam":199,"./bindCallback":209,"./isIterateeCall":217}],211:[function(a,b){function c(a){return function(b,c,e){for(var f=d(b),g=e(b),h=g.length,i=a?h:-1;a?i--:++i<h;){var j=g[i];if(c(f[j],j,f)===!1)break}return b}}var d=a("./toObject");b.exports=c},{"./toObject":221}],212:[function(a,b){var c=a("./baseProperty"),d=c("length");b.exports=d},{"./baseProperty":208}],213:[function(a,b){function c(a,b){var c=null==a?void 0:a[b];return d(c)?c:void 0}var d=a("../lang/isNative");b.exports=c},{"../lang/isNative":225}],214:[function(a,b){function c(a){return null!=a&&e(d(a))}var d=a("./getLength"),e=a("./isLength");b.exports=c},{"./getLength":212,"./isLength":218}],215:[function(a,b){var c=function(){try{Object({toString:0}+"")}catch(a){return function(){return!1}}return function(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}}();b.exports=c},{}],216:[function(a,b){function c(a,b){return a="number"==typeof a||d.test(a)?+a:-1,b=null==b?e:b,a>-1&&a%1==0&&b>a}var d=/^\d+$/,e=9007199254740991;b.exports=c},{}],217:[function(a,b){function c(a,b,c){if(!f(c))return!1;var g=typeof b;if("number"==g?d(c)&&e(b,c.length):"string"==g&&b in c){var h=c[b];return a===a?a===h:h!==h}return!1}var d=a("./isArrayLike"),e=a("./isIndex"),f=a("../lang/isObject");b.exports=c},{"../lang/isObject":226,"./isArrayLike":214,"./isIndex":216}],218:[function(a,b){function c(a){return"number"==typeof a&&a>-1&&a%1==0&&d>=a}var d=9007199254740991;b.exports=c},{}],219:[function(a,b){function c(a){return!!a&&"object"==typeof a}b.exports=c},{}],220:[function(a,b){function c(a){for(var b=i(a),c=b.length,j=c&&a.length,l=!!j&&g(j)&&(e(a)||d(a)||h(a)),m=-1,n=[];++m<c;){var o=b[m];(l&&f(o,j)||k.call(a,o))&&n.push(o)}return n}var d=a("../lang/isArguments"),e=a("../lang/isArray"),f=a("./isIndex"),g=a("./isLength"),h=a("../lang/isString"),i=a("../object/keysIn"),j=Object.prototype,k=j.hasOwnProperty;b.exports=c},{"../lang/isArguments":222,"../lang/isArray":223,"../lang/isString":228,"../object/keysIn":232,"./isIndex":216,"./isLength":218}],221:[function(a,b){function c(a){if(f.unindexedChars&&e(a)){for(var b=-1,c=a.length,g=Object(a);++b<c;)g[b]=a.charAt(b);return g}return d(a)?a:Object(a)}var d=a("../lang/isObject"),e=a("../lang/isString"),f=a("../support");b.exports=c},{"../lang/isObject":226,"../lang/isString":228,"../support":234}],222:[function(a,b){function c(a){return e(a)&&d(a)&&g.call(a,"callee")&&!h.call(a,"callee")}var d=a("../internal/isArrayLike"),e=a("../internal/isObjectLike"),f=Object.prototype,g=f.hasOwnProperty,h=f.propertyIsEnumerable;b.exports=c},{"../internal/isArrayLike":214,"../internal/isObjectLike":219}],223:[function(a,b){var c=a("../internal/getNative"),d=a("../internal/isLength"),e=a("../internal/isObjectLike"),f="[object Array]",g=Object.prototype,h=g.toString,i=c(Array,"isArray"),j=i||function(a){
return e(a)&&d(a.length)&&h.call(a)==f};b.exports=j},{"../internal/getNative":213,"../internal/isLength":218,"../internal/isObjectLike":219}],224:[function(a,b){function c(a){return d(a)&&g.call(a)==e}var d=a("./isObject"),e="[object Function]",f=Object.prototype,g=f.toString;b.exports=c},{"./isObject":226}],225:[function(a,b){function c(a){return null==a?!1:d(a)?k.test(i.call(a)):f(a)&&(e(a)?k:g).test(a)}var d=a("./isFunction"),e=a("../internal/isHostObject"),f=a("../internal/isObjectLike"),g=/^\[object .+?Constructor\]$/,h=Object.prototype,i=Function.prototype.toString,j=h.hasOwnProperty,k=RegExp("^"+i.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");b.exports=c},{"../internal/isHostObject":215,"../internal/isObjectLike":219,"./isFunction":224}],226:[function(a,b){function c(a){var b=typeof a;return!!a&&("object"==b||"function"==b)}b.exports=c},{}],227:[function(a,b){function c(a){var b;if(!g(a)||l.call(a)!=i||f(a)||e(a)||!k.call(a,"constructor")&&(b=a.constructor,"function"==typeof b&&!(b instanceof b)))return!1;var c;return h.ownLast?(d(a,function(a,b,d){return c=k.call(d,b),!1}),c!==!1):(d(a,function(a,b){c=b}),void 0===c||k.call(a,c))}var d=a("../internal/baseForIn"),e=a("./isArguments"),f=a("../internal/isHostObject"),g=a("../internal/isObjectLike"),h=a("../support"),i="[object Object]",j=Object.prototype,k=j.hasOwnProperty,l=j.toString;b.exports=c},{"../internal/baseForIn":205,"../internal/isHostObject":215,"../internal/isObjectLike":219,"../support":234,"./isArguments":222}],228:[function(a,b){function c(a){return"string"==typeof a||d(a)&&g.call(a)==e}var d=a("../internal/isObjectLike"),e="[object String]",f=Object.prototype,g=f.toString;b.exports=c},{"../internal/isObjectLike":219}],229:[function(a,b){function c(a){return e(a)&&d(a.length)&&!!C[E.call(a)]}var d=a("../internal/isLength"),e=a("../internal/isObjectLike"),f="[object Arguments]",g="[object Array]",h="[object Boolean]",i="[object Date]",j="[object Error]",k="[object Function]",l="[object Map]",m="[object Number]",n="[object Object]",o="[object RegExp]",p="[object Set]",q="[object String]",r="[object WeakMap]",s="[object ArrayBuffer]",t="[object Float32Array]",u="[object Float64Array]",v="[object Int8Array]",w="[object Int16Array]",x="[object Int32Array]",y="[object Uint8Array]",z="[object Uint8ClampedArray]",A="[object Uint16Array]",B="[object Uint32Array]",C={};C[t]=C[u]=C[v]=C[w]=C[x]=C[y]=C[z]=C[A]=C[B]=!0,C[f]=C[g]=C[s]=C[h]=C[i]=C[j]=C[k]=C[l]=C[m]=C[n]=C[o]=C[p]=C[q]=C[r]=!1;var D=Object.prototype,E=D.toString;b.exports=c},{"../internal/isLength":218,"../internal/isObjectLike":219}],230:[function(a,b){function c(a){return d(a,e(a))}var d=a("../internal/baseCopy"),e=a("../object/keysIn");b.exports=c},{"../internal/baseCopy":203,"../object/keysIn":232}],231:[function(a,b){var c=a("../internal/getNative"),d=a("../internal/isArrayLike"),e=a("../lang/isObject"),f=a("../internal/shimKeys"),g=a("../support"),h=c(Object,"keys"),i=h?function(a){var b=null==a?void 0:a.constructor;return"function"==typeof b&&b.prototype===a||("function"==typeof a?g.enumPrototypes:d(a))?f(a):e(a)?h(a):[]}:f;b.exports=i},{"../internal/getNative":213,"../internal/isArrayLike":214,"../internal/shimKeys":220,"../lang/isObject":226,"../support":234}],232:[function(a,b){function c(a){if(null==a)return[];j(a)||(a=Object(a));var b=a.length;b=b&&i(b)&&(f(a)||e(a)||k(a))&&b||0;for(var c=a.constructor,d=-1,m=g(c)&&c.prototype||x,n=m===a,o=Array(b),q=b>0,r=l.enumErrorProps&&(a===w||a instanceof Error),t=l.enumPrototypes&&g(a);++d<b;)o[d]=d+"";for(var C in a)t&&"prototype"==C||r&&("message"==C||"name"==C)||q&&h(C,b)||"constructor"==C&&(n||!z.call(a,C))||o.push(C);if(l.nonEnumShadows&&a!==x){var D=a===y?u:a===w?p:A.call(a),E=B[D]||B[s];for(D==s&&(m=x),b=v.length;b--;){C=v[b];var F=E[C];n&&F||(F?!z.call(a,C):a[C]===m[C])||o.push(C)}}return o}var d=a("../internal/arrayEach"),e=a("../lang/isArguments"),f=a("../lang/isArray"),g=a("../lang/isFunction"),h=a("../internal/isIndex"),i=a("../internal/isLength"),j=a("../lang/isObject"),k=a("../lang/isString"),l=a("../support"),m="[object Array]",n="[object Boolean]",o="[object Date]",p="[object Error]",q="[object Function]",r="[object Number]",s="[object Object]",t="[object RegExp]",u="[object String]",v=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],w=Error.prototype,x=Object.prototype,y=String.prototype,z=x.hasOwnProperty,A=x.toString,B={};B[m]=B[o]=B[r]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},B[n]=B[u]={constructor:!0,toString:!0,valueOf:!0},B[p]=B[q]=B[t]={constructor:!0,toString:!0},B[s]={constructor:!0},d(v,function(a){for(var b in B)if(z.call(B,b)){var c=B[b];c[a]=z.call(c,a)}}),b.exports=c},{"../internal/arrayEach":202,"../internal/isIndex":216,"../internal/isLength":218,"../lang/isArguments":222,"../lang/isArray":223,"../lang/isFunction":224,"../lang/isObject":226,"../lang/isString":228,"../support":234}],233:[function(a,b){var c=a("../internal/baseMerge"),d=a("../internal/createAssigner"),e=d(c);b.exports=e},{"../internal/baseMerge":206,"../internal/createAssigner":210}],234:[function(a,b){var c=Array.prototype,d=Error.prototype,e=Object.prototype,f=e.propertyIsEnumerable,g=c.splice,h={};!function(a){var b=function(){this.x=a},c={0:a,length:a},e=[];b.prototype={valueOf:a,y:a};for(var i in new b)e.push(i);h.enumErrorProps=f.call(d,"message")||f.call(d,"name"),h.enumPrototypes=f.call(b,"prototype"),h.nonEnumShadows=!/valueOf/.test(e),h.ownLast="x"!=e[0],h.spliceObjects=(g.call(c,0,1),!c[0]),h.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),b.exports=h},{}],235:[function(a,b){function c(a){return a}b.exports=c},{}],236:[function(a,b){"use strict";var c=a("object-keys"),d=a("foreach"),e="function"==typeof Symbol&&"symbol"==typeof Symbol(),f=Object.prototype.toString,g=function(a){return"function"==typeof a&&"[object Function]"===f.call(a)},h=function(){var a={};try{Object.defineProperty(a,"x",{enumerable:!1,value:a});for(var b in a)return!1;return a.x===a}catch(c){return!1}},i=Object.defineProperty&&h(),j=function(a,b,c,d){(!(b in a)||g(d)&&d())&&(i?Object.defineProperty(a,b,{configurable:!0,enumerable:!1,value:c,writable:!0}):a[b]=c)},k=function(a,b){var f=arguments.length>2?arguments[2]:{},g=c(b);e&&(g=g.concat(Object.getOwnPropertySymbols(b))),d(g,function(c){j(a,c,b[c],f[c])})};k.supportsDescriptors=!!i,b.exports=k},{foreach:237,"object-keys":240}],237:[function(a,b){var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString;b.exports=function(a,b,e){if("[object Function]"!==d.call(b))throw new TypeError("iterator must be a function");var f=a.length;if(f===+f)for(var g=0;f>g;g++)b.call(e,a[g],g,a);else for(var h in a)c.call(a,h)&&b.call(e,a[h],h,a)}},{}],238:[function(a,b){var c="Function.prototype.bind called on incompatible ",d=Array.prototype.slice,e=Object.prototype.toString,f="[object Function]";b.exports=function(a){var b=this;if("function"!=typeof b||e.call(b)!==f)throw new TypeError(c+b);for(var g,h=d.call(arguments,1),i=function(){if(this instanceof g){var c=b.apply(this,h.concat(d.call(arguments)));return Object(c)===c?c:this}return b.apply(a,h.concat(d.call(arguments)))},j=Math.max(0,b.length-h.length),k=[],l=0;j>l;l++)k.push("$"+l);if(g=Function("binder","return function ("+k.join(",")+"){ return binder.apply(this,arguments); }")(i),b.prototype){var m=function(){};m.prototype=b.prototype,g.prototype=new m,m.prototype=null}return g}},{}],239:[function(a,b){var c=a("./implementation");b.exports=Function.prototype.bind||c},{"./implementation":238}],240:[function(a,b){"use strict";var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString,e=Array.prototype.slice,f=a("./isArguments"),g=Object.prototype.propertyIsEnumerable,h=!g.call({toString:null},"toString"),i=g.call(function(){},"prototype"),j=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],k=function(a){var b=a.constructor;return b&&b.prototype===a},l={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},m=function(){if("undefined"==typeof window)return!1;for(var a in window)try{if(!l["$"+a]&&c.call(window,a)&&null!==window[a]&&"object"==typeof window[a])try{k(window[a])}catch(b){return!0}}catch(b){return!0}return!1}(),n=function(a){if("undefined"==typeof window||!m)return k(a);try{return k(a)}catch(b){return!1}},o=function(a){var b=null!==a&&"object"==typeof a,e="[object Function]"===d.call(a),g=f(a),k=b&&"[object String]"===d.call(a),l=[];if(!b&&!e&&!g)throw new TypeError("Object.keys called on a non-object");var m=i&&e;if(k&&a.length>0&&!c.call(a,0))for(var o=0;o<a.length;++o)l.push(String(o));if(g&&a.length>0)for(var p=0;p<a.length;++p)l.push(String(p));else for(var q in a)m&&"prototype"===q||!c.call(a,q)||l.push(String(q));if(h)for(var r=n(a),s=0;s<j.length;++s)r&&"constructor"===j[s]||!c.call(a,j[s])||l.push(j[s]);return l};o.shim=function(){if(Object.keys){var a=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!a){var b=Object.keys;Object.keys=function(a){return b(f(a)?e.call(a):a)}}}else Object.keys=o;return Object.keys||o},b.exports=o},{"./isArguments":241}],241:[function(a,b){"use strict";var c=Object.prototype.toString;b.exports=function(a){var b=c.call(a),d="[object Arguments]"===b;return d||(d="[object Array]"!==b&&null!==a&&"object"==typeof a&&"number"==typeof a.length&&a.length>=0&&"[object Function]"===c.call(a.callee)),d}},{}],242:[function(a,b){"use strict";var c=a("object-keys");b.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var a={},b=Symbol("test");if("string"==typeof b)return!1;var d=42;a[b]=d;for(b in a)return!1;if(0!==c(a).length)return!1;if("function"==typeof Object.keys&&0!==Object.keys(a).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(a).length)return!1;var e=Object.getOwnPropertySymbols(a);if(1!==e.length||e[0]!==b)return!1;if(!Object.prototype.propertyIsEnumerable.call(a,b))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var f=Object.getOwnPropertyDescriptor(a,b);if(f.value!==d||f.enumerable!==!0)return!1}return!0}},{"object-keys":240}],243:[function(a,b){"use strict";var c=a("object-keys"),d=a("function-bind"),e=function(a){return"undefined"!=typeof a&&null!==a},f=a("./hasSymbols")(),g=Object,h=d.call(Function.call,Array.prototype.push),i=d.call(Function.call,Object.prototype.propertyIsEnumerable);b.exports=function(a){if(!e(a))throw new TypeError("target must be an object");var b,d,j,k,l,m,n,o=g(a);for(b=1;b<arguments.length;++b){if(d=g(arguments[b]),k=c(d),f&&Object.getOwnPropertySymbols)for(l=Object.getOwnPropertySymbols(d),j=0;j<l.length;++j)n=l[j],i(d,n)&&h(k,n);for(j=0;j<k.length;++j)n=k[j],m=d[n],i(d,n)&&(o[n]=m)}return o}},{"./hasSymbols":242,"function-bind":239,"object-keys":240}],244:[function(a,b){"use strict";var c=a("define-properties"),d=a("./implementation"),e=a("./polyfill"),f=a("./shim");c(d,{implementation:d,getPolyfill:e,shim:f}),b.exports=d},{"./implementation":243,"./polyfill":245,"./shim":246,"define-properties":236}],245:[function(a,b){"use strict";var c=a("./implementation"),d=function(){if(!Object.assign)return!1;for(var a="abcdefghijklmnopqrst",b=a.split(""),c={},d=0;d<b.length;++d)c[b[d]]=b[d];var e=Object.assign({},c),f="";for(var g in e)f+=g;return a!==f},e=function(){if(!Object.assign||!Object.preventExtensions)return!1;var a=Object.preventExtensions({1:2});try{Object.assign(a,"xy")}catch(b){return"y"===a[1]}};b.exports=function(){return Object.assign?d()?c:e()?c:Object.assign:c}},{"./implementation":243}],246:[function(a,b){"use strict";var c=a("define-properties"),d=a("./polyfill");b.exports=function(){var a=d();return c(Object,{assign:a},{assign:function(){return Object.assign!==a}}),a}},{"./polyfill":245,"define-properties":236}],247:[function(a,b){function c(a,b){var c,d=null;try{c=JSON.parse(a,b)}catch(e){d=e}return[d,c]}b.exports=c},{}],248:[function(a,b){function c(a){return a.replace(/\n\r?\s*/g,"")}b.exports=function(a){for(var b="",d=0;d<arguments.length;d++)b+=c(a[d])+(arguments[d+1]||"");return b}},{}],249:[function(a,b){function c(a,b,c){if(!g(b))throw new TypeError("iterator must be a function");arguments.length<3&&(c=this),"[object Array]"===h.call(a)?d(a,b,c):"string"==typeof a?e(a,b,c):f(a,b,c)}function d(a,b,c){for(var d=0,e=a.length;e>d;d++)i.call(a,d)&&b.call(c,a[d],d,a)}function e(a,b,c){for(var d=0,e=a.length;e>d;d++)b.call(c,a.charAt(d),d,a)}function f(a,b,c){for(var d in a)i.call(a,d)&&b.call(c,a[d],d,a)}var g=a("is-function");b.exports=c;var h=Object.prototype.toString,i=Object.prototype.hasOwnProperty},{"is-function":252}],250:[function(a,b){(function(c){var d="undefined"!=typeof c?c:"undefined"!=typeof window?window:{},e=a("min-document");if("undefined"!=typeof document)b.exports=document;else{var f=d["__GLOBAL_DOCUMENT_CACHE@4"];f||(f=d["__GLOBAL_DOCUMENT_CACHE@4"]=e),b.exports=f}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"min-document":173}],251:[function(a,b){(function(a){b.exports="undefined"!=typeof window?window:"undefined"!=typeof a?a:"undefined"!=typeof self?self:{}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],252:[function(a,b){function c(a){var b=d.call(a);return"[object Function]"===b||"function"==typeof a&&"[object RegExp]"!==b||"undefined"!=typeof window&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}b.exports=c;var d=Object.prototype.toString},{}],253:[function(a,b){function c(a){var b=!1;return function(){return b?void 0:(b=!0,a.apply(this,arguments))}}b.exports=c,c.proto=c(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return c(this)},configurable:!0})})},{}],254:[function(a,b){var c=a("trim"),d=a("for-each"),e=function(a){return"[object Array]"===Object.prototype.toString.call(a)};b.exports=function(a){if(!a)return{};var b={};return d(c(a).split("\n"),function(a){var d=a.indexOf(":"),f=c(a.slice(0,d)).toLowerCase(),g=c(a.slice(d+1));"undefined"==typeof b[f]?b[f]=g:e(b[f])?b[f].push(g):b[f]=[b[f],g]}),b}},{"for-each":249,trim:255}],255:[function(a,b,c){function d(a){return a.replace(/^\s*|\s*$/g,"")}c=b.exports=d,c.left=function(a){return a.replace(/^\s*/,"")},c.right=function(a){return a.replace(/\s*$/,"")}},{}],256:[function(a,b){"use strict";function c(a,b){for(var c=0;c<a.length;c++)b(a[c])}function d(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function e(a,b,c){var d=a;return k(b)?(c=b,"string"==typeof a&&(d={uri:a})):d=m(b,{uri:a}),d.callback=c,d}function f(a,b,c){return b=e(a,b,c),g(b)}function g(a){function b(){4===k.readyState&&g()}function c(){var a=void 0;if(k.response?a=k.response:"text"!==k.responseType&&k.responseType||(a=k.responseText||k.responseXML),u)try{a=JSON.parse(a)}catch(b){}return a}function e(a){clearTimeout(o),a instanceof Error||(a=new Error(""+(a||"Unknown XMLHttpRequest Error"))),a.statusCode=0,h(a,i)}function g(){if(!n){var b;clearTimeout(o),b=a.useXDR&&void 0===k.status?200:1223===k.status?204:k.status;var d=i,e=null;0!==b?(d={body:c(),statusCode:b,method:q,headers:{},url:p,rawRequest:k},k.getAllResponseHeaders&&(d.headers=l(k.getAllResponseHeaders()))):e=new Error("Internal XMLHttpRequest Error"),h(e,d,d.body)}}var h=a.callback;if("undefined"==typeof h)throw new Error("callback argument missing");h=j(h);var i={body:void 0,headers:{},statusCode:0,method:q,url:p,rawRequest:k},k=a.xhr||null;k||(k=a.cors||a.useXDR?new f.XDomainRequest:new f.XMLHttpRequest);var m,n,o,p=k.url=a.uri||a.url,q=k.method=a.method||"GET",r=a.body||a.data||null,s=k.headers=a.headers||{},t=!!a.sync,u=!1;if("json"in a&&(u=!0,s.accept||s.Accept||(s.Accept="application/json"),"GET"!==q&&"HEAD"!==q&&(s["content-type"]||s["Content-Type"]||(s["Content-Type"]="application/json"),r=JSON.stringify(a.json))),k.onreadystatechange=b,k.onload=g,k.onerror=e,k.onprogress=function(){},k.ontimeout=e,k.open(q,p,!t,a.username,a.password),t||(k.withCredentials=!!a.withCredentials),!t&&a.timeout>0&&(o=setTimeout(function(){n=!0,k.abort("timeout");var a=new Error("XMLHttpRequest timeout");a.code="ETIMEDOUT",e(a)},a.timeout)),k.setRequestHeader)for(m in s)s.hasOwnProperty(m)&&k.setRequestHeader(m,s[m]);else if(a.headers&&!d(a.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in a&&(k.responseType=a.responseType),"beforeSend"in a&&"function"==typeof a.beforeSend&&a.beforeSend(k),k.send(r),k}function h(){}var i=a("global/window"),j=a("once"),k=a("is-function"),l=a("parse-headers"),m=a("xtend");b.exports=f,f.XMLHttpRequest=i.XMLHttpRequest||h,f.XDomainRequest="withCredentials"in new f.XMLHttpRequest?f.XMLHttpRequest:i.XDomainRequest,c(["get","put","post","patch","head","delete"],function(a){f["delete"===a?"del":a]=function(b,c,d){return c=e(b,c,d),c.method=a.toUpperCase(),g(c)}})},{"global/window":251,"is-function":252,once:253,"parse-headers":254,xtend:257}],257:[function(a,b){function c(){for(var a={},b=0;b<arguments.length;b++){var c=arguments[b];for(var e in c)d.call(c,e)&&(a[e]=c[e])}return a}b.exports=c;var d=Object.prototype.hasOwnProperty},{}]},{},[10]),amp.utils=amp.utils||{},amp.utils.getBitrateByUnit=function(a){var b=a+"bps";return a>=1e6?(a=amp.utils.roundToOneDecimal(a/1e6),b=a+"Mbps"):a>=1e3&&(a=amp.utils.roundToOneDecimal(a/1e3),b=a+"Kbps"),b},amp.utils.getSizeByUnit=function(a){var b=a;return a>=1048576?(a=amp.utils.roundToOneDecimal(a/1048576),b=a+"MB"):a>=1024&&(a=amp.utils.roundToOneDecimal(a/1024),b=a+"KB"),b},amp.utils.roundToOneDecimal=function(a){return+(Math.round(a+"e+1")+"e-1")},function(a){"use strict";var b=amp.getComponent("MenuButton"),c=b.prototype.addChild;b.prototype.addChild=function(b){c.call(this,b),b.hasClass("vjs-menu")&&this.trigger(a.internalEventName.menuadded)}}(window.amp),function(a){"use strict";a.plugin("responsive",function(b){function c(a){return"number"==typeof a?a:"string"!=typeof a||isNaN(parseInt(a,10))?!1:parseInt(a,10)}function d(a){for(var b={},d=Object.keys(a),e=0;e<d.length;e++){var f=d[e],g=a[f],h=c(g);if(h!==!1)b[f]={from:h,to:h};else if(g.from||g.to){var i=c(g.from),j=c(g.to);(i!==!1||j!==!1)&&(b[f]={}),i!==!1&&(b[f].from=i),j!==!1&&(b[f].to=j)}}return b}function e(a){a.playerContainer().style.fontSize=a.playerContainer().offsetWidth+"px"}function f(){var a=this.getCurrentTextTrack();a&&this.textTrackDisplay.updateForTrack(a)}function g(){for(var a=this.playerContainer().offsetWidth,b=[],c=0;c<o.length;c++){var d=o[c],f=n[d].from,g=n[d].to;void 0!==f&&void 0!==g?a>=f&&g>=a&&b.push(d):void 0!==f&&a>=f?b.push(d):void 0!==g&&g>=a&&b.push(d)}b.length>0&&(b=b.join(" "),i!==b&&(this.removeElClass(this.playerContainer(),i),this.addElClass(this.playerContainer(),b),i=b)),e(this)}function h(){for(var a=j.el().offsetHeight-j.controlBar.el().offsetHeight,b=a-20,c=0;c<l.length;c++){var d=l[c];d.style.maxHeight=b+"px"}}var i,j=this,k=200,l=[],m={"amp-size-es":{from:189,to:229},"amp-size-s":{from:230,to:399},"amp-size-m":{from:400,to:799},"amp-size-l":{from:800}},n=d(a.mergeOptions(b.sizeClasses,m)),o=Object.keys(n);e(j),j.addThrottledWindowResizeListener(a.bind(j,g),k),j.one(a.eventName.loadstart,function(){a.TOUCH_ENABLED&&j.addClass("amp-touch-enabled")}),j.ready(a.bind(j,function(){this.addThrottledWindowResizeListener(a.bind(this,f),k),g.call(this);var b=this;this.addThrottledWindowResizeListener(h,k),j.on("fullscreenchange",function(){g.call(b)}),this.on(a.internalEventName.menuadded,function(){l=this.controlBar.el().querySelectorAll(".vjs-menu-content"),h()})}))})}(window.amp),function(a){"use strict";a.plugin("ampAudioTracks",function(b){function c(a){var b=p.controlBar.audioTracksButton,c=s,d=b.items.indexOf(a),e=w[d],f=p.currentAudioStreamList();!f||void 0===e||0>e||(c!==d&&f.switchIndex(e)&&(c<b.items.length&&b.items[c].selected(!1),a.selected(!0),s=d),p.hasStarted()&&p.restartCheckMediaWorkflowIfNeeded())}function d(a){var b=a.currentAudioStreamList();if(!b)return[];f(a);for(var c,d,e=[],g=0;g<b.streams.length;g++)c=b.streams[g],d=c.hasOwnProperty("supported")?c.supported:!0,e.push({text:c.title?c.title:c.name,codecName:m(c.codec),codec:c.codec,supported:d});return e}function e(a){var b=a.currentAudioStreamList();if(!b)return null;for(var c=0;c<b.streams.length;c++)if(b.streams[c].enabled)return b.streams[c].codec;return null}function f(b){var c=b.currentAudioStreamList();if(z)for(var d=0;d<c.streams.length;d++)c.streams[d].title=c.streams[d].name;else{var e=o(c.streams,function(a){var b=j(a.language);return b||(b=a.language),b}),f=o(c.streams,function(b){return a.utils.getBitrateByUnit(b.bitrate)}),g=[];if(l(e))g=e;else{var h=[];f.forEach(function(a,b){var c=e[b]?e[b]:"Track"+b;h.push(c+" - "+f[b])}),g=h.slice(),h.forEach(function(a,b){var c=h.indexOf(a);b>c&&(g[c]=h[c]+" ("+c+")",g[b]=h[b]+" ("+b+")")})}for(var d=0;d<c.streams.length;d++)c.streams[d].title=g[d]}}function g(){var b=this.player_.currentAudioStreamList();b&&b.addEventListener(a.streamListEventName.streamselected,a.bind(this,h)),this.refresh(),s=void 0,i(this.player_)}function h(){var a=this.player_.currentAudioStreamList(),b=this.player_.controlBar.audioTracksButton,c=s,d=w[c];if(d!==a.enabledIndices[0]){c<b.items.length&&b.items[c].selected(!1);var e=a.enabledIndices[0];s=x[e],s<b.items.length&&b.items[s].selected(!0)}}function i(a){var b=a.currentAudioStreamList();if(b){var d=a.controlBar.audioTracksButton,e=w[s];if(e!=b.enabledIndices[0]){var f=x[b.enabledIndices[0]];void 0!==f&&c(d.items[f])}}}function j(a){if(!a)return null;var b=null;return 3==a.length&&(b=amp.get2LetterLangCode(a)),q&&b&&q[b]?q[b].nativeName:q&&a&&q[a]?q[a].nativeName:null}function k(a){return a.filter(function(a,b,c){return c.indexOf(a)===b})}function l(a){return k(a).length==a.length}function m(a){var b=["aac","mp4a"],c=["dtse","ac-3","ec-3"];return null==a?v:(a=a.toLowerCase(),n(c,a)?u:n(b,a)?v:void 0)}function n(a,b){for(var c=0;c<a.length;c++)if(b.indexOf(a[c])>-1)return!0;return!1}function o(a,b){var c=[];return a.forEach(function(a,d){c.push(b(a,d))}),c}var p=this,q=a.getIsoLangs(),r=b&&b.menuTitle?b.menuTitle:"Audio Tracks",s=b&&b.selectedItem?b.selectedItem:0,t="amp-audiotracks-control",u=this.htmlEncode(this.localize("Dolby Digital")),v=this.htmlEncode(this.localize("Stereo")),w={},x={},y=!0,z=!1;p.options_.skinConfig&&p.options_.skinConfig.audioTracksMenu&&("undefined"!=typeof p.options_.skinConfig.audioTracksMenu.enabled&&(y=p.options_.skinConfig.audioTracksMenu.enabled),z=p.options_.skinConfig.audioTracksMenu.useManifestForLabel||!1);var A=a.getComponent("MenuItem");a.AudioTrackskMenuItem=a.extend(A,{init:function(a,b){var c={label:b.text,selected:b.selected,selectable:!0};A.call(this,a,c),this.addClass("amp-menu-item")}}),a.AudioTrackskMenuItem.prototype.handleClick=function(){c(this)},a.registerComponent("AudioTrackskMenuItem",a.AudioTrackskMenuItem);var B=a.getComponent("MenuButton");a.AudioTracksButton=a.extend(B,{init:function(b,c){y&&(c=c||{},c.name="audioTracksButton",c.needTextControl=!1,B.call(this,b,c),b.addEventListener(AzureHtml5JS.Common.isSafari?a.eventName.loadeddata:a.eventName.loadedmetadata,a.bind(this,g)))}}),a.AudioTracksButton.prototype.refresh=function(){if(this.removeChild(this.menu),null!=this.menu&&this.menu.dispose(),this.menu=this.createMenu(),!this.items||this.items.length<=1)return void this.hide();this.addChild(this.menu);var b=a.getComponent("Component"),c=new b(p,{el:a.createEl("li",{className:"amp-menu-header",innerHTML:this.htmlEncode(this.localize(r)),tabindex:-1})});this.menu.prependItem(c),this.show()},a.AudioTracksButton.prototype.buttonText=r,a.AudioTracksButton.prototype.createItems=function(){var b=d(this.player_)||[],c=!0,f=null,g=[];AzureHtml5JS.Common.isChromiumEdge&&(c=this.player_&&this.player_.tech_&&this.player_.tech_.mediaPlayer&&this.player_.tech_.mediaPlayer._sessionContext&&this.player_.tech_.mediaPlayer._sessionContext.emeManager&&this.player_.tech_.mediaPlayer._sessionContext.emeManager.matchedKeySystem?!0:!1),c&&(f=e(this.player_));for(var h=0,i=0;h<b.length;h++)if(b[h].supported&&(!c||b[h].codec===f)){w[i]=h,x[h]=i++;var j=new a.AudioTrackskMenuItem(this.player_,b[h]);g.push(j)}return g},a.AudioTracksButton.prototype.buildCSSClass=function(){return t+" "+B.prototype.buildCSSClass.call(this)},a.registerComponent("AudioTracksButton",a.AudioTracksButton),p.ready(function(){var b=new a.AudioTracksButton(p,{selectedItemIndex:s});p.controlBar.audioTracksButton=p.controlBar.addChild(b),AzureHtml5JS.Common.isChromiumEdge&&p.addEventListener("drmselected",function(){p.controlBar.audioTracksButton.refresh()}),y&&(p.controlBar.audioTracksButton.el_.setAttribute("aria-label","Audio Tracks Menu"),p.controlBar.audioTracksButton.el_.setAttribute("title",this.localize("Audio Tracks")),p.controlBar.audioTracksButton.el_.setAttribute("role","presentation"))})})}(window.amp),function(a){"use strict";var b=a.getComponent("CaptionSettingsMenuItem"),c=b.prototype.onClick,d=a.getComponent("TextTrackSettings"),e=d.prototype.saveSettings;a.plugin("closedCaption",function(f){var g=this,h=f&&f.menuTitle?f.menuTitle:"Closed Captioning";g.addEventListener(a.eventName.loadedmetadata,function(){g.controlBar.captionsButton.el().className+=" amp-closedcaption-control",g.controlBar.captionsButton.buttonText=h;var b=a.getComponent("Component"),c=new b(g,{el:a.createEl("li",{className:"amp-menu-header",innerHTML:this.htmlEncode(this.localize(h)),tabindex:-1})});g.controlBar.captionsButton.menu.prependItem(c)}),b.prototype.onClick=function(){c.apply(this),this.player().addClass("amp-showing-texttrack-settings")},d.prototype.saveSettings=function(){e.apply(this),this.player().removeClass("amp-showing-texttrack-settings")},g.on("dispose",function(){b.prototype.onClick=c,d.prototype.saveSettings=e})})}(window.amp),function(a){"use strict";a.plugin("contentTitle",function(b){function c(a,b,c){var d="amp-logo";if(f&&null!==c.currentClip()&&c.currentClip().isAd){var e="",g=c.currentClip().clickThrough||"",h=parseInt(c.duration()-c.currentTime());h>=0&&c.currentTime()>0&&(e=AMP.Misc.formatString(c.localize("AD_TIMING_INFO"),h),g.length>0&&(e=c.htmlEncode(e)+' | <a onclick=" return true" class="aboutLink">'+c.htmlEncode(g)+"</a>"),b=e),d="amp-logo-ad"}else b=c.htmlEncode(b);var i=null;i=a?['<div class="logo-title-row">','<div class="title"><h4>'+c.htmlEncode(a)+"</h4></div>",'<div class="'+d+'"></div>',"</div>"]:['<div class="logo-title-row">','<div class="title"></div>','<div class="'+d+'"></div>',"</div>"];var j=null;b&&(j='<div class="description">'+b+"</div>");var k=i.join("");return null!=j&&(k+=j),k}function d(){var b=c(this.title_||this.options_.title,this.options_.description,this);if(void 0!==e.contentTitleElement){e.contentTitleElement.innerHTML=b;var d=e.options().logo?!!e.options().logo.enabled:!0,g=f?"amp-logo-ad":"amp-logo";if(d&&e.el().getElementsByClassName(g).length>0){var h=new a.Logo(e);e.el().getElementsByClassName(g)[0].appendChild(h.el()),e.on("dispose",function(){h.dispose()})}}}var e=this,f=e.options_.isAdPlayer||!1,g=a.bind(e,d);e.ready(function(){var d=c(b.title,b.description,e),g="";g=f?a.createEl("div",{className:"amp-content-title-ad",innerHTML:d}):a.createEl("div",{className:"amp-content-title",innerHTML:d}),e.contentTitleElement=e.el().appendChild(g),f&&(e.contentTitleElement.onclick=function(){e.trigger("tech-click")})}),e.on("firstplay",g),e.on("presentationUpdate",g),f&&e.on("timeupdate",g),e.on("dispose",function(){e.contentTitleElement&&(e.contentTitleElement.parentElement&&e.contentTitleElement.parentElement.removeChild(e.contentTitleElement),e.contentTitleElement=null)})})}(window.amp),function(a){"use strict";a.plugin("wallClockOverlay",function(){function b(){var a=c.getWallClockTime(null,d.useLocalTimeZone,d.timezone,d.controlBar12HourFormat,!1),b=['<div class="overlay-row">','<div class="title"><h4>'+this.htmlEncode(a)+"</h4></div>","</div>"];c.overlayElement&&(c.overlayElement.innerHTML=b.join(""))}var c=this,d=c.options_.wallClockTimeDisplaySettings,e=d?d.enabled:!1,f=a.bind(c,b);c.ready(function(){if(e){var b=a.createEl("div",{className:"amp-wall-clock-overlay",innerHTML:""});c.overlayElement=c.el().appendChild(b)}}),e&&c.on("timeupdate",f),c.on("dispose",function(){c.overlayElement&&(c.overlayElement.parentElement&&c.overlayElement.parentElement.removeChild(c.overlayElement),c.overlayElement=null)})})}(window.amp),function(a){"use strict";a.plugin("controlBarIcons",function(b){function c(a){for(var b=0;b<j.length;b++)if(a===j[b].name())return j[b];return null}function d(b,d){var f=d.replace("amp-controlbaricons-","");f="controlBarIcons"+(f[0].toUpperCase()+f.slice(1));for(var g=a.getComponent("Component"),h=new g(e,{name:f,el:a.createEl("div",{className:d})}),i=0;i<b.length;i++){var j=c(b[i]);j&&(h.addChild(j),e.controlBar.removeChild(j))}e.controlBar.addChild(h)}var e=this,f=b&&b.leftIcons?b.leftIcons:[],g=b&&b.middleIcons?b.middleIcons:[],h=b&&b.rightIcons?b.rightIcons:[],i=b?!!b.removeOtherIcons:!1,j=[];e.ready(function(){if(j=e.controlBar.children().slice(),i)for(var a=0;a<j.length;a++)e.controlBar.removeChild(j[a]);d(f,"amp-controlbaricons-left"),d(g,"amp-controlbaricons-middle"),d(h,"amp-controlbaricons-right")}),e.on("dispose",function(){setTimeout(function(){for(var a=0;a<j.length;a++)j[a]&&j[a].dispose&&(j[a].dispose(),j[a]=null)},0)})})}(window.amp);var AMP;!function(a){!function(){"use strict";var b=function(){function a(a,b){this.languageCode=a,this.languageName=b,this.files=[]}return a}(),c=function(){function c(a,b,c){this.mediaPlayer=a,this.player=b,this.playerElement=c,this.visible=!1,this.languagesInFiles={},this.languageCount=0,this.selectedFile=null}return c.prototype.options=function(c){var d,e,f,g=this.mediaPlayer.getIsoLangs(),h=this.visible;if(this.removeDialogElement(),!(c&&c instanceof Array))return void a.Logger.error(5,"Download plugin: downloadable media options are invalid.");for(this.languagesInFiles={},this.languageCount=0,d=0;d<c.length;d++){var i=c[d];i.lang&&"string"==typeof i.lang&&(e=null,f=null,g[i.lang]?(e=i.lang,f=g[i.lang]):(e=i.lang.split("-")[0],e&&g[e]&&(f=g[e])),e&&f&&(this.languagesInFiles[e]?this.languagesInFiles[e].files.push(i):(this.languagesInFiles[e]=new b(e,f),this.languagesInFiles[e].files.push(i),this.languageCount++)))}h&&this.languageCount>0&&this.show(),h&&0===this.languageCount&&this.closeCallback&&this.closeCallback()},c.prototype.show=function(){this.visible||(this.dialogElement||this.createDialogElement(),this.dialogElement.style.display="block",this.visible=!0,this.dialogElement.focus())},c.prototype.createDialogElement=function(){var b,c,d,e,f,g=this,h=this.playerElement.id,i=h+"_dlclose",j=h+"_dl",k=h+"_sel",l=h+"_dlglbl",m=h+"_dlgdesc";this.dialogElement=document.createElement("div"),this.dialogElement.style.display="none",this.dialogElement.className="amp-download-dialog",this.dialogElement.tabIndex=-1,this.dialogElement.setAttribute("role","dialog"),this.dialogElement.setAttribute("aria-labelledby",l),this.dialogElement.setAttribute("aria-describedby",m),this.dialogElement.onkeydown=function(a){27==a.keyCode&&g.hide()},c=this.dialogElement.appendChild(document.createElement("div")),c.setAttribute("role","document"),d=c.appendChild(document.createElement("div")),d.id=l,d.className="vjs-control-text",d.setAttribute("role","heading"),d.setAttribute("aria-level","1"),d.innerText=this.player.localize("Media Download Dialog"),e=c.appendChild(document.createElement("div")),e.id=m,e.className="vjs-control-text",e.innerText=this.player.localize("Media Download Description"),
f=c.appendChild(document.createElement("div")),f.className="outline-enabled",f.innerHTML="<div id='"+i+"' class='amp-download-close vjs-control outline-enabled-control' role='button' tabindex=0><span class='vjs-control-text'>"+this.player.localize("Close")+"</span></div><div class='amp-download-container'><div class='amp-download-header'><div class='amp-download-header-title'>"+this.player.localize("Download")+"</div></div><div class='amp-download-body'><div class='amp-download-left-col'><form></form></div><div class='amp-download-right-col'><label class='amp-download-label' for='"+k+"' >"+this.player.localize("Language")+"</label><select id='"+k+"'></select></div><div class='amp-clear'></div></div><div class='amp-download-footer'><a id='"+j+"' class='amp-download-button amp-download-disabled' download>"+this.player.localize("Download")+"</a></div></div>";var n=this.dialogElement.getElementsByTagName("form")[0],o=this.dialogElement.getElementsByTagName("select")[0];for(b in this.languagesInFiles)if(this.languagesInFiles.hasOwnProperty(b)){var p=this.languagesInFiles[b],q=document.createElement("option");q.value=b,q.innerText=p.languageName.nativeName,o.add(q)}o.selectedIndex=0,o.onchange=function(){g.refreshMediaList(n,o)},this.refreshMediaList(n,o),this.playerElement.appendChild(this.dialogElement),document.getElementById(i).onclick=function(){g.hide()},this.downloadButton=document.getElementById(j),this.downloadButton.onclick=function(){g.selectedFile&&a.Logger.verbose(5,"Download plugin: Starting download file: "+g.selectedFile.uri)}},c.prototype.removeDialogElement=function(){this.dialogElement&&(this.playerElement.removeChild(this.dialogElement),this.dialogElement=null),this.visible=!1},c.prototype.refreshMediaList=function(a,b){var c,d,e,f=this;for(this.unselectFile();a.firstChild;)a.removeChild(a.firstChild);if(b.selectedIndex>=0&&b[b.selectedIndex]&&(d=b[b.selectedIndex],e=this.languagesInFiles[d.value]))for(c=0;c<e.files.length;c++)!function(b){var c=document.createElement("input");c.type="radio",c.name="fileselect",c.onchange=function(){f.selectFile(e.files[b])};var d=document.createElement("label");d.className="amp-download-label",d.appendChild(c),d.appendChild(document.createTextNode(f.getLabel(e.files[b]))),a.appendChild(d)}(c)},c.prototype.hide=function(){this.visible&&(this.dialogElement.style.display="none",this.visible=!1,this.closeCallback&&this.closeCallback())},c.prototype.onClose=function(a){this.closeCallback=a},c.prototype.selectFile=function(a){this.selectedFile=a,this.downloadButton&&(this.downloadButton.className="amp-download-button",this.downloadButton.href=a.uri)},c.prototype.unselectFile=function(){this.selectedFile=null,this.downloadButton&&(this.downloadButton.className="amp-download-button amp-download-disabled",this.downloadButton.removeAttribute("href"))},c.prototype.getLabel=function(b){var d="";switch(b.type){case amp.downloadableMediaType.video:d=c.videoWithoutCCLabel;break;case amp.downloadableMediaType.videoWithCC:d=c.videoWithCCLabel;break;case amp.downloadableMediaType.audio:d=c.audioLabel;break;case amp.downloadableMediaType.transcript:d=c.transciptLabel;break;default:a.Logger.error(5,"Download plugin: Unrecognized media type: "+b.type),d=b.type}return d=this.player.localize(d),b.bitrate&&(d=d+", "+amp.utils.getBitrateByUnit(b.bitrate)),b.size&&(d=d+", "+amp.utils.getSizeByUnit(b.size)),d},c.videoWithCCLabel="Video with Closed Caption",c.videoWithoutCCLabel="Video without Closed Caption",c.audioLabel="Audio",c.transciptLabel="Transcript",c}(),d=function(){function a(a,b){this.mediaPlayer=a,this.player=b;var d="Download",e=a.getComponent("Button"),f="amp-download-control";a.DownloadButton=a.extend(e,{init:function(a,b){b=b||{},b.name="downloadButton",e.call(this,a,b),this.controlText(d),this.buttonText=d,this.dialogVisible=!1,this.dialog=null,this.pused=!1,this.el_.setAttribute("style","cursor:pointer"),this.el_.setAttribute("title",this.localize("Download"))}}),a.DownloadButton.prototype.buildCSSClass=function(){return f+" "+e.prototype.buildCSSClass.call(this).trim()},a.DownloadButton.prototype.handleClick=function(){var b=this;this.dialog||(this.dialog=new c(a,this.player_,this.player_.el()),this.dialog.onClose(function(){b.dialogVisible=!1,b.paused&&(b.player_.play(),b.paused=!1)}),this.dialog.options(this.player_.downloadableMedia())),this.dialogVisible?(this.dialog.hide(),this.dialogVisible=!1):(this.dialog.show(),this.dialogVisible=!0,this.player_.paused()||(this.player_.pause(),this.paused=!0))},a.registerComponent("DownloadButton",a.DownloadButton),b.ready(function(){var c=new a.DownloadButton(b),d=b.downloadableMedia();b.controlBar.downloadButton=b.controlBar.addChild(c),d&&d instanceof Array&&0!==d.length||(b.controlBar.downloadButton.el().style.display="none"),b.addEventListener("play",function(){b.controlBar.downloadButton.dialogVisible&&b.pause()});var e=function(){var a=b.downloadableMedia(),c=!!a&&a instanceof Array&&a.length>0;b.controlBar.downloadButton.dialog&&b.controlBar.downloadButton.dialog.options(a),c?b.addClass("amp-showing-download-control"):b.removeClass("amp-showing-download-control")};b.addEventListener("downloadableMediaChanged",e),e()})}return a}();!function(a,b){amp.plugin("download",function(){new d(b,this)})}(window,window.amp)}(a.Plugins||(a.Plugins={}));a.Plugins}(AMP||(AMP={})),function(a){"use strict";a.plugin("live",function(b){function c(){f(),w.currentTime(w.duration()),F=!1}function d(){w.isLive()?(G="LowLatency"===w.currentHeuristicProfile()&&"AzureHtml5JS"===w.currentTechName(),G&&(D=0,F=!1,B=C,w.addEventListener(amp.internalEventName.currentTimeChanging,k)),w.addEventListener(a.eventName.seeked,l),w.addEventListener(a.eventName.seeking,l),w.addEventListener(a.eventName.timeupdate,j),u(),o()):(w.removeEventListener(a.eventName.seeked,l),w.removeEventListener(a.eventName.seeking,l),w.removeEventListener(a.eventName.timeupdate,j),t(),v()),G||(B=A,w.removeEventListener(amp.internalEventName.currentTimeChanging,k))}function e(){"Html5"==w.currentTechName()&&w.isLive()&&(u(),o())}function f(){w.canControlPlaybackRate()&&w.playbackRate()>1&&h()}function g(){w.canControlPlaybackRate()&&w.playbackRate()<1&&h()}function h(){w.playbackRate(1),H=!0,I=1,K=!1,L=!1,M=!1,w.one(a.eventName.timeupdate,l)}function i(){w.canControlPlaybackRate()&&I!==w.playbackRate()&&(H=!1,F=!0)}function j(){if(w.isLive()){var b=m();b?(t(),q(),G&&setTimeout(function(){!w.paused()&&!F&&Date.now()-D>E&&(AMP.Logger.warning(AMP.Logger.Area.plugin,"amplive plugin: player drifted from live edge. Attempting to move to live edge.."),D=0,c())},50),!H&&n()&&g()):(G&&0==D&&(D=Date.now()),H||f())}else w.removeEventListener(a.eventName.seeked,l),w.removeEventListener(a.eventName.seeking,l),w.removeEventListener(a.eventName.timeupdate,j),t(),v()}function k(a,b){b.time<w.duration()&&(F=!0,D=0)}function l(){w.isLive()&&(m()?(t(),q()):(o(),p()))}function m(){var a=w.currentPlayerSettingValue("livePlaybackOffsetInWallClockSec");return w.currentTime()<w.duration()-B-a}function n(){return w.currentTime()<J}function o(){var a=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),b=w.currentTechName().toUpperCase();(!a||"HTML5FAIRPLAYHLS"!==b&&"HTML5"!==b)&&w.addClass(z)}function p(){K||(K=!0,L=!1,M=!1,w.trigger(a.internalEventName.playingAtLiveDVREdge))}function q(){n()?r():s()}function r(){M||(K=!1,L=!1,M=!0,w.trigger(a.internalEventName.playingAtStartDVREdge))}function s(){L||(K=!1,L=!0,M=!1,w.trigger(a.internalEventName.playingInDVR))}function t(){w.removeClass(z)}function u(){var a=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),b=w.currentTechName().toUpperCase();(!a||"HTML5FAIRPLAYHLS"!==b&&"HTML5"!==b)&&(w.controlBar.liveDisplay.addClass(y),w.controlBar.liveDisplay.show())}function v(){w.controlBar.liveDisplay.removeClass(y),w.controlBar.liveDisplay.hide()}var w=this,x=b&&b.controlText?b.controlText:"LIVE",y="amp-live-control",z="amp-live-on",A=5,B=A,C=2,D=0,E=3e4,F=!1,G=!1,H=!1,I=1,J=5,K=!1,L=!1,M=!1,N=a.getComponent("Component");a.LiveEdgeProgressBar=a.extend(N,{init:function(a,b){N.call(this,a,b)}}),a.LiveEdgeProgressBar.prototype.createEl=function(){return a.createEl("div",{className:"amp-live-edge-progress",tabIndex:0})},a.registerComponent("LiveEdgeProgressBar",a.LiveEdgeProgressBar);var O=function(){m()&&c()};w.ready(function(){w.addEventListener(a.eventName.ratechange,i),w.addEventListener(a.eventName.loadedmetadata,d),w.addEventListener(a.eventName.durationchange,e),w.controlBar.liveDisplay.off(w,"durationchange",w.controlBar.liveDisplay.updateShowing);var b=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),c=w.currentTechName().toUpperCase();(!b||"HTML5FAIRPLAYHLS"!==c&&"HTML5"!==c)&&w.controlBar.liveDisplay.setClickHandler(O);var f=a.createEl("div",{className:"amp-livetimeindicator",innerHTML:this.htmlEncode(this.localize(x))});w.controlBar.currentTimeDisplay.el().appendChild(f)})})}(window.amp),function(a){"use strict";a.plugin("logo",function(b){var c=b.enabled,d=b.opacity,e="https://microsoft.com",f=b.targetUrl,g="amp-logo",h=a.getComponent("Component");a.Logo=a.extend(h,{init:function(a,b){h.call(this,a,b)}}),a.Logo.prototype.createEl=function(){var b,c="/skins/amp-default/assets/icons/amslogo.svg",g=a.getComponent("Player"),h=window.document.body.className.includes("high-contrast-enabled");if(f){var i,j=a.decodeURL(f);i=j.hierarchical.match(/^((ftp:\/\/)|(javascript:))/i)?e:j.hierarchical.match(/^(https?:)?\/\//i)?a.encodeURL(j):a.createEl("div",{innerHTML:'<a href="'+a.encodeURL(j)+'"></a>'}).firstChild.href,b=(amp.browser.IS_FIREFOX||amp.browser.IS_IE11||amp.browser.IS_EDGE)&&h?a.createEl("span",{innerHTML:'<img src="'+g.getScriptRootURL()+c+'"><a target="_blank" href="'+i+'"></a>'}):a.createEl("span",{innerHTML:'<a target="_blank" href="'+i+'"></a>'})}else b=(amp.browser.IS_FIREFOX||amp.browser.IS_IE11||amp.browser.IS_EDGE)&&h?a.createEl("div",{innerHTML:'<img src="'+g.getScriptRootURL()+c+'">'}):a.createEl("div");return b.style.opacity=d,this.container=b,b},a.registerComponent("Logo",a.Logo),this.ready(function(){var b=this;if(c&&b.el().getElementsByClassName(g).length>0){var d=new a.Logo(b);b.el().getElementsByClassName(g)[0].appendChild(d.el()),b.on("dispose",function(){d.dispose()})}})})}(window.amp),function(a){"use strict";a.plugin("moreOptions",function(b){function c(a,b){if(t=b,b){for(var c=0;c<o.length;c++)o[c].control.el().tabIndex=-1,o[c].control.addClass("amp-control-disabled");a.controlBar.moreOptionsButton.el().tabIndex=0,a.controlBar.moreOptionsButton.removeClass("amp-control-disabled"),a.controlBar.moreOptionsButton.el().setAttribute("aria-hidden","false")}else{for(var c=0;c<o.length;c++)o[c].control.el().tabIndex=0,o[c].control.removeClass("amp-control-disabled"),o[c].control.menu&&(o[c].control.el().style.position="",o[c].control.el().style.left="");a.controlBar.moreOptionsButton.el().tabIndex=-1,a.controlBar.moreOptionsButton.addClass("amp-control-disabled"),a.controlBar.moreOptionsButton.el().setAttribute("aria-hidden","true")}a.toggleClass("amp-showing-more-options-button",b)}function d(a){a.controlBar.moreOptionsButton.menu.el().style.display="";for(var b=0;b<o.length;b++)o[b].control.menu&&(o[b].control.menu.el().style.display="")}function e(a){var b=function(b,c){for(var d=0;d<b.length;d++){var e=a.controlBar[b[d]];e&&e.el()&&c.push({control:e,text:e.buttonText,className:e.el().className})}};return o=[],b(l,o),b(a.options_.plugins.moreOptions.controls,o),o}function f(a){var b=a.controlBar.el();s={left:b.querySelector(".amp-controlbaricons-left"),middle:b.querySelector(".amp-controlbaricons-middle"),right:b.querySelector(".amp-controlbaricons-right")},h=s.right.offsetWidth;var d=window.getComputedStyle(s.middle);k=parseInt(d.minWidth,10),isNaN(k)&&(k=0),s.middle.style.minWidth="0",p=[];for(var e=0;e<o.length;e++)o[e].control.hasClass("vjs-hidden")||p.push(o[e]);p.length>1?(a.addThrottledWindowResizeListener(function(){g(a)},r),g(a)):c(a,!1)}function g(a){if(0==a.controlBar.width())c(a,a.width()<k);else if(null!==s){var b=s.middle.offsetWidth;t&&(b=s.middle.offsetWidth-(h-s.right.offsetWidth)),c(a,k+1>b)}}var h,i=a.getComponent("Component"),j=this,k=0,l=b&&b.controls?b.controls:[],m=b&&b.menuTitle?b.menuTitle:"More Options",n="amp-moreoptions-control",o=[],p=[],q=Date.now(),r=200,s=null,t=!1,u=a.getComponent("MenuItem");a.MoreOptionsMenuItem=a.extend(u,{init:function(a,b){var c={label:b.text,value:b.value,selected:b.selected};u.call(this,a,c),this.control=b.control,this.addClass("amp-menu-item"),b.className.split(" ").forEach(function(a){this.addClass(a)},this),this.control.menu&&this.control.menu.on("mouseleave",function(){this.el().style.display=""})}}),a.MoreOptionsMenuItem.prototype.handleClick=function(){this.control.handleClick(),q=Date.now()},a.registerComponent("MoreOptionsMenuItem",a.MoreOptionsMenuItem);var v=a.getComponent("MenuButton");a.MoreOptionsButton=a.extend(v,{init:function(b,c){if(c=c||{},c.name="moreOptionsButton",c.needTextControl=!1,v.call(this,b,c),b.addEventListener(amp.eventName.loadedmetadata,a.bind(this,function(){this.refresh()})),this.on("mouseover",function(){d(b)}),this.items.length>0){var e=new i(b,{el:a.createEl("li",{className:"amp-menu-header",innerHTML:this.htmlEncode(this.localize(m)),tabindex:-1})});this.menu.prependItem(e)}this.el().tabIndex=-1,this.addClass("amp-control-disabled"),this.el().setAttribute("aria-hidden","true"),this.el().setAttribute("aria-label","More Options"),this.el().setAttribute("title",this.localize("More Options")),this.el().setAttribute("role","presentation")}}),a.MoreOptionsButton.prototype.buttonText=m,a.MoreOptionsButton.prototype.createItems=function(){for(var b=e(this.player_)||[],c=[],d=0;d<b.length;d++){var f=new a.MoreOptionsMenuItem(this.player_,b[d]);c.push(f)}return c},a.MoreOptionsButton.prototype.buildCSSClass=function(){return n+" "+v.prototype.buildCSSClass.call(this)},a.MoreOptionsButton.prototype.refresh=function(){if(this.removeChild(this.menu),null!=this.menu&&this.menu.dispose(),this.menu=this.createMenu(),this.addChild(this.menu),this.items.length>0){var b=new i(this.player_,{el:a.createEl("li",{className:"amp-menu-header",innerHTML:this.htmlEncode(this.localize(m)),tabindex:-1})});this.menu.prependItem(b)}},a.MoreOptionsButton.prototype.hasJustBeenClicked=function(){return Date.now()-q<500},a.MoreOptionsButton.prototype.onClick=function(a){this.hasJustBeenClicked()||v.prototype.onClick.call(this,a)},a.MoreOptionsButton.prototype.isSubMenuVisible=function(){var a=this,b=this.player_.controlBar;if(b)for(var c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++)if(b[c[d]]!==a&&b[c[d]].el_&&b[c[d]].el_.className&&-1!==b[c[d]].el_.className.indexOf("vjs-menu-button")&&b[c[d]].buttonPressed_)return!0;return!1},a.MoreOptionsButton.prototype.vjsHandleMouseLeave=a.MoreOptionsButton.prototype.handleMouseLeave,a.MoreOptionsButton.prototype.handleMouseLeave=function(){this.isSubMenuVisible()||this.vjsHandleMouseLeave()},a.registerComponent("MoreOptionsButton",a.MoreOptionsButton),j.ready(function(){var d=new a.MoreOptionsButton(j,b);j.controlBar.moreOptionsButton=j.controlBar.addChild(d),j.addEventListener(amp.eventName.loadedmetadata,function(){f(j)}),j.on("fullscreenchange",function(){c(j,j.controlBar.width()<k)}),j.on("visibilityChange",function(){g(j)}),j.on("dispose",function(){s=null})})})}(window.amp),function(a){"use strict";a.plugin("quality",function(b){function c(a){var b=a.player_.controlBar.qualityButton,c=k,d=b.items.indexOf(a);if(c!==d){b.items[c].selected(!1),a.selected(!0),k=d,e(b,d);var f=a.player_.currentVideoStreamList(),g=f.selectedIndex,h=f.streams[g].tracks;f.streams[g].selectTrackByIndex(0==k?-1:h.length-k)}}function d(b){var c=b.currentVideoStreamList();if(c&&0!==c.streams.length){var d=c.selectedIndex,e=c.streams[d].tracks,f=[];f[0]={text:m,selectable:!0};for(var g=1;g<=e.length;g++){var h=e[e.length-g].bitrate;f[g]={text:e[e.length-g].height+"p-"+a.utils.getBitrateByUnit(h),selectable:e[e.length-g].selectable}}return k>=0&&k<f.length&&(f[k].selected=!0),f}}function e(a,b){if(0==b)d=4;else{var c=a.items[b].options_.label.split("-")[0].replace("p",""),d=4;d=c>720?4:720>=c&&c>480?3:480>=c&&c>360?2:1}var e=a.el().className.match(/quality-\d/);a.el().className=a.el().className.replace(e,"quality-"+d)}function f(){this.refresh(),g(this.player_)}function g(b){var c=b.currentVideoStreamList();if(c&&c.streams)for(var d=0;d<c.streams.length;d++)c.streams[d].addEventListener(amp.streamEventName.trackselected,a.bind(b,h))}function h(){var a=this.controlBar.qualityButton,b=this.currentVideoStreamList();if(b){for(var c=b.selectedIndex,d=b.streams[c].tracks,f=-1,g=0,h=0;h<d.length;h++)d[h].selectable&&(f=h,g++);var i=-1;i=g>1?0:d.length-f,i!==k&&(k<a.items.length&&a.items[k].selected(!1),k=i,a.items[k].selected(!0),e(a,k))}}var i=this,j=b&&b.menuTitle?b.menuTitle:"Quality",k=b&&b.selectedItem?b.selectedItem:0,l="amp-quality-control",m=b&&b.autoMenuItemLabel?b.autoMenuItemLabel:"Auto",n=a.getComponent("MenuItem");a.QualityMenuItem=a.extend(n,{init:function(a,b){var c={label:b.text,value:b.value,selected:b.selected,selectable:b.selectable};n.call(this,a,c),this.addClass("amp-menu-item")}}),a.QualityMenuItem.prototype.handleClick=function(){c(this)},a.registerComponent("QualityMenuItem",a.QualityMenuItem);var o=a.getComponent("MenuButton");a.QualityButton=a.extend(o,{init:function(b,c){if(c=c||{},c.name="qualityButton",c.needTextControl=!1,o.call(this,b,c),b.addEventListener("loadedmetadataInternal",a.bind(this,f)),void 0!=this.items&&this.items.length>0){var d=a.getComponent("Component"),e=new d(b,{el:a.createEl("li",{className:"amp-menu-header",innerHTML:this.htmlEncode(this.localize(j)),tabindex:-1})});this.menu.prependItem(e),this.el().className+=" quality-"+(4-k)}else this.hide()}}),a.QualityButton.prototype.buttonText=j,a.QualityButton.prototype.createItems=function(){for(var b=d(this.player_)||[],c=[],e=0;e<b.length;e++){var f=new a.QualityMenuItem(this.player_,b[e]);c.push(f)}return c},a.QualityButton.prototype.buildCSSClass=function(){return l+" "+o.prototype.buildCSSClass.call(this)},a.registerComponent("QualityButton",a.QualityButton),i.ready(function(){var b=new a.QualityButton(i,{selectedItemIndex:k});i.controlBar.qualityButton=i.controlBar.addChild(b),i.controlBar.qualityButton.el_.setAttribute("aria-label","Video Quality Menu"),i.controlBar.qualityButton.el_.setAttribute("title",this.localize("Video Quality")),i.controlBar.qualityButton.el_.setAttribute("role","presentation")}),a.QualityButton.prototype.refresh=function(){if(this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=this.createMenu(),this.addChild(this.menu),void 0!=this.items&&this.items.length>0){var b=a.getComponent("Component"),c=new b(i,{el:a.createEl("li",{className:"amp-menu-header",innerHTML:this.htmlEncode(this.localize(j)),tabindex:-1})});this.menu.prependItem(c),null==this.el().className.match(/quality-\d/)&&(this.el().className+=" quality-"+(4-k)),this.show()}else this.hide()}})}(window.amp),function(a){"use strict";a.plugin("subtitles",function(b){var c=this,d=b&&b.menuTitle?b.menuTitle:"Subtitles",e=b&&b.offMenuItemLabel?b.offMenuItemLabel:"Off";c.addEventListener(amp.eventName.loadedmetadata,function(){c.controlBar.subtitlesButton.el().className+=" amp-subtitles-control",c.controlBar.subtitlesButton.menu.children()[0].el().innerHTML=this.htmlEncode(this.localize(e)),c.controlBar.subtitlesButton.buttonText=d;var b=a.getComponent("Component"),f=new b(c,{el:a.createEl("li",{className:"amp-menu-header",innerHTML:this.htmlEncode(this.localize(d)),tabindex:-1})});c.controlBar.subtitlesButton.menu.prependItem(f)})})}(window.amp),function(a){"use strict";a.plugin("outline",function(a){function b(a){a.clientX&&0!==a.clientX&&a.clientY&&0!==a.clientY&&i.removeClass(n)}function c(a){a.classList.add(o),a.removeEventListener("click",b),a.addEventListener("click",b),i.on("dispose",function(){a.removeEventListener("click",b)})}function d(){for(var a=i.el().querySelectorAll(k),b=0;b<a.length;b++)c(a[b]);if(j)for(var d=i.controlBar.el().querySelectorAll(m),b=0;b<d.length;b++)c(d[b]);e()}function e(){var a=i.el().querySelector(l);null!==a&&(a.classList.add(o),a.removeEventListener("mousedown",g),a.addEventListener("mousedown",g),i.on("dispose",function(){var a=i.el().querySelector(l);a&&a.removeEventListener("mousedown",g)}))}function f(){i.addClass(n),d()}function g(){b(),i.controls()&&(i.paused()?i.play():i.pause())}function h(){i.addClass(n),p&&(p=!1,d())}var i=this,j=!!a&&!!a.displayOnMenuItems,k=".vjs-control",l=".vjs-fullscreen-outline",m=".vjs-menu-item",n="outline-enabled",o="outline-enabled-control",p=!0;i.ready(function(){f(),i.controlBar.on("keydown",h)}),i.on("sourceset",function(){p=!0})})}(window.amp),function(a){"use strict";a.plugin("ampV2timelineMarkers",function(b){function c(){!f.isDisposed()&&f.duration()>0&&(j=f.duration(),d(),e(),f.isLive()&&g&&g.length>0&&setTimeout(c,1e3))}function d(){for(var a=0;a<k.length;a++)f.controlBar.progressControl.seekBar.removeChild(k[a]);k=[]}function e(){for(var b=0;b<g.length;b++){var c=new a.Marker(f,g[b]);c.el().tabIndex=0,k.push(c),f.controlBar.progressControl.seekBar.addChild(c)}}var f=this,g=b&&b.markers?b.markers:[],h="#ffd800",i="amp-timeline-marker",j=0,k=[],l=a.getComponent("Button"),m=a.getComponent("Component");a.Marker=a.extend(l,{init:function(a,b){var c=a.duration(),d=b.time>0?b.time:0,e=b.color?b.color:h;l.call(this,a,videojs.mergeOptions({el:m.prototype.createEl.call(this,"div",{innerHTML:" ",className:i})},b)),d=a.currentTime()+d-a.currentMediaTime();var f=d/c*100;f>0&&100>f&&(this.el_.style.left=d/c*100+"%",this.el_.style.backgroundColor=e,this.on("click",this.onClick))}}),a.Marker.prototype.onClick=function(){this.player().currentTime(this.options().time)},f.ready(function(){g&&(c(),f.on("sourceset",function(){g=[],d()}),f.on("midrollAdded",function(){if(this.scheduler){var a=this.scheduler.getMidRolls();if(a){g=[];for(var b=0;b<a.length;b++)g.push({time:a[b].splice.startOffset});c()}}}))})})}(window.amp),function(a){"use strict";a.plugin("ampVolumeMenuButton",function(b){var c=this,d=0/0,e=b.hideVolumeBarOnInActivity;void 0===e&&(e=!0);var f=a.getComponent("MuteToggle");a.AmpVolumeMenuButton=a.extend(f,{init:function(a,b){b=b||{},b.name="ampVolumeMenuButton",f.call(this,a,b),this.buttonTouched=!1}}),a.AmpVolumeMenuButton.prototype.clearOtherMenus=function(){this.volumeControl.buttonPressed_&&this.volumeControl.unpressButton(),f.prototype.clearOtherMenus.call(this)},a.AmpVolumeMenuButton.prototype.setVolumeControl=function(a){this.volumeControl=a},a.AmpVolumeMenuButton.prototype.handleClick=function(){this.clearOtherMenus(),this.buttonTouched=!this.buttonTouched,this.buttonTouched&&this.volumeControl.trigger("mouseover"),f.prototype.handleClick.call(this)};var g=a.getComponent("TooltipClickable");a.VolumeControl=a.extend(g,{init:function(b,c){c=c||{},c.name="volumeControl",c.el=a.createEl("div",{className:"vjs-volume-control"}),g.call(this,b,c),this.el_.setAttribute("title",this.localize("volume level")),this.on(b,"loadstart",function(){var a=!1;if(b.tech_.featuresVolumeControl===!1)a=!0;else if("HTML5FAIRPLAYHLS"===b.currentTechName().toUpperCase()||"HTML5"===b.currentTechName().toUpperCase()&&("video/mp4"===b.currentType()||"audio/mp3"===b.currentType()));else{var c=b.currentAudioStreamList();c&&c.streams&&0!==c.streams.length||(a=!0)}a?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),this.createChildElements(),this.setUpEventHandlers()}}),a.VolumeControl.prototype.setUpEventHandlers=function(){var a=this;this.on("mouseover",function(){a.handleMouseOver()}),this.on("mouseleave",function(){a.handleMouseLeave()}),this.on(c,this.volumeBar.playerEvent,function(){a.updateVolumeHandle()})},a.VolumeControl.prototype.createChildElements=function(){this.createVolumeMenuButton(),this.createVolumeBar()},a.VolumeControl.prototype.createVolumeMenuButton=function(){var d=new a.AmpVolumeMenuButton(c,b);this.ampVolumeMenuButton=this.addChild(d),d.setVolumeControl(this)},a.VolumeControl.prototype.unpressButton=function(){this.popUp.unlockShowing(),this.el_.setAttribute("aria-expanded","false"),this.buttonPressed_=!1},a.VolumeControl.prototype.pressButton=function(){this.ampVolumeMenuButton.clearOtherMenus(),this.popUp.lockShowing(),this.el_.setAttribute("aria-expanded","true"),this.buttonPressed_=!0,this.volumeBar.el().focus()},a.VolumeControl.prototype.handleMouseLeave=function(){this.unpressButton()},a.VolumeControl.prototype.handleMouseOver=function(){this.pressButton()},a.VolumeControl.prototype.handleFocusOnVolumeBar=function(){this.pressButton()},a.VolumeControl.prototype.createVolumeBar=function(){var d=a.getComponent("Popup"),e=new d(c,{contentElType:"div"}),f=a.getComponent("VolumeBar"),g=new f(c,b||{}),h=this.createVolumeSliderHandle();g.el_.appendChild(h),g.on("focus",function(){c.controlBar.volumeControl.handleFocusOnVolumeBar()}),this.volumeBar=e.addChild(g),this.popUp=this.addChild(e),this.volumeHandle=h,this.volumeBar.el().tabIndex=-1},a.VolumeControl.prototype.updateVolumeHandle=function(){var a=this.volumeBar;if(a.bar&&a.bar.el_){var c;b&&b.vertical===!1?(this.volumeHandle.style.left=a.bar.el_.style.width,c=this.volumeHandle.style.left):(this.volumeHandle.style.top=a.bar.el_.style.height,c=this.volumeHandle.style.top),this.volumeHandle.innerHTML='<span class="vjs-control-text">'+c+"</span>"}"off"===this.ampVolumeMenuButton.el_.getAttribute("aria-live")&&this.ampVolumeMenuButton.el_.setAttribute("aria-live","polite")},a.VolumeControl.prototype.createVolumeSliderHandle=function(){var b=a.getComponent("Component"),c=b.prototype.createEl.call(this,"div",{className:"vjs-volume-handle vjs-control"});return c},a.registerComponent("AmpVolumeMenuButton",a.AmpVolumeMenuButton),a.registerComponent("VolumeControl",a.VolumeControl),c.ready(function(){var b=new a.VolumeControl(c,{});c.controlBar.volumeControl=c.controlBar.addChild(b);var f=c.controlBar.volumeControl,g=function(){isNaN(d)||(clearTimeout(d),d=0/0)};e&&(c.on("userinactive",function(){f.popUp&&f.volumeBar.el_===document.activeElement&&(g(),d=setTimeout(function(){f.volumeBar.el_!==document.activeElement||c.userActive()||f.ampVolumeMenuButton.el().focus()},1e3)),f.el_.setAttribute("aria-expanded","false"),f.el_.setAttribute("aria-hidden","true")}),c.on("useractive",g)),f.updateVolumeHandle(),this.one(c,"timeupdate",function(){f.volumeBar.update(),f.updateVolumeHandle()})})})}(window.amp),function(a){"use strict";a.plugin("playbackSpeed",function(b){function c(){v.sort(function(a,b){return b.value-a.value})}function d(){for(var a=0;a<v.length;a++)if(1===v[a].value)return;v.push({selected:!1,name:t.htmlEncode(t.localize("1.0x")),value:1})}function e(){f(function(){return!0})}function f(a){for(w=[],B=0;B<v.length;B++)v[B].name&&v[B].value>=.5&&v[B].value<=4&&a(v[B].value)&&w.push({selected:!1,name:v[B].name,value:v[B].value})}function g(){f(function(a){return 1>=a})}function h(){f(function(a){return a>=1})}function i(){d(),c(),e()}function j(a,b){b.canControlPlaybackRate()&&b.playbackRate(a)}function k(a){var b=a.controlBar.playbackSpeedButton.currentSpeedIndex||0===a.controlBar.playbackSpeedButton.currentSpeedIndex?w[a.controlBar.playbackSpeedButton.currentSpeedIndex].value:1;a.controlBar.playbackSpeedButton.removeClass(y),a.controlBar.playbackSpeedButton.removeClass(z),a.controlBar.playbackSpeedButton.removeClass(A),a.controlBar.playbackSpeedButton.addClass(b>1?z:1>b?A:y)}function l(a,b,c,d){var e=c||a.player_,f=e.controlBar.playbackSpeedButton,g=e.controlBar.playbackSpeedButton.currentSpeedIndex,h=o(b||a.options().value);null===h||!d&&g===h||(m(f),f.items[h].selected(!0),n(f,h),j(w[h].value,e),e.controlBar.playbackSpeedButton.currentSpeedIndex=h,k(e))}function m(a){for(var b=0;b<a.items.length;b++)a.items[b].selected(!1)}function n(a,b){1===w[b].value}function o(a){for(var b=0;b<w.length;b++)if(Math.abs(w[b].value-a)<.001)return b;return null}var p=a.getComponent("Component"),q=a.getComponent("MenuItem"),r=a.getComponent("MenuButton");if(b&&b.enabled){var s,t=this,u=[{name:"2.0x",value:2},{name:"1.0x",value:1},{name:"0.5x",value:.5}],v=b.speedLevels?b.speedLevels.slice(0):u.slice(0),w=[],x="Playback Speed",y="amp-playbackspeed-control-normal",z="amp-playbackspeed-control-fast",A="amp-playbackspeed-control-slow",B=0;i();var C=b.initialSpeed?b.initialSpeed:1;s=o(C),null==s&&AMP.Logger.error(AMP.Logger.Area.plugin,"PlaybackSpeed plugin: cannot identify speed index for initial speed."),a.PlaybackSpeedMenuItem=a.extend(q,{init:function(a,b){var c={label:b.name,value:b.value,selected:b.selected,selectable:!0};q.call(this,a,c),this.addClass("amp-menu-item"),this.on("click",this.handleClick),this.value=b.value}}),a.PlaybackSpeedMenuItem.prototype.handleClick=function(){l(this)},a.registerComponent("PlaybackSpeedMenuItem",a.PlaybackSpeedMenuItem),a.PlaybackSpeedButton=a.extend(r,{init:function(b,c){c=c||{},c.name="playbackSpeedButton",r.call(this,b,c),b.addEventListener(a.eventName.loadedmetadata,a.bind(this,a.PlaybackSpeedButton.prototype.refresh));var d=new p(b,{el:a.createEl("li",{className:"amp-menu-header",innerHTML:this.htmlEncode(this.localize(x)),tabindex:-1})});this.menu.prependItem(d),b.canControlPlaybackRate()?(this.addDVRPlaybackEventCallbacks(),this.show()):this.hide()}}),a.PlaybackSpeedButton.prototype.addDVRPlaybackEventCallbacks=function(){var b=this;t.addEventListener(a.internalEventName.playingAtLiveDVREdge,function(){b.handleLiveEdgePlayback()}),t.addEventListener(a.internalEventName.playingAtStartDVREdge,function(){b.handleStartEdgePlayback()}),t.addEventListener(a.internalEventName.playingInDVR,function(){b.handlePlayingInDVR()})},a.PlaybackSpeedButton.prototype.buttonText=x,a.PlaybackSpeedButton.prototype.createItems=function(){for(var b=[],c=0;c<w.length;c++){var d=new a.PlaybackSpeedMenuItem(this.player_,w[c]);b.push(d)}return b},a.PlaybackSpeedButton.prototype.buildCSSClass=function(){return y+" "+r.prototype.buildCSSClass.call(this).trim()},a.PlaybackSpeedButton.prototype.refresh=function(){this.player_.canControlPlaybackRate()?this.show():this.hide()},a.PlaybackSpeedButton.prototype.setInitialValues=function(){this.player_.controlBar.playbackSpeedButton.currentSpeedIndex=s,this.player_.controlBar.playbackSpeedButton.el_.setAttribute("aria-label","Playback Speed"),this.player_.controlBar.playbackSpeedButton.el_.setAttribute("title",this.localize("Playback Speed")),this.player_.controlBar.playbackSpeedButton.el_.setAttribute("role","presentation"),k(this.player_)},a.PlaybackSpeedButton.prototype.handleLiveEdgePlayback=function(){g(),this.updateMenuItemsAndUi()},a.PlaybackSpeedButton.prototype.handleStartEdgePlayback=function(){h(),this.updateMenuItemsAndUi()},a.PlaybackSpeedButton.prototype.handlePlayingInDVR=function(){e(),this.updateMenuItemsAndUi()},a.PlaybackSpeedButton.prototype.updateMenuItemsAndUi=function(){this.update(),this.selectMenuItemWithValue(this.player_.playbackRate())},a.PlaybackSpeedButton.prototype.selectMenuItemWithValue=function(a){for(var b=0;b<this.items.length;b++)this.items[b].selected(this.items[b].value===a?!0:!1)},a.registerComponent("PlaybackSpeedButton",a.PlaybackSpeedButton),t.on("sourceset",function(){t.controlBar.playbackSpeedButton&&(i(),t.controlBar.playbackSpeedButton.updateMenuItemsAndUi())}),t.ready(function(){var b=new a.PlaybackSpeedButton(t);t.controlBar.playbackSpeedButton=t.controlBar.addChild(b),t.controlBar.playbackSpeedButton.setInitialValues(),t.addEventListener(amp.eventName.ratechange,function(){t.canControlPlaybackRate()&&l(void 0,t.playbackRate(),t)}),null!==s&&t.addEventListener(amp.eventName.loadeddata,function(){t.playbackRate(C)}),l(void 0,t.playbackRate(),t,!0)})}})}(window.amp),amp.AmpSkinPlugin=amp.extend(amp.getComponent("Component"),{init:function(a){"use strict";var b=a.options_.logo,c=b&&void 0!==b.enabled?b.enabled:!0,d=b&&b.opacity?b.opacity:.5,e=b&&b.targetUrl?b.targetUrl:null,f=(b&&b.horizontalPosition?b.horizontalPosition:"left",
b&&b.verticalPosition?b.verticalPosition:"top",{contentTitle:{title:a.options_.title||"",description:a.options_.description||""},wallClockOverlay:{},logo:{enabled:c,opacity:d,targetUrl:e},responsive:{sizeClasses:a.options_.sizeClasses||{}},live:{controlText:"LIVE"},ampAudioTracks:{menuTitle:"Audio Tracks"},closedCaption:{menuTitle:"Closed Captioning"},subtitles:{menuTitle:"Subtitles",offMenuItemLabel:"Off"},quality:{menuTitle:"Quality",selectedItem:0},playbackSpeed:a.options_.playbackSpeed||{enabled:!1},download:a.options_.download||{},ampVolumeMenuButton:{vertical:!0,hideVolumeBarOnInActivity:!0},moreOptions:{controls:["qualityButton","captionsButton","subtitlesButton","audioTracksButton","castToDeviceButton","shareButton","playbackSpeedButton","downloadButton","nextTrackButton","skipForwardButton","fastForwardButton","rewindButton","skipBackwardButton","previousTrackButton"]},controlBarIcons:{leftIcons:["playToggle","previousTrackButton","skipBackwardButton","rewindButton","fastForwardButton","skipForwardButton","nextTrackButton","playbackRateMenuButton","liveDisplay","chaptersButton"],middleIcons:["liveIndicator","currentTimeDisplay","progressControl","timeDivider","durationDisplay","remainingTimeDisplay"],rightIcons:["shareButton","playbackSpeedButton","downloadButton","castToDeviceButton","audioTracksButton","subtitlesButton","captionsButton","qualityButton","volumeControl","moreOptionsButton","fullscreenToggle"],removeOtherIcons:!1},outline:{displayOnMenuItems:!0},ampV2timelineMarkers:{}});a.options_.plugins.moreOptions={controls:[]},Object.getOwnPropertyNames(f).forEach(function(b){a[b]&&a[b](f[b])}),a.addEventListener(amp.eventName.loadedmetadata,function(){var b=a.controlBar.options();b.children.volumeMenuButton&&b.children.volumeMenuButton.volumeBar&&b.children.volumeMenuButton.volumeBar.vertical&&a.addClass("amp-vertical-volume-slider")})}}),amp.AmpSkinPlugin.prototype.dispose=function(){},amp.registerComponent("AmpSkinPlugin",amp.AmpSkinPlugin),amp.getComponent("ControlBar").prototype.options_={loadEvent:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},subtitlesButton:{},captionsButton:{},chaptersButton:{},ampSkinPlugin:{}}},function(a){"use strict";window.videojs_hotkeys={version:"0.2.16"};var b=function(b){function c(a){return 32===a.which||179===a.which}function d(a){return 37===a.which||177===a.which}function e(a){return 39===a.which||176===a.which}function f(a){return 38===a.which}function g(a){return 40===a.which}function h(a){return 77===a.which}function i(a){return 70===a.which}var j=this,k=j.el(),l=document,m={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,enableModifiersForNumbers:!0,enableSeek:!0,enablePlayPause:!0,playPauseKey:c,rewindKey:d,forwardKey:e,volumeUpKey:f,volumeDownKey:g,muteKey:h,fullscreenKey:i,customKeys:{}},n=1,o=2,p=3,q=4,r=5,s=6,t=7,u=a.mergeOptions||a.util.mergeOptions;b=u(m,b||{});var v=b.volumeStep,w=b.seekStep,x=b.enableMute,y=b.enableVolumeScroll,z=b.enableFullscreen,A=b.enableNumbers,B=b.enableJogStyle,C=b.alwaysCaptureHotkeys,D=b.enableModifiersForNumbers,E=b.enableSeek,F=b.enablePlayPause;k.hasAttribute("tabIndex")||k.setAttribute("tabIndex","1"),(C||!j.autoplay())&&j.one("play",function(){k.focus()}),j.on("userinactive",function(){var a=function(){clearTimeout(b)},b=setTimeout(function(){j.off("useractive",a),l.activeElement&&l.activeElement.parentElement==k.querySelector(".vjs-control-bar")&&k.focus()},10);j.one("useractive",a)}),j.on("play",function(){var a=k.querySelector(".iframeblocker");a&&""===a.style.display&&(a.style.display="block",a.style.bottom="39px")});var G=function(a){var c,d=a.which,e=a.preventDefault;if(j.controls()){var f=l.activeElement;if(C||f==k||f==k.querySelector(".vjs-tech")||f==k.querySelector(".vjs-control-bar")||f==k.querySelector(".iframeblocker"))switch(J(a,j)){case n:F&&(e(),C&&a.stopPropagation(),j.paused()?j.play():j.pause());break;case o:E&&(e(),c=j.currentTime()-w,j.currentTime()<=w&&(c=0),j.currentTime(c));break;case p:E&&(e(),j.currentTime(j.currentTime()+w));break;case r:e(),B?(c=j.currentTime()-1,j.currentTime()<=1&&(c=0),j.currentTime(c)):j.volume(j.volume()-v);break;case q:e(),B?j.currentTime(j.currentTime()+1):j.volume(j.volume()+v);break;case s:x&&j.muted(!j.muted());break;case t:z&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen());break;default:if((d>47&&59>d||d>95&&106>d)&&(D||!(a.metaKey||a.ctrlKey||a.altKey))&&A){var g=48;d>95&&(g=96);var h=d-g;e(),j.currentTime(j.duration()*h*.1)}for(var i in b.customKeys){var m=b.customKeys[i];m&&m.key&&m.handler&&m.key(a)&&(e(),m.handler(j,b))}}}},H=function(a){if(j.controls()){var b=a.relatedTarget||a.toElement||l.activeElement;(b==k||b==k.querySelector(".vjs-tech")||b==k.querySelector(".iframeblocker"))&&z&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen())}},I=function(a){if(j.controls()){var b=a.relatedTarget||a.toElement||l.activeElement;if((C||b==k||b==k.querySelector(".vjs-tech")||b==k.querySelector(".iframeblocker")||b==k.querySelector(".vjs-control-bar"))&&y){a=window.event||a;var c=Math.max(-1,Math.min(1,a.wheelDelta||-a.detail));a.preventDefault?a.preventDefault():a.returnValue=!1,1==c?j.volume(j.volume()+v):-1==c&&j.volume(j.volume()-v)}}},J=function(a,c){return b.playPauseKey(a,c)?n:b.rewindKey(a,c)?o:b.forwardKey(a,c)?p:b.volumeUpKey(a,c)?q:b.volumeDownKey(a,c)?r:b.muteKey(a,c)?s:b.fullscreenKey(a,c)?t:void 0};return j.on("keydown",G),j.on("dblclick",H),j.on("mousewheel",I),j.on("DOMMouseScroll",I),this};a.plugin("hotKeys",b)}(window.videojs),amp.AmpInlinePlugins=amp.extend(amp.getComponent("Component"),{init:function(a,b){"use strict";var c={hotKeys:{},ampAds:{}};Object.getOwnPropertyNames(c).forEach(function(d){if(a[d]){var e=c[d];b&&b.playerOptions&&b.playerOptions[d]&&(e=b.playerOptions[d]),a[d](e)}})}}),amp.registerComponent("AmpInlinePlugins",amp.AmpInlinePlugins),amp.getComponent("Player").prototype.options_.children.push("AmpInlinePlugins"),!function(a){var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.ADSVAST=a()}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length))throw b=arguments[1],b instanceof Error?b:TypeError('Uncaught, unspecified "error" event.');if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];c.apply(this,h)}else if(f(c)){for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];for(j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h)}return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned){var e;e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0)}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d(a._events[b])?1:a._events[b].length:0}},{}],2:[function(a,b){var c;c=function(){function a(){this.errorURLTemplates=[],this.impressionURLTemplates=[],this.creatives=[],this.adTitle=""}return a}(),b.exports=c},{}],3:[function(a,b){var c,d,e;d=a("./parser.coffee"),e=a("./util.coffee"),c=function(){function a(){}return a.cappingFreeLunch=0,a.cappingMinimumTimeInterval=0,a.timeout=0,a.get=function(a,b,c){var e;return e=+new Date,this.totalCallsTimeout<e?(this.totalCalls=1,this.totalCallsTimeout=e+36e5):this.totalCalls++,this.cappingFreeLunch>=this.totalCalls?void b(null):e-this.lastSuccessfullAd<this.cappingMinimumTimeInterval?void b(null):d.parse(a,function(){return function(a){return b(a)}}(this),c)},function(){var b,c;c=e.storage,b=Object.defineProperty,["lastSuccessfullAd","totalCalls","totalCallsTimeout"].forEach(function(d){b(a,d,{get:function(){return c.getItem(d)},set:function(a){return c.setItem(d,a)},configurable:!1,enumerable:!0})}),null==a.totalCalls&&(a.totalCalls=0),null==a.totalCallsTimeout&&(a.totalCallsTimeout=0)}(),a}(),b.exports=c},{"./parser.coffee":8,"./util.coffee":14}],4:[function(a,b){var c;c=function(){function a(){this.id=null,this.width=0,this.height=0,this.type=null,this.staticResource=null,this.companionClickThroughURLTemplate=null,this.trackingEvents={}}return a}(),b.exports=c},{}],5:[function(a,b){var c,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};c=function(){function a(){this.trackingEvents={},this.progressOffsets=[]}return a}(),e=function(a){function b(){b.__super__.constructor.apply(this,arguments),this.type="linear",this.duration=0,this.skipDelay=null,this.mediaFiles=[],this.videoClickThroughURLTemplate=null,this.videoClickTrackingURLTemplate=null}return h(b,a),b}(c),f=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return h(b,a),b}(c),d=function(){function a(){this.type="companion",this.variations=[]}return a}(),b.exports={VASTCreativeLinear:e,VASTCreativeNonLinear:f,VASTCreativeCompanion:d}},{}],6:[function(a,b){b.exports={client:a("./client.coffee"),tracker:a("./tracker.coffee"),parser:a("./parser.coffee"),util:a("./util.coffee")}},{"./client.coffee":3,"./parser.coffee":8,"./tracker.coffee":10,"./util.coffee":14}],7:[function(a,b){var c;c=function(){function a(){this.fileURL=null,this.deliveryType="progressive",this.mimeType=null,this.codec=null,this.bitrate=0,this.minBitrate=0,this.maxBitrate=0,this.width=0,this.height=0}return a}(),b.exports=c},{}],8:[function(a,b){var c,d,e,f,g,h,i,j,k,l=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};c=a("./urlhandler.coffee"),j=a("./response.coffee"),d=a("./ad.coffee"),k=a("./util.coffee"),g=a("./creative.coffee").VASTCreativeLinear,f=a("./creative.coffee").VASTCreativeCompanion,h=a("./mediafile.coffee"),e=a("./companionad.coffee"),i=function(){function a(){}var b;return b=[],a.addURLTemplateFilter=function(a){"function"==typeof a&&b.push(a)},a.removeURLTemplateFilter=function(){return b.pop()},a.countURLTemplateFilters=function(){return b.length},a.clearUrlTemplateFilters=function(){return b=[]},a.parse=function(a,b,c){return this._parse(a,null,function(a,c){return b(c)},c)},a._parse=function(a,d,e,f){var g,h,i;for(h=0,i=b.length;i>h;h++)g=b[h],a=g(a);return null==d&&(d=[]),d.push(a),c.get(a,function(b){return function(c,f){var g,h,i,m,n,o,p,q,r,s,t;if(null!=c)return e(c);if(n=new j,null==(null!=f?f.documentElement:void 0)||"VAST"!==f.documentElement.nodeName)return e();for(s=f.documentElement.childNodes,o=0,q=s.length;q>o;o++)m=s[o],"Error"===m.nodeName&&n.errorURLTemplates.push(b.parseNodeText(m));for(t=f.documentElement.childNodes,p=0,r=t.length;r>p;p++)m=t[p],"Ad"===m.nodeName&&(g=b.parseAdElement(m),null!=g?n.ads.push(g):(AMP.Logger.error(AMP.Logger.Area.plugin,"Ads plugin: Ad element parsing failed."),k.track(n.errorURLTemplates,{ERRORCODE:101})));for(h=function(){var a,b,c;if(n){for(c=n.ads,a=0,b=c.length;b>a;a++)if(g=c[a],null!=g.nextWrapperURL)return;return 0===n.ads.length&&(AMP.Logger.error(AMP.Logger.Area.plugin,"Ads plugin: No Ads."),k.track(n.errorURLTemplates,{ERRORCODE:303}),n=null),e(null,n)}},i=n.ads.length;i--;)g=n.ads[i],null!=g.nextWrapperURL&&!function(c){var e,f;return d.length>=10||(f=c.nextWrapperURL,l.call(d,f)>=0)?(AMP.Logger.error(AMP.Logger.Area.plugin,"Ads plugin: Reached maximum wrapper length of 10 and no Ads found."),k.track(c.errorURLTemplates,{ERRORCODE:302}),n.ads.splice(n.ads.indexOf(c),1),void h()):(-1===c.nextWrapperURL.indexOf("://")&&(e=a.slice(0,a.lastIndexOf("/")),c.nextWrapperURL=""+e+"/"+c.nextWrapperURL),b._parse(c.nextWrapperURL,d,function(a,b){var d,e,f,g,i,j,l,m,o,p,q,r,s,t;if(null!=a)AMP.Logger.error(AMP.Logger.Area.plugin,"Ads plugin: Wrapper URi fetch timeout."),k.track(c.errorURLTemplates,{ERRORCODE:301}),n.ads.splice(n.ads.indexOf(c),1);else if(null==b)AMP.Logger.error(AMP.Logger.Area.plugin,"Ads plugin: No wrapped response."),k.track(c.errorURLTemplates,{ERRORCODE:303}),n.ads.splice(n.ads.indexOf(c),1);else for(n.errorURLTemplates=n.errorURLTemplates.concat(b.errorURLTemplates),f=n.ads.indexOf(c),n.ads.splice(f,1),r=b.ads,j=0,l=r.length;l>j;j++){if(g=r[j],g.errorURLTemplates=c.errorURLTemplates.concat(g.errorURLTemplates),g.impressionURLTemplates=c.impressionURLTemplates.concat(g.impressionURLTemplates),null!=c.trackingEvents)for(s=g.creatives,p=0,m=s.length;m>p;p++)for(d=s[p],t=Object.keys(c.trackingEvents),q=0,o=t.length;o>q;q++)e=t[q],d.trackingEvents=d.trackingEvents||{},(i=d.trackingEvents)[e]||(i[e]=[]),d.trackingEvents[e]=d.trackingEvents[e].concat(c.trackingEvents[e]);n.ads.splice(f,0,g)}return delete c.nextWrapperURL,h()}))}(g);return h()}}(this),f)},a.childByName=function(a,b){var c,d,e,f;for(f=a.childNodes,d=0,e=f.length;e>d;d++)if(c=f[d],c.nodeName===b)return c},a.childsByName=function(a,b){var c,d,e,f,g;for(d=[],g=a.childNodes,e=0,f=g.length;f>e;e++)c=g[e],c.nodeName===b&&d.push(c);return d},a.parseAdElement=function(a){var b,c,d,e;for(e=a.childNodes,c=0,d=e.length;d>c;c++){if(b=e[c],"Wrapper"===b.nodeName)return this.parseWrapperElement(b);if("InLine"===b.nodeName)return this.parseInLineElement(b)}},a.parseWrapperElement=function(a){var b,c,d;return b=this.parseInLineElement(a),d=this.childByName(a,"VASTAdTagURI"),null!=d&&(b.nextWrapperURL=this.parseNodeText(d)),c=b.creatives[0],null!=c&&null!=c.trackingEvents&&(b.trackingEvents=c.trackingEvents),null!=b.nextWrapperURL?b:void 0},a.parseInLineElement=function(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p;for(b=new d,n=a.childNodes,h=0,k=n.length;k>h;h++)switch(g=n[h],g.nodeName){case"AdTitle":b.adTitle=this.parseNodeText(g);break;case"Error":b.errorURLTemplates.push(this.parseNodeText(g));break;case"Impression":b.impressionURLTemplates.push(this.parseNodeText(g));break;case"Creatives":for(o=this.childsByName(g,"Creative"),i=0,l=o.length;l>i;i++)for(e=o[i],p=e.childNodes,j=0,m=p.length;m>j;j++)switch(f=p[j],f.nodeName){case"Linear":c=this.parseCreativeLinearElement(f),c&&b.creatives.push(c);break;case"CompanionAds":c=this.parseCompanionAd(f),c&&b.creatives.push(c)}}return b},a.parseCreativeLinearElement=function(a){var b,c,d,e,f,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A;if(b=new g,b.duration=this.parseDuration(this.parseNodeText(this.childByName(a,"Duration"))),-1===b.duration&&"Wrapper"!==a.parentNode.parentNode.parentNode.nodeName)return null;for(j=a.getAttribute("skipoffset"),null==j?b.skipDelay=null:"%"===j.charAt(j.length-1)?(i=parseInt(j,10),b.skipDelay=b.duration*(i/100)):b.skipDelay=this.parseDuration(j),n=this.childByName(a,"VideoClicks"),null!=n&&(b.videoClickThroughURLTemplate=this.parseNodeText(this.childByName(n,"ClickThrough")),b.videoClickTrackingURLTemplate=this.parseNodeText(this.childByName(n,"ClickTracking"))),x=this.childsByName(a,"TrackingEvents"),p=0,t=x.length;t>p;p++)for(l=x[p],y=this.childsByName(l,"Tracking"),q=0,u=y.length;u>q;q++)if(k=y[q],c=k.getAttribute("event"),m=this.parseNodeText(k),null!=c&&null!=m)if("progress"===c){var B=k.getAttribute("offset");if(-1!==B.indexOf("%"))B=B.trim().substring(0,B.indexOf("%"));else if(B=B.trim().split(":"),4==B.length||3==B.length){var C=B[0],D=B[1],E=B[2];B=3600*C+60*D+E,B=B/b.duration*100}B=parseInt(B),c=c+"-"+B,null==(o=b.trackingEvents)[c]&&(o[c]=[]),b.trackingEvents[c].push(m),b.progressOffsets.push(B)}else null==(o=b.trackingEvents)[c]&&(o[c]=[]),b.trackingEvents[c].push(m);for(z=this.childsByName(a,"MediaFiles"),r=0,v=z.length;v>r;r++)for(f=z[r],A=this.childsByName(f,"MediaFile"),s=0,w=A.length;w>s;s++)e=A[s],d=new h,d.fileURL=this.parseNodeText(e),d.deliveryType=e.getAttribute("delivery"),d.codec=e.getAttribute("codec"),d.mimeType=e.getAttribute("type"),d.bitrate=parseInt(e.getAttribute("bitrate")||0),d.minBitrate=parseInt(e.getAttribute("minBitrate")||0),d.maxBitrate=parseInt(e.getAttribute("maxBitrate")||0),d.width=parseInt(e.getAttribute("width")||0),d.height=parseInt(e.getAttribute("height")||0),b.mediaFiles.push(d);return b},a.parseCompanionAd=function(a){var b,c,d,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;for(d=new f,u=this.childsByName(a,"Companion"),m=0,q=u.length;q>m;m++){for(c=u[m],b=new e,b.id=c.getAttribute("id")||null,b.width=c.getAttribute("width"),b.height=c.getAttribute("height"),v=this.childsByName(c,"StaticResource"),n=0,r=v.length;r>n;n++)h=v[n],b.type=h.getAttribute("creativeType")||0,b.staticResource=this.parseNodeText(h);for(w=this.childsByName(c,"TrackingEvents"),o=0,s=w.length;s>o;o++)for(j=w[o],x=this.childsByName(j,"Tracking"),p=0,t=x.length;t>p;p++)i=x[p],g=i.getAttribute("event"),k=this.parseNodeText(i),null!=g&&null!=k&&(null==(l=b.trackingEvents)[g]&&(l[g]=[]),b.trackingEvents[g].push(k));b.companionClickThroughURLTemplate=this.parseNodeText(this.childByName(c,"CompanionClickThrough")),d.variations.push(b)}return d},a.parseDuration=function(a){var b,c,d,e,f;return null==a?-1:(b=a.split(":"),3!==b.length?-1:(f=b[2].split("."),e=parseInt(f[0]),2===f.length&&(e+=parseFloat("0."+f[1])),d=parseInt(60*b[1]),c=parseInt(60*b[0]*60),isNaN(c||isNaN(d||isNaN(e||d>3600||e>60)))?-1:c+d+e))},a.parseNodeText=function(a){return a&&(a.textContent||a.text)},a}(),b.exports=i},{"./ad.coffee":2,"./companionad.coffee":4,"./creative.coffee":5,"./mediafile.coffee":7,"./response.coffee":9,"./urlhandler.coffee":11,"./util.coffee":14}],9:[function(a,b){var c;c=function(){function a(){this.ads=[],this.errorURLTemplates=[]}return a}(),b.exports=c},{}],10:[function(a,b){var c,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=a("./client.coffee"),g=a("./util.coffee"),e=a("./creative.coffee").VASTCreativeLinear,c=a("events").EventEmitter,f=function(a){function b(a,b){var c,f,g;if(this.ad=a,this.creative=b,this.muted=!1,this.impressed=!1,this.skipable=!1,this.skipDelayDefault=-1,this.trackingEvents={},this.progressOffsets=[],this.emitAlwaysEvents=["creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","rewind","skip","mute","unmute","pause","rewind","resume","fullscreen","exitFullscreen","closeLinear","close","skip","click","progress"],b){g=b.trackingEvents;for(c in g)f=g[c],this.trackingEvents[c]=f.slice(0);this.progressOffsets=b.progressOffsets||[],this.progressOffsets.sort(function(a,b){return a-b})}b instanceof e?(this.assetDuration=b.duration,this.quartiles={firstQuartile:Math.round(25*this.assetDuration)/100,midpoint:Math.round(50*this.assetDuration)/100,thirdQuartile:Math.round(75*this.assetDuration)/100},this.skipDelay=b.skipDelay,this.linear=!0,this.clickThroughURLTemplate=b.videoClickThroughURLTemplate,this.clickTrackingURLTemplate=b.videoClickTrackingURLTemplate):(this.skipDelay=-1,this.linear=!1),this.on("start",function(){d.lastSuccessfullAd=+new Date})}return i(b,a),b.prototype.resetTrackingEventsInfo=function(){if(this.creative){var a,b,c=this.creative.trackingEvents;for(a in c)b=c[a],this.trackingEvents[a]=b.slice(0);this.impressed=!1}},b.prototype.setProgress=function(a){var b,c,d,e,f,g,h,i,j;if(f=null===this.skipDelay?this.skipDelayDefault:this.skipDelay,-1===f||this.skipable||(f>a?this.emit("skip-countdown",f-a):(this.skipable=!0,this.emit("skip-countdown",0))),this.linear&&this.assetDuration>0){if(c=[],a>0){if(c.push("start"),d=Math.round(a/this.assetDuration*100),this.progressOffsets.length>0)for(var k=this.progressOffsets.length-1;k>=0;k--)if(this.progressOffsets[k]<=d){c.push("progress-"+this.progressOffsets[k]);break}j=this.quartiles;for(e in j)g=j[e],a>=g&&g+1>=a&&c.push(e)}for(h=0,i=c.length;i>h;h++)b=c[h],this.track(b,!0);a<this.progress&&this.track("rewind")}return this.progress=a},b.prototype.setMuted=function(a){return this.muted!==a&&this.track(a?"muted":"unmuted"),this.muted=a},b.prototype.setPaused=function(a){return this.paused!==a&&this.track(a?"pause":"resume"),this.paused=a},b.prototype.setFullscreen=function(a){return this.fullscreen!==a&&this.track(a?"fullscreen":"exitFullscreen"),this.fullscreen=a},b.prototype.setSkipDelay=function(a){return"number"==typeof a?this.skipDelay=a:void 0},b.prototype.load=function(){return this.impressed?void 0:(this.impressed=!0,this.trackURLs(this.ad.impressionURLTemplates),this.track("creativeView"))},b.prototype.errorWithCode=function(a){return this.trackURLs(this.ad.errorURLTemplates,{ERRORCODE:a})},b.prototype.complete=function(){this.track("complete"),this.resetTrackingEventsInfo()},b.prototype.stop=function(){return this.track(this.linear?"closeLinear":"close")},b.prototype.skip=function(){this.track("skip"),this.trackingEvents=[],this.resetTrackingEventsInfo()},b.prototype.click=function(){var a,b;return null!=this.clickTrackingURLTemplate&&this.trackURLs([this.clickTrackingURLTemplate]),null!=this.clickThroughURLTemplate?(this.linear&&(b={CONTENTPLAYHEAD:this.progressFormated()}),a=g.resolveURLTemplates([this.clickThroughURLTemplate],b)[0],this.emit("clickthrough",a)):void 0},b.prototype.setAssetFileUri=function(a){this.assetFileUri=encodeURIComponent(a)},b.prototype.track=function(a,b){var c,d;null==b&&(b=!1),"closeLinear"===a&&null==this.trackingEvents[a]&&null!=this.trackingEvents.close&&(a="close"),d=this.trackingEvents[a],c=this.emitAlwaysEvents.indexOf(a),null!=d?(this.emit(a,""),this.trackURLs(d)):-1!==c&&this.emit(a,""),b===!0&&(delete this.trackingEvents[a],c>-1&&this.emitAlwaysEvents.splice(c,1))},b.prototype.trackURLs=function(a,b){return null==b&&(b={}),this.linear&&(b.CONTENTPLAYHEAD=this.progressFormated(),b.ASSETURI=this.assetFileUri),g.track(a,b)},b.prototype.progressFormated=function(){var a,b,c,d,e;return e=parseInt(this.progress),a=e/3600,a.length<2&&(a="0"+a),b=e/60%60,b.length<2&&(b="0"+b),d=e%60,d.length<2&&(d="0"+b),c=parseInt(100*(this.progress-e)),""+a+":"+b+":"+d+"."+c},b}(c),b.exports=f},{"./client.coffee":3,"./creative.coffee":5,"./util.coffee":14,events:1}],11:[function(a,b){var c,d,e;e=a("./urlhandlers/xmlhttprequest.coffee"),d=a("./urlhandlers/flash.coffee"),c=function(){function b(){}return b.get=function(b,c,f){return"undefined"==typeof window||null===window?a("./urlhandlers/node.coffee").get(b,c):e.supported()?e.get(b,c,f):d.supported()?d.get(b,c):c()},b}(),b.exports=c},{"./urlhandlers/flash.coffee":12,"./urlhandlers/xmlhttprequest.coffee":13}],12:[function(a,b){var c;c=function(){function a(){}return a.xdr=function(){var a;return window.XDomainRequest&&(a=new XDomainRequest),a},a.supported=function(){return!!this.xdr()},a.get=function(a,b){function c(){return b(null,null)}var d,e;return(e="function"==typeof window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLDOM"):void 0)?(e.async=!1,d=this.xdr(),d.open("GET",a),d.send(),d.onerror=c,d.ontimeout=c,d.onload=function(){return e.loadXML(d.responseText),b(null,e)}):b()},a}(),b.exports=c},{}],13:[function(a,b){var c;c=function(){function a(){}return a.xhr=function(){var a;return a=new window.XMLHttpRequest,"withCredentials"in a?a:void 0},a.supported=function(){return!!this.xhr()},a.get=function(a,b,c){function d(){return b(null,null)}var e;return e=this.xhr(),e.open("GET",a),e.timeout=c,e.ontimeout=d,e.onerror=d,e.send(),e.onreadystatechange=function(){return 4===e.readyState?b(null,e.responseXML):void 0}},a}(),b.exports=c},{}],14:[function(a,b){var c;c=function(){function a(){}return a.track=function(a,b){var c,d,e,f,g,h;for(d=this.resolveURLTemplates(a,b),h=[],f=0,g=d.length;g>f;f++)c=d[f],"undefined"!=typeof window&&null!==window&&(e=new Image,h.push(e.src=c));return h},a.resolveURLTemplates=function(a,b){var c,d,e,f,g,h,i,j,k;d=[],null==b&&(b={}),"CACHEBUSTING"in b||(b.CACHEBUSTING=Math.round(1e10*Math.random())),b.random=b.CACHEBUSTING;for(j=0,k=a.length;k>j;j++)if(c=a[j],h=c){for(e in b)i=b[e],f="["+e+"]",g="%%"+e+"%%",h=h.replace(f,i),h=h.replace(g,i);d.push(h)}return d},a.storage=function(){var a,b,c,d;try{c="undefined"!=typeof window&&null!==window?window.localStorage||window.sessionStorage:null}catch(e){d=e,c=null}return b=function(a){var b,c;try{if(c="__VASTUtil__",a.setItem(c,c),a.getItem(c)!==c)return!0}catch(d){return b=d,!0}return!1},(null==c||b(c))&&(a={},c={length:0,getItem:function(b){return a[b]},setItem:function(b,c){a[b]=c,this.length=Object.keys(a).length},removeItem:function(b){delete a[b],this.length=Object.keys(a).length},clear:function(){a={},this.length=0}}),c}(),a}(),b.exports=c},{}]},{},[6])(6)});var AMP;!function(a){!function(b){!function(b){"use strict";var c=function(){function a(){}return a.creativeView="creativeView",a.start="start",a.firstQuartile="firstQuartile",a.midpoint="midpoint",a.thirdQuartile="thirdQuartile",a.complete="complete",a.mute="mute",a.unmute="unmute",a.pause="pause",a.rewind="rewind",a.resume="resume",a.fullscreen="fullscreen",a.exitFullscreen="exitFullscreen",a.expand="expand",a.collapse="collapse",a.acceptInvitationLinear="acceptInvitationLinear",a.closeLinear="closeLinear",a.skip="skip",a.progress="progress",a.click="click",a.error="error",a}();b.TrackingEvents=c;var d=function(){function a(){}return a.XML_PARSING_ERROR=100,a.VAST_SCHEMA_VALIDATION_ERROR=101,a.VAST_VERSION_OF_RESPONSE_NOT_SUPPORTED=102,a.TRAFFICKING_ERROR=200,a.VIDE0_PLAYER_EXPECTED_DIFFERENT_LINEARITY=201,a.VIDE0_PLAYER_EXPECTED_DIFFERENT_DURATION=202,a.VIDE0_PLAYER_EXPECTED_DIFFERENT_SIZE=203,a.GENERAL_RESPONSE_ERROR=300,a.TIMEOUT_OF_URI_PROVIDED_IN_WRAPPER=301,a.WRAPPER_LIMIT_REACHED=302,a.NO_ADS_RESPONSE_AFTER_WRAPPERS=303,a.GENERAL_LINEAR_ERROR=400,a.TIMEOUT_MEDIA_URI=402,a.NO_MEDIA_FILE_SUPPORTED=403,a.PROBLEM_PLAYING_MEDIA_FILE=405,a.UNDEFINED_ERROR=900,a}();b.VastErrorsCodes=d;var e=function(){function b(){}return b.prototype.get=function(b,c,d){var e=this,f=window.ADSVAST.client;a.Logger.verbose(5,"Ads plugin: Fetching ads"),f.get(b,function(b){a.Logger.verbose(5,"Ads plugin: Ads fetch response VastFile = "+JSON.stringify(b)),null!=b?(a.Logger.verbose(5,"Ads plugin: Ads Fetched"),e.addTrackerForCreatives(b),c.call(e,b)):(a.Logger.verbose(5,"Ads plugin: Failed to fetch the ads"),c.call(e))},d)},b.prototype.addTrackerForCreatives=function(a){for(var b=0;b<a.ads.length;b++){var c=a.ads[b].creatives,d=null;d=new window.ADSVAST.tracker(a.ads[b]),a.ads[b].tracker=d;for(var e=0;e<c.length;e++){var d=null;d=new window.ADSVAST.tracker(a.ads[b],c[e]),c[e].tracker=d}}},b}();b.VastSourceHandler=e}(b.vast||(b.vast={}));b.vast}(a.ads||(a.ads={}));a.ads}(AMP||(AMP={}));var AMP;!function(a){!function(a){!function(a){!function(a){var b=function(){function a(){}return a.maxdur="{maxdur}",a.mindur="{mindur}",a.maxbr="{maxbr}",a.DEFAULT_MAX_DUR_SEC=30,a.DEFAULT_MIN_DUR_SEC=15,a.DEFAULT_MAX_BITRATE_KBPS=600,a}();a.UrlKeys=b;var c=function(){function a(){}return a.formatVastFileUrl=function(a,c,d,e){for(var f=a,g=[b.maxbr,b.mindur,b.maxdur],h=[d,e,c],i=0;i<g.length;i++)f=f.replace(g[i],""+h[i]);return f},a}();a.VastUrlFormatter=c}(a.UrlFormatter||(a.UrlFormatter={}));a.UrlFormatter}(a.vast||(a.vast={}));a.vast}(a.ads||(a.ads={}));a.ads}(AMP||(AMP={}));var AMP;!function(a){!function(b){"use strict";function c(a){new h(a,this)}var d=function(){function a(a,b,c){this.source=a,this.tracks=b,this.name=c}return a}();b.AssetImpl=d;var e=function(){function a(a,b,c,d,e,f,g){this.name=a,this.parent=b,this.offset=c,this.controls=d,this.timedReturn=e,this.clickThrough=f,this.skippable=g,this.isAd=!1}return a}();b.ClipImpl=e;var f=function(){function a(){this.pauseTimeline=!1,this.clips=[]}return a.prototype.add=function(a){return this.clips.push(a)},a}();b.PlayListImpl=f;var g=function(){function a(a,b,c){this.clip=a,this.ad=b,this.creative=c}return a}();b.ClipAdTrackerMap=g,amp.plugin("ampAds",c);var h=function(){function b(b,c){this.player=c,this.refreshPresentationLayout(b),this.registerForPresentationUpdate(),this.vastSourceHandler=new a.ads.vast.VastSourceHandler}return b.prototype.registerForPresentationUpdate=function(){var a=this;this.player.addEventListener("presentationUpdate",function(){a.refreshPresentationLayout(a.player.presentationLayout())})},b.prototype.refreshPresentationLayout=function(a){this.reset(),this.processPresentationLayout(a)},b.prototype.reset=function(){this.preRoll=null,this.midRolls=[],this.postRoll=null,this.inBandSourceUri=null,this.mainProgram=null,this.adsFetched=[],this.preRoll=null,this.postRoll=null,this.postRollClip=null,this.preRollClip=null,this.preRollFetchFailed=!1,this.postRollFetchFailed=!1,this.adTrackerInfo=[],this.requestedBitrate=300},b.prototype.init=function(){var a=this;setTimeout(function(){a.initializePlaylist()},10)},b.prototype.initializePlaylist=function(){var a=!1;this.preRoll&&this.preRoll.sourceUri&&(this.fetchAdForAdElement(this.preRoll),a=!0),this.postRoll&&this.postRoll.sourceUri&&(this.fetchAdForAdElement(this.postRoll),a=!0),!a&&this.mainProgram&&this.mainProgram.source&&this.checkPlayListAvailabilityAndStartPlayback()},b.prototype.handleAdFetchSuccess=function(a,b){if(!this.player.isDisposed()){if(this.overrideAdOptions(a,b),a===this.preRoll)this.preRollClip=this.getClipForAdElement(a,b);
else{if(a!==this.postRoll){var c=this.getClipForAdElement(a,b),d={clip:c,splice:null};return a.splice&&(d.splice=a.splice),void this.player.addMidRoll(d)}this.postRollClip=this.getClipForAdElement(a,b)}this.checkPlayListAvailabilityAndStartPlayback()}},b.prototype.checkPlayListAvailabilityAndStartPlayback=function(){var a=!0,b=!0;null===this.preRoll||null!==this.preRollClip||this.preRollFetchFailed||(a=!1),null===this.postRoll||null!==this.postRollClip||this.postRollFetchFailed||(b=!1);var c=null;a&&b&&(c=new f,null!==this.preRoll&&null!==this.preRollClip&&c.add(this.preRollClip),c.add(this.getClipForMainProgram()),null!==this.postRoll&&null!==this.postRollClip&&c.add(this.postRollClip),c.pauseTimeline=!0,this.player.isDisposed()||this.player.playlist(c))},b.prototype.getClipForAdElement=function(b,c){for(var f=null,h=0;h<c.ads[0].creatives.length;h++)if("linear"===c.ads[0].creatives[h].type){f=c.ads[0].creatives[h];break}null==f&&(a.Logger.error(5,"Ads plugin: No Linear creative found"),c.ads[0].tracker.errorWithCode(a.ads.vast.VastErrorsCodes.VIDE0_PLAYER_EXPECTED_DIFFERENT_LINEARITY));var i=null,j=["video/mp4","video/mpeg"];if(f){for(var h=0;h<f.mediaFiles.length;h++)-1!==j.indexOf(f.mediaFiles[h].mimeType)&&(null!==i?i.bitrate<f.mediaFiles[h].bitrate&&f.mediaFiles[h].bitrate<=this.requestedBitrate?i=f.mediaFiles[h]:i.bitrate>f.mediaFiles[h].bitrate&&f.mediaFiles[h].bitrate>=this.requestedBitrate&&(i=f.mediaFiles[h]):i=f.mediaFiles[h]);null===i&&(a.Logger.error(5,"Ads plugin: No supported Media file can be found."),f.tracker.errorWithCode(a.ads.vast.VastErrorsCodes.NO_MEDIA_FILE_SUPPORTED))}if(null!==f&&null!=i){i.fileURL=i.fileURL.trim(),f.tracker.setAssetFileUri(i.fileURL);var k=new d({src:i.fileURL,type:i.mimeType},null,c.ads[0].adTitle),l=new e(c.ads[0].adTitle,k,0,!0);return this.strictSchedule&&(l.timedReturn=!0),f.videoClickThroughURLTemplate&&f.videoClickThroughURLTemplate.length>0&&(l.clickThrough=f.videoClickThroughURLTemplate),b.options&&b.options.skipAd&&b.options.skipAd.enabled&&(l.skippable=b.options.skipAd.offset),l.ad=c,l.isAd=!0,this.adTrackerInfo.push(new g(l,c,f)),l}return b===this.preRoll?this.preRollFetchFailed=!0:b===this.postRoll&&(this.postRollFetchFailed=!0),null},b.prototype.getTrackerMapInfoForClip=function(a){for(var b=0;b<this.adTrackerInfo.length;b++)if(a===this.adTrackerInfo[b].clip)return this.adTrackerInfo[b];return null},b.prototype.getClipForMainProgram=function(){var a="Main Program",b=new d(this.mainProgram.source,this.mainProgram.tracks,a),c=new e(a,b,0,!0,!1);return c.isAd=!1,c},b.prototype.overrideAdOptions=function(a,b){if(a.options&&a.options.skipAd&&a.options.skipAd.enabled)for(var c=0;c<b.ads.length;c++)for(var d=0;d<b.ads[c].creatives.length;d++)b.ads[c].creatives[d].skipDelay=a.options.skipAd.offset},b.prototype.handleAdFetchError=function(b){a.Logger.verbose(5,"Ads plugin: Ads fetch failed for Uri = "+b.sourceUri),b===this.preRoll&&(this.preRollFetchFailed=!0,this.checkPlayListAvailabilityAndStartPlayback()),b===this.postRoll&&(this.postRollFetchFailed=!0,this.checkPlayListAvailabilityAndStartPlayback())},b.prototype.getFormattedUrl=function(b){var c=b.splice&&b.splice.duration?b.splice.duration:a.ads.vast.UrlFormatter.UrlKeys.DEFAULT_MAX_DUR_SEC,d=this.player.videoBufferData(),e=a.ads.vast.UrlFormatter.UrlKeys.DEFAULT_MAX_BITRATE_KBPS;return d&&d.downloadCompleted&&(e=d.downloadCompleted.mediaDownload.bitrate/1024,this.requestedBitrate=e),a.ads.vast.UrlFormatter.VastUrlFormatter.formatVastFileUrl(b.sourceUri,c,e,a.ads.vast.UrlFormatter.UrlKeys.DEFAULT_MIN_DUR_SEC)},b.prototype.fetchAdForAdElement=function(c){if(c.sourceUri){var d={manager:this,adElement:c},e=this.getFormattedUrl(c);this.vastSourceHandler.get(e,amp.bind(d,function(a){var b=this.manager.adsFetched.indexOf(this.adElement);a&&a.ads&&a.ads.length>0&&-1!==b?this.manager.handleAdFetchSuccess(this.adElement,a):this.manager.handleAdFetchError(this.adElement),this.manager.adsFetched.splice(b,1)}),b.DefaultTimeoutVal),this.adsFetched.push(c)}else a.Logger.error(5,"Ads plugin: fetchAdForAdElement ad missing sourceUri")},b.prototype.addListenersForPlayerEvents=function(){for(var a=this,b=[amp.eventName.playing,amp.eventName.timeupdate,amp.eventName.loadeddata,amp.eventName.splicewaiting,amp.eventName.start,amp.eventName.firstquartile,amp.eventName.midpoint,amp.eventName.thirdquartile,amp.eventName.complete,amp.eventName.mute,amp.eventName.unmute,amp.eventName.resume,amp.eventName.pause,amp.eventName.fullscreen,amp.eventName.exitfullscreen,amp.eventName.click,amp.eventName.skip,amp.eventName.errorInPlayingAd,amp.eventName.disposing],c=0;c<b.length;c++)this.player.addEventListener(b[c],function(b){a.handlePlayerEvent(b)})},b.prototype.fetchAllStaticMidRolls=function(){if(null!==this.midRolls)for(var a=0;a<this.midRolls.length;a++)this.midRolls[a].startTime>=0&&(this.midRolls[a].splice={id:-1,startOffset:this.midRolls[a].startTime},this.fetchAdForAdElement(this.midRolls[a]))},b.prototype.handlePlayerEvent=function(b){switch(b.type){case amp.eventName.disposing:break;case amp.eventName.loadeddata:var c=b.clip;c&&!c.isAd&&this.fetchAllStaticMidRolls();break;case amp.eventName.splicewaiting:var d=this.player.spliceWaiting();d.sort(function(a,b){return a.startOffset-b.startOffset});for(var e=0;e<d.length;e++)if(d[e].out){a.Logger.error(5,"ads-plugin : Fetching ad for splice OUT with Id = "+d[e].id+" duration ="+d[e].duration+" startOffset = "+d[e].startOffset);var f={sourceUri:this.inBandSourceUri,startTime:d[e].startOffset,splice:d[e]};this.fetchAdForAdElement(f)}else a.Logger.error(5,"ads-plugin : Processing splice Cancel or IN with Id = "+d[e].id+" duration ="+d[e].duration),this.player.addMidRoll({splice:d[e]});break;case amp.eventName.complete:case amp.eventName.start:case amp.eventName.errorInPlayingAd:case amp.eventName.skip:case amp.eventName.firstquartile:case amp.eventName.midpoint:case amp.eventName.thirdquartile:case amp.eventName.mute:case amp.eventName.unmute:case amp.eventName.resume:case amp.eventName.pause:case amp.eventName.fullscreen:case amp.eventName.exitfullscreen:case amp.eventName.timeupdate:case amp.eventName.playing:case amp.eventName.click:var c=b.clip;this.processPlayerEventForClip(c,b,this.player);break;case amp.eventName.error:}},b.prototype.processPlayerEventForClip=function(b,c){var d=this.mapAmpEventNameToVastEventName(c.type);if(b&&b.isAd&&null!==d){var e=this.getTrackerMapInfoForClip(b);null!==e&&e.creative.tracker&&(d!==a.ads.vast.TrackingEvents.error?(e.creative.tracker.setProgress(c.time),d===a.ads.vast.TrackingEvents.creativeView?e.creative.tracker.load():d===a.ads.vast.TrackingEvents.click?(e.creative.videoClickThroughURLTemplate&&window.open(e.creative.videoClickThroughURLTemplate),e.creative.tracker.click()):d!==a.ads.vast.TrackingEvents.progress&&e.creative.tracker.track(d)):(a.Logger.error(5,"Ads plugin: Ads playback Error."),e.creative.tracker.errorWithCode(a.ads.vast.VastErrorsCodes.PROBLEM_PLAYING_MEDIA_FILE)),(d===a.ads.vast.TrackingEvents.skip||d===a.ads.vast.TrackingEvents.complete||d===a.ads.vast.TrackingEvents.error)&&e.creative.tracker.resetTrackingEventsInfo())}},b.prototype.compareAdStartTime=function(a,b){var c=0,d=10;return a<b.startTime-d?c=-1:a>b.startTime&&(c=1),c},b.prototype.handleTimeUpdateAndFetchMidRoll=function(a){var c=b.binarySearchThroughMidRolls(a,this.midRolls,this.compareAdStartTime);-1!==c&&-1!==this.adsFetched.indexOf(this.midRolls[c])&&this.fetchAdForAdElement(this.midRolls[c])},b.prototype.processPresentationLayout=function(a){var b=this;if(null!==a&&void 0!==a){var c=!1;if(a.preRoll){if(!a.preRoll.sourceUri)throw"preRoll without sourceUri is not valid";this.preRoll=a.preRoll,c=!0}if(a.midRoll&&a.midRoll.length>0)for(var d=0;d<a.midRoll.length;d++){var e=a.midRoll[d];if(!e.sourceUri)throw"midRoll entry without sourceUri is not valid";if(e.sourceUri&&!e.startTime){if(this.inBandSourceUri)throw"multiple midRoll entries without starTime are not valid.";this.inBandSourceUri=e.sourceUri,c=!0}else{if(e.startTime<0)throw"midRoll starTime cannot be nagative.";this.midRolls.push(e),c=!0}}if(a.postRoll){if(!a.postRoll.sourceUri)throw"postRoll without sourceUri is not valid";this.postRoll=a.postRoll,c=!0}if(a.mainProgram){if(!a.mainProgram.source)throw"ads-plugin needs a valid presentationLayout.mainProgram definition.";this.mainProgram=a.mainProgram,c=!0}this.midRolls.length>1&&this.midRolls.sort(function(a,b){return a.startTime-b.startTime}),this.strictSchedule=!!a.strictSchedule,c&&(this.player.showBusy(),this.player.ready(function(){b.addListenersForPlayerEvents()}),this.init())}},b.prototype.mapAmpEventNameToVastEventName=function(b){switch(b){case amp.eventName.playing:return a.ads.vast.TrackingEvents.creativeView;case amp.eventName.errorInPlayingAd:return a.ads.vast.TrackingEvents.error;case amp.eventName.start:return a.ads.vast.TrackingEvents.start;case amp.eventName.firstquartile:return a.ads.vast.TrackingEvents.progress;case amp.eventName.midpoint:return a.ads.vast.TrackingEvents.progress;case amp.eventName.thirdquartile:return a.ads.vast.TrackingEvents.progress;case amp.eventName.complete:return a.ads.vast.TrackingEvents.complete;case amp.eventName.mute:return a.ads.vast.TrackingEvents.mute;case amp.eventName.unmute:return a.ads.vast.TrackingEvents.unmute;case amp.eventName.resume:return a.ads.vast.TrackingEvents.resume;case amp.eventName.fullscreen:return a.ads.vast.TrackingEvents.fullscreen;case amp.eventName.exitfullscreen:return a.ads.vast.TrackingEvents.exitFullscreen;case amp.eventName.click:return a.ads.vast.TrackingEvents.click;case amp.eventName.skip:return a.ads.vast.TrackingEvents.skip;case amp.eventName.pause:return a.ads.vast.TrackingEvents.pause;case amp.eventName.resume:return a.ads.vast.TrackingEvents.resume;case amp.eventName.rewind:return a.ads.vast.TrackingEvents.rewind;case amp.eventName.timeupdate:return a.ads.vast.TrackingEvents.progress}return null},b.DefaultTimeoutVal=5e3,b.binarySearchThroughMidRolls=AzureHtml5JS.Common.binarySearch,b}()}(a.ads||(a.ads={}));a.ads}(AMP||(AMP={}));var AMP;!function(a){!function(b){"use strict";function c(a){return new d(a)}b.createScheduler=c;var d=function(){function b(b){var c=this;this._eventsToRoute=[amp.eventName.canplaythrough,amp.eventName.timeupdate,amp.eventName.start,amp.eventName.firstquartile,amp.eventName.midpoint,amp.eventName.thirdquartile,amp.eventName.ended,amp.eventName.mute,amp.eventName.unmute,amp.eventName.rewind,amp.eventName.resume,amp.eventName.pause,amp.eventName.fullscreen,amp.eventName.exitfullscreen,amp.eventName.click,amp.eventName.skip,amp.eventName.error,amp.eventName.play,amp.eventName.playing],this._player=b,this._adPlaybackStrategy=a.Scheduler.Strategy.getStrategy(this._player),this._midRolls=[],this._currentClipIndexInPlayList=-1,this.addListenersForAllPlayerEvents(),this._currentPreloadPlayIndexInMidRolls=-1,this._lastMidRollPlayed=null,this._lastMainContentTime=-1,this._adPlayMonitorTimerId=0/0,this._nextClipPreloaded=!1,this._adPlayStartTime=0/0,this._playList=null,this._player.addEventListener("presentationUpdate",function(){null!==c._playList&&c._adPlaybackStrategy.updateAutoPlay(!0),c.reset(),c._adPlaybackStrategy.presentationUpdated()})}return b.prototype.setPlaylist=function(a){var b=this;this._playList=a,this.startPlaybackWithNextInPlayList(),this._player.one(amp.eventName.play,function(){b.handleFirstPlay(b._player)})},b.prototype.playlist=function(){return this._playList},b.prototype.reset=function(){this._midRolls=[],this._currentClipIndexInPlayList=-1,this._currentPreloadPlayIndexInMidRolls=-1,this._lastMidRollPlayed=null,this._lastMainContentTime=-1,this._nextClipPreloaded=!1,this._adPlayStartTime=0/0,this.stopAdPlayTimer(),this._playList=null},b.prototype.dispose=function(){this.stopRoutingAdEvents(),this._adPlaybackStrategy&&this._adPlaybackStrategy.dispose(),this.stopAdPlayTimer()},b.prototype.startPlaybackWithNextInPlayList=function(){if(this._currentClipIndexInPlayList++,this._playList.clips.length>0&&this._currentClipIndexInPlayList<this._playList.clips.length){var b=this._playList.clips[this._currentClipIndexInPlayList];b.isAd?(a.Logger.verbose(9,"Playing ad CLip with src ="+b.parent.source.src),this._nextClipPreloaded=!1,this._adPlaybackStrategy.playAdClip(b)):(a.Logger.verbose(9,"Starting Main Content play."),this._adPlaybackStrategy.setMainContent(b),this.resumeMainContent()),this.preloadMainContent()}else this._adPlaybackStrategy.isPlayingAd()&&this._adPlaybackStrategy.handlePostRollCompleted()},b.prototype.preloadMainContent=function(){if(0===this._currentClipIndexInPlayList&&this._adPlaybackStrategy.isPlayingAd()){var a=this._currentClipIndexInPlayList+1,b=this._playList.clips.length;if(a>b)return;var c=this._playList.clips[a];for(a+=1;c.isAd&&b-1>a;)c=this._playList.clips[a++];if(!c.isAd)return this._adPlaybackStrategy.setMainContent(c),void this._adPlaybackStrategy.preloadMainContent()}},b.prototype.addListenersForAllPlayerEvents=function(){var a=this._adPlaybackStrategy.getAdPlayer();this._player!==a&&(this.startRoutingAdEvents(a),this.addEventListeners(a)),this.addEventListeners(this._player)},b.prototype.addEventListeners=function(a){var b=this;a.addEventListener(amp.eventName.timeupdate,function(){b.playerTimeUpdate(a)}),a.addEventListener(amp.eventName.seeked,function(){b.playerSeeked(a)}),a.addEventListener(amp.eventName.ended,function(){b.handleEnded(a)})},b.prototype.startRoutingAdEvents=function(a){var b=this;this._eventsToRoute.forEach(function(c){a.addEventListener(c,b.adEventHandler.bind(b))})},b.prototype.stopRoutingAdEvents=function(){var a=this._adPlaybackStrategy.getAdPlayer();if(this._player!==a){var b=this;this._eventsToRoute.forEach(function(c){a.removeEventListener(c,b.adEventHandler.bind(b))})}},b.prototype.adEventHandler=function(a){if(this._adPlaybackStrategy.isPlayingAd()){var b,c=this._adPlaybackStrategy.getAdPlayer();switch(a.type){case amp.eventName.error:if(!this._adPlaybackStrategy.isPlayingAd())return;b=amp.eventName.errorInPlayingAd,this._adPlaybackStrategy.updateAutoPlay(!0);break;case amp.eventName.ended:b=amp.eventName.complete;break;case amp.eventName.pause:if(b=amp.eventName.pause,c.ended())return;break;case amp.eventName.click:if(b=amp.eventName.click,c.paused())return void c.play();c.pause(),this.stopAdPlayTimer();break;default:b=a.type}this._player.trigger(b,null,c.currentClip(),c.currentTime()),(b===amp.eventName.errorInPlayingAd||b===amp.eventName.skip)&&this.handleEnded(c)}},b.prototype.resumeMainContent=function(a){this.stopAdPlayTimer(),(this.isTimeToResumeMainContent()||a)&&(this._currentPreloadPlayIndexInMidRolls=-1,this._adPlaybackStrategy.resumeMainContent(),this._adPlayStartTime=0/0,this.removeObsoleteMidRollsForLiveStreaming())},b.prototype.handleFirstPlay=function(a){this._adPlaybackStrategy.isPlayingAd()||(this._mainContentLive=a.isLive(),this._mainContentLive&&(this.removeStaticMidRolls(),this._player.trigger("midrollAdded"),this._currentPreloadPlayIndexInMidRolls=-1))},b.prototype.removeStaticMidRolls=function(){var a=[];if(this._midRolls.length>0){for(var b=0;b<this._midRolls.length;b++)this._midRolls[b].splice.id>0&&a.push(this._midRolls[b]);this._midRolls=a}},b.prototype.playerSeeked=function(){var a=this;if(!this._adPlaybackStrategy.isPlayingAd()&&this._midRolls.length>0){var b=this._player.currentMediaTime();this.handleSkipAndPlayPreloadedAd(b)||(this._lastMidRollPlayed=null,this._lastMainContentTime=b,AzureHtml5JS.Util.setTimeout(function(){a.preloadAd(a._lastMainContentTime,!0)},100))}},b.prototype.handleSkipAndPlayPreloadedAd=function(a){if(this._lastMainContentTime<a&&-1!==this._currentPreloadPlayIndexInMidRolls&&a>this._midRolls[this._currentPreloadPlayIndexInMidRolls].splice.startOffset){{var b=this._adPlaybackStrategy.getAdPlayer();b.bufferedPercent()}return this.handleTimeUpdateAndFetchMidRoll(this._midRolls[this._currentPreloadPlayIndexInMidRolls].splice.startOffset,!1,!0)}return!1},b.prototype.playerTimeUpdate=function(a){!this._adPlaybackStrategy.isPlayingAd()&&this._midRolls.length>0&&!a.paused()&&(this._lastMainContentTime=this._player.currentMediaTime(),this.handleTimeUpdateAndFetchMidRoll(this._lastMainContentTime)||this.checkIfPreloadNeedsRefresh()&&this.preloadAd(this._lastMainContentTime,!1))},b.prototype.checkIfPreloadNeedsRefresh=function(){return!this._adPlaybackStrategy.isPlayingAd()&&-1!==this._currentPreloadPlayIndexInMidRolls&&this._player.currentMediaTime()<this._midRolls[this._currentPreloadPlayIndexInMidRolls].splice.startOffset?!1:!0},b.prototype.handleEnded=function(b){var c=b.currentClip();null!==c&&(this._adPlaybackStrategy.updateAutoPlay(!0),c.isAd&&!this.isPlayListItem(c)?(a.Logger.verbose(9,"Handling ended for Clip="+c.parent.source.src),this._adPlaybackStrategy.isPlayingAd()&&this.resumeMainContent()):(this._lastMidRollPlayed=null,this.startPlaybackWithNextInPlayList()))},b.prototype.isPlayListItem=function(a){return-1!==this._playList.clips.indexOf(a)},b.prototype.addMidRoll=function(b){if(this._adPlaybackStrategy.isMidRollSpupported()){var c=0;if(this._mainContentLive&&b.splice.id<0)return;if(!this._mainContentLive&&b.splice.id<0&&(c=this._player.currentMediaTime()-this._player.currentTime(),b.splice.startOffset=b.splice.startOffset+c),b.clip){if(!this.updateExistingMidRoll(b)){var d=this.midRollsSortingNeeded(b);this._midRolls.push(b),d&&(this._currentPreloadPlayIndexInMidRolls=-1,this.keepMidRollsSorted()),a.Logger.verbose(9,"Current media time ="+this._player.currentMediaTime()),a.Logger.verbose(9,"Received an ad signal message with startOffset ="+b.splice.startOffset+" and Id ="+b.splice.id+" and Duration ="+b.splice.duration)}}else a.Logger.verbose(9,"Reveived a splice In or Cancel with Id = "+b.splice.id+" Cancel ="+b.splice.cancel+" And out = "+b.splice.out+" And duration = "+b.splice.duration),this.clearSplice(b.splice)}return this._player.trigger("midrollAdded"),this._midRolls},b.prototype.midRollsSortingNeeded=function(a){return this._midRolls.length>0&&this._midRolls[this._midRolls.length-1].splice.startOffset<=a.splice.startOffset?!1:0===this._midRolls.length?!1:!0},b.prototype.removeObsoleteMidRollsForLiveStreaming=function(){if(this._mainContentLive&&!this._adPlaybackStrategy.isPlayingAd()){var b=this._player.currentMediaTime()-this._player.currentTime();if(this._midRolls.length>0){for(var c=[],d=[],e=0;e<this._midRolls.length;e++)this._midRolls[e].splice.id>0&&this._midRolls[e].splice.startOffset<b?(d.push(this._midRolls[e]),a.Logger.verbose(9,"Splice with Offset ="+this._midRolls[e].splice.startOffset+" is stale and will be removed")):c.push(this._midRolls[e]);d.length>0&&(this._midRolls=c,this._currentClipIndexInPlayList=-1)}}},b.prototype.updateExistingMidRoll=function(b){if(b.splice.id>0)for(var c=this._midRolls.length,d=0;c>d;d++)if(this._midRolls[d].splice.id===b.splice.id){a.Logger.verbose(9,"Duplicate splice with ID ="+this._midRolls[d].splice.id+" storing a suplimentory Clip new duration ="+b.splice.duration+" new startOffset="+b.splice.startOffset);var e=this._midRolls[d].splice;if(this._currentPreloadPlayIndexInMidRolls===d&&this._adPlaybackStrategy.isPlayingAd()){if(e.startOffset===b.splice.startOffset){if(e.duration>b.splice.duration){e.duration=b.splice.duration;var f=(Date.now()-this._adPlayStartTime)/1e3;this.startAdPlayMonitor(this._midRolls[d],e.startOffset+f)}return this._midRolls[d]=b,!0}this._lastMidRollPlayed=null,this.resumeMainContent(!0)}return this._midRolls.splice(d,1),!1}},b.prototype.getMidRolls=function(){return this._midRolls},b.prototype.keepMidRollsSorted=function(){this._midRolls.length>1&&this._midRolls.sort(function(a,b){return a.splice.startOffset-b.splice.startOffset})},b.prototype.clearSplice=function(b){var c=this;if(this._currentPreloadPlayIndexInMidRolls>=0&&this._adPlaybackStrategy.isPlayingAd()&&this._midRolls[this._currentPreloadPlayIndexInMidRolls].splice&&this._midRolls[this._currentPreloadPlayIndexInMidRolls].splice.id===b.id){var d=this._midRolls[this._currentPreloadPlayIndexInMidRolls];if(void 0!==b.cancel&&b.cancel)this.resumeMainContent(!0);else if(void 0!==b.out&&!b.out&&void 0===d.splice.duration){var e=b.startOffset,f=(this._lastMainContentTime,(Date.now()-this._adPlayStartTime)/1e3),g=e-d.splice.startOffset,h=g-f;d.splice.duration=g,a.Logger.verbose(9,"Updated duration of splice with Id = "+d.splice.id+" to = "+d.splice.duration),0>=h?this.resumeMainContent(!0):(this.stopAdPlayTimer(),this._adPlayMonitorTimerId=AzureHtml5JS.Util.setTimeout(function(){c.resumeMainContent()},1e3*h))}}else if(void 0!==b.out&&void 0===b.cancel&&!b.out){var i=this.searchMidRollsForSplice(b);if(-1!==i){var j=this._midRolls[i],e=b.startOffset,g=e-j.splice.startOffset;j.splice.duration=g}}if(b.cancel){var k=-1;for(k=this.searchMidRollsForSplice(b);-1!==k;)this._midRolls.splice(k,1),k=this.searchMidRollsForSplice(b);this._currentPreloadPlayIndexInMidRolls=-1}},b.prototype.searchMidRollsForSplice=function(a){for(var b=0;b<this._midRolls.length;b++)if(this._midRolls[b].splice.id===a.id)return b;return-1},b.prototype.searchMidRollsAfterTimeForPreload=function(a){for(var b=6e5,c=0;c<this._midRolls.length;c++)if(this._midRolls[c].splice.startOffset>a&&this._midRolls[c].splice.startOffset<a+b)return c;return-1},b.prototype.compareAdStartTimeForPlay=function(a,b){var c=0,d=.3,e=.2;return a<b.splice.startOffset-d?c=-1:b.splice.duration&&b.splice.id>0&&a>b.splice.startOffset+b.splice.duration?c=1:void 0===b.splice.duration&&a>b.splice.startOffset+e&&(c=1),c},b.prototype.handleTimeUpdateAndFetchMidRoll=function(c,d,e){if(!this._adPlaybackStrategy.isPlayingAd()||d){var f=b.binarySearchThroughMidRolls(c,this._midRolls,this.compareAdStartTimeForPlay);if(-1!==f&&this._midRolls[f].clip&&(!e||this._midRolls[f].played!==!0)&&this._lastMidRollPlayed!==this._midRolls[f]){a.Logger.verbose(9,"Found an Ad that we can play for media time = "+c);var g=this._adPlayStartTime;return this.startMidRollPlayback(this._midRolls[f],c),d&&!isNaN(g)&&(this._adPlayStartTime=g),this._currentPreloadPlayIndexInMidRolls=f,!0}}return!1},b.prototype.startMidRollPlayback=function(b,c){this._adPlaybackStrategy.updateAutoPlay(!0),this._lastMidRollPlayed=b,this.startAdPlayMonitor(b,c),this._adPlayStartTime=Date.now(),this._mainContentAtLiveEdgeBeforeAdBreak=this._adPlaybackStrategy.isMainContentAtLiveEdge(),this._mainContentLive=this._adPlaybackStrategy.isMainContentLive(),a.Logger.verbose(9,"Starting Ad playback for time ="+c+" ad start time = "+b.splice.startOffset+" ad duration = "+b.splice.cancel),this._adPlaybackStrategy.playAdClip(b.clip,b.splice.id>0),b.played=!0},b.prototype.preloadAd=function(b,c){if(null!==this._adPlaybackStrategy.currentClip()&&!this._adPlaybackStrategy.currentClip().isAd){var d=this.searchMidRollsAfterTimeForPreload(b);if(-1!==d&&this._midRolls[d].clip&&this._currentPreloadPlayIndexInMidRolls!==d&&this._lastMidRollPlayed!==this._midRolls[d]){var e=!1;c?e=!0:-1===this._currentPreloadPlayIndexInMidRolls&&(e=!0),e&&this._midRolls[d].clip&&(a.Logger.verbose(9,"Preloading ad CLip with src ="+this._midRolls[d].clip.parent.source.src),this._adPlaybackStrategy.preloadAd(this._midRolls[d].clip),this._nextClipPreloaded=!0,this._currentPreloadPlayIndexInMidRolls=d)}else this._mainContentLive||(this._currentClipIndexInPlayList<this._playList.clips.length-1&&!this._nextClipPreloaded&&(a.Logger.verbose(9,"Preloading ad Clip with src ="+this._playList.clips[this._currentClipIndexInPlayList+1].parent.source.src),this._adPlaybackStrategy.preloadAd(this._playList.clips[this._currentClipIndexInPlayList+1]),this._nextClipPreloaded=!0),this._currentPreloadPlayIndexInMidRolls=-1)}},b.prototype.startAdPlayMonitor=function(b,c){var d=this;if(this.stopAdPlayTimer(),b.splice.id>0&&b.splice.duration){var e=b.splice.startOffset+b.splice.duration-c;this._adPlayMonitorTimerId=AzureHtml5JS.Util.setTimeout(function(){d.resumeMainContent()},1e3*e),a.Logger.verbose(9,"Starting _adPlayMonitor for duration = "+e)}},b.prototype.isTimeToResumeMainContent=function(){var b=this._lastMidRollPlayed,c=Date.now(),d=(c-this._adPlayStartTime)/1e3;return null!==b&&null!==b.splice&&b.splice.id>0&&!isNaN(this._adPlayStartTime)&&this.handleTimeUpdateAndFetchMidRoll(this._lastMainContentTime+d,!0)?(this._lastMainContentTime=this._lastMainContentTime+d,!1):(a.Logger.verbose(9,"Switching to main program after time = "+d),!0)},b.prototype.stopAdPlayTimer=function(){isNaN(this._adPlayMonitorTimerId)||(AzureHtml5JS.Util.clearTimeout(this._adPlayMonitorTimerId),this._adPlayMonitorTimerId=0/0)},b.prototype.isPlayingAd=function(){return this._adPlaybackStrategy.isPlayingAd()},b.prototype.getAdPlayer=function(){return this._adPlaybackStrategy.getAdPlayer()},b.binarySearchThroughMidRolls=AzureHtml5JS.Common.binarySearch,b}();b.Scheduler=d}(a.Scheduler||(a.Scheduler={}));a.Scheduler}(AMP||(AMP={}));var __extends=this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);c.prototype=b.prototype,a.prototype=new c},AMP;!function(a){!function(b){!function(b){"use strict";function c(a){return AzureHtml5JS.Common.isMobile?new d(a):new e(a)}b.getStrategy=c;var d=function(){function a(a){this._mainPlayer=a,this._mainPlayerState=null}return a.prototype.isMainContentLive=function(){return this._mainPlayer.isLive()},a.prototype.isMainContentAtLiveEdge=function(){var a=this._mainPlayer.currentPlayerSettingValue("livePlaybackOffsetInWallClockSec"),b=5;return this._mainPlayer.currentTime()<this._mainPlayer.duration()-b-a?!1:!0},a.prototype.preloadAd=function(){},a.prototype.preloadMainContent=function(){},a.prototype.isPlayingAd=function(){return this._mainPlayer.currentClip().isAd},a.prototype.updateAutoPlay=function(){this._mainPlayer.autoplay(!0)},a.prototype.dispose=function(){},a.prototype.presentationUpdated=function(){},a.prototype.isMidRollSpupported=function(){return!1},a.prototype.setMainContent=function(a){this._mainContent=a},a.prototype.playAdClip=function(a){this.pauseMainContent(),this._mainPlayer.playClip(a)},a.prototype.currentClip=function(){return this._mainPlayer.currentClip()},a.prototype.getAdPlayer=function(){return this._mainPlayer},a.prototype.pauseMainContent=function(){this._mainPlayer&&null!==this._mainPlayer.currentSrc()&&null===this._mainPlayerState&&(this._mainPlayer.pause(),this._mainPlayerState=null)},a.prototype.resumeMainContent=function(){null!==this._mainPlayerState?(this._mainPlayer.loadPlayerFromState(this._mainPlayerState),this._mainPlayerState=null):this._mainPlayer.playClip(this._mainContent)},a.prototype.handlePostRollCompleted=function(){},a}();b.SinglePlayerStrategy=d;var e=function(b){function c(a){b.call(this,a),this.populateAdDomElements(),this.setUpFullScreenEventHandling(),this._isFirstPlayForMainContent=!0}return __extends(c,b),c.prototype.preloadAd=function(a){this._adPlayer.resetPlayer(),this._adPlayer.controls(!1),this._adPlayer.preloadClip(a)},c.prototype.preloadMainContent=function(){this._mainPlayer.preloadClip(this._mainContent)},c.prototype.isMidRollSpupported=function(){return"AzureHtml5JS"===this._mainPlayer.currentTechName()?!0:!1},c.prototype.isPlayingAd=function(){return this._currentPlayer===this._adPlayer},c.prototype.updateAutoPlay=function(){this._mainPlayer.autoplay(!0),this._adPlayer.autoplay(!0),this._adPlayer.poster(""),this._adPlayer.bigPlayButton.el_.className="vjs-big-play-button "},c.prototype.dispose=function(){this._adPlayer.dispose()},c.prototype.presentationUpdated=function(){this._mainContent=null,this._adPlayer.muted(!1),this._adPlayer.options_.autoplay=this._mainPlayer.options_.autoplay,this._adPlayer.poster(this._mainPlayer.poster()),this._adPlayer.resetPlayer(),this._adPlayer.trigger("presentationUpdate"),this._isFirstPlayForMainContent=!0,this._adPlayer.bigPlayButton.el_.className="vjs-big-play-button override-controls-disabled "},c.prototype.storeMainContentPlaybackRate=function(){try{this._mainPlayer.canControlPlaybackRate()&&(this._mainContentPlayRate=this._mainPlayer.playbackRate())}catch(b){a.Logger.warning(9,"Exception in retrieving playback rate")}},c.prototype.updateMainContentPlaybackRate=function(){try{this._mainPlayer.canControlPlaybackRate()&&this._mainPlayer.playbackRate(this._mainContentPlayRate)}catch(b){a.Logger.warning(9,"Exception in setting playback rate")}},c.prototype.playAdClip=function(b,c){this.copyPlayerStatus(this._mainPlayer,this._adPlayer),this.storeMainContentPlaybackRate(),c?(1!==this._mainContentPlayRate&&this._mainPlayer.canControlPlaybackRate()&&this._mainPlayer.playbackRate(1),this._mainPlayer.muted(!0)):this.pauseMainContent(),this._mainPlayer.hide(),this._currentPlayer=this._adPlayer,this._adPlayer.currentClip()===b&&null===this._adPlayer.error()?(this._adPlayer.play(),this._adPlayer.show()):(a.Logger.verbose(9,"Ad is not preloaded, so executing a playClip"),this._adPlayer.resetPlayer(),this._adPlayer.playClip(b),this._adPlayer.show(!0),this._adPlayer.controls(!1)),null!==this._mainPlayer.currentClip()&&this._adPlayer.poster("")},c.prototype.isMainContentPaused=function(){try{return this._mainPlayer.paused()}catch(b){a.Logger.warning(9,"Exception in retrieving isPaused status.")}return!1},c.prototype.resumeMainContent=function(){this.copyPlayerStatus(this._adPlayer,this._mainPlayer),this._currentPlayer=this._mainPlayer,null!=this._adPlayer&&this._adPlayer.pauseAndHide(),null===this._mainPlayer.currentClip()||this._mainPlayer.currentClip()!==this._mainContent||null!==this._mainPlayer.error()?(this._mainPlayer.show(!0),this._mainPlayer.playClip(this._mainContent)):this.isMainContentPaused()&&null===this._mainPlayer.error()?this.startMainContentPlay():this._mainPlayer.show(),this._isFirstPlayForMainContent&&this._mainPlayer.isLive()&&null===this._mainPlayer.error()&&(this._isFirstPlayForMainContent=!1,this._mainPlayer.currentTime(this._mainPlayer.duration())),this.updateMainContentPlaybackRate()},c.prototype.startMainContentPlay=function(){var b=this;this._mainPlayer.show(),this._mainPlayer.play();var c=0;try{c=this._mainPlayer.currentTime(),2>c&&(this._mainPlayer.el_.style.opacity=0,this.pauseMainContent(),AzureHtml5JS.Util.setTimeout(function(){b._mainPlayer.el_.style.opacity=1,b._mainPlayer.play()},200))}catch(d){a.Logger.warning(9,"Exception in startMainContentPlay.")}},c.prototype.handlePostRollCompleted=function(){this.copyPlayerStatus(this._adPlayer,this._mainPlayer),null!=this._adPlayer&&this._adPlayer.pauseAndHide(),this.updateMainContentPlaybackRate(),this._currentPlayer=this._mainPlayer,this._mainPlayer.show()},c.prototype.copyPlayerStatus=function(b,c){try{null!==b&&null!==c&&(c.volume(b.volume()),c.muted(b.muted()))}catch(d){a.Logger.warning(9,"Exception in copying volume status.")}},c.prototype.setUpFullScreenEventHandling=function(){var b=this;try{this._mainPlayer.addEventListener("fullscreenchange",function(){b.copyFullScreenStatus(b._mainPlayer,b._adPlayer)}),this._adPlayer.addEventListener("fullscreenchange",function(){b.copyFullScreenStatus(b._adPlayer,b._mainPlayer)})}catch(c){a.Logger.warning(9,"Exception in settingup fullscreen event handling.")}},c.prototype.copyFullScreenStatus=function(b,c){try{b.isFullscreen()&&!c.isFullscreen()?c.enterFullscreen():!b.isFullscreen()&&c.isFullscreen()&&c.exitFullscreen()}catch(d){a.Logger.warning(9,"Exception in copying fullscreen status.")}},c.prototype.pauseMainContent=function(){try{null!==this._mainPlayer&&this._mainPlayer.pause()}catch(b){a.Logger.warning(9,"Exception in pausing playback.")}},c.prototype.getAdPlayer=function(){return this._adPlayer},c.prototype.currentClip=function(){return this._currentPlayer.currentClip()},c.prototype.populateAdDomElements=function(){this._adPlayer=this._mainPlayer.createAdPlayer()},c}(d);b.MultiPlayerStrategy=e}(b.Strategy||(b.Strategy={}));b.Strategy}(a.Scheduler||(a.Scheduler={}));a.Scheduler}(AMP||(AMP={})),function(a){var b=a.vttjs={},c=b.VTTCue,d=b.VTTRegion,e=a.VTTCue,f=a.VTTRegion;b.shim=function(){b.VTTCue=c,b.VTTRegion=d},b.restore=function(){b.VTTCue=e,b.VTTRegion=f;

}}(this),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=h[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){if("string"!=typeof a)return!1;var b=i[a.toLowerCase()];return b?a.toLowerCase():!1}function e(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)a[d]=c[d]}return a}function f(a,b,f){var h=this,i=/MSIE\s8\.0/.test(navigator.userAgent),j={};i?h=document.createElement("custom"):j.enumerable=!0,h.hasBeenReset=!1;var k="",l=!1,m=a,n=b,o=f,p=null,q="",r=!0,s="auto",t="start",u=50,v="middle",w=50,x="middle";return Object.defineProperty(h,"id",e({},j,{get:function(){return k},set:function(a){k=""+a}})),Object.defineProperty(h,"pauseOnExit",e({},j,{get:function(){return l},set:function(a){l=!!a}})),Object.defineProperty(h,"startTime",e({},j,{get:function(){return m},set:function(a){if("number"!=typeof a)throw new TypeError("Start time must be set to a number.");m=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",e({},j,{get:function(){return n},set:function(a){if("number"!=typeof a)throw new TypeError("End time must be set to a number.");n=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",e({},j,{get:function(){return o},set:function(a){o=""+a,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",e({},j,{get:function(){return p},set:function(a){p=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",e({},j,{get:function(){return q},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");q=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",e({},j,{get:function(){return r},set:function(a){r=!!a,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",e({},j,{get:function(){return s},set:function(a){if("number"!=typeof a&&a!==g)throw new SyntaxError("An invalid number or illegal string was specified.");s=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",e({},j,{get:function(){return t},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");t=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",e({},j,{get:function(){return u},set:function(a){if(0>a||a>100)throw new Error("Position must be between 0 and 100.");u=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",e({},j,{get:function(){return v},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",e({},j,{get:function(){return w},set:function(a){if(0>a||a>100)throw new Error("Size must be between 0 and 100.");w=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",e({},j,{get:function(){return x},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),h.displayState=void 0,i?h:void 0}var g="auto",h={"":!0,lr:!0,rl:!0},i={start:!0,middle:!0,end:!0,left:!0,right:!0};f.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},a.VTTCue=a.VTTCue||f,b.VTTCue=f}(this,this.vttjs||{}),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=f[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){return"number"==typeof a&&a>=0&&100>=a}function e(){var a=100,b=3,e=0,f=100,g=0,h=100,i="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!d(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!d(a))throw new Error("RegionAnchorX must be between 0 and 100.");f=a}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!d(a))throw new Error("RegionAnchorY must be between 0 and 100.");e=a}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(a){if(!d(a))throw new Error("ViewportAnchorY must be between 0 and 100.");h=a}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(a){if(!d(a))throw new Error("ViewportAnchorX must be between 0 and 100.");g=a}},scroll:{enumerable:!0,get:function(){return i},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");i=b}}})}var f={"":!0,up:!0};a.VTTRegion=a.VTTRegion||e,b.VTTRegion=e}(this,this.vttjs||{}),function(a){function b(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function c(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function d(){this.values=o(null)}function e(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function f(a,f,g){function h(){var d=c(a);if(null===d)throw new b(b.Errors.BadTimeStamp,"Malformed timestamp: "+k);return a=a.replace(/^[^\sa-zA-Z-]+/,""),d}function i(a,b){var c=new d;e(a,function(a,b){switch(a){case"region":for(var d=g.length-1;d>=0;d--)if(g[d].id===b){c.set(a,g[d].region);break}break;case"vertical":c.alt(a,b,["rl","lr"]);break;case"line":var e=b.split(","),f=e[0];c.integer(a,f),c.percent(a,f)?c.set("snapToLines",!1):null,c.alt(a,f,["auto"]),2===e.length&&c.alt("lineAlign",e[1],["start","middle","end"]);break;case"position":e=b.split(","),c.percent(a,e[0]),2===e.length&&c.alt("positionAlign",e[1],["start","middle","end"]);break;case"size":c.percent(a,b);break;case"align":c.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=c.get("region",null),b.vertical=c.get("vertical",""),b.line=c.get("line","auto"),b.lineAlign=c.get("lineAlign","start"),b.snapToLines=c.get("snapToLines",!0),b.size=c.get("size",100),b.align=c.get("align","middle"),b.position=c.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=c.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function j(){a=a.replace(/^\s+/,"")}var k=a;if(j(),f.startTime=h(),j(),"-->"!==a.substr(0,3))throw new b(b.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+k);a=a.substr(3),j(),f.endTime=h(),j(),i(a,f)}function g(a,b){function d(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function e(a){return p[a]}function f(a){for(;o=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(o[0],e);return a}function g(a,b){return!s[b.localName]||s[b.localName]===a.localName}function h(b,c){var d=q[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=r[b];return f&&c&&(e[f]=c.trim()),e}for(var i,j=a.document.createElement("div"),k=j,l=[];null!==(i=d());)if("<"!==i[0])k.appendChild(a.document.createTextNode(f(i)));else{if("/"===i[1]){l.length&&l[l.length-1]===i.substr(2).replace(">","")&&(l.pop(),k=k.parentNode);continue}var m,n=c(i.substr(1,i.length-2));if(n){m=a.document.createProcessingInstruction("timestamp",n),k.appendChild(m);continue}var o=i.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!o)continue;if(m=h(o[1],o[3]),!m)continue;if(!g(k,m))continue;o[2]&&(m.className=o[2].substr(1).replace("."," ")),l.push(o[1]),k.appendChild(m),k=m}return j}function h(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g<f.length;g++){d=f.charCodeAt(g);for(var h=0;h<t.length;h++)if(t[h]===d)return"rtl"}return"ltr"}function i(a){if("number"==typeof a.line&&(a.snapToLines||a.line>=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;e<c.length&&c[e]!==b;e++)"showing"===c[e].mode&&d++;return-1*++d}function j(){}function k(a,b,c){var d=/MSIE\s8\.0/.test(navigator.userAgent),e="rgba(255, 255, 255, 1)",f="rgba(0, 0, 0, 0.8)";d&&(e="rgb(255, 255, 255)",f="rgb(0, 0, 0)"),j.call(this),this.cue=b,this.cueDiv=g(a,b.text);var i={color:e,backgroundColor:f,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};d||(i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl",i.unicodeBidi="plaintext"),this.applyStyles(i,this.cueDiv),this.div=a.document.createElement("div"),i={textAlign:"middle"===b.align?"center":b.align,font:c.font,whiteSpace:"pre-line",position:"absolute"},d||(i.direction=h(this.cueDiv),i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(i),this.div.appendChild(this.cueDiv);var k=0;switch(b.positionAlign){case"start":k=b.position;break;case"middle":k=b.position-b.size/2;break;case"end":k=b.position-b.size}this.applyStyles(""===b.vertical?{left:this.formatStyle(k,"%"),width:this.formatStyle(b.size,"%")}:{top:this.formatStyle(k,"%"),height:this.formatStyle(b.size,"%")}),this.move=function(a){this.applyStyles({top:this.formatStyle(a.top,"px"),bottom:this.formatStyle(a.bottom,"px"),left:this.formatStyle(a.left,"px"),right:this.formatStyle(a.right,"px"),height:this.formatStyle(a.height,"px"),width:this.formatStyle(a.width,"px")})}}function l(a){var b,c,d,e,f=/MSIE\s8\.0/.test(navigator.userAgent);if(a.div){c=a.div.offsetHeight,d=a.div.offsetWidth,e=a.div.offsetTop;var g=(g=a.div.childNodes)&&(g=g[0])&&g.getClientRects&&g.getClientRects();a=a.div.getBoundingClientRect(),b=g?Math.max(g[0]&&g[0].height||0,a.height/g.length):0}this.left=a.left,this.right=a.right,this.top=a.top||e,this.height=a.height||c,this.bottom=a.bottom||e+(a.height||c),this.width=a.width||d,this.lineHeight=void 0!==b?b:a.lineHeight,f&&!this.lineHeight&&(this.lineHeight=13)}function m(a,b,c,d){function e(a,b){for(var e,f=new l(a),g=1,h=0;h<b.length;h++){for(;a.overlapsOppositeAxis(c,b[h])||a.within(c)&&a.overlapsAny(d);)a.move(b[h]);if(a.within(c))return a;var i=a.intersectPercentage(c);g>i&&(e=new l(a),g=i),a=new l(f)}return e||f}var f=new l(b),g=b.cue,h=i(g),j=[];if(g.snapToLines){var k;switch(g.vertical){case"":j=["+y","-y"],k="height";break;case"rl":j=["+x","-x"],k="width";break;case"lr":j=["-x","+x"],k="width"}var m=f.lineHeight,n=m*Math.round(h),o=c[k]+m,p=j[0];Math.abs(n)>o&&(n=0>n?-1:1,n*=Math.ceil(o/m)*m),0>h&&(n+=""===g.vertical?c.height:c.width,j=j.reverse()),f.move(p,n)}else{var q=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=q/2;break;case"end":h-=q}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}j=["+y","-x","+x","-y"],f=new l(b)}var r=e(f,j);b.move(r.toCSSCompatValues(c))}function n(){}var o=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();b.prototype=o(Error.prototype),b.prototype.constructor=b,b.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},d.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d<c.length;++d)if(b===c[d]){this.set(a,b);break}},integer:function(a,b){/^-?\d+$/.test(b)&&this.set(a,parseInt(b,10))},percent:function(a,b){var c;return(c=b.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(b=parseFloat(b),b>=0&&100>=b)?(this.set(a,b),!0):!1}};var p={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},q={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},r={v:"title",lang:"lang"},s={rt:"ruby"},t=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];j.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},j.prototype.formatStyle=function(a,b){return 0===a?0:a+b},k.prototype=o(j.prototype),k.prototype.constructor=k,l.prototype.move=function(a,b){switch(b=void 0!==b?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},l.prototype.overlaps=function(a){return this.left<a.right&&this.right>a.left&&this.top<a.bottom&&this.bottom>a.top},l.prototype.overlapsAny=function(a){for(var b=0;b<a.length;b++)if(this.overlaps(a[b]))return!0;return!1},l.prototype.within=function(a){return this.top>=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},l.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.left<a.left;case"-x":return this.right>a.right;case"+y":return this.top<a.top;case"-y":return this.bottom>a.bottom}},l.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},l.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},l.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c};return e},n.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},n.convertCueToDOMTree=function(a,b){return a&&b?g(a,b):null};var u=.05,v="sans-serif",w="1.5%";n.processCues=function(a,b,c){function d(a){for(var b=0;b<a.length;b++)if(a[b].hasBeenReset||!a[b].displayState)return!0;return!1}if(!a||!b||!c)return null;for(;c.firstChild;)c.removeChild(c.firstChild);var e=a.document.createElement("div");if(e.style.position="absolute",e.style.left="0",e.style.right="0",e.style.top="0",e.style.bottom="0",e.style.margin=w,c.appendChild(e),d(b)){var f=[],g=l.getSimpleBoxPosition(e),h=Math.round(g.height*u*100)/100,i={font:h+"px "+v};!function(){for(var c,d,h=0;h<b.length;h++)d=b[h],c=new k(a,d,i),e.appendChild(c.div),m(a,c,g,f),d.displayState=c.div,f.push(l.getSimpleBoxPosition(c))}()}else for(var j=0;j<b.length;j++)e.appendChild(b[j].displayState)},n.Parser=function(a,b,c){c||(c=b,b={}),b||(b={}),this.window=a,this.vttjs=b,this.state="INITIAL",this.buffer="",this.decoder=c||new TextDecoder("utf8"),this.regionList=[]},n.Parser.prototype={reportOrThrowError:function(a){if(!(a instanceof b))throw a;this.onparsingerror&&this.onparsingerror(a)},parse:function(a){function c(){for(var a=i.buffer,b=0;b<a.length&&"\r"!==a[b]&&"\n"!==a[b];)++b;var c=a.substr(0,b);return"\r"===a[b]&&++b,"\n"===a[b]&&++b,i.buffer=a.substr(b),c}function g(a){var b=new d;if(e(a,function(a,c){switch(a){case"id":b.set(a,c);break;case"width":b.percent(a,c);break;case"lines":b.integer(a,c);break;case"regionanchor":case"viewportanchor":var e=c.split(",");if(2!==e.length)break;var f=new d;if(f.percent("x",e[0]),f.percent("y",e[1]),!f.has("x")||!f.has("y"))break;b.set(a+"X",f.get("x")),b.set(a+"Y",f.get("y"));break;case"scroll":b.alt(a,c,["up"])}},/=/,/\s/),b.has("id")){var c=new(i.vttjs.VTTRegion||i.window.VTTRegion);c.width=b.get("width",100),c.lines=b.get("lines",3),c.regionAnchorX=b.get("regionanchorX",0),c.regionAnchorY=b.get("regionanchorY",100),c.viewportAnchorX=b.get("viewportanchorX",0),c.viewportAnchorY=b.get("viewportanchorY",100),c.scroll=b.get("scroll",""),i.onregion&&i.onregion(c),i.regionList.push({id:b.get("id"),region:c})}}function h(a){e(a,function(a,b){switch(a){case"Region":g(b)}},/:/)}var i=this;a&&(i.buffer+=i.decoder.decode(a,{stream:!0}));try{var j;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;j=c();var k=j.match(/^WEBVTT([ \t].*)?$/);if(!k||!k[0])throw new b(b.Errors.BadSignature);i.state="HEADER"}for(var l=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(l?l=!1:j=c(),i.state){case"HEADER":/:/.test(j)?h(j):j||(i.state="ID");continue;case"NOTE":j||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(j)){i.state="NOTE";break}if(!j)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===j.indexOf("-->")){i.cue.id=j;continue}case"CUE":try{f(j,i.cue,i.regionList)}catch(m){i.reportOrThrowError(m),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var n=-1!==j.indexOf("-->");if(!j||n&&(l=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=j;continue;case"BADCUE":j||(i.state="ID");continue}}}catch(m){i.reportOrThrowError(m),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new b(b.Errors.BadSignature)}catch(c){a.reportOrThrowError(c)}return a.onflush&&a.onflush(),this}},a.WebVTT=n}(this,this.vttjs||{});
//# sourceMappingURL=azuremediaplayer.min.js.map
/* End of azuremediaplayer.min.js */;
/*! js-cookie v3.0.1 | MIT */
!function (e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = e || self, function () { var n = e.Cookies, o = e.Cookies = t(); o.noConflict = function () { return e.Cookies = n, o } }()) }(this, (function () { "use strict"; function e(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var o in n) e[o] = n[o] } return e } return function t(n, o) { function r(t, r, i) { if ("undefined" != typeof document) { "number" == typeof (i = e({}, o, i)).expires && (i.expires = new Date(Date.now() + 864e5 * i.expires)), i.expires && (i.expires = i.expires.toUTCString()), t = encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape); var c = ""; for (var u in i) i[u] && (c += "; " + u, !0 !== i[u] && (c += "=" + i[u].split(";")[0])); return document.cookie = t + "=" + n.write(r, t) + c } } return Object.create({ set: r, get: function (e) { if ("undefined" != typeof document && (!arguments.length || e)) { for (var t = document.cookie ? document.cookie.split("; ") : [], o = {}, r = 0; r < t.length; r++) { var i = t[r].split("="), c = i.slice(1).join("="); try { var u = decodeURIComponent(i[0]); if (o[u] = n.read(c, u), e === u) break } catch (e) { } } return e ? o[e] : o } }, remove: function (t, n) { r(t, "", e({}, n, { expires: -1 })) }, withAttributes: function (n) { return t(this.converter, e({}, this.attributes, n)) }, withConverter: function (n) { return t(e({}, this.converter, n), this.attributes) } }, { attributes: { value: Object.freeze(o) }, converter: { value: Object.freeze(n) } }) }({ read: function (e) { return '"' === e[0] && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent) }, write: function (e) { return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent) } }, { path: "/" }) }));;

// adds and removes the hidden attribute
$(document).on('click','[data-show]',function(){ var target = $($(this).attr('data-show')); target.removeAttr('hidden'); return false; });
$(document).on('click','[data-hide]',function(){ var target = $($(this).attr('data-hide')); target.attr('hidden',true); return false; });
$(document).on('click','[data-showhide]',function(){ 
	var target = $($(this).attr('data-showhide'));
	if ( target.attr('hidden') ) {
		target.removeAttr('hidden'); 
	} else {
		target.attr('hidden',true); 
	}
	return false; 
});

// adds and removes the visible attribute
$(document).on('click','[data-no-show]',function(){ var target = $($(this).attr('data-no-show')); target.removeAttr('visible'); return false; });
$(document).on('click','[data-no-hide]',function(){ var target = $($(this).attr('data-no-hide')); target.attr('visible',true); return false; });


// applies tooltips and date pickers automatically
$(document).ready(function(){
	$('[data-toggle=tooltip]').tooltip({container: 'body'});
	$('[data-toggle=tooltip]').click(function(){
		$(this).tooltip('hide');
	});
	$('input.form-control.date').datetimepicker({showClose:true});
});

// chart rendering
$(document).ready(function(){
	$('[data-chart]').each(function(){
		var data = eval('('+$(this).attr('data-chart')+')');
		$(this).highcharts(data);
	});
});

$(document).on('click','[data-toggle-guide]',function(){
    $('.content-wrapper').toggleClass('guide-on', $('.content-wrapper').hasClass('guide-on') === false, {
        duration: 0,
        complete: function () {
            $(window).trigger('resize');

            $('div[data-c-chart]').trigger('toggle-navigation');

            $('.content-wrapper').trigger('toggle-navigation');
        }
    });
});

// drag & drop
$(document).ready(function(){
	$('[data-sortable]').each(function(){
		var args_string = $(this).attr('data-sortable');
		var args = args_string.split(',');
		$(this).sortable({
		  connectWith: $.trim(args[0]),
		  handle: $.trim(args[1]),
		  placeholder: $.trim(args[2]) + ' sortable-placeholder',
		  helper: function(e, ui) {  
				ui.children().each(function() {  
    			$(this).width($(this).width());  
  			});  
  			return ui;  
			}
		});
	});
});



var c5App = angular.module('c5-App', ['ui.bootstrap','ngSanitize'],function($interpolateProvider) {
	$interpolateProvider.startSymbol('[[');
	$interpolateProvider.endSymbol(']]');
});

c5App.controller("TreeController", function($scope) {

	$scope.delete = function(col,index) {
		console.log(col.$parent)
		col.$parent.$parent.splice(index,1); 
	};
	$scope.add = function(col) {
			var post = col.cols.length + 1;
			var newName = col.name + '-' + post;
			col.cols.push({name: newName,cols: []});
	};
	$scope.hascols = function(col) {
			return (col.cols.length > 0)
	};
	$scope.cols = [
		{ size: 3 },
		{ size: 3 },
		{ size: 6, cols: [
			{ size: 4, cols: [
				{ size: 2 },
				{ size: 2 }
			] },
			{ size: 2 }
		] }
	];
});

var click = { x: 0, y: 0 };

c5App.directive('viewable', function() {
	return {
		restrict:'A',
		link: function(scope, element, attrs) {
			scope.$watch('style',function(newValue, oldValue) {
				scope.el.css = {
					'width': scope.el.style.width*100+'%',
					'height': scope.el.style.height*100+'%',
					'left': scope.el.style.left*100+'%',
					'top': scope.el.style.top*100+'%',
				}
			},true);
		}
	}
});

c5App.directive('configurable', function() {
	return {
		restrict:'A',
		link: function(scope, element, attrs) {
			scope.$watch('style',function(newValue, oldValue) {
				scope.el.css = {
					'width': scope.el.style.width*100+'%',
					'height': scope.el.style.height*100+'%',
					'left': scope.el.style.left*100+'%',
					'top': scope.el.style.top*100+'%',
				}
			},true);
			element.draggable({
				containment: "parent",
				start: function(event) {
					click.x = event.clientX;
					click.y = event.clientY;
				},
				drag: function(event, ui) {
					var zoom = scope.$parent.zoom;
					ui.position.left = (event.clientX - click.x + ui.originalPosition.left) / zoom;
					ui.position.top = (event.clientY - click.y + ui.originalPosition.top ) / zoom;
				},
				stop: function(event,ui) {
					$(this).css({
						left:(parseInt($(this).css("left")) / ($(this).parent().width() / 100)+"%"),
						top:(parseInt($(this).css("top")) / ($(this).parent().height() / 100)+"%"),
						width:(parseInt($(this).css("width")) / ($(this).parent().width() / 100)+"%"),
						height:(parseInt($(this).css("height")) / ($(this).parent().height() / 100)+"%")
					});
				}
			}).resizable({
				containment: "parent",
				handles: "n,e,s,w,ne,se,sw,nw",
				minWidth: false,
				minHeight: false,
				start: function(event) {
					click.x = event.clientX;
					click.y = event.clientY;
				},
				resize: function(event, ui) {
					var zoom = scope.$parent.zoom;
					ui.position.left = ( ui.position.left != ui.originalPosition.left ) ? ui.originalPosition.left + (event.clientX - click.x) / zoom : ui.position.left;
					ui.position.top = ( ui.position.top != ui.originalPosition.top ) ? ui.originalPosition.top + (event.clientY - click.y) / zoom : ui.position.top;
					ui.size.width = ui.originalSize.width + ( ui.size.width - ui.originalSize.width ) / zoom;
					ui.size.height = ui.originalSize.height + ( ui.size.height - ui.originalSize.height ) / zoom;
				},
				stop: function(event,ui) {
					$(this).css({
						left:(parseInt($(this).css("left")) / ($(this).parent().width() / 100)+"%"),
						top:(parseInt($(this).css("top")) / ($(this).parent().height() / 100)+"%"),
						width:(parseInt($(this).css("width")) / ($(this).parent().width() / 100)+"%"),
						height:(parseInt($(this).css("height")) / ($(this).parent().height() / 100)+"%")
					});
				}
			}).click(function(){
				element.draggable({disabled:true});
			});
		}
	}
});

c5App.controller('document-Controller', function ($scope) {
	
	$scope.document = {
		unit: 'in',
		pages: [{
			width: '8.5',
			height: '11',
			scan: '../../../../../Common/img/sample/flyer-1.jpg',
			elements: [{
				id: 1,
				type: 'text',
				style: { font: 'Arial', size: 32, color: '#ffffff', align: 'center', width: .7, height: .1, top: .075, left: .15 },
				settings: { editable: true, min: 0, max: 100, },
				content: { text: '<b>Lorem ipsum dolor sit amet</b>\nconsectetur adipisicing...' }
			},{
				id: 2,
				type: 'text',
				style: { font: 'Arial', size: 18, color: '#ffffff', align: 'center', width: .4, height: .03, top: .699, left: .3 },
				settings: { editable: true, min: 0, max: 100, },
				content: { text: 'Lorem ipsum dolor sit amet' }
			},{
				id: 3,
				type: 'text',
				style: { font: 'Arial', size: 15, color: '#ffffff', align: 'center', width: .4, height: .03, top: .736, left: .3 },
				settings: { editable: true, min: 0, max: 100, },
				content: { text: '<i>Lorem ipsum dolor sit amet</i>' }
			},{
				id: 4,
				type: 'text',
				style: { font: 'Arial', size: 12, color: '#999999', align: 'left', width: .7, height: .08, top: .8, left: .15 },
				settings: { editable: true, min: 0, max: 100, },
				content: { text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia...' }
			}]
		},{
			width: '8.5',
			height: '11',
			scan: '../../../../../Common/img/sample/flyer-2.jpg',
			elements: [],
		},{
			width: '6',
			height: '4',
			scan: '../../../../../Common/img/sample/postcard-1.jpg',
			elements: [],
		}]
	};
	$scope.active_element = null;
	$scope.activateElement = function(el,event){
		$scope.active_element = el;
		for ( var i = 0 ; i < $scope.document.pages.length ; i++ ) {
			var page = $scope.document.pages[i];
			for ( var e = 0 ; e < page.elements.length ; e++ ) {
				var element = page.elements[e];
				if ( el && el.id == element.id ) {
					element.active = true;
					if ( el.type == 'text' ) {
						$(event.target).draggable({disabled:true});
						$(event.target).find('.document-element-text').froalaEditor({
							toolbarInline: true,
							charCounterCount: false,
							toolbarButtons: ['bold', 'italic', 'underline', 'strikeThrough', 'color', '-', 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'indent', 'outdent', '-', 'insertImage', 'insertLink', 'insertFile', 'insertVideo', 'undo', 'redo']
						})
					}
				} else {
					element.active = false;
				}
			}
		}
	};
});


c5App.controller('c5-Controller', function ($scope) {
	$scope.items = [];
	$scope.items_selected = 0;
	$scope.$watchCollection('items', function(newVal, oldVal){
		var count = 0;
		for ( var x in $scope.items ) {
			if ( $scope.items[x] ) {
				count++;
			}
		}
		$scope.items_selected = count;
	});
  $scope.data = {
	columns: [
		{ type: 'check', responsive: false },
		{ type: 'sort', label: 'Deal Name' },
		{ type: 'sort', label: 'Parner' },
		{ type: 'sort', label: 'Country' },
		{ type: 'sort', label: 'State', sorted: true, order: 1 },
		{ type: 'sort', label: 'Assigned to' },
		{ type: 'sort', label: 'Account' },
		{ type: 'sort', label: 'Amount' },
		{ type: 'sort', label: 'Close Date' },
		{ type: 'sort', label: 'Stage' },
		{ type: 'sort', label: 'Days in Stage' },
		{ type: 'sort', label: 'Source' },
		{ type: 'sort', label: 'Campaign' },
		{ type: 'sort', label: 'Last Update' },
		{ type: 'sort', label: 'Reg Status' },
		{ type: 'sort', label: 'Expiration Date' },
		{ type: 'sort', label: 'Reg Assigned' },
		{ type: 'sort', label: 'Partner Action' },
		{ type: 'sort', label: 'Vendor Action' },
		{ type: 'sort', label: 'Created' },
		{ type: 'sort', label: 'MDF Request' },
		{ type: 'sort', label: 'Salesforce' },
		{ type: 'sort', label: 'Archived' },
	],
	rows: [
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Kyoto University', link: '#', primary: true },{ type: 'data', content: 'Kambei Technologies', link: '#' },{ type: 'data', content: 'Japan' },{ type: 'data', content: 'Kanagawa Prefecture', sorted: true },{ type: 'data', content: 'Toshiro Mifune' },{ type: 'data', content: 'Kyoto University', link: '#' },{ type: 'data', content: '$10,000' },{ type: 'data', content: '01.01.2015' },{ type: 'data', content: '380' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Arlington Campus', link: '#', primary: true },{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: 'USA' },{ type: 'data', content: 'Virginia', sorted: true },{ type: 'data', content: 'John Armonk' },			{ type: 'data', content: 'DC Utilities Ltd.', link: '#' },{ type: 'data', content: '$12,000' },{ type: 'data', content: '02.23.2015' },{ type: 'data', content: '120' },{ type: 'data', content: 'Partner' },{ type: 'data', content: '' },{ type: 'data', content: '01.03.2015' },{ type: 'data', content: 'New (Open)' },{ type: 'data', content: '' },{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '' },			{ type: 'data', content: '01.03.2014' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' },{ type: 'data', content: '' }],
	]};


	$scope.data = {
	columns: [
		{ type: 'check', responsive: false },
		{ type: 'sort', label: 'Name', primary: true },
		{ type: 'sort', label: 'Size' },
		{ type: 'sort', label: 'Type' },
		{ type: 'sort', label: 'Last Updated', sorted: true, order: 1 },
		{ type: 'sort', label: 'Owner' }
	],
	rows: [
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Lorem ipsum dolor sit amet', link: '#', primary: true, filetype: 'dir' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Consectetur adipiscing', link: '#', primary: true, filetype: 'doc' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Elit sed do eiusmod tempor incididunt', link: '#', primary: true, filetype: 'link' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut labore et dolore magna aliqua', link: '#', primary: true, filetype: 'video' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut enim ad minim veniam quis nostrud exercitation ullamco', link: '#', primary: true, filetype: 'pres' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Laboris nisi ut aliquip ex ea commodo consequat', link: '#', primary: true, filetype: 'brainshark' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Consectetur adipiscing', link: '#', primary: true, filetype: 'pdf' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Elit sed do eiusmod tempor incididunt', link: '#', primary: true, filetype: 'data' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut labore et dolore magna aliqua', link: '#', primary: true, filetype: 'dir' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut labore et dolore magna aliq', link: '#', primary: true, filetype: 'dir' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut enim ad minim veniam quis nostrud exercitation ullamco', link: '#', primary: true, filetype: 'dir' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Laboris nisi ut aliquip ex ea commodo consequat', link: '#', primary: true, filetype: 'dir' },{ type: 'data', content: '128KB'},{ type: 'data', content: 'MS Word' },{ type: 'data', content: '01/11/15', sorted: true },{ type: 'data', content: 'Rufus Vega', link: '#' }]
	]};


	$scope.data = {
	columns: [
		{ type: 'check', responsive: false },
		{ type: 'sort', label: 'Name', primary: true },
		{ type: 'sort', label: 'Current Balance and this is a very long title', sorted: true, order: 1, total: { content: '1234.40', type: 'currency' } },
		{ type: 'sort', label: 'Available Balance', total: { content: '1234.40', type: 'currency' } },
		{ type: 'sort', label: 'Liquid Amount', total: { content: '1234.40', type: 'currency' } },
		{ type: 'sort', label: 'Expiring', date: '05/27/2016', total: { content: '1234.40', type: 'currency' } }
	],
	rows: [
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Lorem ipsum dolor sit amet', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '321'},{ type: 'currency', content: '456.12'},{ type: 'currency', content: '12.13'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Consectetur adipiscing', link: '#', primary: true },{ sorted: true, type: 'currency', content: '194.32'},{ type: 'currency', content: '1654'},{ type: 'currency', content: '5216.00'},{ type: 'currency', content: '8'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Elit sed do eiusmod tempor incididunt', link: '#', primary: true },{ sorted: true, type: 'currency', content: '45.2'},{ type: 'currency', content: '3265.1'},{ type: 'currency', content: '2349.23'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut labore et dolore magna aliqua', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut enim ad minim veniam quis nostrud exercitation ullamco', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Laboris nisi ut aliquip ex ea commodo consequat', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Consectetur adipiscing', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Elit sed do eiusmod tempor incididunt', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut labore et dolore magna aliqua', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut labore et dolore magna aliq', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut enim ad minim veniam quis nostrud exercitation ullamco', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Lorem ipsum dolor sit amet', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '321'},{ type: 'currency', content: '456.12'},{ type: 'currency', content: '12.13'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Consectetur adipiscing', link: '#', primary: true },{ sorted: true, type: 'currency', content: '194.32'},{ type: 'currency', content: '1654'},{ type: 'currency', content: '5216.00'},{ type: 'currency', content: '8'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Elit sed do eiusmod tempor incididunt', link: '#', primary: true },{ sorted: true, type: 'currency', content: '45.2'},{ type: 'currency', content: '3265.1'},{ type: 'currency', content: '2349.23'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut labore et dolore magna aliqua', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut enim ad minim veniam quis nostrud exercitation ullamco', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Laboris nisi ut aliquip ex ea commodo consequat', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Consectetur adipiscing', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Elit sed do eiusmod tempor incididunt', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut labore et dolore magna aliqua', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut labore et dolore magna aliq', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}],
		[{ type: 'check', responsive: false },{ type: 'data', content: 'Ut enim ad minim veniam quis nostrud exercitation ullamco', link: '#', primary: true },{ sorted: true, type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'},{ type: 'currency', content: '100'}]
	]};

	$scope.document = {
		unit: 'in',
		pages: [{
			width: '8.5',
			height: '11',
			scan: '../../../../../Common/img/sample/flyer-1.jpg',
			active_element: false,
			elements: [{
				id: 1,
				type: 'text',
				style: { font: 'Arial', size: 32, color: '#fff', align: 'center', width: .7, height: .1, top: .075, left: .15 },
				settings: { editable: true, min: 0, max: 100, },
				content: { text: '<b>Lorem ipsum dolor sit amet</b>\nconsectetur adipisicing...' }
			},{
				id: 2,
				type: 'text',
				style: { font: 'Arial', size: 18, color: '#fff', align: 'center', width: .4, height: .03, top: .699, left: .3 },
				settings: { editable: true, min: 0, max: 100, },
				content: { text: 'Lorem ipsum dolor sit amet' }
			},{
				id: 3,
				type: 'text',
				style: { font: 'Arial', size: 15, color: '#fff', align: 'center', width: .4, height: .03, top: .736, left: .3 },
				settings: { editable: true, min: 0, max: 100, },
				content: { text: '<i>Lorem ipsum dolor sit amet</i>' }
			},{
				id: 4,
				type: 'text',
				style: { font: 'Arial', size: 12, color: '#999', align: 'left', width: .7, height: .08, top: .8, left: .15 },
				settings: { editable: true, min: 0, max: 100, },
				content: { text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia...' }
			}]
		},{
			width: '8.5',
			height: '11',
			scan: '../../../../../Common/img/sample/flyer-2.jpg'
		},{
			width: '6',
			height: '4',
			scan: '../../../../../Common/img/sample/postcard-1.jpg'
		}]
	};


	$scope.table_sizes = function() {
		var columns = $scope.data.columns;
		var rows = $scope.data.rows;
		var sizes = [];
		for ( var i = 0 ; i < columns.length ; i++ ) {
			if ( columns[i].type == 'check' ) {
				sizes[i] = 'check';
			} else {
				var label = columns[i].label.length;
				var contents = [];
				for ( var x = 0 ; x < rows.length ; x++ ) {
					contents.push( rows[x][i].content.length + ( ( columns[i].filetype ) ? 20 : 0 ) );
				}
				var max = Math.max.apply( Math, contents );
				var max = Math.max(max,label);
				sizes[i] = max;
			}
		}
		return sizes;
	}

	$scope.data.colsize = function(i) {
		var columns = $scope.data.columns;
		var rows = $scope.data.rows;
		size = null;
		if ( columns[i].type == 'check' ) {
			size = 'check';
		} else {
			var label = columns[i].label.length + ( ( columns[i].date ) ? columns[i].date.length : 0 );
			var contents = [];
			for ( var x = 0 ; x < rows.length ; x++ ) {
				contents.push( Number(rows[x][i].content.length) );
			}
			var max = Math.max.apply( Math, contents );
			var max = Math.max(max,label);
			size = max;
		}
		return ( size == 'check' ? 12 : size*8+10 );
	}

});
;
