-
Notifications
You must be signed in to change notification settings - Fork 238
Expand file tree
/
Copy pathableplayer.min.js
More file actions
3 lines (3 loc) · 252 KB
/
ableplayer.min.js
File metadata and controls
3 lines (3 loc) · 252 KB
1
2
3
/*! ableplayer V4.6.0-beta with DOMPurify included */
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).DOMPurify=e()}(this,(function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:i,getPrototypeOf:s,getOwnPropertyDescriptor:a}=Object;let{freeze:n,seal:r,create:o}=Object,{apply:l,construct:h}="undefined"!=typeof Reflect&&Reflect;n||(n=function freeze(t){return t}),r||(r=function seal(t){return t}),l||(l=function apply(t,e,i){return t.apply(e,i)}),h||(h=function construct(t,e){return new t(...e)});const p=unapply(Array.prototype.forEach),c=unapply(Array.prototype.lastIndexOf),u=unapply(Array.prototype.pop),d=unapply(Array.prototype.push),f=unapply(Array.prototype.splice),g=unapply(String.prototype.toLowerCase),m=unapply(String.prototype.toString),v=unapply(String.prototype.match),y=unapply(String.prototype.replace),b=unapply(String.prototype.indexOf),T=unapply(String.prototype.trim),P=unapply(Object.prototype.hasOwnProperty),k=unapply(RegExp.prototype.test),C=function unconstruct(t){return function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return h(t,i)}}(TypeError);function unapply(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return l(t,e,s)}}function addToSet(t,s){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;e&&e(t,null);let n=s.length;for(;n--;){let e=s[n];if("string"==typeof e){const t=a(e);t!==e&&(i(s)||(s[n]=t),e=t)}t[e]=!0}return t}function cleanArray(t){for(let e=0;e<t.length;e++){P(t,e)||(t[e]=null)}return t}function clone(e){const i=o(null);for(const[s,a]of t(e)){P(e,s)&&(Array.isArray(a)?i[s]=cleanArray(a):a&&"object"==typeof a&&a.constructor===Object?i[s]=clone(a):i[s]=a)}return i}function lookupGetter(t,e){for(;null!==t;){const i=a(t,e);if(i){if(i.get)return unapply(i.get);if("function"==typeof i.value)return unapply(i.value)}t=s(t)}return function fallbackValue(){return null}}const w=n(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=n(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),A=n(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$=n(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=n(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),S=n(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=n(["#text"]),I=n(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),M=n(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=n(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),L=n(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),E=r(/\{\{[\w\W]*|[\w\W]*\}\}/gm),O=r(/<%[\w\W]*|[\w\W]*%>/gm),F=r(/\$\{[\w\W]*/gm),R=r(/^data-[\-\w.\u00B7-\uFFFF]+$/),V=r(/^aria-[\-\w]+$/),z=r(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=r(/^(?:\w+script|data):/i),W=r(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_=r(/^html$/i),q=r(/^[a-z][.\w]*(-[.\w]+)+$/i);var j=Object.freeze({__proto__:null,ARIA_ATTR:V,ATTR_WHITESPACE:W,CUSTOM_ELEMENT:q,DATA_ATTR:R,DOCTYPE_NAME:_,ERB_EXPR:O,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:H,MUSTACHE_EXPR:E,TMPLIT_EXPR:F});const K=1,U=3,Y=7,G=8,X=9,Q=function getGlobal(){return"undefined"==typeof window?null:window};var J=function createDOMPurify(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const DOMPurify=t=>createDOMPurify(t);if(DOMPurify.version="3.2.6",DOMPurify.removed=[],!e||!e.document||e.document.nodeType!==X||!e.Element)return DOMPurify.isSupported=!1,DOMPurify;let{document:i}=e;const s=i,a=s.currentScript,{DocumentFragment:r,HTMLTemplateElement:l,Node:h,Element:E,NodeFilter:O,NamedNodeMap:F=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:R,DOMParser:V,trustedTypes:H}=e,W=E.prototype,q=lookupGetter(W,"cloneNode"),J=lookupGetter(W,"remove"),Z=lookupGetter(W,"nextSibling"),tt=lookupGetter(W,"childNodes"),et=lookupGetter(W,"parentNode");if("function"==typeof l){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let it,st="";const{implementation:at,createNodeIterator:nt,createDocumentFragment:rt,getElementsByTagName:ot}=i,{importNode:lt}=s;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};DOMPurify.isSupported="function"==typeof t&&"function"==typeof et&&at&&void 0!==at.createHTMLDocument;const{MUSTACHE_EXPR:pt,ERB_EXPR:ct,TMPLIT_EXPR:ut,DATA_ATTR:dt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:gt,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:vt}=j;let{IS_ALLOWED_URI:yt}=j,bt=null;const Tt=addToSet({},[...w,...D,...A,...x,...N]);let Pt=null;const kt=addToSet({},[...I,...M,...B,...L]);let Ct=Object.seal(o(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wt=null,Dt=null,At=!0,$t=!0,xt=!1,St=!0,Nt=!1,It=!0,Mt=!1,Bt=!1,Lt=!1,Et=!1,Ot=!1,Ft=!1,Rt=!0,Vt=!1,zt=!0,Ht=!1,Wt={},_t=null;const qt=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let jt=null;const Kt=addToSet({},["audio","video","img","source","image","track"]);let Ut=null;const Yt=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";let Jt=Qt,Zt=!1,te=null;const ee=addToSet({},[Gt,Xt,Qt],m);let ie=addToSet({},["mi","mo","mn","ms","mtext"]),se=addToSet({},["annotation-xml"]);const ae=addToSet({},["title","style","font","a","script"]);let ne=null;const re=["application/xhtml+xml","text/html"];let oe=null,le=null;const he=i.createElement("form"),pe=function isRegexOrFunction(t){return t instanceof RegExp||t instanceof Function},ce=function _parseConfig(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!le||le!==t){if(t&&"object"==typeof t||(t={}),t=clone(t),ne=-1===re.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,oe="application/xhtml+xml"===ne?m:g,bt=P(t,"ALLOWED_TAGS")?addToSet({},t.ALLOWED_TAGS,oe):Tt,Pt=P(t,"ALLOWED_ATTR")?addToSet({},t.ALLOWED_ATTR,oe):kt,te=P(t,"ALLOWED_NAMESPACES")?addToSet({},t.ALLOWED_NAMESPACES,m):ee,Ut=P(t,"ADD_URI_SAFE_ATTR")?addToSet(clone(Yt),t.ADD_URI_SAFE_ATTR,oe):Yt,jt=P(t,"ADD_DATA_URI_TAGS")?addToSet(clone(Kt),t.ADD_DATA_URI_TAGS,oe):Kt,_t=P(t,"FORBID_CONTENTS")?addToSet({},t.FORBID_CONTENTS,oe):qt,wt=P(t,"FORBID_TAGS")?addToSet({},t.FORBID_TAGS,oe):clone({}),Dt=P(t,"FORBID_ATTR")?addToSet({},t.FORBID_ATTR,oe):clone({}),Wt=!!P(t,"USE_PROFILES")&&t.USE_PROFILES,At=!1!==t.ALLOW_ARIA_ATTR,$t=!1!==t.ALLOW_DATA_ATTR,xt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,St=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Nt=t.SAFE_FOR_TEMPLATES||!1,It=!1!==t.SAFE_FOR_XML,Mt=t.WHOLE_DOCUMENT||!1,Et=t.RETURN_DOM||!1,Ot=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Lt=t.FORCE_BODY||!1,Rt=!1!==t.SANITIZE_DOM,Vt=t.SANITIZE_NAMED_PROPS||!1,zt=!1!==t.KEEP_CONTENT,Ht=t.IN_PLACE||!1,yt=t.ALLOWED_URI_REGEXP||z,Jt=t.NAMESPACE||Qt,ie=t.MATHML_TEXT_INTEGRATION_POINTS||ie,se=t.HTML_INTEGRATION_POINTS||se,Ct=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&pe(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ct.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&pe(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ct.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ct.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Nt&&($t=!1),Ot&&(Et=!0),Wt&&(bt=addToSet({},N),Pt=[],!0===Wt.html&&(addToSet(bt,w),addToSet(Pt,I)),!0===Wt.svg&&(addToSet(bt,D),addToSet(Pt,M),addToSet(Pt,L)),!0===Wt.svgFilters&&(addToSet(bt,A),addToSet(Pt,M),addToSet(Pt,L)),!0===Wt.mathMl&&(addToSet(bt,x),addToSet(Pt,B),addToSet(Pt,L))),t.ADD_TAGS&&(bt===Tt&&(bt=clone(bt)),addToSet(bt,t.ADD_TAGS,oe)),t.ADD_ATTR&&(Pt===kt&&(Pt=clone(Pt)),addToSet(Pt,t.ADD_ATTR,oe)),t.ADD_URI_SAFE_ATTR&&addToSet(Ut,t.ADD_URI_SAFE_ATTR,oe),t.FORBID_CONTENTS&&(_t===qt&&(_t=clone(_t)),addToSet(_t,t.FORBID_CONTENTS,oe)),zt&&(bt["#text"]=!0),Mt&&addToSet(bt,["html","head","body"]),bt.table&&(addToSet(bt,["tbody"]),delete wt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');it=t.TRUSTED_TYPES_POLICY,st=it.createHTML("")}else void 0===it&&(it=function _createTrustedTypesPolicy(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const s="data-tt-policy-suffix";e&&e.hasAttribute(s)&&(i=e.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return null}}(H,a)),null!==it&&"string"==typeof st&&(st=it.createHTML(""));n&&n(t),le=t}},ue=addToSet({},[...D,...A,...$]),de=addToSet({},[...x,...S]),fe=function _forceRemove(t){d(DOMPurify.removed,{element:t});try{et(t).removeChild(t)}catch(e){J(t)}},ge=function _removeAttribute(t,e){try{d(DOMPurify.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){d(DOMPurify.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Et||Ot)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},me=function _initDocument(t){let e=null,s=null;if(Lt)t="<remove></remove>"+t;else{const e=v(t,/^[\r\n\t ]+/);s=e&&e[0]}"application/xhtml+xml"===ne&&Jt===Qt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=it?it.createHTML(t):t;if(Jt===Qt)try{e=(new V).parseFromString(a,ne)}catch(t){}if(!e||!e.documentElement){e=at.createDocument(Jt,"template",null);try{e.documentElement.innerHTML=Zt?st:a}catch(t){}}const n=e.body||e.documentElement;return t&&s&&n.insertBefore(i.createTextNode(s),n.childNodes[0]||null),Jt===Qt?ot.call(e,Mt?"html":"body")[0]:Mt?e.documentElement:n},ve=function _createNodeIterator(t){return nt.call(t.ownerDocument||t,t,O.SHOW_ELEMENT|O.SHOW_COMMENT|O.SHOW_TEXT|O.SHOW_PROCESSING_INSTRUCTION|O.SHOW_CDATA_SECTION,null)},ye=function _isClobbered(t){return t instanceof R&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof F)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},be=function _isNode(t){return"function"==typeof h&&t instanceof h};function _executeHooks(t,e,i){p(t,(t=>{t.call(DOMPurify,e,i,le)}))}const Te=function _sanitizeElements(t){let e=null;if(_executeHooks(ht.beforeSanitizeElements,t,null),ye(t))return fe(t),!0;const i=oe(t.nodeName);if(_executeHooks(ht.uponSanitizeElement,t,{tagName:i,allowedTags:bt}),It&&t.hasChildNodes()&&!be(t.firstElementChild)&&k(/<[/\w!]/g,t.innerHTML)&&k(/<[/\w!]/g,t.textContent))return fe(t),!0;if(t.nodeType===Y)return fe(t),!0;if(It&&t.nodeType===G&&k(/<[/\w]/g,t.data))return fe(t),!0;if(!bt[i]||wt[i]){if(!wt[i]&&ke(i)){if(Ct.tagNameCheck instanceof RegExp&&k(Ct.tagNameCheck,i))return!1;if(Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(i))return!1}if(zt&&!_t[i]){const e=et(t)||t.parentNode,i=tt(t)||t.childNodes;if(i&&e){for(let s=i.length-1;s>=0;--s){const a=q(i[s],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,Z(t))}}}return fe(t),!0}return t instanceof E&&!function _checkValidNamespace(t){let e=et(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});const i=g(t.tagName),s=g(e.tagName);return!!te[t.namespaceURI]&&(t.namespaceURI===Xt?e.namespaceURI===Qt?"svg"===i:e.namespaceURI===Gt?"svg"===i&&("annotation-xml"===s||ie[s]):Boolean(ue[i]):t.namespaceURI===Gt?e.namespaceURI===Qt?"math"===i:e.namespaceURI===Xt?"math"===i&&se[s]:Boolean(de[i]):t.namespaceURI===Qt?!(e.namespaceURI===Xt&&!se[s])&&!(e.namespaceURI===Gt&&!ie[s])&&!de[i]&&(ae[i]||!ue[i]):!("application/xhtml+xml"!==ne||!te[t.namespaceURI]))}(t)?(fe(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!k(/<\/no(script|embed|frames)/i,t.innerHTML)?(Nt&&t.nodeType===U&&(e=t.textContent,p([pt,ct,ut],(t=>{e=y(e,t," ")})),t.textContent!==e&&(d(DOMPurify.removed,{element:t.cloneNode()}),t.textContent=e)),_executeHooks(ht.afterSanitizeElements,t,null),!1):(fe(t),!0)},Pe=function _isValidAttribute(t,e,s){if(Rt&&("id"===e||"name"===e)&&(s in i||s in he))return!1;if($t&&!Dt[e]&&k(dt,e));else if(At&&k(ft,e));else if(!Pt[e]||Dt[e]){if(!(ke(t)&&(Ct.tagNameCheck instanceof RegExp&&k(Ct.tagNameCheck,t)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(t))&&(Ct.attributeNameCheck instanceof RegExp&&k(Ct.attributeNameCheck,e)||Ct.attributeNameCheck instanceof Function&&Ct.attributeNameCheck(e))||"is"===e&&Ct.allowCustomizedBuiltInElements&&(Ct.tagNameCheck instanceof RegExp&&k(Ct.tagNameCheck,s)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(s))))return!1}else if(Ut[e]);else if(k(yt,y(s,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==b(s,"data:")||!jt[t]){if(xt&&!k(gt,y(s,mt,"")));else if(s)return!1}else;return!0},ke=function _isBasicCustomElement(t){return"annotation-xml"!==t&&v(t,vt)},Ce=function _sanitizeAttributes(t){_executeHooks(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||ye(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Pt,forceKeepAttr:void 0};let s=e.length;for(;s--;){const a=e[s],{name:n,namespaceURI:r,value:o}=a,l=oe(n),h=o;let c="value"===n?h:T(h);if(i.attrName=l,i.attrValue=c,i.keepAttr=!0,i.forceKeepAttr=void 0,_executeHooks(ht.uponSanitizeAttribute,t,i),c=i.attrValue,!Vt||"id"!==l&&"name"!==l||(ge(n,t),c="user-content-"+c),It&&k(/((--!?|])>)|<\/(style|title)/i,c)){ge(n,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){ge(n,t);continue}if(!St&&k(/\/>/i,c)){ge(n,t);continue}Nt&&p([pt,ct,ut],(t=>{c=y(c,t," ")}));const d=oe(t.nodeName);if(Pe(d,l,c)){if(it&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(r);else switch(H.getAttributeType(d,l)){case"TrustedHTML":c=it.createHTML(c);break;case"TrustedScriptURL":c=it.createScriptURL(c)}if(c!==h)try{r?t.setAttributeNS(r,n,c):t.setAttribute(n,c),ye(t)?fe(t):u(DOMPurify.removed)}catch(e){ge(n,t)}}else ge(n,t)}_executeHooks(ht.afterSanitizeAttributes,t,null)},we=function _sanitizeShadowDOM(t){let e=null;const i=ve(t);for(_executeHooks(ht.beforeSanitizeShadowDOM,t,null);e=i.nextNode();)_executeHooks(ht.uponSanitizeShadowNode,e,null),Te(e),Ce(e),e.content instanceof r&&_sanitizeShadowDOM(e.content);_executeHooks(ht.afterSanitizeShadowDOM,t,null)};return DOMPurify.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,a=null,n=null,o=null;if(Zt=!t,Zt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!be(t)){if("function"!=typeof t.toString)throw C("toString is not a function");if("string"!=typeof(t=t.toString()))throw C("dirty is not a string, aborting")}if(!DOMPurify.isSupported)return t;if(Bt||ce(e),DOMPurify.removed=[],"string"==typeof t&&(Ht=!1),Ht){if(t.nodeName){const e=oe(t.nodeName);if(!bt[e]||wt[e])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof h)i=me("\x3c!----\x3e"),a=i.ownerDocument.importNode(t,!0),a.nodeType===K&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!Et&&!Nt&&!Mt&&-1===t.indexOf("<"))return it&&Ft?it.createHTML(t):t;if(i=me(t),!i)return Et?null:Ft?st:""}i&&Lt&&fe(i.firstChild);const l=ve(Ht?t:i);for(;n=l.nextNode();)Te(n),Ce(n),n.content instanceof r&&we(n.content);if(Ht)return t;if(Et){if(Ot)for(o=rt.call(i.ownerDocument);i.firstChild;)o.appendChild(i.firstChild);else o=i;return(Pt.shadowroot||Pt.shadowrootmode)&&(o=lt.call(s,o,!0)),o}let c=Mt?i.outerHTML:i.innerHTML;return Mt&&bt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&k(_,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),Nt&&p([pt,ct,ut],(t=>{c=y(c,t," ")})),it&&Ft?it.createHTML(c):c},DOMPurify.setConfig=function(){ce(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Bt=!0},DOMPurify.clearConfig=function(){le=null,Bt=!1},DOMPurify.isValidAttribute=function(t,e,i){le||ce({});const s=oe(t),a=oe(e);return Pe(s,a,i)},DOMPurify.addHook=function(t,e){"function"==typeof e&&d(ht[t],e)},DOMPurify.removeHook=function(t,e){if(void 0!==e){const i=c(ht[t],e);return-1===i?void 0:f(ht[t],i,1)[0]}return u(ht[t])},DOMPurify.removeHooks=function(t){ht[t]=[]},DOMPurify.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},DOMPurify}();return J}));var AblePlayerInstances=[];!function(t){t((function(){t("video, audio").each((function(e,i){void 0!==t(i).data("able-player")&&AblePlayerInstances.push(new AblePlayer(t(this),t(i)))}))})),window.onYouTubeIframeAPIReady=function(){AblePlayer.youTubeIframeAPIReady=!0,t("body").trigger("youTubeIframeAPIReady",[])},t(window).on("keydown",(function(t){1===AblePlayer.nextIndex&&AblePlayer.lastCreated.onPlayerKeyPress(t)})),window.AblePlayer=function(e){if(AblePlayer.lastCreated=this,this.media=e,0!==t(e).length){void 0!==t(e).attr("autoplay")?(this.autoplay=!0,this.okToPlay=!0):(this.autoplay=!1,this.okToPlay=!1),void 0!==t(e).attr("loop")?this.loop=!0:this.loop=!1,void 0!==t(e).attr("playsinline")?this.playsInline="1":this.playsInline="0",t(e).attr("poster")?this.hasPoster=!0:this.hasPoster=!1,t(e).attr("width")&&(this.width=t(e).attr("width")),t(e).attr("height")&&(this.height=t(e).attr("height"));var i=t(e).data("start-time"),s=!("number"!=typeof i&&("string"!=typeof i||""===value.trim()||isNaN(value)||!isFinite(Number(value))));if(this.startTime=void 0!==i&&s?t(e).data("start-time"):0,void 0!==t(e).data("debug")&&!1!==t(e).data("debug")?this.debug=!0:this.debug=!1,void 0!==t(e).data("root-path")?this.rootPath=t(e).data("root-path").replace(/\/?$/,"/"):this.rootPath=this.getRootPath(),this.defaultVolume=7,void 0!==t(e).data("volume")&&""!==t(e).data("volume")){var a=t(e).data("volume");a>=0&&a<=10&&(this.defaultVolume=a)}if(this.volume=this.defaultVolume,void 0!==t(e).data("use-chapters-button")&&!1===t(e).data("use-chapters-button")?this.useChaptersButton=!1:this.useChaptersButton=!0,void 0!==t(e).data("descriptions-audible")&&!1===t(e).data("descriptions-audible")||void 0!==t(e).data("description-audible")&&!1===t(e).data("description-audible")?this.readDescriptionsAloud=!1:this.readDescriptionsAloud=!0,this.descVoices=[],"screenreader"==t(e).data("desc-reader")?this.descReader="screenreader":this.descReader="browser","off"==t(e).data("state-captions")?this.defaultStateCaptions=0:this.defaultStateCaptions=1,"on"==t(e).data("state-descriptions")?this.defaultStateDescriptions=1:this.defaultStateDescriptions=0,"off"==t(e).data("desc-pause-default")?this.defaultDescPause=0:this.defaultDescPause=1,void 0!==t(e).data("heading-level")&&""!==t(e).data("heading-level")){var n=t(e).data("heading-level");/^[0-6]*$/.test(n)&&(this.playerHeadingLevel=n)}if(void 0!==t(e).data("transcript-div")&&""!==t(e).data("transcript-div")?this.transcriptDivLocation=t(e).data("transcript-div"):this.transcriptDivLocation=null,void 0!==t(e).data("include-transcript")&&!1===t(e).data("include-transcript")?this.hideTranscriptButton=!0:this.hideTranscriptButton=null,this.transcriptType=null,void 0!==t(e).data("transcript-src")?(this.transcriptSrc=t(e).data("transcript-src"),this.transcriptSrcHasRequiredParts()&&(this.transcriptType="manual")):t(e).find('track[kind="captions"], track[kind="subtitles"]').length>0&&(this.transcriptDivLocation?this.transcriptType="external":this.transcriptType="popup"),void 0!==t(e).data("lyrics-mode")&&!1!==t(e).data("lyrics-mode")?this.lyricsMode=!0:this.lyricsMode=!1,void 0!==t(e).data("transcript-title")&&""!==t(e).data("transcript-title")&&(this.transcriptTitle=t(e).data("transcript-title")),"overlay"===t(e).data("captions-position")?this.defaultCaptionsPosition="overlay":this.defaultCaptionsPosition="below",void 0!==t(e).data("chapters-div")&&""!==t(e).data("chapters-div")&&(this.chaptersDivLocation=t(e).data("chapters-div")),void 0!==t(e).data("chapters-title")&&(this.chaptersTitle=t(e).data("chapters-title")),void 0!==t(e).data("chapters-default")&&""!==t(e).data("chapters-default")?this.defaultChapter=t(e).data("chapters-default"):this.defaultChapter=null,"arrows"===t(e).data("speed-icons")?this.speedIcons="arrows":this.speedIcons="animals","chapter"===t(e).data("seekbar-scope")||"chapters"===t(e).data("seekbar-scope")?this.seekbarScope="chapter":this.seekbarScope="video",void 0!==t(e).data("youtube-id")&&""!==t(e).data("youtube-id")&&(this.youTubeId=this.getYouTubeId(t(e).data("youtube-id"))),void 0!==t(e).data("youtube-desc-id")&&""!==t(e).data("youtube-desc-id")&&(this.youTubeDescId=this.getYouTubeId(t(e).data("youtube-desc-id"))),void 0!==t(e).data("youtube-nocookie")&&t(e).data("youtube-nocookie")?this.youTubeNoCookie=!0:this.youTubeNoCookie=!1,void 0!==t(e).data("vimeo-id")&&""!==t(e).data("vimeo-id")&&(this.vimeoId=this.getVimeoId(t(e).data("vimeo-id"))),void 0!==t(e).data("vimeo-desc-id")&&""!==t(e).data("vimeo-desc-id")&&(this.vimeoDescId=this.getVimeoId(t(e).data("vimeo-desc-id"))),"legacy"==t(e).data("skin")?this.skin="legacy":this.skin="2020",void 0!==t(e).data("width")?this.playerWidth=parseInt(t(e).data("width")):t(e)[0].getAttribute("width")?this.playerWidth=parseInt(t(e)[0].getAttribute("width")):this.playerWidth=null,this.iconType="font",this.forceIconType=!1,void 0!==t(e).data("icon-type")&&""!==t(e).data("icon-type")){var r=t(e).data("icon-type");"font"!==r&&"image"!=r&&"svg"!=r||(this.iconType=r,this.forceIconType=!0)}if(void 0!==t(e).data("allow-fullscreen")&&!1===t(e).data("allow-fullscreen")?this.allowFullscreen=!1:this.allowFullscreen=!0,this.clickedFullscreenButton=!1,this.restoringAfterFullscreen=!1,this.defaultSeekInterval=10,this.useFixedSeekInterval=!1,void 0!==t(e).data("seek-interval")&&""!==t(e).data("seek-interval")){var o=t(e).data("seek-interval");/^[1-9][0-9]*$/.test(o)&&(this.seekInterval=o,this.useFixedSeekInterval=!0)}void 0!==t(e).data("show-now-playing")&&!1===t(e).data("show-now-playing")?this.showNowPlaying=!1:this.showNowPlaying=!0,void 0!==t(e).data("use-ttml")?(this.useTtml=!0,this.convert=require("xml-js")):this.useTtml=!1,void 0!==t(e).data("test-fallback")&&!1!==t(e).data("test-fallback")?"2"==t(e).data("test-fallback")?this.testFallback=2:this.testFallback=1:this.testFallback=!1,void 0!==t(e).data("lang")&&""!==t(e).data("lang")?this.lang=t(e).data("lang").toLowerCase():this.lang=null,void 0!==t(e).data("meta-type")&&""!==t(e).data("meta-type")&&(this.metaType=t(e).data("meta-type")),void 0!==t(e).data("meta-div")&&""!==t(e).data("meta-div")&&(this.metaDiv=t(e).data("meta-div")),void 0!==t(e).data("search-div")&&""!==t(e).data("search-div")&&(this.searchDiv=t(e).data("search-div"),void 0!==t(e).data("search")&&""!==t(e).data("search")&&(this.searchString=t(e).data("search")),void 0!==t(e).data("search-lang")&&""!==t(e).data("search-lang")?this.searchLang=t(e).data("search-lang"):this.searchLang=null,void 0!==t(e).data("search-ignore-caps")&&!1!==t(e).data("search-ignore-caps")?this.searchIgnoreCaps=!0:this.searchIgnoreCaps=!1,void 0!==t(e).data("search-div")&&""!==t(e).data("search-div")&&(this.searchString=t(e).data("search"),this.searchDiv=t(e).data("search-div"))),void 0!==t(e).data("hide-controls")&&!1!==t(e).data("hide-controls")?(this.hideControls=!0,this.hideControlsOriginal=!0):(this.hideControls=!1,this.hideControlsOriginal=!1),void 0!==t(e).data("steno-mode")&&!1!==t(e).data("steno-mode")?(this.stenoMode=!0,void 0!==t(e).data("steno-iframe-id")&&""!==t(e).data("steno-iframe-id")?(this.stenoFrameId=t(e).data("steno-iframe-id"),this.$stenoFrame=t("#"+this.stenoFrameId),this.$stenoFrame.length||(this.stenoFrameId=null,this.$stenoFrame=null)):(this.stenoFrameId=null,this.$stenoFrame=null)):(this.stenoMode=!1,this.stenoFrameId=null,this.$stenoFrame=null),this.setDefaults(),this.ableIndex=AblePlayer.nextIndex,AblePlayer.nextIndex+=1,this.title=t(e).attr("title"),this.tt={};var l=this;t.when(this.getTranslationText()).then((function(){l.countProperties(l.tt)>50?l.setup():l.provideFallback()})).fail((function(){l.provideFallback()}))}else this.provideFallback()},AblePlayer.nextIndex=0,AblePlayer.prototype.setup=function(){var t=this;this.initializing=!0,this.reinitialize().then((function(){t.player?t.setupInstance().then((function(){t.setupInstancePlaylist(),t.hasPlaylist||t.recreatePlayer().then((function(){t.initializing=!1,t.playerCreated=!0}))})):t.provideFallback()}))},AblePlayer.getActiveDOMElement=function(){for(var t=document.activeElement;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t},AblePlayer.localGetElementById=function(e,i){return e.getRootNode?t(e.getRootNode().querySelector("#"+i)):t(document.getElementById(i))},AblePlayer.youTubeIframeAPIReady=!1,AblePlayer.loadingYouTubeIframeAPI=!1}(jQuery),function(t){AblePlayer.prototype.setDefaults=function(){this.playerCreated=!1,this.playing=!1,this.paused=!0,this.clickedPlay=!1,this.fullscreen=!1,this.swappingSrc=!1,this.initializing=!1,this.cueingPlaylistItems=!1,this.buttonWithFocus=null,this.speechEnabled=null,this.setIconColor(),this.setButtonImages()},AblePlayer.prototype.getRootPath=function(){var t,e,i,s,a,n;for(t=document.getElementsByTagName("script"),e=0;e<t.length;e++)if(-1!==(i=t[e].src).substring(i.lastIndexOf("/")).indexOf("ableplayer")){s=i.split("?")[0];break}return n=(a=s.split("/").slice(0,-1).join("/")).lastIndexOf("/"),a.substring(0,n)+"/"},AblePlayer.prototype.setIconColor=function(){var e,i,s,a,n;for(e=["controller","toolbar"],i=0;i<e.length;i++)"controller"==e[i]?s=t("<div>",{class:"able-controller"}).hide():"toolbar"===e[i]&&(s=t("<div>",{class:"able-window-toolbar"}).hide()),t("body").append(s),n=.2126*(a=s.css("background-color").replace(/[^\d,]/g,"").split(","))[0]+.7152*a[1]+.0722*a[2]<125?"white":"black","controller"===e[i]?this.iconColor=n:"toolbar"===e[i]&&(this.toolbarIconColor=n),s.remove()},AblePlayer.prototype.setButtonImages=function(){this.imgPath=this.rootPath+"button-icons/"+this.iconColor+"/",this.playButtonImg=this.imgPath+"play.png",this.pauseButtonImg=this.imgPath+"pause.png",this.restartButtonImg=this.imgPath+"restart.png",this.rewindButtonImg=this.imgPath+"rewind.png",this.forwardButtonImg=this.imgPath+"forward.png",this.previousButtonImg=this.imgPath+"previous.png",this.nextButtonImg=this.imgPath+"next.png","arrows"===this.speedIcons?(this.fasterButtonImg=this.imgPath+"slower.png",this.slowerButtonImg=this.imgPath+"faster.png"):"animals"===this.speedIcons&&(this.fasterButtonImg=this.imgPath+"rabbit.png",this.slowerButtonImg=this.imgPath+"turtle.png"),this.captionsButtonImg=this.imgPath+"captions.png",this.chaptersButtonImg=this.imgPath+"chapters.png",this.signButtonImg=this.imgPath+"sign.png",this.transcriptButtonImg=this.imgPath+"transcript.png",this.descriptionsButtonImg=this.imgPath+"descriptions.png",this.fullscreenExpandButtonImg=this.imgPath+"fullscreen-expand.png",this.fullscreenCollapseButtonImg=this.imgPath+"fullscreen-collapse.png",this.prefsButtonImg=this.imgPath+"preferences.png",this.helpButtonImg=this.imgPath+"help.png"},AblePlayer.prototype.getSvgData=function(t){var e=Array();switch(t){case"play":e[0]="0 0 16 20",e[1]="M0 18.393v-16.429q0-0.29 0.184-0.402t0.441 0.033l14.821 8.237q0.257 0.145 0.257 0.346t-0.257 0.346l-14.821 8.237q-0.257 0.145-0.441 0.033t-0.184-0.402z";break;case"pause":e[0]="0 0 20 20",e[1]="M0 18.036v-15.714q0-0.29 0.212-0.502t0.502-0.212h5.714q0.29 0 0.502 0.212t0.212 0.502v15.714q0 0.29-0.212 0.502t-0.502 0.212h-5.714q-0.29 0-0.502-0.212t-0.212-0.502zM10 18.036v-15.714q0-0.29 0.212-0.502t0.502-0.212h5.714q0.29 0 0.502 0.212t0.212 0.502v15.714q0 0.29-0.212 0.502t-0.502 0.212h-5.714q-0.29 0-0.502-0.212t-0.212-0.502z";break;case"stop":e[0]="0 0 20 20",e[1]="M0 18.036v-15.714q0-0.29 0.212-0.502t0.502-0.212h15.714q0.29 0 0.502 0.212t0.212 0.502v15.714q0 0.29-0.212 0.502t-0.502 0.212h-15.714q-0.29 0-0.502-0.212t-0.212-0.502z";break;case"restart":e[0]="0 0 20 20",e[1]="M18 8h-6l2.243-2.243c-1.133-1.133-2.64-1.757-4.243-1.757s-3.109 0.624-4.243 1.757c-1.133 1.133-1.757 2.64-1.757 4.243s0.624 3.109 1.757 4.243c1.133 1.133 2.64 1.757 4.243 1.757s3.109-0.624 4.243-1.757c0.095-0.095 0.185-0.192 0.273-0.292l1.505 1.317c-1.466 1.674-3.62 2.732-6.020 2.732-4.418 0-8-3.582-8-8s3.582-8 8-8c2.209 0 4.209 0.896 5.656 2.344l2.344-2.344v6z";break;case"rewind":e[0]="0 0 20 20",e[1]="M11.25 3.125v6.25l6.25-6.25v13.75l-6.25-6.25v6.25l-6.875-6.875z";break;case"forward":e[0]="0 0 20 20",e[1]="M10 16.875v-6.25l-6.25 6.25v-13.75l6.25 6.25v-6.25l6.875 6.875z";break;case"previous":e[0]="0 0 20 20",e[1]="M5 17.5v-15h2.5v6.875l6.25-6.25v13.75l-6.25-6.25v6.875z";break;case"next":e[0]="0 0 20 20",e[1]="M15 2.5v15h-2.5v-6.875l-6.25 6.25v-13.75l6.25 6.25v-6.875z";break;case"slower":e[0]="0 0 20 20",e[1]="M0 7.321q0-0.29 0.212-0.502t0.502-0.212h10q0.29 0 0.502 0.212t0.212 0.502-0.212 0.502l-5 5q-0.212 0.212-0.502 0.212t-0.502-0.212l-5-5q-0.212-0.212-0.212-0.502z";break;case"faster":e[0]="0 0 11 20",e[1]="M0 12.411q0-0.29 0.212-0.502l5-5q0.212-0.212 0.502-0.212t0.502 0.212l5 5q0.212 0.212 0.212 0.502t-0.212 0.502-0.502 0.212h-10q-0.29 0-0.502-0.212t-0.212-0.502z";break;case"turtle":e[0]="0 0 20 20",e[1]="M17.212 3.846c-0.281-0.014-0.549 0.025-0.817 0.144-1.218 0.542-1.662 2.708-2.163 3.942-1.207 2.972-7.090 4.619-11.755 5.216-0.887 0.114-1.749 0.74-2.428 1.466 0.82-0.284 2.126-0.297 2.74 0.144 0.007 0.488-0.376 1.062-0.625 1.37-0.404 0.5-0.398 0.793 0.12 0.793 0.473 0 0.752 0.007 1.635 0 0.393-0.003 0.618-0.16 1.49-1.49 3.592 0.718 5.986-0.264 5.986-0.264s0.407 1.755 1.418 1.755h1.49c0.633 0 0.667-0.331 0.625-0.433-0.448-1.082-0.68-1.873-0.769-2.5-0.263-1.857 0.657-3.836 2.524-5.457 0.585 0.986 2.253 0.845 2.909-0.096s0.446-2.268-0.192-3.221c-0.49-0.732-1.345-1.327-2.188-1.37zM8.221 4.663c-0.722-0.016-1.536 0.111-2.5 0.409-4.211 1.302-4.177 4.951-3.51 5.745 0 0-0.955 0.479-0.409 1.274 0.448 0.652 3.139 0.191 5.409-0.529s4.226-1.793 5.312-2.692c0.948-0.785 0.551-2.106-0.505-1.947-0.494-0.98-1.632-2.212-3.798-2.26zM18.846 5.962c0.325 0 0.577 0.252 0.577 0.577s-0.252 0.577-0.577 0.577c-0.325 0-0.577-0.252-0.577-0.577s0.252-0.577 0.577-0.577z";break;case"rabbit":e[0]="0 0 20 20",e[1]="M10.817 0c-2.248 0-1.586 0.525-1.154 0.505 1.551-0.072 5.199 0.044 6.851 2.428 0 0-1.022-2.933-5.697-2.933zM10.529 0.769c-2.572 0-2.837 0.51-2.837 1.106 0 0.545 1.526 0.836 2.524 0.697 2.778-0.386 4.231-0.12 5.264 0.865-1.010 0.779-0.75 1.401-1.274 1.851-1.093 0.941-2.643-0.673-4.976-0.673-2.496 0-4.712 1.92-4.712 4.76-0.157-0.537-0.769-0.913-1.442-0.913-0.974 0-1.514 0.637-1.514 1.49 0 0.769 1.13 1.791 2.861 0.938 0.499 1.208 2.265 1.364 2.452 1.418 0.538 0.154 1.875 0.098 1.875 0.865 0 0.794-1.034 1.094-1.034 1.707 0 1.070 1.758 0.873 2.284 1.034 1.683 0.517 2.103 1.214 2.788 2.212 0.771 1.122 2.572 1.408 2.572 0.625 0-3.185-4.413-4.126-4.399-4.135 0.608-0.382 2.139-1.397 2.139-3.534 0-1.295-0.703-2.256-1.755-2.861 1.256 0.094 2.572 1.205 2.572 2.74 0 1.877-0.653 2.823-0.769 2.957 1.975-1.158 3.193-3.91 3.029-6.37 0.61 0.401 1.27 0.577 1.971 0.625 0.751 0.052 1.475-0.225 1.635-0.529 0.38-0.723 0.162-2.321-0.12-2.837-0.763-1.392-2.236-1.73-3.606-1.683-1.202-1.671-3.812-2.356-5.529-2.356zM1.37 3.077l-0.553 1.538h3.726c0.521-0.576 1.541-1.207 2.284-1.538h-5.457zM18.846 5.192c0.325 0 0.577 0.252 0.577 0.577s-0.252 0.577-0.577 0.577c-0.325 0-0.577-0.252-0.577-0.577s0.252-0.577 0.577-0.577zM0.553 5.385l-0.553 1.538h3.197c0.26-0.824 0.586-1.328 0.769-1.538h-3.413z";break;case"ellipsis":e[0]="0 0 20 20",e[1]="M10.001 7.8c-1.215 0-2.201 0.985-2.201 2.2s0.986 2.2 2.201 2.2c1.215 0 2.199-0.985 2.199-2.2s-0.984-2.2-2.199-2.2zM3.001 7.8c-1.215 0-2.201 0.985-2.201 2.2s0.986 2.2 2.201 2.2c1.215 0 2.199-0.986 2.199-2.2s-0.984-2.2-2.199-2.2zM17.001 7.8c-1.215 0-2.201 0.985-2.201 2.2s0.986 2.2 2.201 2.2c1.215 0 2.199-0.985 2.199-2.2s-0.984-2.2-2.199-2.2z";break;case"pipe":e[0]="0 0 20 20",e[1]="M10.15 0.179h0.623c0.069 0 0.127 0.114 0.127 0.253v19.494c0 0.139-0.057 0.253-0.127 0.253h-1.247c-0.069 0-0.126-0.114-0.126-0.253v-19.494c0-0.139 0.057-0.253 0.126-0.253h0.623z";break;case"captions":e[0]="0 0 20 20",e[1]="M0.033 3.624h19.933v12.956h-19.933v-12.956zM18.098 10.045c-0.025-2.264-0.124-3.251-0.743-3.948-0.112-0.151-0.322-0.236-0.496-0.344-0.606-0.386-3.465-0.526-6.782-0.526s-6.313 0.14-6.907 0.526c-0.185 0.108-0.396 0.193-0.519 0.344-0.607 0.697-0.693 1.684-0.731 3.948 0.037 2.265 0.124 3.252 0.731 3.949 0.124 0.161 0.335 0.236 0.519 0.344 0.594 0.396 3.59 0.526 6.907 0.547 3.317-0.022 6.176-0.151 6.782-0.547 0.174-0.108 0.384-0.183 0.496-0.344 0.619-0.697 0.717-1.684 0.743-3.949v0 0zM9.689 9.281c-0.168-1.77-1.253-2.813-3.196-2.813-1.773 0-3.168 1.387-3.168 3.617 0 2.239 1.271 3.636 3.372 3.636 1.676 0 2.851-1.071 3.035-2.852h-2.003c-0.079 0.661-0.397 1.168-1.068 1.168-1.059 0-1.253-0.91-1.253-1.876 0-1.33 0.442-2.010 1.174-2.010 0.653 0 1.068 0.412 1.13 1.129h1.977zM16.607 9.281c-0.167-1.77-1.252-2.813-3.194-2.813-1.773 0-3.168 1.387-3.168 3.617 0 2.239 1.271 3.636 3.372 3.636 1.676 0 2.851-1.071 3.035-2.852h-2.003c-0.079 0.661-0.397 1.168-1.068 1.168-1.059 0-1.253-0.91-1.253-1.876 0-1.33 0.441-2.010 1.174-2.010 0.653 0 1.068 0.412 1.13 1.129h1.976z";break;case"descriptions":e[0]="0 0 20 20",e[1]="M17.623 3.57h-1.555c1.754 1.736 2.763 4.106 2.763 6.572 0 2.191-0.788 4.286-2.189 5.943h1.484c1.247-1.704 1.945-3.792 1.945-5.943-0-2.418-0.886-4.754-2.447-6.572v0zM14.449 3.57h-1.55c1.749 1.736 2.757 4.106 2.757 6.572 0 2.191-0.788 4.286-2.187 5.943h1.476c1.258-1.704 1.951-3.792 1.951-5.943-0-2.418-0.884-4.754-2.447-6.572v0zM11.269 3.57h-1.542c1.752 1.736 2.752 4.106 2.752 6.572 0 2.191-0.791 4.286-2.181 5.943h1.473c1.258-1.704 1.945-3.792 1.945-5.943 0-2.418-0.876-4.754-2.447-6.572v0zM10.24 9.857c0 3.459-2.826 6.265-6.303 6.265v0.011h-3.867v-12.555h3.896c3.477 0 6.274 2.806 6.274 6.279v0zM6.944 9.857c0-1.842-1.492-3.338-3.349-3.338h-0.876v6.686h0.876c1.858 0 3.349-1.498 3.349-3.348v0z";break;case"sign":e[0]="0 0 20 20",e[1]="M10.954 10.307c0.378 0.302 0.569 1.202 0.564 1.193 0.697 0.221 1.136 0.682 1.136 0.682 1.070-0.596 1.094-0.326 1.558-0.682 0.383-0.263 0.366-0.344 0.567-1.048 0.187-0.572-0.476-0.518-1.021-1.558-0.95 0.358-1.463 0.196-1.784 0.167-0.145-0.020-0.12 0.562-1.021 1.247zM14.409 17.196c-0.133 0.182-0.196 0.218-0.363 0.454-0.28 0.361 0.076 0.906 0.253 0.82 0.206-0.076 0.341-0.488 0.567-0.623 0.115-0.061 0.422-0.513 0.709-0.82 0.211-0.238 0.363-0.344 0.564-0.594 0.341-0.422 0.412-0.744 0.709-1.193 0.184-0.236 0.312-0.307 0.481-0.594 0.886-1.679 0.628-2.432 1.475-3.629 0.26-0.353 0.552-0.442 0.964-0.653 0.383-2.793-0.888-4.356-0.879-4.361-1.067 0.623-1.644 0.879-2.751 0.82-0.417-0.005-0.636-0.182-1.048-0.145-0.385 0.015-0.582 0.159-0.964 0.29-0.589 0.182-0.91 0.344-1.529 0.535-0.393 0.11-0.643 0.115-1.050 0.255-0.348 0.147-0.182 0.029-0.427 0.312-0.317 0.348-0.238 0.623-0.535 1.222-0.371 0.785-0.326 0.891-0.115 0.987-0.14 0.402-0.174 0.672-0.14 1.107 0.039 0.331-0.101 0.562 0.255 0.825 0.483 0.361 1.499 1.205 1.757 1.217 0.39-0.012 1.521 0.029 2.096-0.368 0.13-0.081 0.167-0.162 0.056 0.145-0.022 0.037-1.433 1.136-1.585 1.131-1.794 0.056-1.193 0.157-1.303 0.115-0.091 0-0.955-1.055-1.477-0.682-0.196 0.12-0.287 0.236-0.363 0.452 0.066 0.137 0.383 0.358 0.675 0.54 0.422 0.27 0.461 0.552 0.881 0.653 0.513 0.115 1.060 0.039 1.387 0.081 0.125 0.034 1.256-0.297 1.961-0.675 0.65-0.336-0.898 0.648-1.276 1.131-1.141 0.358-0.82 0.373-1.362 0.483-0.503 0.115-0.479 0.086-0.822 0.196-0.356 0.086-0.648 0.572-0.312 0.825 0.201 0.167 0.827-0.066 1.445-0.086 0.275-0.005 1.391-0.518 1.644-0.653 0.633-0.339 1.099-0.81 1.472-1.077 0.518-0.361-0.584 0.991-1.050 1.558zM8.855 9.799c-0.378-0.312-0.569-1.212-0.564-1.217-0.697-0.206-1.136-0.667-1.136-0.653-1.070 0.582-1.099 0.312-1.558 0.653-0.388 0.277-0.366 0.363-0.567 1.045-0.187 0.594 0.471 0.535 1.021 1.561 0.95-0.344 1.463-0.182 1.784-0.142 0.145 0.010 0.12-0.572 1.021-1.247zM5.4 2.911c0.133-0.191 0.196-0.228 0.368-0.454 0.27-0.371-0.081-0.915-0.253-0.849-0.211 0.096-0.346 0.508-0.599 0.653-0.093 0.052-0.4 0.503-0.682 0.82-0.211 0.228-0.363 0.334-0.564 0.599-0.346 0.407-0.412 0.729-0.709 1.161-0.184 0.258-0.317 0.324-0.481 0.621-0.886 1.669-0.631 2.422-1.475 3.6-0.26 0.38-0.552 0.461-0.964 0.682-0.383 2.788 0.883 4.346 0.879 4.336 1.068-0.609 1.639-0.861 2.751-0.825 0.417 0.025 0.636 0.201 1.048 0.174 0.385-0.025 0.582-0.169 0.964-0.285 0.589-0.196 0.91-0.358 1.499-0.54 0.422-0.12 0.672-0.125 1.080-0.285 0.348-0.128 0.182-0.010 0.427-0.282 0.312-0.358 0.238-0.633 0.508-1.217 0.398-0.8 0.353-0.906 0.142-0.991 0.135-0.412 0.174-0.677 0.14-1.107-0.044-0.336 0.101-0.572-0.255-0.82-0.483-0.375-1.499-1.22-1.752-1.222-0.395 0.002-1.526-0.039-2.101 0.339-0.13 0.101-0.167 0.182-0.056-0.11 0.022-0.052 1.433-1.148 1.585-1.163 1.794-0.039 1.193-0.14 1.303-0.088 0.091-0.007 0.955 1.045 1.477 0.682 0.191-0.13 0.287-0.245 0.368-0.452-0.071-0.147-0.388-0.368-0.68-0.537-0.422-0.282-0.464-0.564-0.881-0.655-0.513-0.125-1.065-0.049-1.387-0.11-0.125-0.015-1.256 0.317-1.956 0.68-0.66 0.351 0.893-0.631 1.276-1.136 1.136-0.339 0.81-0.353 1.36-0.479 0.501-0.101 0.476-0.071 0.82-0.172 0.351-0.096 0.648-0.577 0.312-0.849-0.206-0.152-0.827 0.081-1.44 0.086-0.28 0.020-1.396 0.533-1.649 0.677-0.633 0.329-1.099 0.8-1.472 1.048-0.523 0.38 0.584-0.967 1.050-1.529z";break;case"mute":case"volume-mute":e[0]="0 0 20 20",e[1]="M7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714zM18.75 12.093v1.657h-1.657l-2.093-2.093-2.093 2.093h-1.657v-1.657l2.093-2.093-2.093-2.093v-1.657h1.657l2.093 2.093 2.093-2.093h1.657v1.657l-2.093 2.093z";break;case"volume-soft":e[0]="0 0 20 20",e[1]="M10.723 14.473c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.584-1.584 1.584-4.161 0-5.745-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.315 2.315 2.315 6.082 0 8.397-0.183 0.183-0.423 0.275-0.663 0.275zM7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714z";break;case"volume-medium":e[0]="0 0 20 20",e[1]="M14.053 16.241c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 2.559-2.559 2.559-6.722 0-9.281-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c1.594 1.594 2.471 3.712 2.471 5.966s-0.878 4.373-2.471 5.966c-0.183 0.183-0.423 0.275-0.663 0.275zM10.723 14.473c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.584-1.584 1.584-4.161 0-5.745-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.315 2.315 2.315 6.082 0 8.397-0.183 0.183-0.423 0.275-0.663 0.275zM7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714z";break;case"volume-loud":e[0]="0 0 21 20",e[1]="M17.384 18.009c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.712-1.712 2.654-3.988 2.654-6.408s-0.943-4.696-2.654-6.408c-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.066 2.066 3.204 4.813 3.204 7.734s-1.138 5.668-3.204 7.734c-0.183 0.183-0.423 0.275-0.663 0.275zM14.053 16.241c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 2.559-2.559 2.559-6.722 0-9.281-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c1.594 1.594 2.471 3.712 2.471 5.966s-0.878 4.373-2.471 5.966c-0.183 0.183-0.423 0.275-0.663 0.275zM10.723 14.473c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.584-1.584 1.584-4.161 0-5.745-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.315 2.315 2.315 6.082 0 8.397-0.183 0.183-0.423 0.275-0.663 0.275zM7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714z";break;case"chapters":e[0]="0 0 20 20",e[1]="M5 2.5v17.5l6.25-6.25 6.25 6.25v-17.5zM15 0h-12.5v17.5l1.25-1.25v-15h11.25z";break;case"transcript":e[0]="0 0 20 20",e[1]="M0 19.107v-17.857q0-0.446 0.313-0.759t0.759-0.313h8.929v6.071q0 0.446 0.313 0.759t0.759 0.313h6.071v11.786q0 0.446-0.313 0.759t-0.759 0.312h-15q-0.446 0-0.759-0.313t-0.313-0.759zM4.286 15.536q0 0.156 0.1 0.257t0.257 0.1h7.857q0.156 0 0.257-0.1t0.1-0.257v-0.714q0-0.156-0.1-0.257t-0.257-0.1h-7.857q-0.156 0-0.257 0.1t-0.1 0.257v0.714zM4.286 12.679q0 0.156 0.1 0.257t0.257 0.1h7.857q0.156 0 0.257-0.1t0.1-0.257v-0.714q0-0.156-0.1-0.257t-0.257-0.1h-7.857q-0.156 0-0.257 0.1t-0.1 0.257v0.714zM4.286 9.821q0 0.156 0.1 0.257t0.257 0.1h7.857q0.156 0 0.257-0.1t0.1-0.257v-0.714q0-0.156-0.1-0.257t-0.257-0.1h-7.857q-0.156 0-0.257 0.1t-0.1 0.257v0.714zM11.429 5.893v-5.268q0.246 0.156 0.402 0.313l4.554 4.554q0.156 0.156 0.313 0.402h-5.268z";break;case"preferences":e[0]="0 0 20 20",e[1]="M18.238 11.919c-1.049-1.817-0.418-4.147 1.409-5.205l-1.965-3.404c-0.562 0.329-1.214 0.518-1.911 0.518-2.1 0-3.803-1.714-3.803-3.828h-3.931c0.005 0.653-0.158 1.314-0.507 1.919-1.049 1.818-3.382 2.436-5.212 1.382l-1.965 3.404c0.566 0.322 1.056 0.793 1.404 1.396 1.048 1.815 0.42 4.139-1.401 5.2l1.965 3.404c0.56-0.326 1.209-0.513 1.902-0.513 2.094 0 3.792 1.703 3.803 3.808h3.931c-0.002-0.646 0.162-1.3 0.507-1.899 1.048-1.815 3.375-2.433 5.203-1.387l1.965-3.404c-0.562-0.322-1.049-0.791-1.395-1.391zM10 14.049c-2.236 0-4.050-1.813-4.050-4.049s1.813-4.049 4.050-4.049 4.049 1.813 4.049 4.049c-0 2.237-1.813 4.049-4.049 4.049z";break;case"close":e[0]="0 0 16 20",e[1]="M1.228 14.933q0-0.446 0.312-0.759l3.281-3.281-3.281-3.281q-0.313-0.313-0.313-0.759t0.313-0.759l1.518-1.518q0.313-0.313 0.759-0.313t0.759 0.313l3.281 3.281 3.281-3.281q0.313-0.313 0.759-0.313t0.759 0.313l1.518 1.518q0.313 0.313 0.313 0.759t-0.313 0.759l-3.281 3.281 3.281 3.281q0.313 0.313 0.313 0.759t-0.313 0.759l-1.518 1.518q-0.313 0.313-0.759 0.313t-0.759-0.313l-3.281-3.281-3.281 3.281q-0.313 0.313-0.759 0.313t-0.759-0.313l-1.518-1.518q-0.313-0.313-0.313-0.759z";break;case"fullscreen-expand":e[0]="0 0 20 20",e[1]="M0 18.036v-5q0-0.29 0.212-0.502t0.502-0.212 0.502 0.212l1.607 1.607 3.705-3.705q0.112-0.112 0.257-0.112t0.257 0.112l1.272 1.272q0.112 0.112 0.112 0.257t-0.112 0.257l-3.705 3.705 1.607 1.607q0.212 0.212 0.212 0.502t-0.212 0.502-0.502 0.212h-5q-0.29 0-0.502-0.212t-0.212-0.502zM8.717 8.393q0-0.145 0.112-0.257l3.705-3.705-1.607-1.607q-0.212-0.212-0.212-0.502t0.212-0.502 0.502-0.212h5q0.29 0 0.502 0.212t0.212 0.502v5q0 0.29-0.212 0.502t-0.502 0.212-0.502-0.212l-1.607-1.607-3.705 3.705q-0.112 0.112-0.257 0.112t-0.257-0.112l-1.272-1.272q-0.112-0.112-0.112-0.257z";break;case"fullscreen-collapse":e[0]="0 0 20 20",e[1]="M0.145 16.964q0-0.145 0.112-0.257l3.705-3.705-1.607-1.607q-0.212-0.212-0.212-0.502t0.212-0.502 0.502-0.212h5q0.29 0 0.502 0.212t0.212 0.502v5q0 0.29-0.212 0.502t-0.502 0.212-0.502-0.212l-1.607-1.607-3.705 3.705q-0.112 0.112-0.257 0.112t-0.257-0.112l-1.272-1.272q-0.112-0.112-0.112-0.257zM8.571 9.464v-5q0-0.29 0.212-0.502t0.502-0.212 0.502 0.212l1.607 1.607 3.705-3.705q0.112-0.112 0.257-0.112t0.257 0.112l1.272 1.272q0.112 0.112 0.112 0.257t-0.112 0.257l-3.705 3.705 1.607 1.607q0.212 0.212 0.212 0.502t-0.212 0.502-0.502 0.212h-5q-0.29 0-0.502-0.212t-0.212-0.502z";break;case"help":e[0]="0 0 11 20",e[1]="M0.577 6.317q-0.028-0.167 0.061-0.313 1.786-2.969 5.179-2.969 0.893 0 1.797 0.346t1.629 0.926 1.183 1.423 0.458 1.769q0 0.603-0.173 1.127t-0.391 0.854-0.614 0.664-0.642 0.485-0.681 0.396q-0.458 0.257-0.765 0.725t-0.307 0.748q0 0.19-0.134 0.363t-0.313 0.173h-2.679q-0.167 0-0.285-0.206t-0.117-0.419v-0.502q0-0.926 0.725-1.747t1.596-1.211q0.658-0.301 0.938-0.625t0.279-0.848q0-0.469-0.519-0.826t-1.2-0.357q-0.725 0-1.205 0.324-0.391 0.279-1.194 1.283-0.145 0.179-0.346 0.179-0.134 0-0.279-0.089l-1.83-1.395q-0.145-0.112-0.173-0.279zM3.786 16.875v-2.679q0-0.179 0.134-0.313t0.313-0.134h2.679q0.179 0 0.313 0.134t0.134 0.313v2.679q0 0.179-0.134 0.313t-0.313 0.134h-2.679q-0.179 0-0.313-0.134t-0.134-0.313z"}return e},AblePlayer.prototype.reinitialize=function(){var e,i;if(i=(e=new t.Deferred).promise(),window.console||(this.debug=!1),this.startedPlaying=!1,this.autoScrollTranscript=!0,this.$media=t(this.media).first(),this.media=this.$media[0],this.$media.is("audio"))this.mediaType="audio";else{if(!this.$media.is("video"))return this.provideFallback(),e.fail(),i;this.mediaType="video"}return this.$sources=this.$media.find("source"),this.player=this.getPlayer(),this.player||this.provideFallback(),this.setIconType(),e.resolve(),i},AblePlayer.prototype.setPlayerSize=function(t,e){this.$media.attr("id");"audio"===this.mediaType?this.playerWidth&&this.$ableWrapper.css("width",this.playerWidth+"px"):t>0&&e>0&&(this.playerWidth=t,this.playerHeight=e,this.aspectRatio=e/t)},AblePlayer.prototype.setIconType=function(){var e,i,s;if(this.forceIconType)return!1;document.createElementNS&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect?this.iconType="svg":(window.getComputedStyle?(t("span.icon-play").length?i=t("span.icon-play"):(e=t("<span>",{class:"icon-play able-clipped"}),t("body").append(e),i=e),void 0!==(s=window.getComputedStyle(i.get(0),null).getPropertyValue("font-family"))&&-1!==s.indexOf("able")?this.iconType="font":this.iconType="image"):this.iconType="image",void 0!==e&&e.remove())},AblePlayer.prototype.setupInstance=function(){var e=new t.Deferred,i=e.promise();return this.$media.attr("id")?this.mediaId=this.$media.attr("id"):(this.mediaId="ableMediaId_"+this.ableIndex,this.$media.attr("id",this.mediaId)),e.resolve(),i},AblePlayer.prototype.setupInstancePlaylist=function(){var e=this;if(this.hasPlaylist=!1,t(".able-playlist").each((function(){if(t(this).data("player")===e.mediaId){e.hasPlaylist=!0,e.$playlist=t(this).find("li"),t(this).find("li[data-youtube-id]").each((function(){var i=DOMPurify.sanitize(t(this).attr("data-youtube-id")),s=e.getYouTubePosterUrl(i,"120"),a=t("<img>",{src:s,alt:""});t(this).find("button").prepend(a)})),t(this).find("li[data-vimeo-id]").each((function(){var i=t(this).attr("data-vimeo-id"),s=e.getVimeoPosterUrl(i,"120"),a=t("<img>",{src:s,alt:""});t(this).find("button").prepend(a)})),t(this).find("li span").attr("aria-hidden","true"),e.playlistIndex=0;var i=t(this).data("embedded");e.playlistEmbed=void 0!==i&&!1!==i}})),this.hasPlaylist&&this.loop&&this.media.removeAttribute("loop"),this.hasPlaylist&&this.playlistEmbed){var i=this.$playlist.parent();this.$playlistDom=i.clone(),i.remove()}this.hasPlaylist&&0===this.$sources.length&&(this.cuePlaylistItem(0),this.$sources=this.$media.find("source"))},AblePlayer.prototype.recreatePlayer=function(){var e,i,s,a,n;if(this.player)return i=(e=new t.Deferred).promise(),s=this,this.playerDeleted=!1,this.recreatingPlayer=!0,this.playerCreated||(this.loadCurrentPreferences(),this.injectPlayerCode(),this.resizePlayer(this.media.videoWidth,this.media.videoHeight)),this.getSampleDescriptionText(),this.initSignLanguage(),this.initPlayer().then((function(){s.getTracks().then((function(){s.initDescription().then((function(){s.setupTracks().then((function(){s.hasClosedDesc&&(!s.$descDiv||s.$descDiv&&!t.contains(s.$ableDiv[0],s.$descDiv[0]))&&s.injectTextDescriptionArea(),s.initSpeech("init"),s.setupTranscript().then((function(){s.initStenoFrame().then((function(){s.stenoMode&&s.$stenoFrame&&(s.stenoFrameContents=s.$stenoFrame.contents()),s.getMediaTimes().then((function(t){for(s.duration=t.duration,s.elapsed=t.elapsed,s.setFullscreen(!1),void 0===s.volume&&(s.volume=s.defaultVolume),s.volume&&s.setVolume(s.volume),s.transcriptType&&(s.addTranscriptAreaEvents(),s.updateTranscript()),s.captions.length&&s.initDefaultCaption(),s.setMediaAttributes(),s.addControls(),s.addEventListeners(),a=s.getPreferencesGroups(),n=0;n<a.length;n++)s.injectPrefsForm(a[n]);s.setupPopups(),s.updateCaption(),s.injectVTS(),s.chaptersDivLocation&&s.populateChaptersDiv(),s.showSearchResults(),"html5"===s.player&&(s.loadingMedia||(s.$media[0].load(),s.loadingMedia=!0)),setTimeout((function(){s.refreshControls("init"),e.resolve()}),100)}))}))}))}))}))}))}),(function(){s.provideFallback()})),i;console.log("Can't create player; no appropriate player type detected.")},AblePlayer.prototype.initPlayer=function(){var e,i=this;"html5"===this.player?e=this.initHtml5Player():"youtube"===this.player?e=this.initYouTubePlayer():"vimeo"===this.player&&(e=this.initVimeoPlayer());var s=new t.Deferred,a=s.promise();return e.done((function(){i.useFixedSeekInterval?(i.seekInterval||(i.seekInterval=i.defaultSeekInterval),i.seekIntervalCalculated=!0):i.setSeekInterval(),s.resolve()})).fail((function(){s.reject()})),a},AblePlayer.prototype.initStenoFrame=function(){var e,i;return i=(e=new t.Deferred).promise(),this.stenoMode&&this.$stenoFrame?(this.$stenoFrame[0].contentWindow,"complete"==document.readyState?e.resolve():this.$stenoFrame.on("load",(function(){e.resolve()}))):e.resolve(),i},AblePlayer.prototype.setSeekInterval=function(){var t;this.seekInterval=this.defaultSeekInterval,void 0===(t=this.useChapterTimes?this.chapterDuration:this.duration)||t<1?this.seekIntervalCalculated=!1:(this.seekInterval=t<=20?5:t<=30?6:t<=40?8:t<=100?10:t/10,this.seekIntervalCalculated=!0)},AblePlayer.prototype.initDefaultCaption=function(){var t,e;if((t=this.captions).length>0){for(e=0;e<t.length;e++)!0===t[e].def&&(this.captionLang=t[e].language,this.selectedCaptions=t[e]);if(void 0===this.captionLang)for(e=0;e<t.length;e++)t[e].language===this.lang&&(this.captionLang=t[e].language,this.selectedCaptions=t[e]);void 0===this.captionLang&&(this.captionLang=t[0].language,this.selectedCaptions=t[0]),void 0!==this.captionLang&&(this.$transcriptLanguageSelect&&this.$transcriptLanguageSelect.find("option[lang="+this.captionLang+"]").prop("selected",!0),this.syncTrackLanguages("init",this.captionLang)),"vimeo"===this.player&&(this.usingVimeoCaptions&&1==this.prefCaptions?this.vimeoPlayer.enableTextTrack(this.captionLang).then((function(t){})).catch((function(t){t.name})):this.vimeoPlayer.disableTextTrack().then((function(){})).catch((function(t){})))}},AblePlayer.prototype.initHtml5Player=function(){var e=new t.Deferred,i=e.promise();return e.resolve(),i},AblePlayer.prototype.setMediaAttributes=function(){this.$media.attr("tabindex",-1);var t=this.$media.get(0).textTracks;if(t)for(var e=0;e<t.length;)t[e].mode="disabled",e+=1},AblePlayer.prototype.getPlayer=function(){return this.testFallback?null:this.youTubeId?"video"!==this.mediaType?null:"youtube":this.vimeoId?"video"!==this.mediaType?null:"vimeo":this.media.canPlayType?"html5":null}}(jQuery),function(t){AblePlayer.prototype.setCookie=function(t){Cookies.set("Able-Player",JSON.stringify(t),{expires:90,sameSite:"strict"})},AblePlayer.prototype.getCookie=function(){var t,e={preferences:{},sign:{},transcript:{},voices:[]};try{t=JSON.parse(Cookies.get("Able-Player"))}catch(i){this.setCookie(e),t=e}return t||e},AblePlayer.prototype.updateCookie=function(t){var e,i,s,a,n,r,o,l;if(e=this.getCookie(),"transcript"===t||"sign"===t)"transcript"===t?(s=(i=this.$transcriptArea).position(),void 0===e.transcript&&(e.transcript={}),e.transcript.position=i.css("position"),e.transcript.zindex=i.css("z-index"),e.transcript.top=s.top,e.transcript.left=s.left,e.transcript.width=i.width(),e.transcript.height=i.height()):"sign"===t&&(s=(i=this.$signWindow).position(),void 0===e.sign&&(e.sign={}),e.sign.position=i.css("position"),e.sign.zindex=i.css("z-index"),e.sign.top=s.top,e.sign.left=s.left,e.sign.width=i.width(),e.sign.height=i.height());else if("voice"===t){void 0===e.voices&&(e.voices=[]),o=!1;for(var h=0;h<e.voices.length;h++)e.voices[h].lang===this.prefDescVoiceLang&&(o=!0,e.voices[h].name=this.prefDescVoice);o||(l={name:this.prefDescVoice,lang:this.prefDescVoiceLang},e.voices.push(l))}else for(a=this.getAvailablePreferences(),n=0;n<a.length;n++)(r=a[n].name)==t&&(e.preferences[r]=this[r]);this.setCookie(e)},AblePlayer.prototype.getPreferencesGroups=function(){return this.usingYouTubeCaptions?["captions","descriptions","keyboard"]:this.usingVimeoCaptions?["descriptions","keyboard"]:["captions","descriptions","keyboard","transcript"]},AblePlayer.prototype.getAvailablePreferences=function(){var t=[];return t.push({name:"prefAltKey",label:this.tt.prefAltKey,group:"keyboard",default:1}),t.push({name:"prefCtrlKey",label:this.tt.prefCtrlKey,group:"keyboard",default:1}),t.push({name:"prefShiftKey",label:this.tt.prefShiftKey,group:"keyboard",default:0}),t.push({name:"prefTranscript",label:null,group:"transcript",default:0}),t.push({name:"prefHighlight",label:this.tt.prefHighlight,group:"transcript",default:1}),t.push({name:"prefAutoScrollTranscript",label:null,group:"transcript",default:1}),t.push({name:"prefTabbable",label:this.tt.prefTabbable,group:"transcript",default:0}),t.push({name:"prefCaptions",label:null,group:"captions",default:this.defaultStateCaptions}),this.usingYouTubeCaptions||("video"===this.mediaType&&t.push({name:"prefCaptionsPosition",label:this.tt.prefCaptionsPosition,group:"captions",default:this.defaultCaptionsPosition}),t.push({name:"prefCaptionsFont",label:this.tt.prefCaptionsFont,group:"captions",default:"sans-serif"})),t.push({name:"prefCaptionsSize",label:this.tt.prefCaptionsSize,group:"captions",default:"100%"}),this.usingYouTubeCaptions||(t.push({name:"prefCaptionsColor",label:this.tt.prefCaptionsColor,group:"captions",default:"white"}),t.push({name:"prefCaptionsBGColor",label:this.tt.prefCaptionsBGColor,group:"captions",default:"black"}),t.push({name:"prefCaptionsOpacity",label:this.tt.prefCaptionsOpacity,group:"captions",default:"100%"})),"video"===this.mediaType&&(t.push({name:"prefDesc",label:null,group:"descriptions",default:this.defaultStateDescriptions}),t.push({name:"prefDescMethod",label:null,group:"descriptions",default:"video"}),t.push({name:"prefDescVoice",label:this.tt.prefDescVoice,group:"descriptions",default:null}),t.push({name:"prefDescPitch",label:this.tt.prefDescPitch,group:"descriptions",default:1}),t.push({name:"prefDescRate",label:this.tt.prefDescRate,group:"descriptions",default:1}),t.push({name:"prefDescVolume",label:this.tt.volume,group:"descriptions",default:1}),t.push({name:"prefDescPause",label:this.tt.prefDescPause,group:"descriptions",default:this.defaultDescPause}),t.push({name:"prefDescVisible",label:this.tt.prefDescVisible,group:"descriptions",default:0})),t.push({name:"prefSign",label:null,group:null,default:0}),t},AblePlayer.prototype.loadCurrentPreferences=function(){for(var t=this.getAvailablePreferences(),e=this.getCookie(),i=0;i<t.length;i++){var s=t[i].name,a=t[i].default;void 0!==e.preferences[s]?this[s]=e.preferences[s]:(e.preferences[s]=a,this[s]=a)}void 0!==e.voices&&(this.prefVoices=e.voices),this.setCookie(e)},AblePlayer.prototype.injectPrefsForm=function(e){var i,s,a,n,r,o,l,h,p,c,u,d,f,g,m,v,y,b,T,P,k,C,w,D,A,$,x,S,N,I,M,B,L,E,O,F,R,V,z,H;i=this,s=this.getAvailablePreferences();var W="able-prefs-form-"+e;if((a=t("<div>",{class:"able-prefs-form "})).addClass(W),"captions"==e)n=this.tt.prefTitleCaptions;else if("descriptions"==e){n=this.tt.prefTitleDescriptions;var _=t("<p>",{text:this.tt.prefIntroDescription1}),q=t("<ul>"),j=t("<li>",{text:this.tt.prefDescFormatOption1}),K=t("<li>",{text:this.tt.prefDescFormatOption2});q.append(j,K),this.hasOpenDesc&&this.hasClosedDesc?(I=this.tt.prefIntroDescription2+" ",I+="<strong>"+this.tt.prefDescFormatOption1b+"</strong>",I+=" <em>"+this.tt.and+"</em> <strong>"+this.tt.prefDescFormatOption2b+"</strong>."):this.hasOpenDesc?(I=this.tt.prefIntroDescription2,I+=" <strong>"+this.tt.prefDescFormatOption1b+"</strong>."):this.hasClosedDesc?(I=this.tt.prefIntroDescription2,I+=" <strong>"+this.tt.prefDescFormatOption2b+"</strong>."):I=this.tt.prefIntroDescriptionNone,o=t("<p>",{html:I}),l=this.tt.prefIntroDescription3,(this.hasOpenDesc||this.hasClosedDesc)&&(l+=" "+this.tt.prefIntroDescription4),h=t("<p>",{text:l}),a.append(_,q,o,h)}else"keyboard"==e?(n=this.tt.prefTitleKeyboard,r=this.tt.prefIntroKeyboard1,r+=" "+this.tt.prefIntroKeyboard2,r+=" "+this.tt.prefIntroKeyboard3,_=t("<p>",{text:r}),a.append(_)):"transcript"==e&&(n=this.tt.prefTitleTranscript);for(u=t("<div>").attr("role","group"),d="able-prefs-"+e,m=(f=this.mediaId+"-prefs-"+e)+"-legend",u.addClass(d).attr("id",f),"keyboard"===e?((g=t("<h2>"+this.tt.prefHeadingKeyboard1+"</h2>")).attr("id",m),u.attr("aria-labelledby",m),u.append(g)):"descriptions"===e&&((g=t("<h2>"+this.tt.prefHeadingTextDescription+"</h2>")).attr("id",m),u.attr("aria-labelledby",m),u.append(g)),p=0;p<s.length;p++)if(s[p].group==e&&s[p].label){if(b="able-"+(v=s[p].name),T=this.mediaId+"_"+v,y=t("<div>").addClass(b),"captions"===e){for(P=t('<label for="'+T+'"> '+s[p].label+"</label>"),k=t("<select>",{name:v,id:T}),"prefCaptions"!==v&&"prefCaptionsStyle"!==v&&k.on("change",(function(){x=t(this).attr("name"),i.stylizeCaptions(i.$sampleCapsDiv,x)})),C=this.getCaptionsOptions(v),c=0;c<C.length;c++)"prefCaptionsPosition"===v?"overlay"===(D=C[c])?$=this.tt.captionsPositionOverlay:"below"===D&&(D=C[c],$=this.tt.captionsPositionBelow):"prefCaptionsFont"===v||"prefCaptionsColor"===v||"prefCaptionsBGColor"===v?(D=C[c][0],$=C[c][1]):"prefCaptionsOpacity"===v?(D=C[c],$=C[c],"0%"===D?$+=" ("+this.tt.transparent+")":"100%"===D&&($+=" ("+this.tt.solid+")")):(D=C[c],$=C[c]),w=t("<option>",{value:D,text:$}),this[v]===D&&w.prop("selected",!0),k.append(w);y.append(P,k)}else if("descriptions"===e){if(P=t('<label for="'+T+'"> '+s[p].label+"</label>"),"prefDescPause"===v||"prefDescVisible"===v)y.addClass("able-prefs-checkbox"),k=t("<input>",{type:"checkbox",name:v,id:T,value:"true"}),1===this[v]&&k.prop("checked",!0),y.append(k,P);else if(this.synth){if(y.addClass("able-prefs-select"),k=t("<select>",{name:v,id:T}),"prefDescVoice"===v&&this.descVoices.length){for(M=this.getPrefDescVoice(),c=0;c<this.descVoices.length;c++)D=this.descVoices[c].name,A=this.descVoices[c].lang.substring(0,2).toLowerCase(),$=D+" ("+this.descVoices[c].lang+")",w=t("<option>",{value:D,"data-lang":A,text:$}),M===D&&w.prop("selected",!0),k.append(w);this.$voiceSelectField=k}else if("prefDescPitch"==v?C=[0,.5,1,1.5,2]:"prefDescRate"==v?C=[.7,.8,.9,1,1.1,1.2,1.5,2,2.5,3]:"prefDescVolume"==v&&(C=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]),void 0!==C)for(c=0;c<C.length;c++)D=C[c],$=this.makePrefsValueReadable(v,D),w=t("<option>",{value:D,text:$}),this[v]==D&&w.prop("selected",!0),k.append(w),y.append(P,k);k.on("change",(function(){i.announceDescriptionText("sample",i.currentSampleText)})),y.append(P,k)}}else P=t('<label for="'+T+'"> '+s[p].label+"</label>"),k=t("<input>",{type:"checkbox",name:v,id:T,value:"true"}),1===this[v]&&k.prop("checked",!0),"keyboard"===e&&k.on("change",(function(){"prefAltKey"===(x=t(this).attr("name"))?(S=".able-modkey-alt",N=i.tt.prefAltKey+" + "):"prefCtrlKey"===x?(S=".able-modkey-ctrl",N=i.tt.prefCtrlKey+" + "):"prefShiftKey"===x&&(S=".able-modkey-shift",N=i.tt.prefShiftKey+" + "),t(this).is(":checked")?t(S).text(N):t(S).text("")})),y.append(k,P);("prefDescVoice"!==v||this.descVoices.length)&&u.append(y)}if(a.append(u),"captions"===e)this.usingYouTubeCaptions||(this.$sampleCapsDiv=t("<div>",{class:"able-captions-sample"}).text(this.tt.sampleCaptionText),a.append(this.$sampleCapsDiv),this.stylizeCaptions(this.$sampleCapsDiv));else if("descriptions"===e)this.synth&&(this.$sampleDescDiv=t("<div>",{class:"able-desc-sample"}).text(this.tt.sampleDescriptionText),a.append(this.$sampleDescDiv),this.currentSampleText=this.tt.sampleDescriptionText);else if("keyboard"===e){for(B=t("<h2>",{text:this.tt.prefHeadingKeyboard2}),L=t("<ul>"),E=[],O=[],p=0;p<this.controls.length;p++)"play"===this.controls[p]?(E.push(this.tt.play+"/"+this.tt.pause),O.push("p</span> <em>"+this.tt.or+'</em> <span class="able-help-modifiers"> '+this.tt.spacebar)):"restart"===this.controls[p]?(E.push(this.tt.restart),O.push("s")):"previous"===this.controls[p]?(E.push(this.tt.prevTrack),O.push("b")):"next"===this.controls[p]?(E.push(this.tt.nextTrack),O.push("n")):"rewind"===this.controls[p]?(E.push(this.tt.rewind),O.push("r")):"forward"===this.controls[p]?(E.push(this.tt.forward),O.push("f")):"volume"===this.controls[p]?(E.push(this.tt.volume),O.push("v</span> <em>"+this.tt.or+'</em> <span class="able-modkey">1-9'),E.push(this.tt.mute+"/"+this.tt.unmute),O.push("m")):"captions"===this.controls[p]?(this.captions.length>1?E.push(this.tt.captions):this.captionsOn?E.push(this.tt.hideCaptions):E.push(this.tt.showCaptions),O.push("c")):"descriptions"===this.controls[p]?(this.descOn?E.push(this.tt.turnOffDescriptions):E.push(this.tt.turnOnDescriptions),O.push("d")):"prefs"===this.controls[p]?(E.push(this.tt.preferences),O.push("e")):"help"===this.controls[p]&&(E.push(this.tt.help),O.push("h"));for(p=0;p<O.length;p++)F='<span class="able-modkey-alt">',1===this.prefAltKey&&(F+=this.tt.prefAltKey+" + "),F+="</span>",F+='<span class="able-modkey-ctrl">',1===this.prefCtrlKey&&(F+=this.tt.prefCtrlKey+" + "),F+="</span>",F+='<span class="able-modkey-shift">',1===this.prefShiftKey&&(F+=this.tt.prefShiftKey+" + "),F+="</span>",F+='<span class="able-modkey">'+O[p]+"</span>",F+=" = "+E[p],R=t("<li>",{html:F}),L.append(R);F='<span class="able-modkey">'+this.tt.escapeKey+"</span>",F+=" = "+this.tt.escapeKeyFunction,R=t("<li>",{html:F}),L.append(R),a.append(B,L)}t("body").append(a),V=new AccessibleDialog(a,this.$prefsButton,"dialog",!0,n,_,i.tt.closeButtonLabel,"32em"),a.append("<hr>"),z=t('<button class="modal-button">'+this.tt.save+"</button>"),H=t('<button class="modal-button">'+this.tt.cancel+"</button>"),z.on("click",(function(){V.hide(),i.savePrefsFromForm()})),H.on("click",(function(){V.hide(),i.resetPrefsForm()})),a.append(z),a.append(H),"captions"!==e&&"transcript"!==e||u.attr("aria-labelledby",V.titleH1.attr("id")),"captions"===e?this.captionPrefsDialog=V:"descriptions"===e?this.descPrefsDialog=V:"keyboard"===e?this.keyboardPrefsDialog=V:"transcript"===e&&(this.transcriptPrefsDialog=V),t("div.able-prefs-form button.modalCloseButton").on("click",(function(){i.resetPrefsForm()})),t("div.able-prefs-form").on("keydown",(function(t){27===t.which&&i.resetPrefsForm()}))},AblePlayer.prototype.getPrefDescVoice=function(){var t,e,i;if(t=this.selectedDescriptions?this.selectedDescriptions.language:this.captionLang?this.captionLang:this.lang,(e=this.getCookie()).voices)for(i=0;i<e.voices.length;i++)if(e.voices[i].lang===t)return e.voices[i].name;return null},AblePlayer.prototype.rebuildDescPrefsForm=function(){var e,i,s,a;for(this.$voiceSelectField=t("#"+this.mediaId+"_prefDescVoice"),this.$voiceSelectField.empty(),e=0;e<this.descVoices.length;e++)s=(i=this.descVoices[e].name)+" ("+this.descVoices[e].lang+")",a=t("<option>",{value:i,"data-lang":this.descVoices[e].lang.substring(0,2).toLowerCase(),text:s}),this.prefDescVoice==i&&a.prop("selected",!0),this.$voiceSelectField.append(a)},AblePlayer.prototype.makePrefsValueReadable=function(t,e){if("prefDescPitch"===t){if(0===e)return this.tt.prefDescPitch1;if(.5===e)return this.tt.prefDescPitch2;if(1===e)return this.tt.prefDescPitch3;if(1.5===e)return this.tt.prefDescPitch4;if(2===e)return this.tt.prefDescPitch5}else if("prefDescRate"===t){if(.7===e)return 1;if(.8===e)return 2;if(.9===e)return 3;if(1===e)return 4;if(1.1===e)return 5;if(1.2===e)return 6;if(1.5===e)return 7;if(2===e)return 8;if(2.5===e)return 9;if(3===e)return 10}else if("prefDescVolume"===t)return 10*e;return e},AblePlayer.prototype.resetPrefsForm=function(){var e,i,s,a;for(e=this.getCookie(),i=this.getAvailablePreferences(),s=0;s<i.length;s++)a=i[s].name,this.mediaId+"_"+a,-1!==a.indexOf("Captions")&&"prefCaptions"!==a?t('select[name="'+a+'"]').val(e.preferences[a]):1===this[a]?t('input[name="'+a+'"]').prop("checked",!0):t('input[name="'+a+'"]').prop("checked",!1);this.stylizeCaptions(this.$sampleCapsDiv)},AblePlayer.prototype.savePrefsFromForm=function(){var e,i,s,a,n,r,o,l,h,p,c,u;o=0,h=0,p=!1,e=this.getCookie(),i=this.getAvailablePreferences();for(var d=0;d<i.length;d++)if(i[d].label)if(s=i[d].name,a=this.mediaId+"_"+s,"prefDescVoice"===s){void 0===e.voices&&(e.voices=[]),n=this.mediaId+"_prefDescVoice",this.prefDescVoice=t("select#"+n).find(":selected").val(),this.prefDescVoiceLang=t("select#"+n).find(":selected").attr("data-lang"),l=!1;for(var f=0;f<e.voices.length;f++)e.voices[f].lang===this.prefDescVoiceLang&&(l=!0,e.voices[f].name=this.prefDescVoice);l||(r={name:this.prefDescVoice,lang:this.prefDescVoiceLang},e.voices.push(r)),o++}else"prefDescMethod"==s?(this.prefDescMethod="video",this.prefDescMethod!==e.preferences.prefDescMethod&&(e.preferences.prefDescMethod=this.prefDescMethod,o++)):-1!==s.indexOf("Captions")&&"prefCaptions"!==s?(u=t('select[id="'+a+'"]').val(),e.preferences[s]!==u&&(e.preferences[s]=u,this[s]=u,o++,h++),"prefCaptionsSize"===s&&(p=!0,c=u)):-1!==s.indexOf("Desc")&&"prefDescPause"!==s&&"prefDescVisible"!==s?(u=t('select[id="'+a+'"]').val(),e.preferences[s]!==u&&(e.preferences[s]=u,this[s]=u,o++)):t('input[id="'+a+'"]').is(":checked")?(e.preferences[s]=1,1===this[s]||(this[s]=1,o++)):(e.preferences[s]=0,1===this[s]&&(this[s]=0,o++));if(o>0?(this.setCookie(e),this.showAlert(this.tt.prefSuccess)):this.showAlert(this.tt.prefNoChange),"youtube"===this.player&&void 0!==this.usingYouTubeCaptions&&this.usingYouTubeCaptions&&p&&this.youTubePlayer.setOption("captions","fontSize",this.translatePrefs("size",c,"youtube")),AblePlayerInstances.length>1)for(d=0;d<AblePlayerInstances.length;d++)AblePlayerInstances[d].updatePrefs(),AblePlayerInstances[d].loadCurrentPreferences(),AblePlayerInstances[d].resetPrefsForm(),h>0&&(AblePlayerInstances[d].stylizeCaptions(AblePlayerInstances[d].$captionsDiv),void 0!==AblePlayerInstances[d].$descDiv&&AblePlayerInstances[d].stylizeCaptions(AblePlayerInstances[d].$descDiv));else this.updatePrefs(),h>0&&(this.stylizeCaptions(this.$captionsDiv),void 0!==this.$descDiv&&this.stylizeCaptions(this.$descDiv))},AblePlayer.prototype.updatePrefs=function(){this.$transcriptDiv&&(1===this.prefTabbable?this.$transcriptDiv.find("span.able-transcript-seekpoint").attr("tabindex","0"):this.$transcriptDiv.find("span.able-transcript-seekpoint").removeAttr("tabindex"),0===this.prefHighlight&&this.$transcriptDiv.find("span").removeClass("able-highlight")),this.updateCaption(),this.initDescription()},AblePlayer.prototype.usingModifierKeys=function(t){return!(1===this.prefAltKey&&!t.altKey)&&(!(1===this.prefCtrlKey&&!t.ctrlKey)&&!(1===this.prefShiftKey&&!t.shiftKey))}}(jQuery),function(t){function actList(t,e){for(var i=[],s=0;s<e.length;s++)i.push(act(t,e[s]));return i}function act(t,e){var i=e(t);if(null!==t.error)throw t.error;return i}function updatePosition(t,e){for(var i=0;i<e.length;i++)"\n"===e[i]?(t.column=1,t.line+=1):t.column+=1}function cut(t,e){var i=t.text.substring(0,e);return updatePosition(t,i),t.text=t.text.substring(e),i}function cutLine(t,e){var i,s=t.text.indexOf("\n");return-1===s?(updatePosition(t,i=t.text),t.text=""):(i=t.text.substring(0,s),updatePosition(t,i+"\n"),t.text=t.text.substring(s+1)),i}function peekLine(t){var e=t.text.indexOf("\n");return-1===e?t.text:t.text.substring(0,e)}function parseFileBody(t){actList(t,[eatOptionalBOM,eatSignature]);var e=t.text[0];" "===e||"\t"===e||"\n"===e?actList(t,[eatUntilEOLInclusive,parseMetadataHeaders,eatAtLeast1EmptyLines,parseCuesAndComments]):t.error="WEBVTT signature not followed by whitespace."}function parseMetadataHeaders(t){for(;;){var e=peekLine(t);if(-1!==e.indexOf("--\x3e"))return;if(0===e.length)return;var i=act(t,getMetadataKeyValue);t.metadata[i[0]]=i[1],act(t,eatUntilEOLInclusive)}}function nextSpaceOrNewline(t){var e=[],i=t.indexOf(" ");i>=0&&e.push(i);var s=t.indexOf("\t");s>=0&&e.push(s);var a=t.indexOf("\n");return a>=0&&e.push(a),Math.min.apply(null,e)}function getMetadataKeyValue(t){var e=t.text.indexOf("\n"),i=cut(t,e),s=i.indexOf(":");return-1===s?void(t.error="Missing colon."):[i.substring(0,s),i.substring(s+1)]}function getSettingsKeyValue(t){var e=cut(t,nextSpaceOrNewline(t.text)),i=e.indexOf(":");return-1===i?void(t.error="Missing colon."):[e.substring(0,i),e.substring(i+1)]}function parseCuesAndComments(t){for(;;){var e=peekLine(t);if(0!==e.indexOf("NOTE")||4!==e.length&&" "!==e[4]&&"\t"!==e[4])if(0===e.trim().length&&t.text.length>0)act(t,eatEmptyLines);else{if(!(e.trim().length>0))return;act(t,parseCue)}else actList(t,[eatComment,eatEmptyLines])}}function parseCue(t){var e,i=peekLine(t);if(-1===i.indexOf("--\x3e")&&(e=cutLine(t),-1===(i=peekLine(t)).indexOf("--\x3e")))return"Invalid WebVTT file: "+t.src+"\n","Line: "+t.line+", ","Column: "+t.column+"\n",void(console.warn||console.log);var s=actList(t,[getTiming,eatAtLeast1SpacesOrTabs,eatArrow,eatAtLeast1SpacesOrTabs,getTiming]),a=s[0],n=s[4];if(a>=n)t.error="Start time is not sooner than end time.";else{act(t,eatSpacesOrTabs);var r=act(t,getCueSettings);cut(t,1);var o=act(t,getCuePayload);void 0===e&&(e=t.cues.length+1),t.cues.push({id:e,start:a,end:n,settings:r,components:o})}}function getCueSettings(t){for(var e={};t.text.length>0&&"\n"!==t.text[0];){var i=act(t,getSettingsKeyValue);e[i[0]]=i[1],act(t,eatSpacesOrTabs)}return e}function getCuePayload(e){for(var i={type:"internal",tagName:"",value:"",classes:[],annotation:"",parent:null,children:[],language:""},s=i,a=[];e.text.length>0;){var n=peekLine(e);if(-1!==n.indexOf("--\x3e")||/^\s+$/.test(n))break;if(e.text.length>=2&&"\n"===e.text[0]&&"\n"===e.text[1]){cut(e,2);break}var r=getCueToken(e);if("string"===r.type)s.children.push(r);else if("startTag"===r.type)r.type=r.tagName,r.parent=s,-1!==t.inArray(r.tagName,["i","b","u","ruby"])||"rt"===r.tagName&&"ruby"===s.tagName?(a.length>0&&(s.language=a[a.length-1]),s.children.push(r),s=r):"c"===r.tagName||"v"===r.tagName?(r.value=r.annotation,a.length>0&&(s.language=a[a.length-1]),s.children.push(r),s=r):"lang"===r.tagName&&(a.push(r.annotation),a.length>0&&(s.language=a[a.length-1]),s.children.push(r),s=r);else if("endTag"===r.type)r.tagName===s.type&&-1!==t.inArray(r.tagName,["c","i","b","u","ruby","rt","v"])?s=s.parent:"lang"===r.tagName&&"lang"===s.type?(s=s.parent,a.pop()):"ruby"===r.tagName&&"rt"===s.type&&(s=s.parent.parent);else if("timestampTag"===r.type){var o={text:r.value,error:null,metadata:{},cues:[],line:1,column:1};try{var l=act(o,getTiming);0===o.text.length&&(r.value=l,s.push(r))}catch(t){}}}return i}function getCueToken(t){for(var e="data",i=[],s="",a={type:"",tagName:"",value:"",classes:[],annotation:"",children:[]};;){var n;if(n=t.text.length>=2&&"\n"===t.text[0]&&"\n"===t.text[1]?"":t.text.length>0?t.text[0]:"","data"===e)if("&"===n)s="&",e="escape";else if("<"===n){if(0!==i.length)return a.type="string",a.value=i.join(""),a;e="tag"}else{if(""===n)return{type:"string",value:i.join("")};i.push(n)}else if("escape"===e)if("&"===n)i.push(s),s="&";else if(n.match(/[0-9a-z]/))s+=n;else if(";"===n)"&"===s?i.push("&"):"<"===s?i.push("<"):">"===s?i.push(">"):"&lrm"===s?i.push(""):"&rlm"===s?i.push(""):" "===s?i.push(" "):(i.push(s),i.push(";")),e="data";else{if("<"===n||""===n)return i.push(s),a.type="string",a.value=i.join(""),a;if("\t"===n||"\n"===n||"\f"===n||" "===n)return i.push(s),a.type="string",a.value=i.join(""),a;i.push(s),e="data"}else if("tag"===e)if("\t"===n||"\n"===n||"\f"===n||" "===n)e="startTagAnnotation";else if("."===n)e="startTagClass";else if("/"===n)e="endTag";else if(n.match("[0-9]"))e="timestampTag",i.push(n);else{if(">"===n){cut(t,1);break}if(""===n)return a.tagName="",a.type="startTag",a;i.push(n),e="startTag"}else if("startTag"===e)if("\t"===n||"\f"===n||" "===n)e="startTagAnnotation";else if("\n"===n)s=n,e="startTagAnnotation";else if("."===n)e="startTagClass";else{if(">"===n)return cut(t,1),a.tagName=i.join(""),a.type="startTag",a;if(""===n)return a.tagName=i.join(""),a.type="startTag",a;i.push(n)}else if("startTagClass"===e)if("\t"===n||"\f"===n||" "===n)a.classes.push(s),s="",e="startTagAnnotation";else if("\n"===n)a.classes.push(s),s=n,e="startTagAnnotation";else if("."===n)a.classes.push(s),s="";else{if(">"===n)return cut(t,1),a.classes.push(s),a.type="startTag",a.tagName=i.join(""),a;if(""===n)return a.classes.push(s),a.type="startTag",a.tagName=i.join(""),a;s+="c"}else if("startTagAnnotation"===e){if(">"===n)return cut(t,1),s=s.trim().replace(/ +/," "),a.type="startTag",a.tagName=i.join(""),a.annotation=s,a;if(""===n)return s=s.trim().replace(/ +/," "),a.type="startTag",a.tagName=i.join(""),a.annotation=s,a;s+=n}else if("endTag"===e){if(">"===n)return cut(t,1),a.type="endTag",a.tagName=i.join(""),a;if(""===n)return a.type="endTag",a.tagName=i.join(""),a;i.push(n)}else{if("timestampTag"!==e)throw"Unknown tokenState "+e;if(">"===n)return cut(t,1),a.type="timestampTag",a.name=i.join(""),a;if(""===n)return a.type="timestampTag",a.name=i.join(""),a;i.push(n)}cut(t,1)}}function eatComment(t){if(-1===cutLine(t).indexOf("--\x3e"))for(;;){var e=peekLine(t);if(0===e.trim().length)return;if(-1!==e.indexOf("--\x3e"))return void(t.error="Invalid syntax: --\x3e in comment.");cutLine(t)}else t.error="Invalid syntax: --\x3e in NOTE line."}function eatOptionalBOM(t){"\ufeff"===t.text[0]&&cut(t,1)}function eatSignature(t){"WEBVTT"===t.text.substring(0,6)?cut(t,6):t.error="Invalid signature."}function eatArrow(t){t.text.length<3||"--\x3e"!==t.text.substring(0,3)?t.error="Missing --\x3e":cut(t,3)}function eatSpacesOrTabs(t){for(;"\t"===t.text[0]||" "===t.text[0];)cut(t,1)}function eatAtLeast1SpacesOrTabs(t){for(var e=0;"\t"===t.text[0]||" "===t.text[0];)cut(t,1),e+=1;0===e&&(t.error="Missing space.")}function eatUntilEOLInclusive(t){var e=t.text.indexOf("\n");-1===e?t.error="Missing EOL.":cut(t,e+1)}function eatEmptyLines(t){for(;t.text.length>0;){if(0!==peekLine(t).trim().length)break;cutLine(t)}}function eatAtLeast1EmptyLines(t){for(var e=0;t.text.length>0;){if(0!==peekLine(t).trim().length)break;cutLine(t),e+=1}0===e&&(t.error="Missing empty line.")}function getTiming(t){var e=nextSpaceOrNewline(t.text);if(-1!==e){var i=cut(t,e),s=/((\d\d):)?((\d\d):)(\d\d).(\d\d\d)|(\d+).(\d\d\d)/.exec(i);if(s){var a=0,n=s[2],r=s[4];if(r){if(parseInt(r,10)>59)return void(t.error="Invalid minute range");n&&(a+=3600*parseInt(n,10)),a+=60*parseInt(r,10);var o=s[5];if(parseInt(o,10)>59)return void(t.error="Invalid second range");a+=parseInt(o,10),a+=parseInt(s[6],10)/1e3}else a+=parseInt(s[7],10),a+=parseInt(s[8],10)/1e3;return a}t.error="Unable to parse timestamp"}else t.error("Missing timing.")}AblePlayer.prototype.parseWebVTT=function(t,e){var i={src:t,text:e=e.replace(/(\r\n|\n|\r)/g,"\n"),error:null,metadata:{},cues:[],line:1,column:1};try{act(i,parseFileBody)}catch(t){console.warn||console.log}return i}}(jQuery),function(t){AblePlayer.prototype.injectPlayerCode=function(){var e;this.$mediaContainer=this.$media.wrap('<div class="able-media-container"></div>').parent(),this.$ableDiv=this.$mediaContainer.wrap('<div class="able"></div>').parent(),this.$ableWrapper=this.$ableDiv.wrap('<div class="able-wrapper"></div>').parent(),this.$ableWrapper.addClass("able-skin-"+this.skin),this.$ableWrapper.css({width:this.playerWidth+"px"}),"video"===this.mediaType&&("image"==this.iconType||"youtube"===this.player&&!this.hasPoster||this.injectBigPlayButton()),e=t("<div>"),"video"===this.mediaType?e.addClass("able-vidcap-container"):"audio"===this.mediaType&&(e.addClass("able-audcap-container"),e.addClass("captions-off")),this.injectPlayerControlArea(),this.$captionsContainer=this.$mediaContainer.wrap(e).parent(),this.injectAlert(),this.injectPlaylist(),this.injectOffscreenHeading()},AblePlayer.prototype.injectOffscreenHeading=function(){var e;"0"==this.playerHeadingLevel||(void 0===this.playerHeadingLevel&&(this.playerHeadingLevel=this.getNextHeadingLevel(this.$ableDiv)),e="h"+this.playerHeadingLevel.toString(),this.$headingDiv=t("<"+e+">"),this.$ableDiv.prepend(this.$headingDiv),this.$headingDiv.addClass("able-offscreen"),this.$headingDiv.text(this.tt.playerHeading))},AblePlayer.prototype.injectBigPlayButton=function(){var e,i,s,a;e=this,this.$bigPlayButton=t("<button>",{class:"able-big-play-button","aria-hidden":!1,"aria-label":this.tt.play,type:"button",tabindex:0}),"svg"==this.iconType?(i=this.getSvgData("play"),s=t("<svg>",{focusable:"false","aria-hidden":"true",viewBox:i[0]}),a=t("<path>",{d:i[1]}),s.append(a),this.$bigPlayButton.html(s),this.$bigPlayButton.html(this.$bigPlayButton.html())):(this.$bigPlayIcon=t("<span>",{class:"icon-play"}),this.$bigPlayButton.append(this.$bigPlayIcon)),this.$bigPlayButton.on("click",(function(){e.handlePlay()})),this.$mediaContainer.append(this.$bigPlayButton)},AblePlayer.prototype.injectPlayerControlArea=function(){this.$playerDiv=t("<div>",{class:"able-player",role:"region","aria-label":this.mediaType+" player"}),this.$playerDiv.addClass("able-"+this.mediaType),this.hasPlaylist&&this.showNowPlaying&&(this.$nowPlayingDiv=t("<div>",{class:"able-now-playing","aria-live":"assertive","aria-atomic":"true"})),this.$controllerDiv=t("<div>",{class:"able-controller"}),this.$controllerDiv.addClass("able-"+this.iconColor+"-controls"),this.$statusBarDiv=t("<div>",{class:"able-status-bar"}),this.$timer=t("<span>",{class:"able-timer"}),this.$elapsedTimeContainer=t("<span>",{class:"able-elapsedTime",text:"0:00"}),this.$durationContainer=t("<span>",{class:"able-duration"}),this.$timer.append(this.$elapsedTimeContainer).append(this.$durationContainer),this.$speed=t("<span>",{class:"able-speed","aria-live":"assertive","aria-atomic":"true"}).text(this.tt.speed+": 1x"),this.$status=t("<span>",{class:"able-status","aria-live":"polite"}),this.$statusBarDiv.append(this.$timer,this.$speed,this.$status),this.showNowPlaying?this.$playerDiv.append(this.$nowPlayingDiv,this.$controllerDiv,this.$statusBarDiv):this.$playerDiv.append(this.$controllerDiv,this.$statusBarDiv),"video"===this.mediaType?this.$ableDiv.append(this.$playerDiv):this.$ableDiv.prepend(this.$playerDiv)},AblePlayer.prototype.injectTextDescriptionArea=function(){this.$descDiv=t("<div>",{class:"able-descriptions"}),this.$descDiv.attr({"aria-live":"assertive","aria-atomic":"true"}),this.$descDiv.hide(),this.$ableDiv.append(this.$descDiv)},AblePlayer.prototype.getDefaultWidth=function(t){let e=window.innerWidth;return"transcript"===t?e<=450?e:450:"sign"===t?e<=400?e:400:void 0},AblePlayer.prototype.positionDraggableWindow=function(e,i){var s,a,n,r;s=this.getCookie(),"transcript"===e?(n=this.$transcriptArea,void 0!==s.transcript&&(a=s.transcript)):"sign"===e&&(n=this.$signWindow,void 0!==s.transcript&&(a=s.sign)),void 0===a||t.isEmptyObject(a)?(r=this.getOptimumPosition(e,i),void 0===i&&(i=this.getDefaultWidth(e)),n.css({position:r[0],width:i,"z-index":r[3]}),"absolute"===r[0]&&n.css({top:r[1]+"px",left:r[2]+"px"})):(n.css({position:a.position,width:a.width,"z-index":a.zindex}),"absolute"===a.position&&n.css({top:a.top,left:a.left}),this.updateZIndex(e))},AblePlayer.prototype.getOptimumPosition=function(e,i){var s,a,n,r,o;return void 0===i&&(i=this.getDefaultWidth(e)),s=[],a=this.$ableDiv.width(),n=this.$ableDiv.offset().left,r=t(window).width(),o=0,"transcript"===e?void 0!==this.$signWindow&&this.$signWindow.is(":visible")&&(o=this.$signWindow.width()+5):"sign"===e&&void 0!==this.$transcriptArea&&this.$transcriptArea.is(":visible")&&(o=this.$transcriptArea.width()+5),i<r-(n+a+5+o)?(s[0]="absolute",s[1]=0,s[2]=a+o+5):i+5<n?(s[0]="absolute",s[1]=0,s[2]=n-i-5):s[0]="relative",s},AblePlayer.prototype.injectAlert=function(){var e;this.$alertBox=t('<div role="alert"></div>'),this.$alertBox.addClass("able-alert"),this.$alertBox.hide(),this.$alertBox.appendTo(this.$ableDiv),e="audio"==this.mediaType?"-10":"10",this.$alertBox.css({top:e+"px"}),this.$srAlertBox=t('<div role="alert"></div>'),this.$srAlertBox.addClass("able-screenreader-alert"),this.$srAlertBox.appendTo(this.$ableDiv)},AblePlayer.prototype.injectPlaylist=function(){if(!0===this.playlistEmbed){var t=this.$playlistDom.clone();t.insertBefore(this.$statusBarDiv),this.$playlist=t.find("li")}},AblePlayer.prototype.createPopup=function(e,i){var s,a,n,r,o,l,h,p,c,u,d,f;if(s=this,a=t("<ul>",{id:this.mediaId+"-"+e+"-menu",class:"able-popup",role:"menu"}).hide(),"captions"===e&&a.addClass("able-popup-captions"),"prefs"===e)if(this.prefCats.length>1){for(n=0;n<this.prefCats.length;n++)r=t("<li></li>",{role:"menuitem",tabindex:"-1"}),"captions"===(o=this.prefCats[n])?r.text(this.tt.prefMenuCaptions):"descriptions"===o?r.text(this.tt.prefMenuDescriptions):"keyboard"===o?r.text(this.tt.prefMenuKeyboard):"transcript"===o&&r.text(this.tt.prefMenuTranscript),r.on("click",(function(){l=t(this).text(),s.showingPrefsDialog=!0,s.setFullscreen(!1),l===s.tt.prefMenuCaptions?s.captionPrefsDialog.show():l===s.tt.prefMenuDescriptions?s.descPrefsDialog.show():l===s.tt.prefMenuKeyboard?s.keyboardPrefsDialog.show():l===s.tt.prefMenuTranscript&&s.transcriptPrefsDialog.show(),s.closePopups(),s.showingPrefsDialog=!1})),a.append(r);this.$prefsButton.attr("data-prefs-popup","menu")}else 1==this.prefCats.length&&this.$prefsButton.attr("data-prefs-popup",this.prefCats[0]);else if("captions"===e||"chapters"===e){for(h=!1,n=0;n<i.length;n++)p=i[n],("captions"!==e||"html5"!==this.player||void 0!==p.cues)&&(r=t("<li></li>",{role:"menuitemradio",tabindex:"-1",lang:p.language}),p.def&&1==this.prefCaptions?(r.attr("aria-checked","true"),h=!0):r.attr("aria-checked","false"),"captions"==e?(r.text(p.label),r.on("click",this.getCaptionClickFunction(p))):"chapters"==e&&(r.text(this.flattenCueForCaption(p)+" - "+this.formatSecondsAsColonTime(p.start)),r.on("click",this.getChapterClickFunction(p.start))),a.append(r));"captions"===e&&(r=t("<li></li>",{role:"menuitemradio",tabindex:"-1"}).text(this.tt.captionsOff),0===this.prefCaptions?(r.attr("aria-checked","true"),h=!0):r.attr("aria-checked","false"),r.on("click",this.getCaptionOffFunction()),a.append(r))}else if("transcript-window"===e||"sign-window"===e)for((c=[]).push({name:"move",label:this.tt.windowMove}),c.push({name:"resize",label:this.tt.windowResize}),c.push({name:"close",label:this.tt.windowClose}),n=0;n<c.length;n++)(r=t("<li></li>",{role:"menuitem",tabindex:"-1","data-choice":c[n].name})).text(c[n].label),r.on("click mousedown",(function(i){if(i.stopPropagation(),void 0!==i.button&&0!==i.button)return!1;s.windowMenuClickRegistered||s.finishingDrag||(s.windowMenuClickRegistered=!0,s.handleMenuChoice(e.substring(0,e.indexOf("-")),t(this).attr("data-choice"),i))})),a.append(r);return"captions"!==e||h?"chapters"===e&&(a.find('li:contains("'+this.defaultChapter+'")')?a.find('li:contains("'+this.defaultChapter+'")').attr("aria-checked","true").addClass("able-focus"):a.find("li").first().attr("aria-checked","true").addClass("able-focus")):a.find("li[lang="+this.captionLang+"]")?a.find("li[lang="+this.captionLang+"]").attr("aria-checked","true"):a.find("li").last().attr("aria-checked","true"),a.on("keydown",(function(e){(u=t(this).find("li:focus")).is(":first-child")?(d=t(this).find("li").last(),f=u.next()):u.is(":last-child")?(d=u.prev(),f=t(this).find("li").first()):(d=u.prev(),f=u.next()),9===e.which?e.shiftKey?(u.removeClass("able-focus"),d.trigger("focus").addClass("able-focus")):(u.removeClass("able-focus"),f.trigger("focus").addClass("able-focus")):40===e.which||39===e.which?(u.removeClass("able-focus"),f.trigger("focus").addClass("able-focus")):38==e.which||37===e.which?(u.removeClass("able-focus"),d.trigger("focus").addClass("able-focus")):32===e.which||13===e.which?u.trigger("click"):27===e.which&&(u.removeClass("able-focus"),s.closePopups(),e.stopPropagation),e.preventDefault()})),this.$controllerDiv.append(a),a},AblePlayer.prototype.closePopups=function(){var t=this;this.chaptersPopup&&this.chaptersPopup.is(":visible")&&(this.chaptersPopup.hide(),this.$chaptersButton.attr("aria-expanded","false").trigger("focus")),this.captionsPopup&&this.captionsPopup.is(":visible")&&(this.captionsPopup.hide(),this.$ccButton.attr("aria-expanded","false"),this.waitThenFocus(this.$ccButton)),this.prefsPopup&&this.prefsPopup.is(":visible")&&!this.hidingPopup&&(this.hidingPopup=!0,this.prefsPopup.hide(),this.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$prefsButton.attr("aria-expanded","false"),this.showingPrefsDialog||this.waitThenFocus(t.$prefsButton),setTimeout((function(){t.hidingPopup=!1}),100)),this.$volumeSlider&&this.$volumeSlider.is(":visible")&&(this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeButton.attr("aria-expanded","false").trigger("focus")),this.$transcriptPopup&&this.$transcriptPopup.is(":visible")&&(this.hidingPopup=!0,this.$transcriptPopup.hide(),this.$transcriptPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$transcriptPopupButton.attr("aria-expanded","false").trigger("focus"),setTimeout((function(){t.hidingPopup=!1}),100)),this.$signPopup&&this.$signPopup.is(":visible")&&(this.$signPopup.hide(),this.$signPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$signPopupButton.attr("aria-expanded","false").trigger("focus"))},AblePlayer.prototype.setupPopups=function(t){var e,i;if(e=[],void 0===t&&e.push("prefs"),"captions"!==t&&void 0!==t||this.captions.length>0&&e.push("captions"),"chapters"!==t&&void 0!==t||this.chapters.length>0&&this.useChaptersButton&&e.push("chapters"),"transcript-window"===t&&"popup"===this.transcriptType&&e.push("transcript-window"),"sign-window"===t&&this.hasSignLanguage&&e.push("sign-window"),e.length>0){0;for(var s=0;s<e.length;s++){var a=e[s];if("prefs"==a)this.prefsPopup=this.createPopup("prefs");else if("captions"==a)void 0!==this.captionsPopup&&this.captionsPopup||(this.captionsPopup=this.createPopup("captions",this.captions));else if("chapters"==a)i=this.selectedChapters?this.selectedChapters.cues:this.chapters.length>=1?this.chapters[0].cues:[],void 0!==this.chaptersPopup&&this.chaptersPopup||(this.chaptersPopup=this.createPopup("chapters",i));else{if("transcript-window"==a)return this.createPopup("transcript-window");if("sign-window"==a)return this.createPopup("sign-window")}}}},AblePlayer.prototype.provideFallback=function(){var e,i;if(!this.usingFallback){if(this.usingFallback=!0,this.testFallback||(this.testFallback=1),void 0===this.$media&&(this.$media=t(this.media)),this.$media.attr("id")?this.mediaId=this.$media.attr("id"):this.mediaId="media"+Math.floor(1e9*Math.random()).toString(),this.hasFallback=!1,this.$media.children().length)for(e=0;e<this.$media.children().length&&!this.hasFallback;)"SOURCE"!==this.$media.children()[e].tagName&&"TRACK"!==this.$media.children()[e].tagName&&(this.hasFallback=!0),e++;if(this.hasFallback||(i=t("<p>").text("Media player unavailable."),this.$media.append(i)),this.$media.attr("width")&&this.$media.css("width",this.$media.attr("width")+"px"),this.$media.attr("height")&&this.$media.css("height",this.$media.attr("height")+"px"),this.$media.removeAttr("data-able-player"),this.$media.prop("controls",!0),2==this.testFallback){if(t(this.$media).replaceWith(t('<foobar id="foobar-'+this.mediaId+'">')),this.$newFallbackElement=t("#foobar-"+this.mediaId),this.$media.children().length)for(e=this.$media.children().length-1;e>=0;)this.$newFallbackElement.prepend(t(this.$media.children()[e])),e--;this.hasFallback||this.$newFallbackElement.append(i)}}},AblePlayer.prototype.calculateControlLayout=function(){var t,e,i;return(t=[])[0]=[],t[1]=[],"legacy"===this.skin&&(t[2]=[],t[3]=[]),t[0].push("play"),t[0].push("restart"),t[0].push("rewind"),t[0].push("forward"),"legacy"===this.skin&&t[1].push("seek"),this.hasPlaylist&&("legacy"===this.skin||"2020"==this.skin)&&(t[0].push("previous"),t[0].push("next")),this.isPlaybackRateSupported()?(e=!0,"legacy"===this.skin&&(t[2].push("slower"),t[2].push("faster"))):e=!1,i=0,this.hasCaptions&&(i++,"legacy"===this.skin?t[2].push("captions"):"2020"==this.skin&&t[1].push("captions")),this.hasSignLanguage&&(i++,"legacy"===this.skin?t[2].push("sign"):"2020"==this.skin&&t[1].push("sign")),"video"===this.mediaType&&(this.hasOpenDesc||this.hasClosedDesc)&&(i++,"legacy"===this.skin?t[2].push("descriptions"):"2020"==this.skin&&t[1].push("descriptions")),"popup"!==this.transcriptType||this.hideTranscriptButton||(i++,"legacy"===this.skin?t[2].push("transcript"):"2020"==this.skin&&t[1].push("transcript")),this.hasChapters&&this.useChaptersButton&&(i++,"legacy"===this.skin?t[2].push("chapters"):"2020"==this.skin&&t[1].push("chapters")),"2020"==this.skin&&i>0&&t[1].push("pipe"),e&&"2020"===this.skin&&(t[1].push("faster"),t[1].push("slower"),t[1].push("pipe")),"legacy"===this.skin?t[3].push("preferences"):"2020"==this.skin&&t[1].push("preferences"),"video"===this.mediaType&&this.allowFullscreen&&("legacy"===this.skin?t[3].push("fullscreen"):t[1].push("fullscreen")),this.browserSupportsVolume()?(this.volumeButton="volume-"+this.getVolumeName(this.volume),("legacy"===this.skin||"2020"==this.skin)&&t[1].push("volume")):this.volume=!1,t},AblePlayer.prototype.addControls=function(){var e,i,s,a,n,r,o,l,h,p,c,u,d,f,g,m,v,y,b,T,P,k,C,w,D,A,$,x,S,N,I,M,B,L,E,O;e=this,s=(i=this.calculateControlLayout()).length,x=this.mediaId+"-tooltip",this.$tooltipDiv=t("<div>",{id:x,class:"able-tooltip"}).hide(),this.$controllerDiv.append(this.$tooltipDiv),"2020"==this.skin&&(l=t('<div class="able-seekbar"></div>'),h=this.mediaType+" "+this.tt.seekbarLabel,this.$controllerDiv.append(l),this.seekBar=new AccessibleSlider(this.mediaType,l,"horizontal",100,0,this.duration,this.seekInterval,h,"seekbar",!0,"visible"));let F=t('<div class="able-control-row"></div>');for(this.$controllerDiv.append(F),a=0;a<s;a++){for(r=i[a],o=t("<div>",a%2==0?{class:"able-left-controls"}:{class:"able-right-controls"}),F.append(o),n=0;n<r.length;n++)"seek"===(f=r[n])?(l=t('<div class="able-seekbar"></div>'),h=this.mediaType+" "+this.tt.seekbarLabel,o.append(l),void 0!==this.duration&&0!==this.duration||(this.duration=60,this.elapsed=0),this.seekBar=new AccessibleSlider(this.mediaType,l,"horizontal",100,0,this.duration,this.seekInterval,h,"seekbar",!0,"visible")):"pipe"===f?(p=t("<span>",{tabindex:"-1","aria-hidden":"true"}),"font"===this.iconType?p.addClass("icon-pipe"):(c=t("<img>",{src:this.rootPath+"button-icons/"+this.iconColor+"/pipe.png",alt:"",role:"presentation"}),p.append(c)),o.append(p)):(v="volume"===f?this.rootPath+"button-icons/"+this.iconColor+"/"+this.volumeButton+".png":"fullscreen"===f?this.rootPath+"button-icons/"+this.iconColor+"/fullscreen-expand.png":"slower"===f?"animals"===this.speedIcons?this.rootPath+"button-icons/"+this.iconColor+"/turtle.png":this.rootPath+"button-icons/"+this.iconColor+"/slower.png":"faster"===f?"animals"===this.speedIcons?this.rootPath+"button-icons/"+this.iconColor+"/rabbit.png":this.rootPath+"button-icons/"+this.iconColor+"/faster.png":this.rootPath+"button-icons/"+this.iconColor+"/"+f+".png",y=this.getButtonTitle(f),b=t("<div>",{role:"button",tabindex:"0","aria-label":y,class:"able-button-handler-"+f}),"volume"!==f&&"preferences"!==f&&"captions"!==f||("preferences"==f?(this.prefCats=this.getPreferencesGroups(),this.prefCats.length>1?(O=this.mediaId+"-prefs-menu",b.attr({"aria-controls":O,"aria-haspopup":"menu","aria-expanded":"false"})):1===this.prefCats.length&&b.attr({"aria-haspopup":"dialog"})):"volume"===f?(O=this.mediaId+"-volume-slider",b.attr({"aria-controls":O,"aria-expanded":"false"})):"captions"===f&&this.captions&&(this.captions.length>1?b.attr("aria-expanded","false"):b.attr("aria-pressed","false"))),"font"===this.iconType?(T="volume"===f?"icon-"+this.volumeButton:"slower"===f?"animals"===this.speedIcons?"icon-turtle":"icon-slower":"faster"===f?"animals"===this.speedIcons?"icon-rabbit":"icon-faster":"icon-"+f,P=t("<span>",{class:T,"aria-hidden":"true"}),b.append(P)):"svg"===this.iconType?(u="volume"===f?this.getSvgData(this.volumeButton):"fullscreen"===f?this.getSvgData("fullscreen-expand"):"slower"===f?"animals"===this.speedIcons?this.getSvgData("turtle"):this.getSvgData("slower"):"faster"===f?"animals"===this.speedIcons?this.getSvgData("rabbit"):this.getSvgData("faster"):this.getSvgData(f),P=t("<svg>",{focusable:"false","aria-hidden":"true",viewBox:u[0]}),d=t("<path>",{d:u[1]}),P.append(d),b.html(P),b.html(b.html())):(m=t("<img>",{src:v,alt:"",role:"presentation"}),b.append(m)),g=t("<span>",{class:"able-clipped"}).text(y),b.append(g),b.on("mouseenter focus",(function(i){clearTimeout(L),k=t(this).attr("aria-label"),C=t(this).position(),w=t(this).height(),D=t(this).width(),$=e.$controllerDiv.width(),C.right=$-C.left-D,S=C.top+w+5,A=t(this).parent().hasClass("able-right-controls")?"right":"left",I=AblePlayer.localGetElementById(b[0],x).text(k).width(),"left"==A?((N=C.left-I/2)<0&&(N=2),M={left:N+"px",right:"",top:S+"px"}):((N=C.right-I/2)<0&&(N=2),M={left:"",right:N+"px",top:S+"px"}),B=AblePlayer.localGetElementById(b[0],x).text(k).css(M),e.showTooltip(B),t(this).on("mouseleave blur",(function(){clearTimeout(L),L=setTimeout((function(){AblePlayer.localGetElementById(b[0],x).text("").hide()}),500),e.$tooltipDiv.on("mouseenter focus",(function(){clearTimeout(L)})),e.$tooltipDiv.on("mouseleave blur",(function(){AblePlayer.localGetElementById(b[0],x).text("").hide()}))}))})),"captions"===f?this.prefCaptions&&1===this.prefCaptions||(E=this.captions.length>1?this.tt.captions:this.tt.showCaptions,b.addClass("buttonOff").attr("title",E),b.attr("aria-pressed","false")):"descriptions"===f&&(this.prefDesc&&1===this.prefDesc||b.addClass("buttonOff").attr("title",this.tt.turnOnDescriptions)),o.append(b),"play"===f?this.$playpauseButton=b:"previous"==f?(this.$prevButton=b,"previous"==this.buttonWithFocus&&(this.$prevButton.trigger("focus"),this.buttonWithFocus=null)):"next"==f?(this.$nextButton=b,"next"==this.buttonWithFocus&&(this.$nextButton.trigger("focus"),this.buttonWithFocus=null)):"captions"===f?this.$ccButton=b:"sign"===f?(this.$signButton=b,this.$signWindow.is(":visible")||this.$signButton.addClass("buttonOff")):"descriptions"===f?this.$descButton=b:"mute"===f?this.$muteButton=b:"transcript"===f?(this.$transcriptButton=b,this.$transcriptDiv.is(":visible")||this.$transcriptButton.addClass("buttonOff").attr("title",this.tt.showTranscript)):"fullscreen"===f?this.$fullscreenButton=b:"chapters"===f?this.$chaptersButton=b:"preferences"===f?this.$prefsButton=b:"volume"===f&&(this.$volumeButton=b)),"volume"===f&&this.addVolumeSlider(o);a%2==1&&this.$controllerDiv.append('<div style="clear:both;"></div>')}for(var R in void 0!==this.$captionsDiv&&this.stylizeCaptions(this.$captionsDiv),void 0!==this.$descDiv&&this.stylizeCaptions(this.$descDiv),this.controls=[],i)i.hasOwnProperty(R)&&(this.controls=this.controls.concat(i[R]));this.refreshControls("init")},AblePlayer.prototype.useSvg=function(){var t,e,i=Object.create(null),debouncedCheck=function(){clearTimeout(e),e=setTimeout(t,100)},unobserveChanges=function(){},s="http://www.w3.org/1999/xlink";t=function(){var t,e,a,n,r,o,l,h,p,c=0;if(window.XMLHttpRequest&&(r=void 0!==(r=new XMLHttpRequest).withCredentials?XMLHttpRequest:XDomainRequest||void 0),void 0!==r){for(unobserveChanges(),h=document.getElementsByTagName("use"),n=0;n<h.length;n+=1){try{e=h[n].getBoundingClientRect()}catch(t){e=!1}t=(l=h[n].getAttributeNS(s,"href").split("#"))[0],a=l[1],o=e&&0===e.left&&0===e.right&&0===e.top&&0===e.bottom,e&&0===e.width&&0===e.height&&!o?t.length&&(!0!==(p=i[t])&&setTimeout(attrUpdateFunc({useEl:h[n],base:t,hash:a}),0),void 0===p&&(p=new r,i[t]=p,p.onload=onloadFunc(p),p.onerror=onErrorTimeout(p),p.ontimeout=onErrorTimeout(p),p.open("GET",t),p.send(),c+=1)):o||(void 0===i[t]?i[t]=!0:i[t].onload&&(i[t].abort(),i[t].onload=void 0,i[t]=!0))}h="",c+=1,observeIfDone()}function observeIfDone(){var t;0===(c-=1)&&(window.addEventListener("resize",debouncedCheck,!1),window.addEventListener("orientationchange",debouncedCheck,!1),window.MutationObserver?((t=new MutationObserver(debouncedCheck)).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),unobserveChanges=function(){try{t.disconnect(),window.removeEventListener("resize",debouncedCheck,!1),window.removeEventListener("orientationchange",debouncedCheck,!1)}catch(t){}}):(document.documentElement.addEventListener("DOMSubtreeModified",debouncedCheck,!1),unobserveChanges=function(){document.documentElement.removeEventListener("DOMSubtreeModified",debouncedCheck,!1),window.removeEventListener("resize",debouncedCheck,!1),window.removeEventListener("orientationchange",debouncedCheck,!1)}))}function attrUpdateFunc(t){return function(){!0!==i[t.base]&&t.useEl.setAttributeNS(s,"xlink:href","#"+t.hash)}}function onloadFunc(t){return function(){var e,i=document.body,s=document.createElement("x");t.onload=null,s.innerHTML=t.responseText,(e=s.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",i.insertBefore(e,i.firstChild)),observeIfDone()}}function onErrorTimeout(t){return function(){t.onerror=null,t.ontimeout=null,observeIfDone()}}}},AblePlayer.prototype.cuePlaylistItem=function(e){var i,s,a,n,r,o,l=this;s=this.player,this.initializing||this.playerCreated&&this.deletePlayer("playlist"),this.swappingSrc=!0,this.startedPlaying?this.okToPlay=!0:this.okToPlay=!1,this.loadingMedia=!1,i=this.$playlist.eq(e),this.hasAttr(i,"data-youtube-id")?(this.youTubeId=this.getYouTubeId(i.attr("data-youtube-id")),this.hasAttr(i,"data-youtube-desc-id")&&(this.youTubeDescId=this.getYouTubeId(i.attr("data-youtube-desc-id"))),a="youtube"):this.hasAttr(i,"data-vimeo-id")?(this.vimeoId=this.getVimeoId(i.attr("data-vimeo-id")),this.hasAttr(i,"data-vimeo-desc-id")&&(this.vimeoDescId=this.getVimeoId(i.attr("data-vimeo-desc-id"))),a="vimeo"):a="html5","youtube"===a?"html5"===s&&(this.playing&&this.pauseMedia(),this.$media.hide()):(this.youTubeId=!1,"youtube"===s&&this.$media.show()),this.player=a,this.$media.empty(),this.hasAttr(i,"data-poster")&&this.$media.attr("poster",i.attr("data-poster")),this.hasAttr(i,"data-youtube-desc-id")&&this.$media.attr("data-youtube-desc-id",i.attr("data-youtube-desc-id")),this.youTubeId&&this.$media.attr("data-youtube-id",i.attr("data-youtube-id"));var h=i.children("span.able-source");h.length&&h.each((function(){const e=t(this);if(l.hasAttr(e,"data-src")){const i=DOMPurify.sanitize(e.attr("data-src"));if(validate.isProtocolSafe(i)){const s=t("<source>",{src:i});["data-type","data-desc-src","data-sign-src"].forEach((t=>{if(l.hasAttr(e,t)){const i=e.attr(t),a=DOMPurify.sanitize(i);t.endsWith("-src")&&validate.isProtocolSafe(a)?s.attr(t,a):t.endsWith("-src")||s.attr(t,a)}})),l.$media.append(s)}}}));var p=i.children("span.able-track");p.length&&p.each((function(){const e=t(this);if(l.hasAttr(e,"data-src")&&l.hasAttr(e,"data-kind")&&l.hasAttr(e,"data-srclang")){const i=DOMPurify.sanitize(e.attr("data-src"));if(validate.isProtocolSafe(i)){const s=t("<track>",{src:i,kind:e.attr("data-kind"),srclang:e.attr("data-srclang")});["data-label","data-desc","data-default"].forEach((t=>{l.hasAttr(e,t)&&s.attr(t,DOMPurify.sanitize(e.attr(t)))})),l.$media.append(s)}}})),n=DOMPurify.sanitize(i.text()),this.hasAttr(i,"lang")&&(r=i.attr("lang")),this.$sources=this.$media.find("source"),this.recreatingPlayer||this.recreatePlayer().then((function(){l.$playlist.removeClass("able-current").children("button").removeAttr("aria-current"),l.$playlist.eq(e).addClass("able-current").children("button").attr("aria-current","true"),!0===l.showNowPlaying&&void 0!==l.$nowPlayingDiv&&(o=t("<span>"),void 0!==r&&o.attr("lang",r),o.html("<span>"+l.tt.selectedTrack+":</span>"+n),l.$nowPlayingDiv.html(o)),l.initializing?l.swappingSrc=!1:"html5"===l.player?l.loadingMedia||(l.media.load(),l.loadingMedia=!0):"youtube"===l.player&&(l.okToPlay=!0),l.initializing=!1,l.playerCreated=!0}))},AblePlayer.prototype.deletePlayer=function(e){"youtube"===this.player&&this.youTubePlayer&&this.youTubePlayer.destroy(),"vimeo"===this.player&&this.vimeoPlayer&&this.vimeoPlayer.destroy(),this.$controllerDiv.empty(),this.$elapsedTimeContainer.empty().text("0:00"),this.$durationContainer.empty(),this.$signWindow&&this.$signWindow.remove(),this.$transcriptArea&&this.$transcriptArea.remove(),t(".able-modal-dialog").remove(),this.$captionsWrapper&&this.$captionsWrapper.remove(),this.$descDiv&&this.$descDiv.remove(),this.hasCaptions=!1,this.hasChapters=!1,this.hasDescTracks=!1,this.hasOpenDesc=!1,this.hasClosedDesc=!1,this.captionsPopup=null,this.chaptersPopup=null,this.transcriptType=null,this.playerDeleted=!0},AblePlayer.prototype.getButtonTitle=function(t){return"playpause"===t||"play"===t?this.tt.play:"pause"===t?this.tt.pause:"restart"===t?this.tt.restart:"previous"===t?this.tt.prevTrack:"next"===t?this.tt.nextTrack:"rewind"===t?this.tt.rewind:"forward"===t?this.tt.forward:"captions"===t?this.captions.length>1?this.tt.captions:this.captionsOn?this.tt.hideCaptions:this.tt.showCaptions:"descriptions"===t?this.descOn?this.tt.turnOffDescriptions:this.tt.turnOnDescriptions:"transcript"===t?this.$transcriptDiv.is(":visible")?this.tt.hideTranscript:this.tt.showTranscript:"chapters"===t?this.tt.chapters:"sign"===t?this.tt.sign:"volume"===t?this.tt.volume:"faster"===t?this.tt.faster:"slower"===t?this.tt.slower:"preferences"===t?this.tt.preferences:"help"!==t?"fullscreen"===t?this.fullscreen?this.tt.exitFullScreen:this.tt.enterFullScreen:(this.debug,t.charAt(0).toUpperCase()+t.slice(1)):void 0}}(jQuery);var preProcessing={transformCSSClasses:function(t){return t.replace(/<(v|c|b|i|u|lang|ruby)\.([\w\.]+)([^>]*)>/g,(function(t,e,i,s){return`<${e} class="${i.replace(/\./g," ")}"${s}>`}))},transformLangTags:function(t){return t.replace(/<lang\s+([\w-]+)([^>]*)>/g,(function(t,e,i){return'<lang lang="'+e+'"'+i+">"}))},transformVTags:function(t){return t.replace(/<v\s+([^>]*?)>/g,(function(t,e){var i=e.match(/class="([^"]*)"/),s=i?i[0]:"",a=e.replace(/class="[^"]*"/,"").trim().split(/\s+/),n=[],r=[];a.forEach((function(t){-1!==t.indexOf("=")?n.push(t):r.push(t)}));var o=r.join(" "),l="<v";return o&&(l+=' title="'+o+'"'),n.length>0&&(l+=" "+n.join(" ")),s&&(l+=" "+s),l+=">"}))}},postProcessing={postprocessCTag:function(t){return t.replace(/<c class="([\w\s]+)">/g,(function(t,e){return"<c."+e.replace(/\./g," ")+">"}))},postprocessVTag:function(t){return t.replace(/<v([^>]*)class="([\w\s]+)"([^>]*)>/g,(function(t,e,i,s){var a=i.trim().split(/\s+/).join("."),n=(e+s).replace(/\s*class="[\w\s]+"/,"").trim();return"<v."+a+(n?" "+n:"")+">"}))},postprocessLangTag:function(t){return t.replace(/<lang lang="([\w-]+)"([^>]*)>/g,(function(t,e,i){return"<lang "+e+i+">"}))}},validate={preProcessVttContent:function(t){var e=preProcessing.transformCSSClasses(t),i=preProcessing.transformLangTags(e);return preProcessing.transformVTags(i)},postProcessVttContent:function(t,e){var i=postProcessing.postprocessCTag(t),s=postProcessing.postprocessVTag(i);return postProcessing.postprocessLangTag(s).replace(/-->/g,"--\x3e").replace(/<\/v>/g,(function(t,i){return-1!==e.indexOf(t,i)?t:""}))},sanitizeVttContent:function(t){if(null==t)return"";var e=validate.preProcessVttContent(t),i=DOMPurify.sanitize(e,{ALLOWED_TAGS:["b","i","u","v","c","lang","ruby","rt","rp"],ALLOWED_ATTR:["title","class","lang"],KEEP_CONTENT:!0});return validate.postProcessVttContent(i,t)},isProtocolSafe:function(t){try{const e=new URL(t,window.location.origin);return["http:","https:"].includes(e.protocol)}catch(t){return!1}}};"undefined"!=typeof module&&module.exports&&(module.exports=validate),function(t){AblePlayer.prototype.setupTracks=function(){var e,i,s,a,n,r,o,l,h;for(e=this,s=(i=new t.Deferred).promise(),a=[],t("#able-vts").length?(this.vtsTracks=[],this.hasVts=!0):this.hasVts=!1,o=this.hasDescTracks&&this.descOn?this.altTracks:this.tracks,r=0;r<o.length;r++)if(h=(l=o[r]).kind,l.src){l.src;n=this.loadTextObject(l.src),a.push(n.catch((function(t){}))),n.then(function(t,i){t.src;var s=t.language,a=t.label,n=t.desc;return function(r,o){var l=o,h=e.parseWebVTT(r,l).cues;e.hasVts&&e.setupVtsTracks(i,s,n,a,r,l),"captions"===i||"subtitles"===i?e.setupCaptions(t,h):"descriptions"===i?e.setupDescriptions(t,h):"chapters"===i?e.setupChapters(t,h):"metadata"===i&&e.setupMetadata(t,h)}}(l,h))}else(e.usingYouTubeCaptions||e.usingVimeoCaptions)&&e.setupCaptions(l);return e.usingYouTubeCaptions||e.usingVimeoCaptions?i.resolve():t.when.apply(t,a).then((function(){i.resolve()})),s},AblePlayer.prototype.getTracks=function(){var e,i,s,a,n,r,o,l,h,p,c;return e=this,l=!1,s=(i=new t.Deferred).promise(),this.$tracks=this.$media.find("track"),this.tracks=[],this.altTracks=[],this.captions=[],this.descriptions=[],this.chapters=[],this.meta=[],this.hasCaptionsTrack=!1,this.hasDescTracks=!1,this.$tracks.length&&(this.usingYouTubeCaptions=!1,this.$tracks.each((function(i,s){if("captions"===t(this).attr("kind")?e.hasCaptionsTrack=!0:"descriptions"===t(this).attr("kind")&&(e.hasClosedDesc=!0),a=t(this).attr("srclang")?t(this).attr("srclang"):e.lang,n=t(this).attr("label")?t(this).attr("label"):e.getLanguageName(a),void 0===t(this).attr("default")||l?a===e.lang?(h=!0,r=!1):r=!1:(r=!0,l=!0),r&&(e.captionLang=a),void 0!==t(this).data("desc")?(o=!0,e.hasDescTracks=!0):o=!1,o?e.altTracks.push({kind:t(this).attr("kind"),src:t(this).attr("src"),language:a,label:n,def:r,desc:o}):e.tracks.push({kind:t(this).attr("kind"),src:t(this).attr("src"),language:a,label:n,def:r,desc:o}),i==e.$tracks.length-1){if(!l)if(h)for(e.captionLang=e.lang,p=!1,c=0;c<e.tracks.length&&!p;)e.tracks[c].language===e.lang&&(e.tracks[c].def=!0,p=!0),c++;else e.tracks[0].def=!0,e.captionLang=e.tracks[0].language;e.$media.find("track").removeAttr("default")}}))),this.$tracks.length&&this.hasCaptionsTrack?i.resolve():"youtube"===this.player?this.getYouTubeCaptionTracks(this.youTubeId).then((function(){e.hasCaptions&&(e.usingYouTubeCaptions=!0,e.$captionsWrapper&&e.$captionsWrapper.remove()),i.resolve()})):"vimeo"===this.player?this.getVimeoCaptionTracks().then((function(){e.hasCaptions&&(e.usingVimeoCaptions=!0,e.$captionsWrapper&&e.$captionsWrapper.remove()),i.resolve()})):(this.hasCaptions=!1,e.$captionsWrapper&&e.$captionsWrapper.remove(),i.resolve()),s},AblePlayer.prototype.setupCaptions=function(e,i){var s,a;if(void 0===i&&(i=null),this.usingYouTubeCaptions||this.usingVimeoCaptions);else if(0===this.captions.length)this.captions.push({language:e.language,label:e.label,def:e.def,cues:i});else{for(s=!1,a=0;a<this.captions.length;a++)if(e.label.toLowerCase()<this.captions[a].label.toLowerCase()){this.captions.splice(a,0,{language:e.language,label:e.label,def:e.def,cues:i}),s=!0;break}s||this.captions.push({language:e.language,label:e.label,def:e.def,cues:i})}this.hasCaptions=!0,this.currentCaption=-1,1===this.prefCaptions?this.captionsOn=!0:0===this.prefCaptions?this.captionsOn=!1:1===this.defaultStateCaptions?this.captionsOn=!0:this.captionsOn=!1,"audio"===this.mediaType&&this.captionsOn&&this.$captionsContainer.removeClass("captions-off"),(!this.$captionsWrapper||this.$captionsWrapper&&!t.contains(this.$ableDiv[0],this.$captionsWrapper[0]))&&(this.$captionsDiv=t("<div>",{class:"able-captions"}),this.$captionsWrapper=t("<div>",{class:"able-captions-wrapper","aria-hidden":"true"}).hide(),"below"===this.prefCaptionsPosition?this.$captionsWrapper.addClass("able-captions-below"):this.$captionsWrapper.addClass("able-captions-overlay"),this.$captionsWrapper.append(this.$captionsDiv),this.$captionsContainer.append(this.$captionsWrapper))},AblePlayer.prototype.setupDescriptions=function(t,e){this.hasClosedDesc=!0,this.currentDescription=-1,this.descriptions.push({cues:e,language:t.language})},AblePlayer.prototype.setupChapters=function(t,e){this.hasChapters=!0,this.chapters.push({cues:e,language:t.language})},AblePlayer.prototype.setupMetadata=function(e,i,s){"text"===this.metaType?this.metaDiv&&t("#"+this.metaDiv)&&(this.$metaDiv=t("#"+this.metaDiv),this.hasMeta=!0,this.meta=i):"selector"===this.metaType&&(this.hasMeta=!0,this.visibleSelectors=[],this.meta=i)},AblePlayer.prototype.loadTextObject=function(e){var i,s,a,n;return s=(i=new t.Deferred).promise(),a=this,n=t("<div>",{style:"display:none"}),t.ajax({url:e,dataType:"text",success:function(t){var s=validate.sanitizeVttContent(t);n.html(s),i.resolve(e,s),n.remove()},error:function(t,s,r){a.debug,i.reject(e),n.remove()}}),s}}(jQuery),function(t){AblePlayer.prototype.initYouTubePlayer=function(){var e,i,s,a;return e=this,s=(i=new t.Deferred).promise(),this.youTubePlayerReady=!1,a=this.youTubeDescId&&this.prefDesc?this.youTubeDescId:this.youTubeId,this.activeYouTubeId=a,AblePlayer.youTubeIframeAPIReady?e.finalizeYoutubeInit().then((function(){i.resolve()})):(AblePlayer.loadingYouTubeIframeAPI||t.getScript("https://www.youtube.com/iframe_api").fail((function(){i.fail()})),t("body").on("youTubeIframeAPIReady",(function(){e.finalizeYoutubeInit().then((function(){i.resolve()}))}))),s},AblePlayer.prototype.finalizeYoutubeInit=function(){var e,i,s,a,n;return i=(e=new t.Deferred).promise(),s=this,a=this.mediaId+"_youtube",this.$mediaContainer.prepend(t("<div>").attr("id",a)),n=this.okToPlay?1:0,void 0===this.captionLang&&(this.captionLang=this.lang),this.youTubePlayer=new YT.Player(a,{videoId:this.activeYouTubeId,host:this.youTubeNoCookie?"https://www.youtube-nocookie.com":"https://www.youtube.com",playerVars:{autoplay:n,enablejsapi:1,disableKb:1,playsinline:this.playsInline,start:this.startTime,controls:0,cc_load_policy:1,cc_lang_pref:this.captionLang,hl:this.lang,modestbranding:1,rel:0,iv_load_policy:3},events:{onReady:function(){s.youTubePlayerReady=!0,s.playerWidth&&s.playerHeight||s.getYouTubeDimensions(),s.playerWidth&&s.playerHeight&&(s.youTubePlayer.setSize(s.playerWidth,s.playerHeight),s.$ableWrapper.css({width:s.playerWidth+"px"})),s.swappingSrc&&(s.swappingSrc=!1,s.restoreFocus(),s.cueingPlaylistItem=!1,(s.playing||s.okToPlay)&&s.playMedia()),s.userClickedPlaylist&&(s.userClickedPlaylist=!1),s.recreatingPlayer&&(s.recreatingPlayer=!1),e.resolve()},onError:function(t){e.fail()},onStateChange:function(t){s.getPlayerState().then((function(t){"playing"===t?(s.hasSignLanguage&&s.signVideo&&s.signVideo.play(!0),s.playing=!0,s.startedPlaying=!0,s.paused=!1):"ended"==t?s.onMediaComplete():(s.playing=!1,s.paused=!0),s.stoppingYouTube&&"paused"===t&&(s.hasSignLanguage&&s.signVideo&&s.signVideo.pause(!0),void 0!==s.$posterImg&&s.$posterImg.show(),s.stoppingYouTube=!1,s.seeking=!1,s.playing=!1,s.paused=!0)})),"youtube"!==s.player||s.usingYouTubeCaptions||s.youTubePlayer.getOptions("captions")&&s.youTubePlayer.unloadModule("captions")},onPlaybackQualityChange:function(){}}}),this.hasPlaylist||this.$media.remove(),i},AblePlayer.prototype.getYouTubeDimensions=function(t){var e,i,s;void 0!==(e=this.$ableWrapper.find("iframe"))&&e.prop("width")&&(i=e.prop("width"),e.prop("height")&&(s=e.prop("height"),this.resizePlayer(i,s)))},AblePlayer.prototype.getYouTubeCaptionTracks=function(e){var i,s,a,n,r,o,l=new t.Deferred,h=l.promise();return i=this,this.youTubePlayer.getOption("captions","tracklist")||(this.youTubePlayer.addEventListener("onApiChange",(function(t){if(i.duration=i.youTubePlayer.getDuration(),i.loadingYouTubeCaptions){if(s=i.youTubePlayer.getOption("captions","tracklist"),i.okToPlay||i.youTubePlayer.pauseVideo(),s&&s.length){for(a=0;a<s.length;a++)n=s[a].languageCode,r=s[a].languageName,o=!1,void 0!==i.captionLang?n===i.captionLang&&(o=!0):void 0!==i.lang&&n===i.lang&&(o=!0),i.tracks.push({kind:"captions",language:n,label:r,def:o}),i.captions.push({language:n,label:r,def:o,cues:null});i.hasCaptions=!0,i.setupPopups("captions")}else i.usingYouTubeCaptions=!1,i.hasCaptions=!1;i.loadingYouTubeCaptions=!1,i.okToPlay&&i.youTubePlayer.playVideo()}i.captionLangPending&&(i.youTubePlayer.setOption("captions","track",{languageCode:i.captionLangPending}),i.captionLangPending=null),void 0!==i.prefCaptionsSize&&i.youTubePlayer.setOption("captions","fontSize",i.translatePrefs("size",i.prefCaptionsSize,"youtube")),l.resolve()})),this.loadingYouTubeCaptions=!0,this.youTubePlayer.playVideo()),h},AblePlayer.prototype.getYouTubeTimedTextUrl=function(t,e,i){var s="https://www.youtube.com/api/timedtext?fmt=vtt";return s+="&v="+t,s+="&lang="+i,""!==e&&(s+="&name="+e),s},AblePlayer.prototype.getYouTubePosterUrl=function(t,e){var i="https://img.youtube.com/vi/"+t;return"120"==e?i+"/default.jpg":"320"==e||"480"==e?i+"/hqdefault.jpg":"640"==e&&i+"/sddefault.jpg"},AblePlayer.prototype.getYouTubeId=function(t){var e;return-1!==t.indexOf("youtu")?(e=(t=t.trim()).length-11,t.substring(e)):t}}(jQuery),function(t){window.AccessibleSlider=function(e,i,s,a,n,r,o,l,h,p,c){var u,d;u=this,this.position=0,this.tracking=!1,this.trackDevice=null,this.keyTrackPosition=0,this.lastTrackPosition=0,this.nextStep=1,this.inertiaCount=0,this.bodyDiv=t(i),p&&(this.loadedDiv=t("<div></div>"),this.playedDiv=t("<div></div>")),this.seekHead=t("<div>",{"aria-orientation":s,class:"able-"+h+"-head"}),"visible"===c?this.seekHead.attr("tabindex","0"):this.seekHead.attr("tabindex","-1"),this.seekHead.attr({role:"slider","aria-label":l,"aria-valuemin":n,"aria-valuemax":r}),this.timeTooltipTimeoutId=null,this.overTooltip=!1,this.timeTooltip=t("<div>"),this.bodyDiv.append(this.timeTooltip),this.timeTooltip.attr("role","tooltip"),this.timeTooltip.addClass("able-tooltip"),this.timeTooltip.on("mouseenter focus",(function(){u.overTooltip=!0,clearInterval(u.timeTooltipTimeoutId)})),this.timeTooltip.on("mouseleave blur",(function(){u.overTooltip=!1,t(this).hide()})),this.timeTooltip.hide(),this.bodyDiv.append(this.loadedDiv),this.bodyDiv.append(this.playedDiv),this.bodyDiv.append(this.seekHead),this.bodyDiv.wrap("<div></div>"),this.wrapperDiv=this.bodyDiv.parent(),"legacy"===this.skin&&("horizontal"===s?(this.wrapperDiv.width(a),this.loadedDiv.width(0)):(this.wrapperDiv.height(a),this.loadedDiv.height(0))),this.wrapperDiv.addClass("able-"+h+"-wrapper"),p&&(this.loadedDiv.addClass("able-"+h+"-loaded"),this.playedDiv.width(0),this.playedDiv.addClass("able-"+h+"-played"),this.setDuration(r)),this.seekHead.on("mouseenter mouseleave mousemove mousedown mouseup focus blur touchstart touchmove touchend",(function(t){d=u.pointerEventToXY(t),"mouseenter"===t.type||"focus"===t.type?u.overHead=!0:"mouseleave"===t.type||"blur"===t.type?(u.overHead=!1,!u.overBody&&u.tracking&&"mouse"===u.trackDevice&&u.stopTracking(u.pageXToPosition(d.x))):"mousemove"===t.type||"touchmove"===t.type?u.tracking&&"mouse"===u.trackDevice&&u.trackHeadAtPageX(d.x):"mousedown"===t.type||"touchstart"===t.type?(u.startTracking("mouse",u.pageXToPosition(u.seekHead.offset()+u.seekHead.width()/2)),u.bodyDiv.is(":focus")||u.bodyDiv.focus(),t.preventDefault()):"mouseup"!==t.type&&"touchend"!==t.type||u.tracking&&"mouse"===u.trackDevice&&u.stopTracking(u.pageXToPosition(d.x)),"mousemove"!==t.type&&"mousedown"!==t.type&&"mouseup"!==t.type&&"touchstart"!==t.type&&"touchend"!==t.type&&u.refreshTooltip()})),this.bodyDiv.on("mouseenter mouseleave mousemove mousedown mouseup keydown keyup touchstart touchmove touchend",(function(t){if(d=u.pointerEventToXY(t),"mouseenter"===t.type)u.overBody=!0,u.overBodyMousePos={x:d.x,y:d.y};else if("mouseleave"===t.type)u.overBody=!1,u.overBodyMousePos=null,!u.overHead&&u.tracking&&"mouse"===u.trackDevice&&u.stopTracking(u.pageXToPosition(d.x));else if("mousemove"===t.type||"touchmove"===t.type)u.overBodyMousePos={x:d.x,y:d.y},u.tracking&&"mouse"===u.trackDevice&&u.trackHeadAtPageX(d.x);else if("mousedown"===t.type||"touchstart"===t.type)u.startTracking("mouse",u.pageXToPosition(d.x)),u.trackHeadAtPageX(d.x),u.seekHead.is(":focus")||u.seekHead.focus(),t.preventDefault();else if("mouseup"===t.type||"touchend"===t.type)u.tracking&&"mouse"===u.trackDevice&&u.stopTracking(u.pageXToPosition(d.x));else if("keydown"===t.type){if(36===t.which)u.trackImmediatelyTo(0);else if(35===t.which)u.trackImmediatelyTo(u.duration);else if(37===t.which||40===t.which)u.arrowKeyDown(-1);else if(39===t.which||38===t.which)u.arrowKeyDown(1);else if(33===t.which&&o>0)u.arrowKeyDown(o);else{if(!(34===t.which&&o>0))return;u.arrowKeyDown(-o)}t.preventDefault()}else"keyup"===t.type&&t.which>=33&&t.which<=40&&(u.tracking&&"keyboard"===u.trackDevice&&u.stopTracking(u.keyTrackPosition),t.preventDefault());u.overTooltip||"mouseup"===t.type||"keydown"===t.type||"keydown"===t.type||u.refreshTooltip()}))},AccessibleSlider.prototype.arrowKeyDown=function(t){this.tracking&&"keyboard"===this.trackDevice?(this.keyTrackPosition=this.boundPos(this.keyTrackPosition+this.nextStep*t),this.inertiaCount+=1,20===this.inertiaCount&&(this.inertiaCount=0,this.nextStep*=2),this.trackHeadAtPosition(this.keyTrackPosition)):(this.nextStep=1,this.inertiaCount=0,this.keyTrackPosition=this.boundPos(this.position+this.nextStep*t),this.startTracking("keyboard",this.keyTrackPosition),this.trackHeadAtPosition(this.keyTrackPosition))},AccessibleSlider.prototype.pageXToPosition=function(t){var e=t-this.bodyDiv.offset().left,i=this.duration*(e/this.bodyDiv.width());return this.boundPos(i)},AccessibleSlider.prototype.boundPos=function(t){return Math.max(0,Math.min(t,this.duration))},AccessibleSlider.prototype.setDuration=function(t){t!==this.duration&&(this.duration=t,this.resetHeadLocation(),this.seekHead.attr("aria-valuemax",t))},AccessibleSlider.prototype.setWidth=function(t){this.wrapperDiv.width(t),this.resizeDivs(),this.resetHeadLocation()},AccessibleSlider.prototype.getWidth=function(){return this.wrapperDiv.width()},AccessibleSlider.prototype.resizeDivs=function(){this.playedDiv.width(this.bodyDiv.width()*(this.position/this.duration)),this.loadedDiv.width(this.bodyDiv.width()*this.buffered)},AccessibleSlider.prototype.resetHeadLocation=function(){var t=this.position/this.duration,e=this.bodyDiv.width()*t;this.seekHead.css("left",e-this.seekHead.width()/2),this.tracking&&this.stopTracking(this.position)},AccessibleSlider.prototype.setPosition=function(t,e){this.position=t,this.resetHeadLocation(),this.overHead&&this.refreshTooltip(),this.resizeDivs(),this.updateAriaValues(t,e)},AccessibleSlider.prototype.setBuffered=function(t){isNaN(t)||(this.buffered=t,this.redrawDivs)},AccessibleSlider.prototype.startTracking=function(t,e){this.tracking||(this.trackDevice=t,this.tracking=!0,this.bodyDiv.trigger("startTracking",[e]))},AccessibleSlider.prototype.stopTracking=function(t){this.trackDevice=null,this.tracking=!1,this.bodyDiv.trigger("stopTracking",[t]),this.setPosition(t,!0)},AccessibleSlider.prototype.trackHeadAtPageX=function(t){var e=this.pageXToPosition(t),i=t-this.bodyDiv.offset().left-this.seekHead.width()/2;i=Math.max(0,Math.min(i,this.bodyDiv.width()-this.seekHead.width())),this.lastTrackPosition=e,this.seekHead.css("left",i),this.reportTrackAtPosition(e)},AccessibleSlider.prototype.trackHeadAtPosition=function(t){var e=t/this.duration,i=this.bodyDiv.width()*e;this.lastTrackPosition=t,this.seekHead.css("left",i-this.seekHead.width()/2),this.reportTrackAtPosition(t)},AccessibleSlider.prototype.reportTrackAtPosition=function(t){this.bodyDiv.trigger("tracking",[t]),this.updateAriaValues(t,!0)},AccessibleSlider.prototype.updateAriaValues=function(e,i){var s,a=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),o=1===n?"minute":"minutes",l=1===r?"second":"seconds";s=a>0?a+" "+(1===a?"hour":"hours")+", "+n+" "+o+", "+r+" "+l:n>0?n+" "+o+", "+r+" "+l:r+" "+l,this.liveAriaRegion||(this.liveAriaRegion=t("<span>",{class:"able-offscreen","aria-live":"polite"}),this.wrapperDiv.append(this.liveAriaRegion)),i&&this.liveAriaRegion.text()!==s&&this.liveAriaRegion.text(s),this.seekHead.attr("aria-valuetext",s),this.seekHead.attr("aria-valuenow",Math.floor(e).toString())},AccessibleSlider.prototype.trackImmediatelyTo=function(t){this.startTracking("keyboard",t),this.trackHeadAtPosition(t),this.keyTrackPosition=t},AccessibleSlider.prototype.refreshTooltip=function(){if(this.overHead)this.timeTooltip.show(),this.tracking?this.timeTooltip.text(this.positionToStr(this.lastTrackPosition)):this.timeTooltip.text(this.positionToStr(this.position)),this.setTooltipPosition(this.seekHead.position().left+this.seekHead.width()/2);else if(this.overBody&&this.overBodyMousePos)this.timeTooltip.show(),this.timeTooltip.text(this.positionToStr(this.pageXToPosition(this.overBodyMousePos.x))),this.setTooltipPosition(this.overBodyMousePos.x-this.bodyDiv.offset().left);else{clearTimeout(this.timeTooltipTimeoutId);var t=this;this.timeTooltipTimeoutId=setTimeout((function(){t.timeTooltip.hide()}),500)}},AccessibleSlider.prototype.hideSliderTooltips=function(){this.overHead=!1,this.overBody=!1,this.timeTooltip.hide()},AccessibleSlider.prototype.setTooltipPosition=function(t){this.timeTooltip.css({left:t-this.timeTooltip.width()/2-10,bottom:this.seekHead.height()+10})},AccessibleSlider.prototype.positionToStr=function(t){var e=Math.floor(t/3600),i=Math.floor(t/60)%60,s=Math.floor(t%60);return s<10&&(s="0"+s),e>0?(i<10&&(i="0"+i),e+":"+i+":"+s):i+":"+s},AccessibleSlider.prototype.pointerEventToXY=function(t){var e={x:0,y:0};if("touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"touchcancel"==t.type){var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];e.x=i.pageX,e.y=i.pageY}else"mousedown"!=t.type&&"mouseup"!=t.type&&"mousemove"!=t.type&&"mouseover"!=t.type&&"mouseout"!=t.type&&"mouseenter"!=t.type&&"mouseleave"!=t.type||(e.x=t.pageX,e.y=t.pageY);return e}}(jQuery),function(t){AblePlayer.prototype.addVolumeSlider=function(e){var i,s,a,n,r;i=this,s=this.mediaId+"-volume-slider",a=this.mediaId+"-volume-help",this.$volumeSlider=t("<div>",{id:s,class:"able-volume-slider","aria-hidden":"true"}).hide(),this.$volumeSliderTooltip=t("<div>",{class:"able-tooltip",role:"tooltip"}).hide(),this.$volumeRange=t("<input>",{type:"range",min:"0",max:"10",step:"1",orient:"vertical","aria-label":this.tt.volumeUpDown,value:this.volume}),n=parseInt(i.volume)/10*100,this.$volumeHelp=t("<div>",{id:a,class:"able-volume-help","aria-live":"polite"}).text(n+"%"),r=this.$volumeButton.attr("aria-label"),this.$volumeButton.attr("aria-label",r+" "+n+"%"),this.$volumeSlider.append(this.$volumeSliderTooltip,this.$volumeRange,this.$volumeHelp),e.append(this.$volumeSlider),this.$volumeRange.on("change",(function(e){i.handleVolumeChange(t(this).val())})),this.$volumeRange.on("input",(function(e){i.handleVolumeChange(t(this).val())})),this.$volumeRange.on("keydown",(function(t){27!==t.which&&13!==t.which&&9!==t.which||(i.$volumeSlider.is(":visible")?(i.closingVolume=!0,i.hideVolumePopup()):i.closingVolume||i.showVolumePopup())}))},AblePlayer.prototype.refreshVolumeHelp=function(t){var e;e=t/10*100,this.$volumeHelp&&this.$volumeHelp.text(e+"%"),this.$volumeRange.attr("value",t)},AblePlayer.prototype.refreshVolumeButton=function(t){var e,i,s,a,n,r;e=this.getVolumeName(t),i=t/10*100,s=this.tt.volume+" "+i+"%","font"===this.iconType?(a="icon-volume-"+e,this.$volumeButton.find("span").first().removeClass().addClass(a),this.$volumeButton.find("span.able-clipped").text(s)):"image"===this.iconType?(n=this.imgPath+"volume-"+e+".png",this.$volumeButton.find("img").attr("src",n),this.$volumeButton.find("img").attr("alt",s)):"svg"===this.iconType&&("mute"!==e&&(e="volume-"+e),r=this.getSvgData(e),this.$volumeButton.find("svg").attr("viewBox",r[0]),this.$volumeButton.find("path").attr("d",r[1]),this.$volumeButton.attr("aria-label",s))},AblePlayer.prototype.handleVolumeButtonClick=function(){this.$volumeSlider.is(":visible")?this.hideVolumePopup():this.showVolumePopup()},AblePlayer.prototype.handleVolumeKeystroke=function(t){var e;if(!(t>=49&&t<=57))return!1;e=t-48,this.isMuted()&&e>0?this.setMute(!1):0===e?this.setMute(!0):(this.setVolume(e),this.refreshVolumeHelp(e),this.refreshVolumeButton(e))},AblePlayer.prototype.handleVolumeChange=function(t){this.isMuted()&&t>0?this.setMute(!1):0===t?this.setMute(!0):(this.setVolume(t),this.refreshVolumeHelp(t),this.refreshVolumeButton(t))},AblePlayer.prototype.handleMute=function(){this.isMuted()?this.setMute(!1):this.setMute(!0)},AblePlayer.prototype.showVolumePopup=function(){this.closePopups(),this.$tooltipDiv.hide(),this.$volumeSlider.show().attr("aria-hidden","false"),this.$volumeButton.attr("aria-expanded","true"),this.$volumeButton.focus(),this.waitThenFocus(this.$volumeRange)},AblePlayer.prototype.hideVolumePopup=function(){var t=this;this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeButton.attr("aria-expanded","false").focus(),setTimeout((function(){t.closingVolume=!1}),1e3)},AblePlayer.prototype.isMuted=function(){return"html5"===this.player?this.media.muted:"youtube"===this.player?this.youTubePlayer.isMuted():void 0},AblePlayer.prototype.setMute=function(t){t?(this.lastVolume=this.volume,this.volume=0):void 0!==this.lastVolume&&(this.volume=this.lastVolume),"html5"===this.player?this.media.muted=t:"youtube"===this.player&&(t?this.youTubePlayer.mute():this.youTubePlayer.unMute()),this.setVolume(this.volume),this.refreshVolumeHelp(this.volume),this.refreshVolumeButton(this.volume)},AblePlayer.prototype.setVolume=function(t){var e;"html5"===this.player?(e=t/10,this.media.volume=e,this.hasSignLanguage&&this.signVideo&&(this.signVideo.volume=0)):"youtube"===this.player?(e=10*t,this.youTubePlayer.setVolume(e),this.volume=t):"vimeo"===this.player&&(e=t/10,this.vimeoPlayer.setVolume(e).then((function(){}))),this.lastVolume=t},AblePlayer.prototype.getVolume=function(t){return"html5"===this.player?10*this.media.volume:"youtube"===this.player&&this.youTubePlayerReady?this.youTubePlayer.getVolume()/10:"vimeo"===this.player?this.volume:void 0},AblePlayer.prototype.getVolumeName=function(t){return 0==t?"mute":10==t?"loud":t<5?"soft":"medium"}}(jQuery),function(t){var e="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";window.AccessibleDialog=function(i,s,a,n,r,o,l,h,p,c){this.title=r,this.closeButtonLabel=l,this.focusedElementBeforeModal=s,this.escapeHook=c,this.baseId=t(i).attr("id")||Math.floor(1e9*Math.random()).toString();var u=this,d=i;if(this.modal=d,d.css({width:h||"50%"}),d.addClass("able-modal-dialog"),!p){var f=t("<button>",{class:"modalCloseButton",title:u.closeButtonLabel,"aria-label":u.closeButtonLabel}).text("×");f.on("keydown",(function(t){32===t.which&&u.hide()})).on("click",(function(){u.hide()}));var g=t("<h1></h1>");g.attr("id","modalTitle-"+this.baseId),g.text(r),this.titleH1=g,d.attr({"aria-labelledby":"modalTitle-"+this.baseId}),d.prepend(g),d.prepend(f)}d.attr({"aria-hidden":"true",role:a}),n&&d.attr("aria-modal","true"),d.on("keydown",(function(i){if(27===i.which)u.escapeHook?u.escapeHook(i,this):(u.hide(),i.preventDefault());else if(9===i.which){var s=d.find("*").filter(e).filter(":visible");if(0===s.length)return;var a=t(":focus"),n=s.index(a);i.shiftKey?0===n&&(s.get(s.length-1).trigger("focus"),i.preventDefault()):n===s.length-1&&(s.get(0).trigger("focus"),i.preventDefault())}i.stopPropagation()})),t("body > *").not(".able-modal-overlay").not(".able-modal-dialog").removeAttr("inert")},AccessibleDialog.prototype.show=function(){if(!this.overlay){var i=t("<div></div>").attr({class:"able-modal-overlay",tabindex:"-1"});this.overlay=i,t("body").append(i),i.on("mousedown.accessibleModal",(function(t){t.preventDefault()}))}t("body > *").not(".able-modal-overlay").not(".able-modal-dialog").attr("inert",!0),this.overlay.css("display","block"),this.modal.css("display","block"),this.modal.attr({"aria-hidden":"false",tabindex:"-1"}),0===this.modal.find("*").filter(e).filter(":visible").length&&this.focusedElementBeforeModal.blur();var s=this;setTimeout((function(){s.modal.find("button.modalCloseButton").first().trigger("focus")}),300)},AccessibleDialog.prototype.hide=function(){this.overlay&&this.overlay.css("display","none"),this.modal.css("display","none"),this.modal.attr("aria-hidden","true"),t("body > *").not(".able-modal-overlay").not(".able-modal-dialog").removeAttr("inert"),this.focusedElementBeforeModal.trigger("focus")},AccessibleDialog.prototype.getInputs=function(){return!!this.modal&&this.modal.find("input")}}(jQuery),function(t){AblePlayer.prototype.getNextHeadingLevel=function(e){var i,s,a,n;return e.parents().each((function(){if(i=t(this).children(":header"),s=i.length)return a=i.eq(s-1).prop("tagName"),!1})),void 0===a?n=1:(n=parseInt(a[1]),(n+=1)>6&&(n=6)),n},AblePlayer.prototype.countProperties=function(t){var e,i;for(i in e=0,t)t.hasOwnProperty(i)&&++e;return e},AblePlayer.prototype.formatSecondsAsColonTime=function(t,e){var i,s,a,n,r,o,l;if(e)if(2===(n=t.toString().split(".")).length){if((r=n[1]).length<3)for(o=3-r.length,l=1;l<=o;l++)r+="0"}else r="000";return i=Math.floor(t/3600),s=Math.floor(t/60)%60,(a=Math.floor(t%60))<10&&(a="0"+a),i>0?(s<10&&(s="0"+s),e?i+":"+s+":"+a+"."+r:i+":"+s+":"+a):e?(i<1?i="00":i<10&&(i="0"+i),s<1?s="00":s<10&&(s="0"+s),i+":"+s+":"+a+"."+r):s+":"+a},AblePlayer.prototype.getSecondsFromColonTime=function(t){var e;return 3===(e=t.split(":")).length?3600*parseInt(e[0])+60*parseInt(e[1])+parseFloat(e[2]):2===e.length?60*parseInt(e[0])+parseFloat(e[1]):1===e.length?parseFloat(e[0]):void 0},AblePlayer.prototype.capitalizeFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},AblePlayer.prototype.roundDown=function(t,e){return Number(Math.floor(t+"e"+e)+"e-"+e)},AblePlayer.prototype.hasAttr=function(t,e){var i=t.attr(e);return void 0!==i&&!1!==i},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}}(jQuery),function(t){AblePlayer.prototype.initDescription=function(){var e,i;return i=(e=new t.Deferred).promise(),"audio"===this.mediaType&&e.resolve(),this.descFile=this.$sources.first().attr("data-desc-src"),void 0!==this.descFile||this.youTubeDescId||this.vimeoDescId?this.hasOpenDesc=!0:this.hasOpenDesc=!1,this.hasOpenDesc&&this.hasClosedDesc?this.prefDescMethod?this.descMethod=this.prefDescMethod:this.descMethod="video":this.hasOpenDesc?this.descMethod="video":this.hasClosedDesc?this.descMethod="text":this.descMethod=null,this.descMethod?1===this.prefDesc?this.descOn=!0:0===this.prefDesc?this.descOn=!1:1===this.defaultStateDescriptions?this.descOn=!0:this.descOn=!1:this.descOn=!1,void 0===this.$descDiv&&this.hasClosedDesc&&"text"===this.descMethod&&this.injectTextDescriptionArea(),this.descOn?("video"===this.descMethod&&(this.usingDescribedVersion()||this.swapDescription()),this.hasClosedDesc&&(this.prefDescVisible?void 0!==this.$descDiv&&(this.$descDiv.show(),this.$descDiv.removeClass("able-clipped")):void 0!==this.$descDiv&&this.$descDiv.addClass("able-clipped"))):"video"===this.descMethod?this.usingDescribedVersion()&&this.swapDescription():"text"===this.descMethod&&void 0!==this.$descDiv&&(this.$descDiv.hide(),this.$descDiv.removeClass("able-clipped")),e.resolve(),i},AblePlayer.prototype.usingDescribedVersion=function(){return"youtube"===this.player?this.activeYouTubeId===this.youTubeDescId:"vimeo"===this.player?this.activeVimeoId===this.vimeoDescId:this.$sources.first().attr("data-desc-src")===this.$sources.first().attr("src")},AblePlayer.prototype.initSpeech=function(e){var i=this;function attemptEnableSpeech(){var t=new SpeechSynthesisUtterance(" ");t.onend=function(){i.getBrowserVoices(),(Array.isArray(i.descVoices)&&i.descVoices.length||"init"!==e)&&(i.speechEnabled=!0)},i.synth.speak(t)}null===this.speechEnabled&&(window.speechSynthesis?(this.synth=window.speechSynthesis,this.synth.cancel(),"init"===e?(attemptEnableSpeech(),t(document).on("click",(function handleInitialClick(){attemptEnableSpeech(),t(document).off("click",handleInitialClick)}))):attemptEnableSpeech()):this.speechEnabled=!1)},AblePlayer.prototype.getBrowserVoices=function(){var t,e,i,s;if(s=this.captionLang?this.captionLang.substring(0,2).toLowerCase():this.lang.substring(0,2).toLowerCase(),this.descVoices=[],t=this.synth.getVoices(),e=this.getDescriptionLangs(),t.length>0){this.descVoices=[];for(var a=0;a<t.length;a++)(i=t[a].lang.substring(0,2).toLowerCase())===s&&-1!==e.indexOf(i)&&this.descVoices.push(t[a]);this.descVoices.length||(this.descVoices=t)}return!1},AblePlayer.prototype.getDescriptionLangs=function(){var t=[];if(this.tracks)for(var e=0;e<this.tracks.length;e++)"descriptions"===this.tracks[e].kind&&t.push(this.tracks[e].language.substring(0,2).toLowerCase());return t},AblePlayer.prototype.setDescriptionVoice=function(){var t,e,i,s,a;if(e=void 0!==this.getCookie().voices?this.getPrefDescVoice():null,this.getBrowserVoices(),this.rebuildDescPrefsForm(),s=this.selectedDescriptions?this.selectedDescriptions.language:this.captionLang?this.captionLang:this.lang,this.synth&&(t=this.synth.getVoices()).length>0){if(e){a=!1;for(var n=0;n<t.length;n++)if(t[n].lang.substring(0,2).toLowerCase()===s.substring(0,2).toLowerCase()&&t[n].name===e){i=t[n].name,a=!0;break}}if(!a)for(n=0;n<t.length;n++)if(t[n].lang.substring(0,2).toLowerCase()===s.substring(0,2).toLowerCase()){i=t[n].name;break}this.prefDescVoice=i,this.prefDescVoiceLang=s,this.$voiceSelectField&&this.$voiceSelectField.val(this.prefDescVoice),this.updateCookie("voice")}},AblePlayer.prototype.swapDescription=function(){var e,i,s,a;if(e=this,this.loadingMedia=!1,this.$focusedElement=t(":focus"),this.elapsed>0?this.swapTime=this.elapsed:this.swapTime=0,this.duration>0&&(this.prevDuration=this.duration),this.okToPlay||(this.okToPlay=this.playing),this.descOn?this.showAlert(this.tt.alertDescribedVersion):this.showAlert(this.tt.alertNonDescribedVersion),"html5"===this.player){if(this.swappingSrc=!0,this.paused=!0,this.usingDescribedVersion())for(i=0;i<this.$sources.length;i++)s=DOMPurify.sanitize(this.$sources[i].getAttribute("data-orig-src")),this.$sources[i].getAttribute("type"),s&&this.$sources[i].setAttribute("src",s);else for(i=0;i<this.$sources.length;i++)s=DOMPurify.sanitize(this.$sources[i].getAttribute("src")),a=DOMPurify.sanitize(this.$sources[i].getAttribute("data-desc-src")),this.$sources[i].getAttribute("type"),a&&(this.$sources[i].setAttribute("src",a),this.$sources[i].setAttribute("data-orig-src",s));if(this.recreatingPlayer)return;this.playerCreated&&(this.deletePlayer("swap-desc-html"),this.recreatePlayer().then((function(){e.loadingMedia||(e.media.load(),e.loadingMedia=!0)})))}else if("youtube"===this.player){if(this.usingDescribedVersion()?this.activeYouTubeId=this.youTubeId:this.activeYouTubeId=this.youTubeDescId,void 0!==this.youTubePlayer&&(e.swappingSrc=!0,e.playing?e.youTubePlayer.loadVideoById(e.activeYouTubeId,e.swapTime):e.youTubePlayer.cueVideoById(e.activeYouTubeId,e.swapTime)),this.playerCreated&&this.deletePlayer("swap-desc-youtube"),this.recreatingPlayer)return;this.recreatePlayer().then((function(){}))}else if("vimeo"===this.player){if(this.usingDescribedVersion()?(this.activeVimeoId=this.vimeoId,this.showAlert(this.tt.alertNonDescribedVersion)):(this.activeVimeoId=this.vimeoDescId,this.showAlert(this.tt.alertDescribedVersion)),this.playerCreated&&this.deletePlayer("swap-desc-vimeo"),this.recreatingPlayer)return;this.recreatePlayer().then((function(){e.vimeoPlayer.loadVideo(e.activeVimeoId).then((function(){e.playing?e.vimeoPlayer.setCurrentTime(e.swapTime):e.vimeoPlayer.pause()}))}))}},AblePlayer.prototype.showDescription=function(t){if(this.hasClosedDesc&&!this.swappingSrc&&this.descOn&&"video"!==this.descMethod){var e,i,s,a;0;var flattenComponentForDescription=function(t){var e=[];if("string"===t.type)e.push(t.value);else for(var i=0;i<t.children.length;i++)e.push(flattenComponentForDescription(t.children[i]));return e.join("")};for(e=this.selectedDescriptions?this.selectedDescriptions.cues:this.descriptions.length>=1?this.descriptions[0].cues:[],i=0;i<e.length;i++)if(e[i].start<=t&&e[i].end>t){s=i;break}void 0!==s?this.currentDescription!==s&&(this.$status.removeAttr("aria-live"),a=flattenComponentForDescription(e[s].components),"screenreader"===this.descReader?this.$descDiv.html(a):this.speechEnabled?(this.announceDescriptionText("description",a),this.prefDescVisible&&this.$descDiv.html(a).removeAttr("aria-live aria-atomic")):this.$descDiv.html(a),this.prefDescPause&&"text"===this.descMethod&&(this.pauseMedia(),this.pausedForDescription=!0),this.currentDescription=s):(this.$descDiv.html(""),this.currentDescription=-1,this.$status.attr("aria-live","polite"))}},AblePlayer.prototype.syncSpeechToPlaybackRate=function(t){var e;.5===t?e=.7:.75===t?e=.8:1===t?e=1:1.25===t?e=1.1:1.5===t?e=1.2:1.75===t?e=1.5:2===t?e=2:2.25===t?e=2.5:t>=2.5&&(e=3),this.prefDescRate=e},AblePlayer.prototype.announceDescriptionText=function(e,i){var s,a,n,r,o,l,h,p,c;s=this;if(this.speechEnabled||this.initSpeech("desc"),"sample"===e?(a=t("#"+this.mediaId+"_prefDescVoice").val(),o=t("#"+this.mediaId+"_prefDescPitch").val(),l=t("#"+this.mediaId+"_prefDescRate").val(),h=t("#"+this.mediaId+"_prefDescVolume").val()):(a=this.prefDescVoice,o=this.prefDescPitch,l=this.prefDescRate,h=this.prefDescVolume),this.descVoices){if(this.descVoices.length>0){if(a)for(n=0;n<this.descVoices.length;n++)if(this.descVoices[n].name==a){r=this.descVoices[n];break}void 0===r&&(r=this.descVoices[0])}}else r=null;p=new SpeechSynthesisUtterance,r&&(p.voice=r),p.voiceURI="native",p.volume=h,p.rate=l,p.pitch=o,p.text=i,p.lang=this.lang,p.onstart=function(t){},p.onpause=function(t){},p.onend=function(t){this.speakingDescription=!1,c=t.elapsedTime,c>100?(t.elapsedTime/1e3).toFixed(2):t.elapsedTime.toFixed(2),this.debug,"description"===e&&s.prefDescPause&&s.pausedForDescription&&(s.playMedia(),this.pausedForDescription=!1)},p.onerror=function(t){},this.synth.paused&&this.synth.resume(),this.synth.speak(p),this.speakingDescription=!0}}(jQuery),jQuery,AblePlayer.prototype.isIOS=function(t){var e;return e=navigator.userAgent.toLowerCase(),!!/ipad|iphone|ipod/.exec(e)&&(void 0===t||-1!==e.indexOf("os "+t))},AblePlayer.prototype.browserSupportsVolume=function(){var t;return!this.isIOS()&&((t=new Audio).volume=.9,.9===t.volume)},AblePlayer.prototype.nativeFullscreenSupported=function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullscreenEnabled||document.msFullscreenEnabled},function(t){AblePlayer.prototype.seekTo=function(t){var e,i=this;(this.seekFromTime=this.media.currentTime,this.seekToTime=t,this.seeking=!0,this.liveUpdatePending=!0,this.speakingDescription&&this.synth.cancel(),this.hasSignLanguage&&this.signVideo&&(this.signVideo.currentTime=this.startTime),"html5"===this.player)?(this.startTime=t,(e=this.media.seekable).length>0&&this.startTime>=e.start(0)&&this.startTime<=e.end(0)&&(this.media.currentTime=this.startTime,this.seekStatus="complete",this.hasSignLanguage&&this.signVideo&&(this.signVideo.currentTime=this.startTime))):"youtube"===this.player?(this.youTubePlayer.seekTo(t,!0),t>0&&void 0!==this.$posterImg&&this.$posterImg.hide(),this.hasSignLanguage&&this.signVideo&&(this.signVideo.currentTime=t)):"vimeo"===this.player&&this.vimeoPlayer.setCurrentTime(t).then((function(){i.elapsed=t,i.refreshControls("timeline")}));this.refreshControls("timeline")},AblePlayer.prototype.getMediaTimes=function(e,i){var s,a,n,r;return r={},a=(s=new t.Deferred).promise(),n=this,void 0!==e&&void 0!==i?(r.duration=e,r.elapsed=i,s.resolve(r)):this.getDuration().then((function(t){r.duration=n.roundDown(t,6),n.getElapsed().then((function(t){r.elapsed=n.roundDown(t,6),s.resolve(r)}))})),a},AblePlayer.prototype.getDuration=function(){var e,i,s;(i=(e=new t.Deferred).promise(),"vimeo"===this.player)?this.vimeoPlayer?this.vimeoPlayer.getDuration().then((function(t){void 0===t||isNaN(t)||-1===t?e.resolve(0):e.resolve(t)})):e.resolve(0):("html5"===this.player?s=this.media.duration:"youtube"===this.player&&(s=this.youTubePlayerReady?this.duration>0?this.duration:this.youTubePlayer.getDuration():0),void 0===s||isNaN(s)||-1===s?e.resolve(0):e.resolve(s));return i},AblePlayer.prototype.getElapsed=function(){var e,i,s;(i=(e=new t.Deferred).promise(),"vimeo"===this.player)?this.vimeoPlayer?this.vimeoPlayer.getCurrentTime().then((function(t){void 0===t||isNaN(t)||-1===t?e.resolve(0):e.resolve(t)})):e.resolve(0):("html5"===this.player?s=this.media.currentTime:"youtube"===this.player&&(s=this.youTubePlayerReady?this.youTubePlayer.getCurrentTime():0),void 0===s||isNaN(s)||-1===s?e.resolve(0):e.resolve(s));return i},AblePlayer.prototype.getPlayerState=function(){var e,i,s;if(i=(e=new t.Deferred).promise(),s=this,"html5"===this.player)this.media.ended?e.resolve("ended"):this.media.paused?e.resolve("paused"):4!==this.media.readyState?e.resolve("buffering"):e.resolve("playing");else if("youtube"===this.player&&this.youTubePlayerReady){var a=this.youTubePlayer.getPlayerState();-1===a||5===a?e.resolve("stopped"):0===a?e.resolve("ended"):1===a?e.resolve("playing"):2===a?e.resolve("paused"):3===a&&e.resolve("buffering")}else"vimeo"===this.player&&this.vimeoPlayer&&this.vimeoPlayer.getPaused().then((function(t){t?e.resolve("paused"):s.vimeoPlayer.getEnded().then((function(t){t?e.resolve("ended"):e.resolve("playing")}))}));return i},AblePlayer.prototype.isPlaybackRateSupported=function(){return"html5"===this.player?!!this.media.playbackRate:"youtube"===this.player?!!this.youTubePlayerReady&&this.youTubePlayer.getAvailablePlaybackRates().length>1:"vimeo"===this.player?this.vimeoSupportsPlaybackRateChange:void 0},AblePlayer.prototype.setPlaybackRate=function(t){t=Math.max(.5,t),this.hasClosedDesc&&"text"===this.descMethod&&this.syncSpeechToPlaybackRate(t),this.hasSignLanguage&&this.signVideo&&(this.signVideo.playbackRate=t),"html5"===this.player?this.media.playbackRate=t:"youtube"===this.player?this.youTubePlayer.setPlaybackRate(t):"vimeo"===this.player&&this.vimeoPlayer.setPlaybackRate(t),this.hasSignLanguage&&this.signVideo&&(this.signVideo.playbackRate=t),this.playbackRate=t,this.$speed.text(this.tt.speed+": "+t.toFixed(2).toString()+"x")},AblePlayer.prototype.getPlaybackRate=function(){return"html5"===this.player?this.media.playbackRate:"youtube"===this.player&&this.youTubePlayerReady?this.youTubePlayer.getPlaybackRate():void 0},AblePlayer.prototype.isPaused=function(){if("vimeo"===this.player)return!this.playing;this.getPlayerState().then((function(t){return"paused"===t||"stopped"===t||"ended"===t}))},AblePlayer.prototype.pauseMedia=function(){this.hasSignLanguage&&this.signVideo&&this.signVideo.pause(!0),"html5"===this.player?(this.media.pause(!0),this.hasSignLanguage&&this.signVideo&&this.signVideo.pause(!0)):"youtube"===this.player?this.youTubePlayer.pauseVideo():"vimeo"===this.player&&this.vimeoPlayer.pause()},AblePlayer.prototype.playMedia=function(){this.hasSignLanguage&&this.signVideo&&this.signVideo.play(!0),"html5"===this.player?(this.media.play(!0),this.hasSignLanguage&&this.signVideo&&this.signVideo.play(!0)):"youtube"===this.player?(this.youTubePlayer.playVideo(),void 0!==this.$posterImg&&this.$posterImg.hide(),this.stoppingYouTube=!1):"vimeo"===this.player&&this.vimeoPlayer.play(),this.startedPlaying=!0,this.hideControls&&(this.hidingControls=!0,this.invokeHideControlsTimeout())},AblePlayer.prototype.fadeControls=function(t){"out"==t?(this.$mediaContainer.height()+this.$playerDiv.height(),this.$playerDiv.fadeTo(2e3,0,(function(){}))):"in"==t&&this.$playerDiv.fadeTo(100,1)},AblePlayer.prototype.invokeHideControlsTimeout=function(){var t=this;this.hideControlsTimeout=window.setTimeout((function(){void 0!==t.playing&&!0===t.playing&&t.hideControls&&(t.fadeControls("out"),t.controlsHidden=!0)}),5e3),this.hideControlsTimeoutStatus="active"},AblePlayer.prototype.refreshControls=function(e,i,s){var a,n,r,o,l,h,p,c,u,d,f,g,m,v,y;e="init",a=this,this.swappingSrc&&this.playing||void 0!==this.duration&&(this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.chapterElapsed=this.getChapterElapsed()),!1===this.useFixedSeekInterval&&!1===this.seekIntervalCalculated&&this.duration>0&&this.setSeekInterval(),this.seekBar&&(this.useChapterTimes?(n=this.selectedChapters.cues.length-1,this.selectedChapters.cues[n]==this.currentChapter&&this.currentChapter.end!==this.duration?this.seekBar.setDuration(this.duration-this.currentChapter.start):this.seekBar.setDuration(this.chapterDuration)):void 0===this.duration||isNaN(this.duration)||-1===this.duration||this.seekBar.setDuration(this.duration),this.seekBar.tracking||(o=this.liveUpdatePending||this.seekBar.seekHead.is(t(document.activeElement)),this.liveUpdatePending=!1,this.useChapterTimes?this.seekBar.setPosition(this.chapterElapsed,o):this.seekBar.setPosition(this.elapsed,o)),r=this.seekBar.tracking?this.seekBar.lastTrackPosition:this.useChapterTimes?this.chapterElapsed:this.elapsed),void 0!==this.$durationContainer&&(this.useChapterTimes?this.$durationContainer.text(" / "+this.formatSecondsAsColonTime(this.chapterDuration)):this.$durationContainer.text(" / "+this.formatSecondsAsColonTime(this.duration))),void 0!==this.$elapsedTimeContainer&&this.$elapsedTimeContainer.text(this.formatSecondsAsColonTime(r)),"legacy"===this.skin&&this.seekBar&&(p=0,u=(c=this.seekBar.wrapperDiv.parent().prev("div.able-left-controls")).next("div.able-right-controls"),c.children().each((function(){"button"==t(this).attr("role")&&(p+=t(this).outerWidth(!0))})),u.children().each((function(){"button"==t(this).attr("role")&&(p+=t(this).outerWidth(!0))})),d=this.fullscreen?t(window).width()-p:this.$ableWrapper.width()-p-5,Math.abs(d-this.seekBar.getWidth())>5&&this.seekBar.setWidth(d)),"html5"===this.player?this.media.buffered.length>0&&(g=this.media.buffered.end(0),this.useChapterTimes?(g>this.chapterDuration&&(g=this.chapterDuration),this.seekBar&&this.seekBar.setBuffered(g/this.chapterDuration)):this.seekBar&&(isNaN(g)||this.seekBar.setBuffered(g/i))):"youtube"===this.player?this.seekBar&&this.youTubePlayerReady&&this.seekBar.setBuffered(this.youTubePlayer.getVideoLoadedFraction()):this.player,this.$descButton&&(this.descOn?(this.$descButton.removeClass("buttonOff").attr("aria-label",this.tt.turnOffDescriptions),this.$descButton.find("span.able-clipped").text(this.tt.turnOffDescriptions)):(this.$descButton.addClass("buttonOff").attr("aria-label",this.tt.turnOnDescriptions),this.$descButton.find("span.able-clipped").text(this.tt.turnOnDescriptions))),this.$ccButton&&(f=this.captions.length,this.captionsOn?(this.$ccButton.removeClass("buttonOff"),this.$ccButton.attr("aria-pressed","true"),1===f&&(this.$ccButton.attr("aria-label",this.tt.hideCaptions),this.$ccButton.find("span.able-clipped").text(this.tt.hideCaptions))):(this.$ccButton.addClass("buttonOff"),this.$ccButton.attr("aria-pressed","false"),1===f&&(this.$ccButton.attr("aria-label",this.tt.showCaptions),this.$ccButton.find("span.able-clipped").text(this.tt.showCaptions))),f>1&&(this.$ccButton.attr({"aria-label":this.tt.captions,"aria-haspopup":"true","aria-controls":this.mediaId+"-captions-menu"}),this.$ccButton.find("span.able-clipped").text(this.tt.captions))),this.$fullscreenButton&&(this.fullscreen?(this.$fullscreenButton.attr("aria-label",this.tt.exitFullscreen),"font"===this.iconType?(this.$fullscreenButton.find("span").first().removeClass("icon-fullscreen-expand").addClass("icon-fullscreen-collapse"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.exitFullscreen)):"svg"===this.iconType?(y=this.getSvgData("fullscreen-collapse"),this.$fullscreenButton.find("svg").attr("viewBox",y[0]),this.$fullscreenButton.find("path").attr("d",y[1]),this.$fullscreenButton.find("span.able-clipped").text(this.tt.exitFullscreen)):this.$fullscreenButton.find("img").attr("src",this.fullscreenCollapseButtonImg)):(this.$fullscreenButton.attr("aria-label",this.tt.enterFullScreen),"font"===this.iconType?(this.$fullscreenButton.find("span").first().removeClass("icon-fullscreen-collapse").addClass("icon-fullscreen-expand"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.enterFullScreen)):"svg"===this.iconType?(y=this.getSvgData("fullscreen-expand"),this.$fullscreenButton.find("svg").attr("viewBox",y[0]),this.$fullscreenButton.find("path").attr("d",y[1]),this.$fullscreenButton.find("span.able-clipped").text(this.tt.enterFullScreen)):this.$fullscreenButton.find("img").attr("src",this.fullscreenExpandButtonImg))),void 0!==this.$bigPlayButton&&void 0!==this.seekBar&&(this.paused&&!this.seekBar.tracking?(this.hideBigPlayButton||(this.$bigPlayButton.show(),this.$bigPlayButton.attr("aria-hidden","false")),this.fullscreen?(this.$bigPlayButton.width(t(window).width()),this.$bigPlayButton.height(t(window).height())):(this.$bigPlayButton.width(this.$mediaContainer.width()),this.$bigPlayButton.height(this.$mediaContainer.height()))):(this.$bigPlayButton.hide(),this.$bigPlayButton.attr("aria-hidden","true"))),this.transcriptType&&(1===this.prefAutoScrollTranscript?(this.autoScrollTranscript=!0,this.$autoScrollTranscriptCheckbox.prop("checked",!0)):(this.autoScrollTranscript=!1,this.$autoScrollTranscriptCheckbox.prop("checked",!1)),this.autoScrollTranscript&&this.currentHighlight&&(m=Math.floor(this.$transcriptDiv.scrollTop()+t(this.currentHighlight).position().top-this.$transcriptDiv.height()/2+t(this.currentHighlight).height()/2))!==Math.floor(this.$transcriptDiv.scrollTop())&&(this.scrollingTranscript=!0,this.movingHighlight&&(this.$transcriptDiv.scrollTop(m),this.movingHighlight=!1))),this.$chaptersButton&&this.$chaptersButton.attr({"aria-label":this.tt.chapters,"aria-haspopup":"true","aria-controls":this.mediaId+"-chapters-menu"}),l={stopped:this.tt.statusStopped,paused:this.tt.statusPaused,playing:this.tt.statusPlaying,buffering:this.tt.statusBuffering,ended:this.tt.statusEnd},this.stoppingYouTube?(this.$status.text()!==this.tt.statusStopped&&this.$status.text(this.tt.statusStopped),this.$playpauseButton.find("span").first().hasClass("icon-pause")&&("font"===this.iconType?(this.$playpauseButton.find("span").first().removeClass("icon-pause").addClass("icon-play"),this.$playpauseButton.find("span.able-clipped").text(this.tt.play)):"svg"===this.iconType?(y=this.getSvgData("play"),this.$playpauseButton.find("svg").attr("viewBox",y[0]),this.$playpauseButton.find("path").attr("d",y[1]),this.$playpauseButton.find("span.able-clipped").text(this.tt.play)):this.$playpauseButton.find("img").attr("src",this.playButtonImg))):void 0!==this.$status&&void 0!==this.seekBar&&this.getPlayerState().then((function(t){a.$status.text()===l[t]||a.seekBar.tracking?(a.statusDebounceStart=null,a.debouncingStatus=!1,clearTimeout(a.statusTimeout),a.statusTimeout=null):(a.swappingSrc?a.debouncingStatus||(a.statusMessageThreshold=2e3):a.debouncingStatus||(a.statusMessageThreshold=250),h=(new Date).getTime(),a.statusDebounceStart?h-a.statusDebounceStart>a.statusMessageThreshold&&(a.$status.text(l[t]),a.statusDebounceStart=null,clearTimeout(a.statusTimeout),a.statusTimeout=null):(a.statusDebounceStart=h,a.debouncingStatus=!0,a.statusTimeout=setTimeout((function(){a.debouncingStatus=!1,a.refreshControls(e)}),a.statusMessageThreshold))),a.seekBar.tracking||a.stoppingYouTube||("paused"===t||"stopped"===t||"ended"===t?(a.$playpauseButton.attr("aria-label",a.tt.play),"font"===a.iconType?(a.$playpauseButton.find("span").first().removeClass("icon-pause").addClass("icon-play"),a.$playpauseButton.find("span.able-clipped").text(a.tt.play)):"svg"===a.iconType?(y=a.getSvgData("play"),a.$playpauseButton.find("svg").attr("viewBox",y[0]),a.$playpauseButton.find("path").attr("d",y[1]),a.$playpauseButton.find("span.able-clipped").text(a.tt.play)):a.$playpauseButton.find("img").attr("src",a.playButtonImg)):(a.$playpauseButton.attr("aria-label",a.tt.pause),"font"===a.iconType?(a.$playpauseButton.find("span").first().removeClass("icon-play").addClass("icon-pause"),a.$playpauseButton.find("span.able-clipped").text(a.tt.pause)):"svg"===a.iconType?(y=a.getSvgData("pause"),a.$playpauseButton.find("svg").attr("viewBox",y[0]),a.$playpauseButton.find("path").attr("d",y[1]),a.$playpauseButton.find("span.able-clipped").text(a.tt.pause)):a.$playpauseButton.find("img").attr("src",a.pauseButtonImg)))})),this.fullscreen||(v=this.$statusBarDiv.height(),this.$statusBarDiv.find("span.able-speed").height()>v+5?(this.$statusBarDiv.find("span.able-speed").hide(),this.hidingSpeed=!0):(this.hidingSpeed&&(this.$statusBarDiv.find("span.able-speed").show(),this.hidingSpeed=!1),this.$statusBarDiv.width()<300?(this.$statusBarDiv.find("span.able-speed").hide(),this.hidingSpeed=!0):this.hidingSpeed&&(this.$statusBarDiv.find("span.able-speed").show(),this.hidingSpeed=!1))))},AblePlayer.prototype.getHiddenWidth=function(t){var e=t.clone().appendTo("body"),i=e.outerWidth();return e.remove(),i},AblePlayer.prototype.handlePlay=function(t){this.paused?(this.okToPlay=!0,this.playMedia(),this.synth.paused&&this.synth.resume()):(this.okToPlay=!1,this.pauseMedia(),this.speakingDescription&&this.synth.pause()),null===this.speechEnabled&&this.initSpeech("play")},AblePlayer.prototype.handleRestart=function(){this.speakingDescription&&this.synth.cancel(),this.seekTo(0)},AblePlayer.prototype.handlePrevTrack=function(){0===this.playlistIndex?this.playlistIndex=this.$playlist.length-1:this.playlistIndex--,this.cueingPlaylistItem=!0,this.cuePlaylistItem(this.playlistIndex)},AblePlayer.prototype.handleNextTrack=function(){this.playlistIndex===this.$playlist.length-1?this.playlistIndex=0:this.playlistIndex++,this.cueingPlaylistItem=!0,this.cuePlaylistItem(this.playlistIndex)},AblePlayer.prototype.handleRewind=function(){var t;t=this.elapsed-this.seekInterval,this.useChapterTimes?t<this.currentChapter.start&&(t=this.currentChapter.start):t<0&&(t=0),this.seekTo(t)},AblePlayer.prototype.handleFastForward=function(){var t,e;e=this.chapters.length-1,t=this.elapsed+this.seekInterval,this.useChapterTimes?this.chapters[e]==this.currentChapter?(t>this.duration||t>this.currentChapter.end||this.duration%t<this.seekInterval)&&(t=Math.min(this.duration,this.currentChapter.end)):t>this.currentChapter.end&&(t=this.currentChapter.end):t>this.duration&&(t=this.duration),this.seekTo(t)},AblePlayer.prototype.handleRateIncrease=function(){this.changeRate(1)},AblePlayer.prototype.handleRateDecrease=function(){this.changeRate(-1)},AblePlayer.prototype.changeRate=function(t){var e,i,s,a;"html5"===this.player?this.setPlaybackRate(this.getPlaybackRate()+.25*t):"youtube"===this.player?this.youTubePlayerReady&&(e=this.youTubePlayer.getAvailablePlaybackRates(),i=this.getPlaybackRate(),-1===(s=e.indexOf(i))||(s+=t)<e.length&&s>=0&&this.setPlaybackRate(e[s])):"vimeo"===this.player&&(1===t?a=this.vimeoPlaybackRate+.5<=2?this.vimeoPlaybackRate+.5:2:-1===t&&(a=this.vimeoPlaybackRate-.5>=.5?this.vimeoPlaybackRate-.5:.5),this.setPlaybackRate(a))},AblePlayer.prototype.handleCaptionToggle=function(){var t,e=this;if(this.hidingPopup)return this.hidingPopup=!1,!1;if(1===(t=this.captions.length?this.captions:[]).length){if(!0===this.captionsOn)this.captionsOn=!1,this.prefCaptions=0,this.$ccButton.attr("aria-pressed","false"),this.updateCookie("prefCaptions"),this.usingYouTubeCaptions?this.youTubePlayer.unloadModule("captions"):this.usingVimeoCaptions?this.vimeoPlayer.disableTextTrack():this.$captionsWrapper.hide();else{this.captionsOn=!0,this.prefCaptions=1,this.$ccButton.attr("aria-pressed","true"),this.updateCookie("prefCaptions"),this.usingYouTubeCaptions?this.youTubePlayer.loadModule("captions"):this.usingVimeoCaptions?this.vimeoPlayer.enableTextTrack(this.captionLang).then((function(t){})).catch((function(t){t.name})):this.$captionsWrapper.show();for(var i=0;i<t.length;i++)!0===t[i].def&&(this.selectedCaptions=t[i]);this.selectedCaptions=this.captions[0],this.descriptions.length>=0&&(this.selectedDescriptions=this.descriptions[0])}this.refreshControls("captions")}else this.captionsPopup&&this.captionsPopup.is(":visible")?(this.captionsPopup.hide(),this.hidingPopup=!1,this.$ccButton.attr("aria-expanded","false"),this.waitThenFocus(this.$ccButton)):(this.closePopups(),this.captionsPopup&&(this.captionsPopup.show(),this.$ccButton.attr("aria-expanded","true"),setTimeout((function(){e.captionsPopup.css("top",e.$ccButton.position().top-e.captionsPopup.outerHeight()),e.captionsPopup.css("left",e.$ccButton.position().left),e.captionsPopup.find("li").removeClass("able-focus"),e.captionsPopup.find("li").first().trigger("focus").addClass("able-focus")}),50)))},AblePlayer.prototype.waitThenFocus=function(t,e){setTimeout((function(){t.trigger("focus")}),null==e?50:e)},AblePlayer.prototype.handleChapters=function(){if(this.hidingPopup)return this.hidingPopup=!1,!1;this.chaptersPopup.is(":visible")?(this.chaptersPopup.hide(),this.hidingPopup=!1,this.$chaptersButton.attr("aria-expanded","false").trigger("focus")):(this.closePopups(),this.chaptersPopup.show(),this.$chaptersButton.attr("aria-expanded","true"),this.chaptersPopup.css("top",this.$chaptersButton.position().top-this.chaptersPopup.outerHeight()),this.chaptersPopup.css("left",this.$chaptersButton.position().left),this.chaptersPopup.find("li").removeClass("able-focus"),this.chaptersPopup.find('li[aria-checked="true"]').length?this.chaptersPopup.find('li[aria-checked="true"]').trigger("focus").addClass("able-focus"):this.chaptersPopup.find("li").first().addClass("able-focus").attr("aria-checked","true").trigger("focus"))},AblePlayer.prototype.handleDescriptionToggle=function(){this.descOn=!this.descOn,this.prefDesc=+this.descOn,this.updateCookie("prefDesc"),void 0!==this.$descDiv&&(this.$descDiv.is(":hidden")||this.$descDiv.hide()),this.initDescription(),this.refreshControls("descriptions")},AblePlayer.prototype.handlePrefsClick=function(t){var e,i,s,a;if(e=this,null===this.speechEnabled&&this.initSpeech("prefs"),this.hidingPopup)return this.hidingPopup=!1,!1;this.prefsPopup.is(":visible")?(this.prefsPopup.hide(),this.$prefsButton.attr("aria-expanded","false"),this.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.showingPrefsDialog||this.$prefsButton.trigger("focus"),setTimeout((function(){e.hidingPopup=!1}),100)):(this.closePopups(),this.prefsPopup.show(),this.$prefsButton.attr("aria-expanded","true"),this.$prefsButton.trigger("focus"),setTimeout((function(){i=e.$prefsButton.position(),s=e.$ableDiv.width()-5,a=s-e.prefsPopup.width(),e.prefsPopup.css("top",i.top-e.prefsPopup.outerHeight()),e.prefsPopup.css("left",a),e.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","0"),e.prefsPopup.find("li").first().trigger("focus").addClass("able-focus")}),50))},AblePlayer.prototype.handleHelpClick=function(){this.setFullscreen(!1),this.helpDialog.show()},AblePlayer.prototype.handleTranscriptToggle=function(){var t=this;this.$transcriptDiv.is(":visible")?(this.$transcriptArea.hide(),this.$transcriptButton.addClass("buttonOff").attr("aria-label",this.tt.showTranscript),this.$transcriptButton.find("span.able-clipped").text(this.tt.showTranscript),this.prefTranscript=0,this.$transcriptButton.trigger("focus").addClass("able-focus"),setTimeout((function(){t.closingTranscript=!1}),100)):(this.positionDraggableWindow("transcript"),this.$transcriptArea.show(),this.$transcriptPopup.hide(),this.$transcriptButton.removeClass("buttonOff").attr("aria-label",this.tt.hideTranscript),this.$transcriptButton.find("span.able-clipped").text(this.tt.hideTranscript),this.prefTranscript=1,this.focusNotClick=!0,this.$transcriptArea.find("button").first().trigger("focus"),setTimeout((function(){t.focusNotClick=!1}),100)),this.updateCookie("prefTranscript")},AblePlayer.prototype.handleSignToggle=function(){var t=this;this.$signWindow.is(":visible")?(this.$signWindow.hide(),this.$signButton.addClass("buttonOff").attr("aria-label",this.tt.showSign),this.$signButton.find("span.able-clipped").text(this.tt.showSign),this.prefSign=0,this.$signButton.trigger("focus").addClass("able-focus"),setTimeout((function(){t.closingSign=!1}),100)):(this.positionDraggableWindow("sign"),this.$signWindow.show(),this.$signPopup.hide(),this.$signButton.removeClass("buttonOff").attr("aria-label",this.tt.hideSign),this.$signButton.find("span.able-clipped").text(this.tt.hideSign),this.prefSign=1,this.focusNotClick=!0,this.$signWindow.find("button").first().trigger("focus"),setTimeout((function(){t.focusNotClick=!1}),100)),this.updateCookie("prefSign")},AblePlayer.prototype.isFullscreen=function(){return this.nativeFullscreenSupported()?!!(document.fullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullscreenElement||document.mozFullscreenElement||document.msFullscreenElement):!!this.modalFullscreenActive},AblePlayer.prototype.setFullscreen=function(e){if(this.fullscreen!=e){var i=this,s=this.$ableWrapper,a=s[0];if(this.nativeFullscreenSupported())e?(a.requestFullscreen?a.requestFullscreen():a.webkitRequestFullscreen?a.webkitRequestFullscreen():a.mozRequestFullscreen?a.mozRequestFullscreen():a.msRequestFullscreen&&a.msRequestFullscreen(),this.fullscreen=!0):(this.restoringAfterFullscreen=!0,document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullscreen?document.webkitCancelFullscreen():document.mozCancelFullscreen?document.mozCancelFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),this.fullscreen=!1);else{if(!this.fullscreenDialog){var n=t("<div>"),r=t("<p>",{class:"able-screenreader-alert"}).text(this.tt.fullScreen);n.append(r),this.fullscreenDialog=new AccessibleDialog(n,this.$fullscreenButton,"dialog",!0,"Fullscreen video player",r,this.tt.exitFullscreen,"100%",!0,(function(){i.handleFullscreenToggle()})),t("body").append(n)}var o=this.paused;if(e){this.modalFullscreenActive=!0,this.fullscreenDialog.show(),this.$modalFullscreenPlaceholder=t('<div class="placeholder">'),this.$modalFullscreenPlaceholder.insertAfter(s),s.appendTo(this.fullscreenDialog.modal),s===this.$ableColumnLeft&&s.width("100%");t(window).height(),this.$playerDiv.height();void 0!==this.$descDiv&&(this.$descDiv.is(":hidden")||this.$descDiv.height())}else this.modalFullscreenActive=!1,s===this.$ableColumnLeft&&s.width("50%"),s.insertAfter(this.$modalFullscreenPlaceholder),this.$modalFullscreenPlaceholder.remove(),this.fullscreenDialog.hide();!o&&this.paused&&this.playMedia()}t(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",(function(t){i.fullscreen?i.clickedFullscreenButton||(i.fullscreen=!1,i.restoringAfterFullscreen=!0):i.restoringAfterFullscreen=!0,i.resizePlayer(),i.refreshControls("fullscreen"),setTimeout((function(){i.clickedFullscreenButton=!1,i.restoringAfterFullscreen=!1}),1e3)}))}},AblePlayer.prototype.handleFullscreenToggle=function(){var t=this.paused;this.setFullscreen(!this.fullscreen),t?this.pauseMedia():t||this.playMedia(),this.fullscreen?(this.hideControls=!0,this.playing&&(this.fadeControls("out"),this.controlsHidden=!0)):(this.hideControls=this.hideControlsOriginal,this.hideControls||(this.controlsHidden&&(this.fadeControls("in"),this.controlsHidden=!1),"active"===this.hideControlsTimeoutStatus&&(window.clearTimeout(this.hideControlsTimeout),this.hideControlsTimeoutStatus="clear")))},AblePlayer.prototype.handleTranscriptLockToggle=function(t){this.autoScrollTranscript=t,this.prefAutoScrollTranscript=+t,this.updateCookie("prefAutoScrollTranscript"),this.refreshControls("transcript")},AblePlayer.prototype.showTooltip=function(t){t.is(":animated")?t.stop(!0,!0).show():t.stop().show()},AblePlayer.prototype.showAlert=function(t,e){var i,s,a,n;"transcript"===e?(i=this.$transcriptAlert,s=this.$transcriptArea):"sign"===e?(i=this.$signAlert,s=this.$signWindow):i="screenreader"===e?this.$srAlertBox:this.$alertBox,i.text(t).show(),"transcript"==e||"sign"===e?(a=s.width()>i.width()?s.width()/2-i.width()/2:10,"sign"===e?n=s.height()/3*2:"transcript"===e&&(n=this.$transcriptToolbar.height()+30),i.css({top:n+"px",left:a+"px"})):"screenreader"!==e&&i.css({left:this.$playerDiv.width()/2-i.width()/2}),"screenreader"!==e&&setTimeout((function(){i.fadeOut(300)}),3e3)},AblePlayer.prototype.showedAlert=function(t){return"transcript"===t?!!this.showedTranscriptAlert:"sign"===t&&!!this.showedSignAlert},AblePlayer.prototype.resizePlayer=function(e,i){var s,a,n,r,o;if("audio"!==this.mediaType){if(void 0!==e&&void 0!==i?(this.aspectRatio=i/e,this.playerWidth?(a=this.playerWidth,this.playerHeight?n=this.playerHeight:(n=Math.round(a*this.aspectRatio),this.playerHeight=n)):(a="html5"===this.player?t(window).width():this.$ableWrapper.width(),n=Math.round(a*this.aspectRatio))):this.fullscreen?(this.$ableWrapper.addClass("fullscreen"),a=t(window).width(),n=t(window).height()-this.$playerDiv.outerHeight()-5,this.positionCaptions("overlay")):(this.$ableWrapper.removeClass("fullscreen"),a="html5"===this.player?this.playerWidth?this.playerWidth:t(window).width():this.$ableWrapper.width(),n=Math.round(a*this.aspectRatio),this.positionCaptions(this.prefCaptionsPosition)),this.debug,"youtube"===this.player||"vimeo"===this.player?(r=this.$ableWrapper.find("iframe"),"youtube"===this.player&&this.youTubePlayer?this.youTubePlayer.setSize(a,n):r.attr({width:a,height:n}),this.playerWidth&&this.playerHeight&&(this.fullscreen?r.css({"max-width":"","max-height":""}):r.css({"max-width":this.playerWidth+"px","max-height":this.playerHeight+"px"}))):"html5"===this.player&&(this.fullscreen?(this.$media.attr({width:a,height:n}),this.$ableWrapper.css({width:a,height:n})):(this.$media.removeAttr("width height"),this.$ableWrapper.css({width:a+"px",height:"auto"}))),void 0!==this.$captionsDiv){var l=!1;window.screen.width<1200&&(l=!0),s=parseInt(this.prefCaptionsSize,10),this.fullscreen&&!l?s=s/100+"vw":this.fullscreen&&l?s="1.2rem":s+="%",this.$captionsDiv.css({"font-size":s})}"video"===this.mediaType&&(o=2*Math.round(this.$mediaContainer.height()/3),this.$alertBox.css({top:o+"px"})),this.refreshControls()}},AblePlayer.prototype.retrieveOffscreenWindow=function(t,e,i){var s,a,n,r,o,l,h,p;"transcript"==t?s=this.$transcriptArea:"sign"==t&&(s=this.$signWindow),l=s.width(),p=s.height(),n=(a=s.position()).top,o=(r=a.left)+l,h=n+p,n<0&&(n=10,s.css("top",n)),r<0&&(r=10,s.css("left",r)),o>e&&(r=e-20-l,s.css("left",r)),h>i&&(n=i-10-p,s.css("top",n))},AblePlayer.prototype.updateZIndex=function(t){var e,i,s,a,n,r;if(e=8e3,i=7e3,void 0===this.$transcriptArea||void 0===this.$signWindow)return void 0!==this.$transcriptArea?(s=parseInt(this.$transcriptArea.css("z-index")))>i&&this.$transcriptArea.css("z-index",i):void 0!==this.$signWindow&&(a=parseInt(this.$signWindow.css("z-index")))>e&&this.$signWindow.css("z-index",e),!1;if((s=parseInt(this.$transcriptArea.css("z-index")))===(a=parseInt(this.$signWindow.css("z-index"))))n=e,r=i;else if(s>a){if("transcript"===t)return!1;n=s,r=a}else{if("sign"===t)return!1;n=a,r=s}"transcript"===t?(this.$transcriptArea.css("z-index",n),this.$signWindow.css("z-index",r)):"sign"===t&&(this.$signWindow.css("z-index",n),this.$transcriptArea.css("z-index",r))},AblePlayer.prototype.syncTrackLanguages=function(t,e){var i,s,a,n,r;for(i=0;i<this.captions.length;i++)this.captions[i].language===e&&(s=this.captions[i]);for(i=0;i<this.chapters.length;i++)this.chapters[i].language===e&&(n=this.chapters[i]);for(i=0;i<this.descriptions.length;i++)this.descriptions[i].language===e&&(a=this.descriptions[i]);for(i=0;i<this.meta.length;i++)this.meta[i].language===e&&(r=this.meta[i]);if(this.transcriptLang=e,"init"===t||"captions"===t?(this.captionLang=e,this.selectedCaptions=s,this.selectedChapters=n,this.selectedDescriptions=a,this.selectedMeta=r,this.transcriptCaptions=s,this.transcriptChapters=n,this.transcriptDescriptions=a,this.updateChaptersList()):"transcript"===t&&(this.transcriptCaptions=s,this.transcriptChapters=n,this.transcriptDescriptions=a),this.selectedDescriptions&&(this.setDescriptionVoice(),this.$sampleDescDiv&&this.sampleText))for(i=0;i<this.sampleText.length;i++)this.sampleText[i].lang===this.selectedDescriptions.language&&(this.currentSampleText=this.sampleText[i].text,this.$sampleDescDiv.html(this.currentSampleText));this.updateTranscript()}}(jQuery),function(t){AblePlayer.prototype.updateCaption=function(t){this.usingYouTubeCaptions||this.usingVimeoCaptions||void 0===this.$captionsWrapper||(this.captionsOn?(this.$captionsWrapper.show(),void 0!==t&&this.showCaptions(t)):this.$captionsWrapper&&(this.$captionsWrapper.hide(),this.prefCaptions=0))},AblePlayer.prototype.updateCaptionsMenu=function(t){this.captionsPopup.find("li").attr("aria-checked","false"),void 0===t?this.captionsPopup.find("li").last().attr("aria-checked","true"):this.captionsPopup.find("li[lang="+t+"]").attr("aria-checked","true")},AblePlayer.prototype.getCaptionClickFunction=function(t){var e=this;return function(){e.selectedCaptions=t,e.captionLang=t.language,e.currentCaption=-1,e.usingYouTubeCaptions?e.captionsOn?e.youTubePlayer.getOptions("captions")&&e.startedPlaying?e.youTubePlayer.setOption("captions","track",{languageCode:e.captionLang}):e.captionLangPending=e.captionLang:e.youTubePlayer.getOptions("captions")?e.youTubePlayer.setOption("captions","track",{languageCode:e.captionLang}):(e.youTubePlayer.loadModule("captions"),e.captionLangPending=e.captionLang):e.usingVimeoCaptions?e.vimeoPlayer.enableTextTrack(e.captionLang).then((function(t){})).catch((function(t){t.name})):(e.syncTrackLanguages("captions",e.captionLang),e.swappingSrc||(e.updateCaption(e.elapsed),e.showDescription(e.elapsed))),e.captionsOn=!0,e.hidingPopup=!0,e.captionsPopup.hide(),e.$ccButton.attr("aria-expanded","false"),"audio"===e.mediaType&&e.$captionsContainer.removeClass("captions-off"),setTimeout((function(){e.hidingPopup=!1}),100),e.updateCaptionsMenu(e.captionLang),e.waitThenFocus(e.$ccButton),e.prefCaptions=1,e.updateCookie("prefCaptions"),e.refreshControls("captions")}},AblePlayer.prototype.getCaptionOffFunction=function(){var t=this;return function(){"youtube"==t.player?t.youTubePlayer.unloadModule("captions"):t.usingVimeoCaptions&&t.vimeoPlayer.disableTextTrack(),t.captionsOn=!1,t.currentCaption=-1,"audio"===t.mediaType&&t.$captionsContainer.addClass("captions-off"),t.hidingPopup=!0,t.captionsPopup.hide(),t.$ccButton.attr("aria-expanded","false"),setTimeout((function(){t.hidingPopup=!1}),100),t.updateCaptionsMenu(),t.waitThenFocus(t.$ccButton),t.prefCaptions=0,t.updateCookie("prefCaptions"),this.swappingSrc||(t.refreshControls("captions"),t.updateCaption())}},AblePlayer.prototype.showCaptions=function(t){var e,i,s,a;for(a=this.selectedCaptions.cues.length?this.selectedCaptions.cues:this.captions.length>=1?this.captions[0].cues:[],e=0;e<a.length;e++)if(a[e].start<=t&&a[e].end>t){i=e;break}void 0!==i?this.currentCaption!==i&&(s=this.flattenCueForCaption(a[i]).replace(/\n/g,"<br>"),this.$captionsDiv.html(s),this.currentCaption=i,0===s.length?this.$captionsDiv.css("display","none"):this.$captionsDiv.css("display","inline-block")):(this.$captionsDiv.html("").css("display","none"),this.currentCaption=-1)},AblePlayer.prototype.flattenCueForCaption=function(t){var e=[],flattenComponent=function(t){var e,i=[];if("string"===t.type)i.push(t.value);else if("v"===t.type)for(i.push("("+t.value+")"),e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));else if("i"===t.type){for(i.push("<em>"),e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));i.push("</em>")}else if("b"===t.type){for(i.push("<strong>"),e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));i.push("</strong>")}else for(e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));return i.join("")};if(void 0!==t.components)for(var i=0;i<t.components.children.length;i++)e.push(flattenComponent(t.components.children[i]));return e.join("")},AblePlayer.prototype.getCaptionsOptions=function(t){var e=[];switch(t){case"prefCaptionsFont":e[0]=["serif",this.tt.serif],e[1]=["sans-serif",this.tt.sans],e[2]=["cursive",this.tt.cursive],e[3]=["fantasy",this.tt.fantasy],e[4]=["monospace",this.tt.monospace];break;case"prefCaptionsColor":case"prefCaptionsBGColor":e[0]=["white",this.tt.white],e[1]=["yellow",this.tt.yellow],e[2]=["green",this.tt.green],e[3]=["cyan",this.tt.cyan],e[4]=["blue",this.tt.blue],e[5]=["magenta",this.tt.magenta],e[6]=["red",this.tt.red],e[7]=["black",this.tt.black];break;case"prefCaptionsSize":e[0]="75%",e[1]="100%",e[2]="125%",e[3]="150%",e[4]="200%";break;case"prefCaptionsOpacity":e[0]="0%",e[1]="25%",e[2]="50%",e[3]="75%",e[4]="100%";break;case"prefCaptionsStyle":e[0]=this.tt.captionsStylePopOn,e[1]=this.tt.captionsStyleRollUp;break;case"prefCaptionsPosition":e[0]="overlay",e[1]="below"}return e},AblePlayer.prototype.translatePrefs=function(t,e,i){if("youtube"==i&&"size"===t)switch(e){case"75%":return-1;case"100%":return 0;case"125%":return 1;case"150%":return 2;case"200%":return 3}return!1},AblePlayer.prototype.stylizeCaptions=function(e,i){var s,a,n;void 0!==e&&("prefCaptionsPosition"==i?this.positionCaptions():void 0!==i?("prefCaptionsFont"===i?s="font-family":"prefCaptionsSize"===i?s="font-size":"prefCaptionsColor"===i?s="color":"prefCaptionsBGColor"===i?s="background-color":"prefCaptionsOpacity"===i&&(s="opacity"),a="prefCaptionsOpacity"===i?parseFloat(t("#"+this.mediaId+"_"+i).val())/100:t("#"+this.mediaId+"_"+i).val(),e.css(s,a)):(n=parseFloat(this.prefCaptionsOpacity)/100,e.css({"font-family":this.prefCaptionsFont,color:this.prefCaptionsColor,"background-color":this.prefCaptionsBGColor,opacity:n}),e===this.$captionsDiv&&void 0!==this.$captionsDiv&&this.$captionsDiv.css({"font-size":this.prefCaptionsSize}),"below"===this.prefCaptionsPosition?void 0!==this.$captionsWrapper&&this.$captionsWrapper.css({"background-color":this.prefCaptionsBGColor,opacity:"1"}):"overlay"===this.prefCaptionsPosition&&void 0!==this.$captionsWrapper&&this.$captionsWrapper.css({"background-color":"transparent",opacity:""}),this.positionCaptions()))},AblePlayer.prototype.positionCaptions=function(t){void 0===t&&(t=this.prefCaptionsPosition),void 0!==this.$captionsWrapper&&("below"==t?(this.$captionsWrapper.removeClass("able-captions-overlay").addClass("able-captions-below"),this.$captionsWrapper.css({"background-color":this.prefCaptionsBGColor,opacity:"1"})):(this.$captionsWrapper.removeClass("able-captions-below").addClass("able-captions-overlay"),this.$captionsWrapper.css({"background-color":"transparent",opacity:""})))}}(jQuery),function(t){AblePlayer.prototype.populateChaptersDiv=function(){var e,i,s;t("#"+this.chaptersDivLocation)&&(this.$chaptersDiv=t("#"+this.chaptersDivLocation),this.$chaptersDiv.addClass("able-chapters-div"),this.$chaptersDiv.empty(),this.chaptersTitle&&(e="h"+this.getNextHeadingLevel(this.$chaptersDiv).toString(),i=this.mediaId+"-chapters-heading",s=t("<"+e+">",{class:"able-chapters-heading",id:i}).text(this.chaptersTitle),this.$chaptersDiv.append(s)),this.$chaptersNav=t("<nav>"),this.chaptersTitle?this.$chaptersNav.attr("aria-labelledby",i):this.$chaptersNav.attr("aria-label",this.tt.chapters),this.$chaptersDiv.append(this.$chaptersNav),this.updateChaptersList())},AblePlayer.prototype.updateChaptersList=function(){var e,i,s,a,n,r,o,l,h,p;if(e=this,!this.$chaptersNav)return!1;if(void 0===this.useChapterTimes&&("chapter"===this.seekbarScope&&this.selectedChapters.cues.length?this.useChapterTimes=!0:this.useChapterTimes=!1),(i=this.useChapterTimes?this.selectedChapters.cues:this.chapters.length>=1?this.chapters[0].cues:[]).length>0){for(p=t("<ul>"),s=0;s<i.length;s++)a=s,n=t("<li></li>"),l=function(i){return function(){e.seekTrigger="chapter",h=t(this).closest("li"),p=t(this).closest("ul").find("li"),p.index(h),p.removeClass("able-current-chapter").children("button").removeAttr("aria-current"),h.addClass("able-current-chapter").children("button").attr("aria-current","true"),e.updateChapter(i),e.seekTo(i)}},(r=t("<button>",{type:"button",val:a}).text(this.flattenCueForCaption(i[a]))).on("click",l(i[a].start)),r.on("focus",(function(){t(this).closest("ul").find("li").removeClass("able-focus"),t(this).closest("li").addClass("able-focus")})),n.on("hover",(function(){t(this).closest("ul").find("li").removeClass("able-focus"),t(this).addClass("able-focus")})),n.on("mouseleave",(function(){t(this).removeClass("able-focus")})),r.on("blur",(function(){t(this).closest("li").removeClass("able-focus")})),n.append(r),p.append(n),this.defaultChapter===i[a].id&&(r.attr("aria-current","true").parent("li").addClass("able-current-chapter"),this.currentChapter=i[a],o=!0);o||(this.currentChapter=i[0],p.find("button").first().attr("aria-current","true").parent("li").addClass("able-current-chapter")),this.$chaptersNav.html(p)}return!1},AblePlayer.prototype.seekToChapter=function(t){for(var e=0;e<this.selectedChapters.cues.length;){if(this.selectedChapters.cues[e].id==t){this.seekTo(this.selectedChapters.cues[e].start),this.updateChapter(this.selectedChapters.cues[e].start);break}e++}},AblePlayer.prototype.updateChapter=function(t){if(void 0!==this.selectedChapters){var e,i,s;for(e=this.selectedChapters.cues,i=0;i<e.length;i++)if(e[i].start<=t&&e[i].end>t){s=i;break}void 0!==s&&this.currentChapter!==e[s]&&(this.currentChapter=e[s],this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.seekIntervalCalculated=!1),void 0!==this.$chaptersDiv&&(this.$chaptersDiv.find("ul").find("li").removeClass("able-current-chapter").children("button").removeAttr("aria-current"),this.$chaptersDiv.find("ul").find("li").eq(s).addClass("able-current-chapter").children("button").attr("aria-current","true")))}},AblePlayer.prototype.getChapterDuration=function(){var t,e;return void 0===this.currentChapter||void 0===this.duration?0:(t=this.selectedChapters.cues.length-1,this.selectedChapters.cues[t]==this.currentChapter&&this.currentChapter.end!==this.duration?(e=this.duration,this.currentChapter.end=this.duration):e=this.currentChapter.end,e-this.currentChapter.start)},AblePlayer.prototype.getChapterElapsed=function(){return void 0===this.currentChapter?0:this.elapsed>this.currentChapter.start?this.elapsed-this.currentChapter.start:0},AblePlayer.prototype.convertChapterTimeToVideoTime=function(t){if(void 0!==this.currentChapter){var e=this.currentChapter.start+t;return e>this.currentChapter.end?this.currentChapter.end:e}return t},AblePlayer.prototype.getChapterClickFunction=function(t){var e=this;return function(){e.seekTrigger="chapter",e.seekTo(t),e.hidingPopup=!0,e.chaptersPopup.hide(),setTimeout((function(){e.hidingPopup=!1}),100),e.$chaptersButton.trigger("focus")}}}(jQuery),function(t){AblePlayer.prototype.updateMeta=function(t){this.hasMeta&&("text"===this.metaType?(this.$metaDiv.show(),this.showMeta(t||this.elapsed)):this.showMeta(t||this.elapsed))},AblePlayer.prototype.showMeta=function(e){var i,s,a,n,r,o,l,h,p;for(i=[],n=this.meta.length>=1?this.meta:[],s=0;s<n.length;s++)if(n[s].start<=e&&n[s].end>e){a=s;break}if(void 0!==a){if(this.currentMeta!==a)if("text"===this.metaType)this.$metaDiv.html(this.flattenCueForMeta(n[a]).replace(/\n/g,"<br>"));else if("selector"===this.metaType){for(r=this.flattenCueForMeta(n[a]).split("\n"),o=0;o<r.length;o++)"pause"===(l=r[o].trim()).toLowerCase().trim()?(this.hideBigPlayButton=!0,this.pauseMedia()):"focus:"==l.toLowerCase().substring(0,6)?(p=l.substring(6).trim(),t(p).length&&t(p).trigger("focus")):t(l).length&&(this.currentMeta=a,void 0===(h=parseInt(t(l).attr("data-duration")))||isNaN(h)?t(l).show():t(l).show().delay(h).fadeOut(),this.visibleSelectors.push(l),i.push(l));if(this.visibleSelectors&&this.visibleSelectors.length&&this.visibleSelectors.length!==i.length)for(o=this.visibleSelectors.length-1;o>=0;o--)-1==t.inArray(this.visibleSelectors[o],i)&&(t(this.visibleSelectors[o]).hide(),this.visibleSelectors.splice(o,1))}}else{if(void 0!==this.$metaDiv&&this.$metaDiv.html(""),this.visibleSelectors&&this.visibleSelectors.length){for(o=0;o<this.visibleSelectors.length;o++)t(this.visibleSelectors[o]).hide();this.visibleSelectors=[]}this.currentMeta=-1}},AblePlayer.prototype.flattenCueForMeta=function(t){for(var e=[],flattenComponent=function(t){var e,i=[];if("string"===t.type)i.push(t.value);else if("v"===t.type)for(i.push("["+t.value+"]"),e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));else for(e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));return i.join("")},i=0;i<t.components.children.length;i++)e.push(flattenComponent(t.components.children[i]));return e.join("")}}(jQuery),function(t){AblePlayer.prototype.setupTranscript=function(){var e=new t.Deferred,i=e.promise();return this.usingYouTubeCaptions||this.usingVimeoCaptions?(this.transcriptType=null,e.resolve()):(this.transcriptType||this.captions.length&&(this.transcriptType="popup"),this.transcriptType?"popup"===this.transcriptType||"external"===this.transcriptType?(this.injectTranscriptArea(),e.resolve()):"manual"===this.transcriptType&&(this.setupManualTranscript(),e.resolve()):e.resolve()),i},AblePlayer.prototype.injectTranscriptArea=function(){var e,i,s,a,n;if(this.$transcriptArea=t("<div>",{class:"able-transcript-area",role:"dialog","aria-label":this.tt.transcriptTitle}),this.$transcriptToolbar=t("<div>",{class:"able-window-toolbar able-"+this.toolbarIconColor+"-controls"}),this.$transcriptDiv=t("<div>",{class:"able-transcript"}),this.$autoScrollTranscriptCheckbox=t("<input>",{id:"autoscroll-transcript-checkbox-"+this.mediaId,type:"checkbox"}),e=t("<label>",{for:"autoscroll-transcript-checkbox-"+this.mediaId}).text(this.tt.autoScroll),$autoScrollContainer=t("<div>",{class:"autoscroll-transcript"}),$autoScrollContainer.append(e,this.$autoScrollTranscriptCheckbox),this.$transcriptToolbar.append($autoScrollContainer),this.captions.length>1)for(i=t("<div>",{class:"transcript-language-select-wrapper"}),s=t("<label>",{for:"transcript-language-select-"+this.mediaId}).text(this.tt.language),this.$transcriptLanguageSelect=t("<select>",{id:"transcript-language-select-"+this.mediaId}),a=0;a<this.captions.length;a++)n=t("<option></option>",{value:this.captions[a].language,lang:this.captions[a].language}).text(this.captions[a].label),this.captions[a].def&&n.prop("selected",!0),this.$transcriptLanguageSelect.append(n);i&&(i.append(s,this.$transcriptLanguageSelect),this.$transcriptToolbar.append(i)),this.$transcriptArea.append(this.$transcriptToolbar,this.$transcriptDiv),this.transcriptDivLocation?(this.$transcriptArea.removeAttr("role"),this.$transcriptArea.removeAttr("aria-label"),t("#"+this.transcriptDivLocation).append(this.$transcriptArea)):this.$ableWrapper.append(this.$transcriptArea),this.transcriptDivLocation||(this.initDragDrop("transcript"),1===this.prefTranscript&&this.positionDraggableWindow("transcript",this.getDefaultWidth("transcript"))),this.prefTranscript||this.transcriptDivLocation||this.$transcriptArea.hide()},AblePlayer.prototype.addTranscriptAreaEvents=function(){var t=this;this.$autoScrollTranscriptCheckbox.on("click",(function(){t.handleTranscriptLockToggle(t.$autoScrollTranscriptCheckbox.prop("checked"))})),this.$transcriptDiv.on("mousewheel DOMMouseScroll click scroll",(function(e){t.scrollingTranscript||(t.autoScrollTranscript=!1,t.refreshControls("transcript")),t.scrollingTranscript=!1})),void 0!==this.$transcriptLanguageSelect&&(this.$transcriptLanguageSelect.on("click mousedown",(function(t){t.stopPropagation()})),this.$transcriptLanguageSelect.on("change",(function(){var e=t.$transcriptLanguageSelect.val();t.syncTrackLanguages("transcript",e)})))},AblePlayer.prototype.transcriptSrcHasRequiredParts=function(){return!!(t("#"+this.transcriptSrc).length&&(this.$transcriptArea=t("#"+this.transcriptSrc),this.$transcriptArea.find(".able-window-toolbar").length&&(this.$transcriptToolbar=this.$transcriptArea.find(".able-window-toolbar").eq(0),this.$transcriptArea.find(".able-transcript").length&&(this.$transcriptDiv=this.$transcriptArea.find(".able-transcript").eq(0),this.$transcriptArea.find(".able-transcript-seekpoint").length))))&&(this.$transcriptSeekpoints=this.$transcriptArea.find(".able-transcript-seekpoint"),!0)},AblePlayer.prototype.setupManualTranscript=function(){var e,i;e=t("<input>",{id:"autoscroll-transcript-checkbox-"+this.mediaId,type:"checkbox"}),i=t("<label>",{for:"autoscroll-transcript-checkbox-"+this.mediaId}).text(this.tt.autoScroll),this.$autoScrollTranscriptCheckbox=e,this.$transcriptToolbar.append(i,this.$autoScrollTranscriptCheckbox)},AblePlayer.prototype.updateTranscript=function(){if(this.transcriptType&&(!this.playerCreated||this.$transcriptArea)){if("external"===this.transcriptType||"popup"===this.transcriptType){var e,i,s;if(this.transcriptLang?i=this.transcriptCaptions.cues:this.transcriptCaptions?(this.transcriptLang=this.transcriptCaptions.language,i=this.transcriptCaptions.cues):this.selectedCaptions&&(this.transcriptLang=this.captionLang,i=this.selectedCaptions.cues),this.transcriptChapters)e=this.transcriptChapters.cues;else if(this.chapters.length>0){if(this.transcriptLang)for(var a=0;a<this.chapters.length;a++)this.chapters[a].language===this.transcriptLang&&(e=this.chapters[a].cues);void 0===e&&(e=this.chapters[0].cues||[])}if(this.transcriptDescriptions)s=this.transcriptDescriptions.cues;else if(this.descriptions.length>0){if(this.transcriptLang)for(a=0;a<this.descriptions.length;a++)this.descriptions[a].language===this.transcriptLang&&(s=this.descriptions[a].cues);s||(s=this.descriptions[0].cues||[])}var n=this.generateTranscript(e||[],i||[],s||[]);this.$transcriptDiv.html(n),this.$transcriptLanguageSelect&&(this.$transcriptLanguageSelect.find("option:selected").prop("selected",!1),this.$transcriptLanguageSelect.find("option[lang="+this.transcriptLang+"]").prop("selected",!0))}var r=this;1===this.prefTabbable&&this.$transcriptDiv.find("span.able-transcript-seekpoint").attr("tabindex","0"),this.$transcriptArea.length>0&&this.$transcriptArea.find("span.able-transcript-seekpoint").on("click",(function(e){r.seekTrigger="transcript";var i=parseFloat(t(this).attr("data-start"));i+=.01,r.seekingFromTranscript?r.seekingFromTranscript=!1:(r.seekingFromTranscript=!0,r.seekTo(i))}))}},AblePlayer.prototype.highlightTranscript=function(e){if(this.transcriptType){var i,s,a,n=this;e=parseFloat(e),this.$transcriptArea.find("span.able-transcript-seekpoint").each((function(){if(i=parseFloat(t(this).attr("data-start")),s=parseFloat(t(this).attr("data-end")),a=!!t(this).parent().hasClass("able-transcript-chapter-heading"),e>=i&&e<=s&&!a)return t(this).hasClass("able-highlight")||(n.$transcriptArea.find(".able-highlight").removeClass("able-highlight"),t(this).addClass("able-highlight"),n.movingHighlight=!0),!1})),n.currentHighlight=n.$transcriptArea.find(".able-highlight"),0===n.currentHighlight.length&&(n.currentHighlight=null)}},AblePlayer.prototype.generateTranscript=function(e,i,s){var a,n=this,r=t('<div class="able-transcript-container"></div>');if(r.attr("lang",this.transcriptLang),a=void 0!==this.transcriptTitle?this.transcriptTitle:this.lyricsMode?this.tt.lyricsTitle:this.tt.transcriptTitle,!this.transcriptDivLocation){var o=this.playerHeadingLevel,l=(o+=1)+1;if(o<=6)var h="h"+o.toString();else h="div";var p=t("<"+h+">");p.addClass("able-transcript-heading"),o>6&&p.attr({role:"heading","aria-level":o}),p.text(a),p.attr("lang",this.lang),r.append(p)}for(var c=0,u=0,d=0,addChapter=function(e,i){if(l<=6)var s="h"+l.toString();else s="div";var a=t("<"+s+">",{class:"able-transcript-chapter-heading"});l>6&&a.attr({role:"heading","aria-level":l});for(var flattenComponentForChapter=function(t){var e=[];if("string"===t.type)e.push(t.value);else for(var i=0;i<t.children.length;i++)e=e.concat(flattenComponentForChapter(t.children[i]));return e},n=t("<span>",{class:"able-transcript-seekpoint"}),r=0;r<i.components.children.length;r++)for(var o=flattenComponentForChapter(i.components.children[r]),h=0;h<o.length;h++)n.append(o[h]);n.attr("data-start",i.start.toString()),n.attr("data-end",i.end.toString()),a.append(n),e.append(a)},addDescription=function(e,i){var s=t("<div>",{class:"able-transcript-desc"}),a=t("<span>",{class:"able-hidden"});a.attr("lang",n.lang),a.text(n.tt.prefHeadingDescription+": "),s.append(a);for(var flattenComponentForDescription=function(t){var e=[];if("string"===t.type)e.push(t.value);else for(var i=0;i<t.children.length;i++)e=e.concat(flattenComponentForDescription(t.children[i]));return e},r=t("<span>",{class:"able-transcript-seekpoint"}),o=0;o<i.components.children.length;o++)for(var l=flattenComponentForDescription(i.components.children[o]),h=0;h<l.length;h++)r.append(l[h]);r.attr("data-start",i.start.toString()),r.attr("data-end",i.end.toString()),s.append(r),e.append(s)},addCaption=function(e,i){for(var s=t("<span>",{class:"able-transcript-seekpoint able-transcript-caption"}),flattenComponentForCaption=function(e){var i=[],s=0,flattenString=function(t){var e;s++;var i=[];if(""===t)return i;var a=t.indexOf("["),n=t.indexOf("]"),r=t.indexOf("("),o=t.indexOf(")"),l=-1!==a&&-1!==n,h=-1!==r&&-1!==o;if(h||l){if(s>1)var p="<br/>";else p="";var c=p+'<span class="able-unspoken">',u="</span>";h&&l&&(a<r?h=!1:l=!1)}return h?(e=t.substring(0,r),e+=c,e+=t.substring(r,o+1),e+=u,e+=flattenString(t.substring(o+1)),i.push(e)):l?(e=t.substring(0,a),e+=c,e+=t.substring(a,n+1),e+=u,e+=flattenString(t.substring(n+1)),i.push(e)):i.push(t),i};if("string"===e.type)i=i.concat(flattenString(e.value));else if("v"===e.type){var a=t("<span>",{class:"able-unspoken"});e.value=e.value.replace(/^title="|\"$/g,""),a.text("("+e.value+")"),i.push(a);for(var n=0;n<e.children.length;n++)for(var r=flattenComponentForCaption(e.children[n]),o=0;o<r.length;o++)i.push(r[o])}else if("b"===e.type||"i"===e.type){if("b"===e.type)var l=t("<strong>");else if("i"===e.type)l=t("<em>");for(n=0;n<e.children.length;n++)for(r=flattenComponentForCaption(e.children[n]),o=0;o<r.length;o++)l.append(r[o]);"b"!==e.type&&"i"!=e.type||i.push(l," ")}else for(n=0;n<e.children.length;n++)i=i.concat(flattenComponentForCaption(e.children[n]));return i},a=0;a<i.components.children.length;a++)for(var r=flattenComponentForCaption(i.components.children[a]),o=0;o<r.length;o++){var l=r[o];"string"==typeof l&&(n.lyricsMode?l=l.replace(/\n/g,"<br>")+"<br>":l+=" "),s.append(l)}s.attr("data-start",i.start.toString()),s.attr("data-end",i.end.toString()),e.append(s),e.append(" \n")};c<e.length||d<s.length||u<i.length;){if(c<e.length&&d<s.length&&u<i.length)var f=Math.min(e[c].start,s[d].start,i[u].start);else if(c<e.length&&d<s.length)f=Math.min(e[c].start,s[d].start);else if(c<e.length&&u<i.length)f=Math.min(e[c].start,i[u].start);else if(d<s.length&&u<i.length)f=Math.min(s[d].start,i[u].start);else f=null;null!==f?void 0!==e[c]&&e[c].start===f?(addChapter(r,e[c]),c+=1):void 0!==s[d]&&s[d].start===f?(addDescription(r,s[d]),d+=1):(addCaption(r,i[u]),u+=1):c<e.length?(addChapter(r,e[c]),c+=1):d<s.length?(addDescription(r,s[d]),d+=1):u<i.length&&(addCaption(r,i[u]),u+=1)}var g=r.children(),m=0;return g.each((function(){t(this).hasClass("able-transcript-caption")?(-1===t(this).text().indexOf("[")&&-1===t(this).text().indexOf("(")||m>0&&(r.find(".able-block-temp").removeClass("able-block-temp").wrapAll('<div class="able-transcript-block"></div>'),m=0),t(this).addClass("able-block-temp"),m++):m>0&&(r.find(".able-block-temp").removeClass("able-block-temp").wrapAll('<div class="able-transcript-block"></div>'),m=0)})),r}}(jQuery),function(t){AblePlayer.prototype.showSearchResults=function(){var e=this;if(this.searchDiv&&this.searchString){var i=DOMPurify.sanitize(this.searchString);if(t("#"+this.SearchDiv)){var s="<p>"+this.tt.resultsSummary1+" ";s+='<span id="able-search-term-echo">'+i+"</span>",s+="</p>";var a=this.searchFor(i,this.searchIgnoreCaps);if(a.length>0){var n=t("<p>",{class:"able-search-results-summary"}),r=this.tt.resultsSummary2;r+=" <strong>"+a.length+"</strong> ",r+=this.tt.resultsSummary3+" ",r+=this.tt.resultsSummary4,n.html(r);for(var o=t("<ul>"),l=0;l<a.length;l++){var h="aria-search-result-"+l,p=t("<li>",{}),c=this.secondsToTime(a[l].start),u=this.tt.searchButtonLabel+" "+c.title,d=t("<button>",{class:"able-search-results-time","data-start":a[l].start,title:u,"aria-label":u,"aria-describedby":h});d.text(c.value),d.on("click",(function(i){e.seekTrigger="search";var s=parseFloat(t(this).attr("data-start"));s+=.01,e.seeking=!0,e.seekTo(s)}));var f=t("<span>",{class:"able-search-result-text",id:h});f.html("..."+a[l].caption+"..."),p.append(d,f),o.append(p)}t("#"+this.searchDiv).html(s).append(n,o)}else{var g=t("<p>").text(this.tt.noResultsFound);t("#"+this.searchDiv).html(s).append(g)}}}},AblePlayer.prototype.searchFor=function(e,i){var s,a,n,r,o,l,h;n=[];var p=e.split(" ");if(this.captions.length>0){for(l=0;l<this.captions.length;l++)this.captions[l].language===this.searchLang&&(s=this.searchLang,a=this.captions[l].cues);if(a.length>0)for(o=0,l=0;l<a.length;l++)if(-1!==t.inArray(a[l].components.children[0].type,["string","i","b","u","v","c"])){r=this.flattenCueForCaption(a[l]);var c=i?r.toLowerCase():r;for(h=0;h<p.length;h++){var u=i?p[h].toLowerCase():p[h];if(-1!==c.indexOf(u)){n[o]=[],n[o].start=a[l].start,n[o].lang=s,n[o].caption=this.highlightSearchTerm(p,r),o++;break}}}}return n},AblePlayer.prototype.highlightSearchTerm=function(t,e){return t.forEach((function(t){var i=new RegExp(t,"gi");e=e.replace(i,'<span class="able-search-term">$&</span>')})),e},AblePlayer.prototype.secondsToTime=function(t){t=Math.floor(t);var e=parseInt(t/3600,10)%24,i=parseInt(t/60,10)%60,s=t%60,a="",n="";e>0&&(a+=e+":",n+=1==e?"1 "+this.tt.hour+" ":e+" "+this.tt.hours+" "),i<10?(a+="0"+i+":",i>0&&(n+=1==i?"1 "+this.tt.minute+" ":i+" "+this.tt.minutes+" ")):(a+=i+":",n+=i+" "+this.tt.minutes+" "),s<10?(a+="0"+s,s>0&&(n+=1==s?"1 "+this.tt.second+" ":s+" "+this.tt.seconds+" ")):(a+=s,n+=s+" "+this.tt.seconds+" ");var r=[];return r.value=a,r.title=n,r}}(jQuery),function(t){AblePlayer.prototype.onMediaUpdateTime=function(t,e){var i=this;this.getMediaTimes(t,e).then((function(t){i.duration=t.duration,i.elapsed=t.elapsed,i.duration>0&&(1===i.prefHighlight&&i.highlightTranscript(i.elapsed),i.updateCaption(i.elapsed),i.showDescription(i.elapsed),i.updateChapter(i.elapsed),i.updateMeta(i.elapsed),i.refreshControls("timeline",i.duration,i.elapsed))}))},AblePlayer.prototype.onMediaPause=function(){this.controlsHidden&&(this.fadeControls("in"),this.controlsHidden=!1),"active"===this.hideControlsTimeoutStatus&&(window.clearTimeout(this.hideControlsTimeout),this.hideControlsTimeoutStatus="clear"),this.refreshControls("playpause")},AblePlayer.prototype.onMediaComplete=function(){this.hasPlaylist&&!this.cueingPlaylistItem&&(this.playlistIndex===this.$playlist.length-1?this.loop?(this.playlistIndex=0,this.cueingPlaylistItem=!0,this.cuePlaylistItem(0)):(this.playing=!1,this.paused=!0):(this.playlistIndex++,this.cueingPlaylistItem=!0,this.cuePlaylistItem(this.playlistIndex))),this.refreshControls("init")},AblePlayer.prototype.onMediaNewSourceLoad=function(){var t=!1;this.cueingPlaylistItem&&(this.cueingPlaylistItem=!1),this.recreatingPlayer&&(this.recreatingPlayer=!1),this.playbackRate&&this.setPlaybackRate(this.playbackRate),this.userClickedPlaylist?this.startedPlaying&&!this.okToPlay||(this.playMedia(),t=!0):"restart"==this.seekTrigger||"chapter"==this.seekTrigger||"transcript"==this.seekTrigger||"search"==this.seekTrigger?(this.playMedia(),t=!0):this.swappingSrc?this.hasPlaylist?(this.playlistIndex!==this.$playlist.length||this.loop)&&(this.playMedia(),t=!0):this.swapTime>0?"complete"===this.seekStatus?(this.okToPlay&&this.playMedia(),t=!0):"seeking"===this.seekStatus||(this.swapTime===this.elapsed?(this.seekStatus="complete",this.okToPlay&&this.playMedia(),t=!0):this.hasDescTracks?t=!0:this.durationsAreCloseEnough(this.duration,this.prevDuration)?(this.seekStatus="seeking",this.seekTo(this.swapTime)):t=!0):this.playing&&(this.playMedia(),t=!0):this.startedPlaying?this.hasPlaylist?(this.playlistIndex!==this.$playlist.length||this.loop)&&(this.playMedia(),t=!0):t=!0:this.startTime>0?this.seeking?(this.seeking=!1,this.okToPlay&&this.playMedia(),t=!0):this.seekTo(this.startTime):this.defaultChapter&&void 0!==this.selectedChapters?this.seekToChapter(this.defaultChapter):(this.okToPlay&&this.playMedia(),t=!0),t&&(this.swappingSrc=!1,this.seekStatus=null,this.swapTime=0,this.seekTrigger=null,this.seekingFromTranscript=!1,this.userClickedPlaylist=!1,this.okToPlay=!1),this.refreshControls("init"),this.$focusedElement&&(this.restoreFocus(),this.$focusedElement=null)},AblePlayer.prototype.durationsAreCloseEnough=function(t,e){return Math.abs(Math.round(t)-Math.round(e))<=1},AblePlayer.prototype.restoreFocus=function(){var e;this.$focusedElement&&"button"===this.$focusedElement.attr("role")&&(e=this.$focusedElement.attr("class").split(/\s+/),t.each(e,(function(e,i){"able-button-handler-"===i.substring(0,20)&&t("div.able-controller div."+i).trigger("focus")})))},AblePlayer.prototype.addSeekbarListeners=function(){var t=this;this.seekBar.bodyDiv.on("startTracking",(function(e){t.pausedBeforeTracking=t.paused,t.pauseMedia()})).on("tracking",(function(e,i){t.highlightTranscript(i),t.updateCaption(i),t.showDescription(i),t.updateChapter(t.convertChapterTimeToVideoTime(i)),t.updateMeta(i),t.refreshControls("init")})).on("stopTracking",(function(e,i){t.useChapterTimes?t.seekTo(t.convertChapterTimeToVideoTime(i)):t.seekTo(i),t.pausedBeforeTracking||setTimeout((function(){t.playMedia()}),200)}))},AblePlayer.prototype.onClickPlayerButton=function(e){var i,s;"play"===(i=this.getButtonNameFromClass(t(e).attr("class")))?(this.clickedPlay=!0,this.handlePlay()):"restart"===i?(this.seekTrigger="restart",this.handleRestart()):"previous"===i?(this.userClickedPlaylist=!0,this.okToPlay=!0,this.seekTrigger="previous",this.buttonWithFocus="previous",this.handlePrevTrack()):"next"===i?(this.userClickedPlaylist=!0,this.okToPlay=!0,this.seekTrigger="next",this.buttonWithFocus="next",this.handleNextTrack()):"rewind"===i?(this.seekTrigger="rewind",this.handleRewind()):"forward"===i?(this.seekTrigger="forward",this.handleFastForward()):"mute"===i?this.handleMute():"volume"===i?this.handleVolumeButtonClick():"faster"===i?this.handleRateIncrease():"slower"===i?this.handleRateDecrease():"captions"===i?this.handleCaptionToggle():"chapters"===i?this.handleChapters():"descriptions"===i?this.handleDescriptionToggle():"sign"===i?this.closingSign||this.handleSignToggle():"preferences"===i?"menu"===t(e).attr("data-prefs-popup")?this.handlePrefsClick():(this.showingPrefsDialog=!0,this.closePopups(),"keyboard"===(s=t(e).attr("data-prefs-popup"))?this.keyboardPrefsDialog.show():"captions"===s?this.captionPrefsDialog.show():"descriptions"===s?this.descPrefsDialog.show():"transcript"===s&&this.transcriptPrefsDialog.show(),this.showingPrefsDialog=!1):"help"===i?this.handleHelpClick():"transcript"===i?this.closingTranscript||this.handleTranscriptToggle():"fullscreen"===i&&(this.clickedFullscreenButton=!0,this.handleFullscreenToggle())},AblePlayer.prototype.getButtonNameFromClass=function(t){var e,i;for(e=t.split(" "),i=0;i<e.length;i++)if("able-button-handler-"===e[i].substring(0,20))return e[i].substring(20);return t},AblePlayer.prototype.okToHandleKeyPress=function(){var e=AblePlayer.getActiveDOMElement();return"INPUT"!==t(e).prop("tagName")},AblePlayer.prototype.onPlayerKeyPress=function(e){var i,s;return(i=e.which)>=65&&i<=90&&(i+=32),s=t(document.activeElement),27===i&&this.$transcriptArea&&t.contains(this.$transcriptArea[0],s[0])&&!this.hidingPopup?(this.handleTranscriptToggle(),!1):!!this.okToHandleKeyPress()&&void(t(":focus").is("[contenteditable]")||t(":focus").is("input")||t(":focus").is("textarea")&&!this.stenoMode||t(":focus").is("select")||e.target.hasAttribute("contenteditable")||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName&&!this.stenoMode||"SELECT"===e.target.tagName||(27===i?(this.closePopups(),this.$tooltipDiv.hide(),this.seekBar.hideSliderTooltips()):32===i?"button"===s.attr("role")&&(e.preventDefault(),s.trigger("click")):112===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handlePlay()):115===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleRestart()):109===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleMute()):118===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleVolumeButtonClick()):i>=49&&i<=57?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleVolumeKeystroke(i)):99===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleCaptionToggle()):100===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleDescriptionToggle()):102===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleFastForward()):114===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleRewind()):98===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handlePrevTrack()):110===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleNextTrack()):101===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handlePrefsClick()):13===i&&("button"===s.attr("role")||"SPAN"===s.prop("tagName")||"LI"===s.prop("tagName"))&&s.trigger("click")))},AblePlayer.prototype.addHtml5MediaListeners=function(){var t=this;this.$media.on("emptied",(function(){})).on("loadedmetadata",(function(){t.duration=t.media.duration;Math.abs(Math.round(50.5)-Math.round(51.9))})).on("canplay",(function(){})).on("canplaythrough",(function(){t.onMediaNewSourceLoad()})).on("play",(function(){t.refreshControls("playpause")})).on("playing",(function(){t.playing=!0,t.paused=!1,t.swappingSrc=!1,t.refreshControls("playpause")})).on("ended",(function(){t.playing=!1,t.paused=!0,t.onMediaComplete()})).on("progress",(function(){t.refreshControls("timeline")})).on("waiting",(function(){})).on("durationchange",(function(){t.refreshControls("timeline")})).on("timeupdate",(function(){t.onMediaUpdateTime()})).on("pause",(function(){t.clickedPlay?(t.playing=!1,t.paused=!0):t.hasPlaylist||t.swappingSrc||(t.playing=!1,t.paused=!0),t.clickedPlay=!1,t.onMediaPause()})).on("ratechange",(function(){})).on("volumechange",(function(){t.volume=t.getVolume()})).on("error",(function(){t.debug&&t.media.error.code}))},AblePlayer.prototype.addVimeoListeners=function(){var t=this;this.vimeoPlayer.on("loaded",(function(e){t.onMediaNewSourceLoad()})),this.vimeoPlayer.on("play",(function(e){t.playing=!0,t.startedPlaying=!0,t.paused=!1,t.refreshControls("playpause")})),this.vimeoPlayer.on("ended",(function(e){t.playing=!1,t.paused=!0,t.onMediaComplete()})),this.vimeoPlayer.on("bufferstart",(function(){})),this.vimeoPlayer.on("bufferend",(function(){})),this.vimeoPlayer.on("progress",(function(t){})),this.vimeoPlayer.on("seeking",(function(t){})),this.vimeoPlayer.on("seeked",(function(t){})),this.vimeoPlayer.on("timeupdate",(function(e){t.onMediaUpdateTime(e.duration,e.seconds)})),this.vimeoPlayer.on("pause",(function(e){t.clickedPlay?(t.playing=!1,t.paused=!0):t.hasPlaylist||t.swappingSrc||(t.playing=!1,t.paused=!0),t.clickedPlay=!1,t.onMediaPause(),t.refreshControls("playpause")})),this.vimeoPlayer.on("playbackratechange",(function(e){t.vimeoPlaybackRate=e.playbackRate})),this.vimeoPlayer.on("texttrackchange",(function(t){})),this.vimeoPlayer.on("volumechange",(function(e){t.volume=10*e.volume})),this.vimeoPlayer.on("error",(function(t){}))},AblePlayer.prototype.addEventListeners=function(){var e;if(e=this,t(window).on("resize",(function(){e.resizePlayer()})),window.MutationObserver){var i=this.$ableDiv[0];new MutationObserver((function(t){t.forEach((function(t){"attributes"===t.type&&"style"===t.attributeName&&e.$ableDiv.is(":visible")&&e.refreshControls("init")}))})).observe(i,{attributes:!0,childList:!0,characterData:!0})}void 0!==this.seekBar?this.addSeekbarListeners():setTimeout((function(){void 0!==e.seekBar&&e.addSeekbarListeners()}),2e3),this.$controllerDiv.find('div[role="button"]').on("click",(function(t){t.stopPropagation(),e.onClickPlayerButton(this)})),t(document).on("click",(function(i){if(0!==i.button)return!1;(t(".able-popup:visible").length||t(".able-volume-popup:visible"))&&e.closePopups(),"VIDEO"===i.target.tagName&&(e.clickedPlay=!0)})),this.$ableDiv.on("mousemove",(function(){e.controlsHidden?(e.fadeControls("in"),e.controlsHidden=!1,"active"===e.hideControlsTimeoutStatus&&(window.clearTimeout(e.hideControlsTimeout),e.hideControlsTimeoutStatus="clear"),e.hideControls&&e.invokeHideControlsTimeout()):"active"===e.hideControlsTimeoutStatus&&(window.clearTimeout(e.hideControlsTimeout),e.hideControlsTimeoutStatus="clear",e.hideControls&&e.invokeHideControlsTimeout())})),t(document).on("keydown",(function(t){e.controlsHidden?(e.fadeControls("in"),e.controlsHidden=!1,"active"===e.hideControlsTimeoutStatus&&(window.clearTimeout(e.hideControlsTimeout),e.hideControlsTimeoutStatus="clear"),e.hideControls&&e.invokeHideControlsTimeout()):"active"===e.hideControlsTimeoutStatus&&(window.clearTimeout(e.hideControlsTimeout),e.hideControlsTimeoutStatus="clear",e.hideControls&&e.invokeHideControlsTimeout())})),this.$ableDiv.on("keydown",(function(t){AblePlayer.nextIndex>1&&e.onPlayerKeyPress(t)})),this.stenoMode&&void 0!==this.stenoFrameContents&&this.stenoFrameContents.on("keydown",(function(t){e.onPlayerKeyPress(t)})),this.$transcriptArea&&this.$transcriptArea.on("keydown",(function(t){AblePlayer.nextIndex>1&&e.onPlayerKeyPress(t)})),this.$playlist&&this.$playlist.on("click",(function(i){e.userClickedPlaylist||(e.userClickedPlaylist=!0,e.playlistIndex=t(this).index(),e.cuePlaylistItem(e.playlistIndex))})),this.$media.on("click",(function(){e.handlePlay()})),"html5"===this.player?this.addHtml5MediaListeners():"vimeo"===this.player?this.addVimeoListeners():"youtube"===this.player&&setInterval((function(){e.onMediaUpdateTime()}),300)}}(jQuery),function(t){AblePlayer.prototype.initDragDrop=function(e){var i,s,a,n,r,o,l,h,p,c,u,d,f;for(i=this,"transcript"===e?(s=this.$transcriptArea,n="transcript-window",a=this.$transcriptToolbar):"sign"===e&&(s=this.$signWindow,n="sign-window",a=this.$signToolbar),a.addClass("able-draggable"),r=t("<div>",{class:"able-resizable"}),o=t("<svg>").attr({width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"none"}),l=1;l<=3;l++)1===l?(h="100",p="0",c="0",u="100"):2===l?(h="33",p="100",c="100",u="33"):3===l&&(h="67",p="100",c="100",u="67"),d=t("<line>").attr({x1:h,y1:p,x2:c,y2:u,"vector-effect":"non-scaling-stroke"}),o.append(d);r.html(o),f=parseInt(s.css("z-index"))+100,r.css("z-index",f),s.append(r),r.html(r.html()),a.on("mousedown mouseup touchstart touchend",(function(t){return t.stopPropagation(),"mousedown"===t.type||"touchstart"===t.type?i.windowMenuClickRegistered||(i.windowMenuClickRegistered=!0,i.startMouseX=t.pageX,i.startMouseY=t.pageY,i.dragDevice="mouse",i.startDrag(e,s)):"mouseup"!==t.type&&"touchend"!==t.type||i.dragging&&"mouse"===i.dragDevice&&i.endDrag(e),!1})),r.on("mousedown mouseup touchstart touchend",(function(t){return t.stopPropagation(),"mousedown"===t.type||"touchstart"===t.type?i.windowMenuClickRegistered||(i.windowMenuClickRegistered=!0,i.startMouseX=t.pageX,i.startMouseY=t.pageY,i.startResize(e,s)):"mouseup"!==t.type&&"touchend"!==t.type||i.resizing&&i.endResize(e),!1})),s.on("click",(function(){i.windowMenuClickRegistered||i.finishingDrag||i.updateZIndex(e),i.finishingDrag=!1})),this.addWindowMenu(e,s,n)},AblePlayer.prototype.addWindowMenu=function(e,i,s){var a,n,r,o,l,h,p,c,u,d;a=this,this.windowMenuClickRegistered=!1,this.finishingDrag=!1,(n=t('<div role="alert"></div>')).addClass("able-alert"),n.hide(),n.appendTo(this.$activeWindow),n.css({top:i.offset().top}),d=this.mediaId+"-"+s+"-menu",r=t("<button>",{type:"button",tabindex:"0","aria-label":this.tt.windowButtonLabel,"aria-haspopup":"true","aria-controls":d,"aria-expanded":"false",class:"able-button-handler-preferences"}),"font"===this.iconType?(o=t("<span>",{class:"icon-preferences","aria-hidden":"true"}),r.append(o)):(l=this.rootPath+"button-icons/"+this.toolbarIconColor+"/preferences.png",o=t("<img>",{src:l,alt:"",role:"presentation"}),r.append(o)),h=t("<span>",{class:"able-clipped"}).text(this.tt.windowButtonLabel),r.append(h),p=this.mediaId+"-"+s+"-tooltip",c=t("<div>",{class:"able-tooltip",id:p}).hide(),r.on("mouseenter focus",(function(e){var i=t(this).attr("aria-label"),s=AblePlayer.localGetElementById(r[0],p).text(i),n={right:"",left:"0px",top:-1*(s.height()+2)+"px"};s.css(n),a.showTooltip(s),t(this).on("mouseleave blur",(function(){AblePlayer.localGetElementById(r[0],p).text("").hide()}))})),u=this.setupPopups(s),"transcript"===e?(this.$transcriptAlert=n,this.$transcriptPopupButton=r,this.$transcriptPopup=u,this.$transcriptToolbar.prepend(n,r,c,u)):"sign"===e&&(this.$signAlert=n,this.$signPopupButton=r,this.$signPopup=u,this.$signToolbar.append(n,r,c,u)),r.on("click mousedown keydown",(function(t){return!a.focusNotClick&&(a.dragging?(a.dragKeys(e,t),!1):(t.stopPropagation(),a.windowMenuClickRegistered||a.finishingDrag||a.handleWindowButtonClick(e,t),void(a.finishingDrag=!1)))})),this.addResizeDialog(e,i)},AblePlayer.prototype.addResizeDialog=function(e,i){var s,a,n,r,o,l,h,p,c,u,d,f,g,m,v,y,b,T,P,k,C,w,D;s=this,"transcript"===e?(a=this.$transcriptPopup,n=this.$transcriptPopupButton):"sign"===e&&(a=this.$signPopup,n=this.$signPopupButton),r=this.mediaId+"-resize-"+e+"-width",o=this.mediaId+"-resize-"+e+"-height",l=i.width(),h=i.height(),p=l/h,c=t("<div></div>",{class:"able-resize-form"}),u=t("<div></div>"),d=t("<div></div>"),f=t("<input>",{type:"text",id:r,value:l}),g=t("<label>",{for:r}).text(this.tt.width),m=t("<div></div>"),v=t("<input>",{type:"text",id:o,value:h}),y=t("<label>",{for:o}).text(this.tt.height),"sign"===e&&(v.prop("readonly",!0),f.on("input",(function(){b=t(this).val(),T=Math.round(b/p,0),v.val(T)}))),P=t('<button class="modal-button">'+this.tt.save+"</button>"),k=t('<button class="modal-button">'+this.tt.cancel+"</button>"),P.on("click",(function(){C=t("#"+r).val(),w=t("#"+o).val(),C===l&&w===h||(s.resizeObject(e,C,w),s.updateCookie(e)),D.hide(),a.hide(),n.trigger("focus")})),k.on("click",(function(){D.hide(),a.hide(),n.trigger("focus")})),d.append(g,f),m.append(y,v),u.append(d,m),c.append(u,"<hr>",P,k),t("body").append(c),D=new AccessibleDialog(c,n,"dialog",!0,this.tt.windowResizeHeading,u,this.tt.closeButtonLabel,"20em"),"transcript"===e?this.transcriptResizeDialog=D:"sign"===e&&(this.signResizeDialog=D)},AblePlayer.prototype.handleWindowButtonClick=function(e,i){var s,a,n,r,o;if(s=this,this.focusNotClick)return!1;if("transcript"===e?(a=this.$transcriptPopup,n=this.$transcriptPopupButton,r=this.$transcriptToolbar):"sign"===e&&(a=this.$signPopup,n=this.$signPopupButton,r=this.$signToolbar),"keydown"===i.type)if(32===i.which||13===i.which)this.windowMenuClickRegistered=!0;else{if(27!==i.which)return!1;a.is(":visible")?a.hide("fast",(function(){s.windowMenuClickRegistered=!1,a.find("li").removeClass("able-focus").attr("tabindex","-1"),n.trigger("focus")})):"sign"===e?this.handleSignToggle():"transcript"===e&&this.handleTranscriptToggle()}else this.windowMenuClickRegistered=!0;a.is(":visible")?(a.hide(200,"",(function(){s.windowMenuClickRegistered=!1})),a.find("li").removeClass("able-focus"),n.attr("aria-expanded","false").trigger("focus")):(this.updateZIndex(e),o=r.outerHeight()-1,a.css("top",o),a.show(200,"",(function(){n.attr("aria-expanded","true"),t(this).find("li").first().trigger("focus").addClass("able-focus"),s.windowMenuClickRegistered=!1})))},AblePlayer.prototype.handleMenuChoice=function(t,e,i){var s,a,n,r,o;if(s=this,"transcript"===t?(a=this.$transcriptArea,n=this.$transcriptPopup,r=this.$transcriptPopupButton,o=this.transcriptResizeDialog):"sign"===t&&(a=this.$signWindow,n=this.$signPopup,r=this.$signPopupButton,o=this.signResizeDialog),this.$activeWindow=a,"keydown"===i.type)return 27===i.which?(n.hide("fast",(function(){s.windowMenuClickRegistered=!1,n.find("li").removeClass("able-focus").attr("tabindex","-1"),r.attr("aria-expanded","false"),r.trigger("focus")})),!1):("close"!==e&&(this.$activeWindow=a),!1);if(n.hide("fast",(function(){s.windowMenuClickRegistered=!1,n.find("li").removeClass("able-focus").attr("tabindex","-1"),r.attr("aria-expanded","false")})),"close"!==e&&r.trigger("focus"),"move"===e)this.$activeWindow.attr("role","application"),this.showedAlert(t)||(this.showAlert(this.tt.windowMoveAlert,t),"transcript"===t?this.showedTranscriptAlert=!0:"sign"===t&&(this.showedSignAlert=!0)),"keydown"===i.type?this.dragDevice="keyboard":this.dragDevice="mouse",this.startDrag(t,a),n.hide().parent().attr("tabindex","-1").trigger("focus");else if("resize"==e){var l=o.getInputs();l&&(l[0].value=a.width(),l[1].value=a.height()),o.show()}else"close"==e&&("transcript"===t?(this.closingTranscript=!0,this.handleTranscriptToggle()):"sign"===t&&(this.closingSign=!0,this.handleSignToggle()))},AblePlayer.prototype.startDrag=function(e,i){var s,a,n,r,o;return s=this,this.$activeWindow||(this.$activeWindow=i),this.dragging=!0,"transcript"===e?a=this.$transcriptPopup:"sign"===e&&(a=this.$signPopup),a.is(":visible")&&a.hide(),this.updateZIndex(e),n=this.$activeWindow.position(),this.dragStartX=n.left,this.dragStartY=n.top,void 0===this.startMouseX?(this.dragDevice="keyboard",this.dragKeyX=this.dragStartX,this.dragKeyY=this.dragStartY,this.startingDrag=!0):(this.dragDevice="mouse",this.dragOffsetX=this.startMouseX-this.dragStartX,this.dragOffsetY=this.startMouseY-this.dragStartY),this.$activeWindow.addClass("able-drag").css({position:"absolute",top:this.dragStartY+"px",left:this.dragStartX+"px"}).trigger("focus"),"mouse"===this.dragDevice?t(document).on("mousemove touchmove",(function(t){s.dragging&&(r=t.pageX-s.dragOffsetX,o=t.pageY-s.dragOffsetY,s.resetDraggedObject(r,o))})):"keyboard"===this.dragDevice&&this.$activeWindow.on("keydown",(function(t){s.dragging&&s.dragKeys(e,t)})),!1},AblePlayer.prototype.dragKeys=function(t,e){if(this.startingDrag)return this.startingDrag=!1,!1;switch(e.which){case 37:case 63234:this.dragKeyX-=10;break;case 38:case 63232:this.dragKeyY-=10;break;case 39:case 63235:this.dragKeyX+=10;break;case 40:case 63233:this.dragKeyY+=10;break;case 13:case 27:return this.endDrag(t),!1;default:return!1}return this.resetDraggedObject(this.dragKeyX,this.dragKeyY),e.preventDefault&&e.preventDefault(),!1},AblePlayer.prototype.resetDraggedObject=function(t,e){this.$activeWindow.css({left:t+"px",top:e+"px"})},AblePlayer.prototype.resizeObject=function(t,e,i){var s;this.$activeWindow.css({width:e+"px",height:i+"px"}),"transcript"===t&&(s=i-50,this.$transcriptDiv.css("height",s+"px"))},AblePlayer.prototype.endDrag=function(e){var i,s;i=this,"transcript"===e?(this.$transcriptPopup,s=this.$transcriptPopupButton):"sign"===e&&(this.$signPopup,s=this.$signPopupButton),t(document).off("mousemove mouseup touchmove touchup"),this.$activeWindow.off("keydown").removeClass("able-drag"),this.$activeWindow.attr("role","dialog"),this.$activeWindow=null,"keyboard"===this.dragDevice&&s.trigger("focus"),this.dragging=!1,this.updateCookie(e),this.startMouseX=void 0,this.startMouseY=void 0,this.windowMenuClickRegistered=!1,this.finishingDrag=!0,setTimeout((function(){i.finishingDrag=!1}),100)},AblePlayer.prototype.isCloseToCorner=function(t,e,i){var s,a,n,r,o,l;return a=(s=t.offset()).top,n=s.left,r=t.width(),o=a+t.height(),l=n+r,Math.abs(o-i)<=10&&Math.abs(l-e)<=10},AblePlayer.prototype.startResize=function(e,i){var s,a,n,r;return s=this,this.$activeWindow=i,this.resizing=!0,"transcript"===e?a=this.$transcriptPopup:"sign"===e&&(a=this.$signPopup),a.is(":visible")&&a.hide().parent().trigger("focus"),this.$activeWindow.position(),this.dragKeyX=this.dragStartX,this.dragKeyY=this.dragStartY,this.dragStartWidth=this.$activeWindow.width(),this.dragStartHeight=this.$activeWindow.height(),t(document).on("mousemove touchmove",(function(t){s.resizing&&(n=s.dragStartWidth+(t.pageX-s.startMouseX),r=s.dragStartHeight+(t.pageY-s.startMouseY),s.resizeObject(e,n,r))})),!1},AblePlayer.prototype.endResize=function(e){var i;"transcript"===e?(this.$transcriptPopup,i=this.$transcriptPopupButton):"sign"===e&&(this.$signPopup,i=this.$signPopupButton),t(document).off("mousemove mouseup touchmove touchup"),this.$activeWindow.off("keydown"),i.show().trigger("focus"),this.resizing=!1,this.$activeWindow.removeClass("able-resize"),this.updateCookie(e),this.windowMenuClickRegistered=!1,this.finishingDrag=!0,setTimeout((function(){this.finishingDrag=!1}),100)}}(jQuery),function(t){AblePlayer.prototype.initSignLanguage=function(){if(!this.isIOS()&&void 0!==this.$media.data("sign-src")&&""!==this.$media.data("sign-src"))return this.hasSignLanguage=!0,void this.injectSignPlayerCode();"html5"===this.player?(this.signFile=this.$sources.first().attr("data-sign-src"),this.signFile?this.isIOS()?(this.hasSignLanguage=!1,this.debug):(this.debug,this.hasSignLanguage=!0,this.injectSignPlayerCode()):this.hasSignLanguage=!1):this.hasSignLanguage=!1},AblePlayer.prototype.injectSignPlayerCode=function(){var e,i,s,a,n;if(this.getDefaultWidth("sign"),e=this.mediaId+"-sign",this.$signVideo=t("<video>",{id:e,tabindex:"-1",muted:!0}),this.signVideo=this.$signVideo[0],this.$media.data("sign-src"))n=t("<source>",{src:this.$media.data("sign-src"),type:"video/"+this.$media.data("sign-src").substr(-3)}),this.$signVideo.append(n);else for(i=0;i<this.$sources.length;i++){if(s=DOMPurify.sanitize(this.$sources[i].getAttribute("data-sign-src")),a=this.$sources[i].getAttribute("type"),!s)return void(this.hasSignLanguage=!1);n=t("<source>",{src:s,type:a}),this.$signVideo.append(n)}this.$signWindow=t("<div>",{class:"able-sign-window",role:"dialog","aria-label":this.tt.sign}),this.$signToolbar=t("<div>",{class:"able-window-toolbar able-"+this.toolbarIconColor+"-controls"}),this.$signWindow.append(this.$signToolbar,this.$signVideo),this.$ableWrapper.append(this.$signWindow),this.initDragDrop("sign"),1===this.prefSign?this.positionDraggableWindow("sign",this.getDefaultWidth("sign")):this.$signWindow.hide()}}(jQuery),function(){var t={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:"Bengali",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",nativeName:"Català"},ch:{name:"Chamorro",nativeName:"Chamoru"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ny:{name:"Chichewa",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:"česky, čeština"},da:{name:"Danish",nativeName:"dansk"},dv:{name:"Divehi",nativeName:"ދިވެހި"},nl:{name:"Dutch",nativeName:"Nederlands, Vlaams"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},et:{name:"Estonian",nativeName:"eesti, eesti keel"},ee:{name:"Ewe",nativeName:"Eʋegbe"},fo:{name:"Faroese",nativeName:"føroyskt"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fi:{name:"Finnish",nativeName:"suomi, suomen kieli"},fr:{name:"French",nativeName:"français, langue française"},ff:{name:"Fula",nativeName:"Fulfulde, Pulaar, Pular"},gl:{name:"Galician",nativeName:"Galego"},ka:{name:"Georgian",nativeName:"ქართული"},de:{name:"German",nativeName:"Deutsch"},el:{name:"Greek",nativeName:"Ελληνικά"},gn:{name:"Guaraní",nativeName:"Avañeẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},ha:{name:"Hausa",nativeName:"Hausa, هَوُسَ"},he:{name:"Hebrew",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:"Originally called Occidental; then Interlingue after WWII"},ga:{name:"Irish",nativeName:"Gaeilge"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ik:{name:"Inupiaq",nativeName:"Iñupiaq, Iñupiatun"},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",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",nativeName:"Gĩkũyũ"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},ky:{name:"Kyrgyz",nativeName:"кыргыз тили"},kv:{name:"Komi",nativeName:"коми кыв"},kg:{name:"Kongo",nativeName:"KiKongo"},ko:{name:"Korean",nativeName:"한국어 (韓國語), 조선말 (朝鮮語)"},ku:{name:"Kurdish",nativeName:"Kurdî, كوردی"},kj:{name:"Kuanyama",nativeName:"Kuanyama"},la:{name:"Latin",nativeName:"latine, lingua latina"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Luganda",nativeName:"Luganda"},li:{name:"Limburgish",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",nativeName:"मराठी"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mn:{name:"Mongolian",nativeName:"монгол"},na:{name:"Nauru",nativeName:"Ekakairũ Naoero"},nv:{name:"Navajo",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",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},cu:{name:"Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Punjabi",nativeName:"ਪੰਜਾਬੀ, پنجابی"},pi:{name:"Pāli",nativeName:"पाऴि"},fa:{name:"Persian",nativeName:"فارسی"},pl:{name:"Polish",nativeName:"polski"},ps:{name:"Pashto",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",nativeName:"română"},ru:{name:"Russian",nativeName:"русский язык"},sa:{name:"Sanskrit",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:"Gaelic",nativeName:"Gàidhlig"},sn:{name:"Shona",nativeName:"chiShona"},si:{name:"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, castellano"},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:"тоҷикӣ, toğikī, تاجیکی"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},tk:{name:"Turkmen",nativeName:"Türkmen, Түркмен"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog, ᜏᜒᜃᜅ᜔ ᜆᜄᜎᜓᜄ᜔"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татарча, tatarça, تاتارچا"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"Uyƣurqə, ئۇيغۇرچە"},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",nativeName:"Saɯ cueŋƅ, Saw cuengh"},"ar-dz":{name:"Arabic (Algeria)",nativeName:"العربية (الجزائر)"},"ar-bh":{name:"Arabic (Bahrain)",nativeName:"العربية (البحرين)"},"ar-eg":{name:"Arabic (Egypt)",nativeName:"العربية (مصر)"},"ar-iq":{name:"Arabic (Iraq)",nativeName:"العربية (العراق)"},"ar-jo":{name:"Arabic (Jordan)",nativeName:"العربية (الأردن)"},"ar-kw":{name:"Arabic (Kuwait)",nativeName:"العربية (الكويت)"},"ar-lb":{name:"Arabic (Lebanon)",nativeName:"العربية (لبنان)"},"ar-ly":{name:"Arabic (Libya)",nativeName:"العربية (ليبيا)"},"ar-ma":{name:"Arabic (Morocco)",nativeName:"العربية (المملكة المغربية)"},"ar-om":{name:"Arabic (Oman)",nativeName:"العربية (عمان)"},"ar-qa":{name:"Arabic (Qatar)",nativeName:"العربية (قطر)"},"ar-sa":{name:"Arabic (Saudi Arabia)",nativeName:"العربية (المملكة العربية السعودية)"},"ar-sy":{name:"Arabic (Syria)",nativeName:"العربية (سوريا)"},"ar-tn":{name:"Arabic (Tunisia)",nativeName:"العربية (تونس)"},"ar-ae":{name:"Arabic (U.A.E.)",nativeName:"العربية (الإمارات العربية المتحدة)"},"ar-ye":{name:"Arabic (Yemen)",nativeName:"العربية (اليمن)"},"de-at":{name:"German (Austria)",nativeName:"Deutsch (Österreich)"},"de-li":{name:"German (Liechtenstein)",nativeName:"Deutsch (Liechtenstein)"},"de-lu":{name:"German (Luxembourg)",nativeName:"Deutsch (Luxemburg)"},"de-ch":{name:"German (Switzerland)",nativeName:"Deutsch (Schweiz)"},"en-au":{name:"English (Australia)",nativeName:"English (Australia)"},"en-bz":{name:"English (Belize)",nativeName:"English (Belize)"},"en-ca":{name:"English (Canada)",nativeName:"English (Canada)"},"en-ie":{name:"English (Ireland)",nativeName:"English (Ireland)"},"en-jm":{name:"English (Jamaica)",nativeName:"English (Jamaica)"},"en-nz":{name:"English (New Zealand)",nativeName:""},"en-za":{name:"English (South Africa)",nativeName:"English (South Africa)"},"en-tt":{name:"English (Trinidad)",nativeName:"English (Trinidad y Tobago)"},"en-gb":{name:"English (United Kingdom)",nativeName:"English (United Kingdom)"},"en-us":{name:"English (United States)",nativeName:"English (United States)"},"es-ar":{name:"Spanish (Argentina)",nativeName:"Español (Argentina)"},"es-bo":{name:"Spanish (Bolivia)",nativeName:"Español (Bolivia)"},"es-cl":{name:"Spanish (Chile)",nativeName:"Español (Chile)"},"es-co":{name:"Spanish (Colombia)",nativeName:"Español (Colombia)"},"es-cr":{name:"Spanish (Costa Rica)",nativeName:"Español (Costa Rica)"},"es-do":{name:"Spanish (Dominican Republic)",nativeName:"Español (República Dominicana)"},"es-ec":{name:"Spanish (Ecuador)",nativeName:"Español (Ecuador)"},"es-sv":{name:"Spanish (El Salvador)",nativeName:"Español (El Salvador)"},"es-gt":{name:"Spanish (Guatemala)",nativeName:"Español (Guatemala)"},"es-hn":{name:"Spanish (Honduras)",nativeName:"Español (Honduras)"},"es-mx":{name:"Spanish (Mexico)",nativeName:"Español (México)"},"es-ni":{name:"Spanish (Nicaragua)",nativeName:"Español (Nicaragua)"},"es-pa":{name:"Spanish (Panama)",nativeName:"Español (Panamá)"},"es-py":{name:"Spanish (Paraguay)",nativeName:"Español (Paraguay)"},"es-pe":{name:"Spanish (Peru)",nativeName:"Español (Perú)"},"es-pr":{name:"Spanish (Puerto Rico)",nativeName:"Español (Puerto Rico)"},"es-uy":{name:"Spanish (Uruguay)",nativeName:"Español (Uruguay)"},"es-ve":{name:"Spanish (Venezuela)",nativeName:"Español (Venezuela)"},"fr-be":{name:"French (Belgium)",nativeName:"français (Belgique)"},"fr-ca":{name:"French (Canada)",nativeName:"français (Canada)"},"fr-lu":{name:"French (Luxembourg)",nativeName:"français (Luxembourg)"},"fr-ch":{name:"French (Switzerland)",nativeName:"français (Suisse)"},"it-ch":{name:"Italian (Switzerland)",nativeName:"italiano (Svizzera)"},"nl-be":{name:"Dutch (Belgium)",nativeName:"Nederlands (België)"},"pt-br":{name:"Portuguese (Brazil)",nativeName:"Português (Brasil)"},"sv-fi":{name:"Swedish (Finland)",nativeName:"svenska (Finland)"},"zh-hk":{name:"Chinese (Hong Kong)",nativeName:"中文(香港特别行政區)"},"zh-cn":{name:"Chinese (PRC)",nativeName:"中文(中华人民共和国)"},"zh-sg":{name:"Chinese (Singapore)",nativeName:"中文(新加坡)"},"zh-tw":{name:"Chinese Traditional (Taiwan)",nativeName:"中文(台灣)"}};AblePlayer.prototype.getLanguageName=function(e,i){var s,a,n;return(s=t[e.toLowerCase()])?"local"===i?s.nativeName:s.name:e.includes("-")&&(a=e.substring(0,2),n=e.substring(3),s=t[a.toLowerCase()])?"local"===i?s.nativeName+" ("+n+")":s.name+" ("+n+")":e}}(jQuery),function(t){AblePlayer.prototype.getSupportedLangs=function(){return["ca","cs","da","de","en","es","fr","he","id","it","ja","nb","nl","pt","pt-br","sv","tr","zh-tw"]},AblePlayer.prototype.getTranslationText=function(){var e,i,s,a,n,r,o;if(e=t.Deferred(),i=this,s=this.getSupportedLangs(),this.lang&&-1===t.inArray(this.lang,s))if(2==this.lang.indexOf("-"))-1!==t.inArray(this.lang.substring(0,2),s)?this.lang=this.lang.substring(0,2):this.lang=null;else{for(o=!1,r=0;r<s.length;)s[r].substring(0,2)==this.lang&&(this.lang=s[r],o=!0),r++;o||(this.lang=null)}return this.lang||(a=t("body").attr("lang")?t("body").attr("lang").toLowerCase():t("html").attr("lang")?t("html").attr("lang").toLowerCase():null)&&(-1!==t.inArray(a,s)?this.lang=a:2==a.indexOf("-")&&-1!==t.inArray(a.substring(0,2),s)&&(this.lang=a.substring(0,2))),this.lang||(this.lang="en"),this.searchLang||(this.searchLang=this.lang),n=this.rootPath+"translations/"+this.lang+".js",t.getJSON(n,(function(t){i.tt=t,e.resolve()})).fail((function(){i.provideFallback(),e.fail()})),e.promise()},AblePlayer.prototype.getSampleDescriptionText=function(){var e,i,s,a,n,r;for(i=this.getSupportedLangs(),e=this,this.sampleText=[],s=0;s<i.length;s++)a=this.rootPath+"translations/"+i[s]+".js",t.getJSON(a,undefined,function(t){return function(i){n=i.sampleDescriptionText,r={lang:t,text:n},e.sampleText.push(r)}}(i[s]))}}(jQuery),function(t){AblePlayer.prototype.injectVTS=function(){var e,i,s,a,n,r,o,l,h,p,c,u,d,f,g,m,v;if(e=this,t("#able-vts").length&&this.vtsTracks.length){for(k in this.langs=[],this.getAllLangs(this.vtsTracks),this.vtsLang=this.lang,i=t("<h2>").text("Video Transcript Sorter"),t("#able-vts").append(i),this.$vtsAlert=t("<div>",{id:"able-vts-alert","aria-live":"polite","aria-atomic":"true"}),t("#able-vts").append(this.$vtsAlert),s=t("<div>",{id:"able-vts-instructions"}),a=t("<p>").text("Use the Video Transcript Sorter to modify text tracks:"),r=t("<ul>"),o=t("<li>").text("Reorder chapters, descriptions, captions, and/or subtitles so they appear in the proper sequence in Able Player's auto-generated transcript."),l=t("<li>").text("Modify content or start/end times (all are directly editable within the table)."),h=t("<li>").text("Add new content, such as chapters or descriptions."),n=t("<p>").text('After editing, click the "Save Changes" button to generate new content for all relevant timed text files. The new text can be copied and pasted into new WebVTT files.'),r.append(o,l,h),s.append(a,r,n),t("#able-vts").append(s),p=t("<fieldset>"),c=t("<legend>").text("Select a language"),p.append(c),this.langs)d="vts-lang-radio-"+this.langs[k],u=t("<div>",{}),g=t("<input>",{type:"radio",name:"vts-lang",id:d,value:this.langs[k]}).on("click",(function(){e.vtsLang=t(this).val(),e.showVtsAlert("Loading "+e.getLanguageName(e.vtsLang)+" tracks"),e.injectVtsTable("update",e.vtsLang)})),this.langs[k]==this.lang&&g.prop("checked",!0),f=t("<label>",{for:d}).text(this.getLanguageName(this.langs[k])),u.append(g,f),p.append(u);var y,b,T,P,k;t("#able-vts").append(p),m=t("<button>",{type:"button",id:"able-vts-save",value:"save"}).text("Save Changes"),t("#able-vts").append(m),this.injectVtsTable("add",this.vtsLang),y=["captions","chapters","descriptions","subtitles"],t('td[contenteditable="true"]').on("focus",(function(){b=t(this).text()})).on("blur",(function(){b!=t(this).text()&&(T=t(this).index(),P=t(this).text(),1===T?-1===t.inArray(P,y)&&("s"===P.substring(0,1)?t(this).text("subtitles"):"d"===P.substring(0,1)?t(this).text("descriptions"):"ch"===P.substring(0,2)?t(this).text("chapters"):t(this).text("captions")):2!==T&&3!==T||t(this).text(e.formatTimestamp(P)))})).on("keydown",(function(t){t.stopPropagation()})),t("#able-vts-save").on("click",(function(i){i.stopPropagation(),"save"==t(this).attr("value")?(t(this).attr("value","cancel").text("Return to Editor"),v=t("#able-vts table"),t("#able-vts-instructions").hide(),t("#able-vts > fieldset").hide(),t("#able-vts table").remove(),t("#able-vts-icon-credit").remove(),e.parseVtsOutput(v)):(t(this).attr("value","save").text("Save Changes"),t("#able-vts-output").remove(),t("#able-vts-instructions").show(),t("#able-vts > fieldset").show(),t("#able-vts").append(v),t("#able-vts").append(e.getIconCredit()),e.showVtsAlert("Cancelling saving. Any edits you made have been restored in the VTS table."))}))}},AblePlayer.prototype.setupVtsTracks=function(t,e,i,s,a,n){var r,o;r=this.getFilenameFromPath(a),o=this.parseVtsTracks(n),this.vtsTracks.push({kind:t,language:e,label:s,srcFile:r,cues:o})},AblePlayer.prototype.getFilenameFromPath=function(t){var e;return-1===(e=t.lastIndexOf("/"))?t:t.substring(e+1)},AblePlayer.prototype.getFilenameFromTracks=function(t,e){for(var i=0;i<this.vtsTracks.length;i++)if(this.vtsTracks[i].kind===t&&this.vtsTracks[i].language===e)return this.vtsTracks[i].srcFile;return!1},AblePlayer.prototype.parseVtsTracks=function(t){var e,i,s,a,n,r,o,l,h;for(e=t.split("\n"),s=[],a=0;a<e.length;)if(-1!==(r=e[a]).indexOf(" --\x3e ")){if(i=r.trim().split(" "),this.isValidTimestamp(i[0])&&this.isValidTimestamp(i[2])){for(l="",n=a+1,h=!1;n<e.length&&!h;)(o=e[n].trim()).length>0?l.length>0?l+="\n"+o:l+=o:h=!0,n++;s.push({start:i[0],end:i[2],content:l}),a=n}}else a++;return s},AblePlayer.prototype.isValidTimestamp=function(t){return!!/^[0-9:,.]*$/.test(t)},AblePlayer.prototype.formatTimestamp=function(t){var e,i;if(e=t.substring(0,t.lastIndexOf(".")+1),(i=t.substring(t.lastIndexOf(".")+1)).length>3)i=i.substring(0,3);else if(i.length<3)for(;i.length<3;)i+="0";return e+i},AblePlayer.prototype.injectVtsTable=function(e,i){var s,a,n,r,o,l,h,p,c;for("update"===e&&(t("#able-vts table").remove(),t("#able-vts-icon-credit").remove()),s=t("<table>",{lang:i}),a=t("<thead>"),o=t("<tr>",{lang:"en"}),n=["Row","Kind","Start","End","Content","Actions"],r=0;r<n.length;r++)l=t("<th>",{scope:"col"}).text(n[r]),"Actions"===n[r]&&l.addClass("actions"),o.append(l);for(a.append(o),s.append(a),p=this.getAllRows(i),r=0;r<p.length;r++)o=t("<tr>",{id:"able-vts-row-"+(c=r+1),class:"kind-"+p[r].kind}),h=t("<td>").text(c),o.append(h),h=t("<td>",{contenteditable:"true"}).text(p[r].kind),o.append(h),h=t("<td>",{contenteditable:"true"}).text(p[r].start),o.append(h),h=t("<td>",{contenteditable:"true"}).text(p[r].end),o.append(h),h=t("<td>",{contenteditable:"true"}).text(p[r].content),o.append(h),h=this.addVtsActionButtons(c,p.length),o.append(h),s.append(o);t("#able-vts").append(s),t("#able-vts").append(this.getIconCredit())},AblePlayer.prototype.addVtsActionButtons=function(e,i){var s,a,n,r,o,l,h,p,c,u;for(s=this,a=t("<td>"),n=["up","down","insert","delete"],r=0;r<n.length;r++)"up"===(o=n[r])?e>1&&(l=t("<button>",{id:"able-vts-button-up-"+e,title:"Move up","aria-label":"Move Row "+e+" up"}).on("click",(function(t){s.onClickVtsActionButton(t.currentTarget)})),h=t("<svg>",{focusable:"false","aria-hidden":"true",x:"0px",y:"0px",width:"254.296px",height:"254.296px",viewBox:"0 0 254.296 254.296",style:"enable-background:new 0 0 254.296 254.296"}),c=t("<path>",{d:"M249.628,176.101L138.421,52.88c-6.198-6.929-16.241-6.929-22.407,0l-0.381,0.636L4.648,176.101c-6.198,6.897-6.198,18.052,0,24.981l0.191,0.159c2.892,3.305,6.865,5.371,11.346,5.371h221.937c4.577,0,8.613-2.161,11.41-5.594l0.064,0.064C255.857,194.153,255.857,182.998,249.628,176.101z"}),p=t("<g>").append(c),h.append(p),l.append(h),l.html(l.html()),a.append(l)):"down"===o?e<i&&(l=t("<button>",{id:"able-vts-button-down-"+e,title:"Move down","aria-label":"Move Row "+e+" down"}).on("click",(function(t){s.onClickVtsActionButton(t.currentTarget)})),h=t("<svg>",{focusable:"false","aria-hidden":"true",x:"0px",y:"0px",width:"292.362px",height:"292.362px",viewBox:"0 0 292.362 292.362",style:"enable-background:new 0 0 292.362 292.362"}),c=t("<path>",{d:"M286.935,69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952,0-9.233,1.807-12.85,5.424C1.807,72.998,0,77.279,0,82.228c0,4.948,1.807,9.229,5.424,12.847l127.907,127.907c3.621,3.617,7.902,5.428,12.85,5.428s9.233-1.811,12.847-5.428L286.935,95.074c3.613-3.617,5.427-7.898,5.427-12.847C292.362,77.279,290.548,72.998,286.935,69.377z"}),p=t("<g>").append(c),h.append(p),l.append(h),l.html(l.html()),a.append(l)):"insert"===o?(l=t("<button>",{id:"able-vts-button-insert-"+e,title:"Insert row below","aria-label":"Insert row before Row "+e}).on("click",(function(t){s.onClickVtsActionButton(t.currentTarget)})),h=t("<svg>",{focusable:"false","aria-hidden":"true",x:"0px",y:"0px",width:"401.994px",height:"401.994px",viewBox:"0 0 401.994 401.994",style:"enable-background:new 0 0 401.994 401.994"}),c=t("<path>",{d:"M394,154.175c-5.331-5.33-11.806-7.994-19.417-7.994H255.811V27.406c0-7.611-2.666-14.084-7.994-19.414C242.488,2.666,236.02,0,228.398,0h-54.812c-7.612,0-14.084,2.663-19.414,7.993c-5.33,5.33-7.994,11.803-7.994,19.414v118.775H27.407c-7.611,0-14.084,2.664-19.414,7.994S0,165.973,0,173.589v54.819c0,7.618,2.662,14.086,7.992,19.411c5.33,5.332,11.803,7.994,19.414,7.994h118.771V374.59c0,7.611,2.664,14.089,7.994,19.417c5.33,5.325,11.802,7.987,19.414,7.987h54.816c7.617,0,14.086-2.662,19.417-7.987c5.332-5.331,7.994-11.806,7.994-19.417V255.813h118.77c7.618,0,14.089-2.662,19.417-7.994c5.329-5.325,7.994-11.793,7.994-19.411v-54.819C401.991,165.973,399.332,159.502,394,154.175z"}),p=t("<g>").append(c),h.append(p),l.append(h),l.html(l.html()),a.append(l)):"delete"===o&&(l=t("<button>",{id:"able-vts-button-delete-"+e,title:"Delete row ","aria-label":"Delete Row "+e}).on("click",(function(t){s.onClickVtsActionButton(t.currentTarget)})),h=t("<svg>",{focusable:"false","aria-hidden":"true",x:"0px",y:"0px",width:"508.52px",height:"508.52px",viewBox:"0 0 508.52 508.52",style:"enable-background:new 0 0 508.52 508.52"}),c=t("<path>",{d:"M397.281,31.782h-63.565C333.716,14.239,319.478,0,301.934,0h-95.347c-17.544,0-31.782,14.239-31.782,31.782h-63.565c-17.544,0-31.782,14.239-31.782,31.782h349.607C429.063,46.021,414.825,31.782,397.281,31.782z"}),u=t("<path>",{d:"M79.456,476.737c0,17.544,14.239,31.782,31.782,31.782h286.042c17.544,0,31.782-14.239,31.782-31.782V95.347H79.456V476.737z M333.716,174.804c0-8.772,7.151-15.891,15.891-15.891c8.74,0,15.891,7.119,15.891,15.891v254.26c0,8.74-7.151,15.891-15.891,15.891c-8.74,0-15.891-7.151-15.891-15.891V174.804zM238.369,174.804c0-8.772,7.119-15.891,15.891-15.891c8.74,0,15.891,7.119,15.891,15.891v254.26c0,8.74-7.151,15.891-15.891,15.891c-8.772,0-15.891-7.151-15.891-15.891V174.804z M143.021,174.804c0-8.772,7.119-15.891,15.891-15.891c8.772,0,15.891,7.119,15.891,15.891v254.26c0,8.74-7.119,15.891-15.891,15.891c-8.772,0-15.891-7.151-15.891-15.891V174.804z"}),p=t("<g>").append(c,u),h.append(p),l.append(h),l.html(l.html()),a.append(l));return a},AblePlayer.prototype.updateVtsActionButtons=function(t,e){var i,s,a,n,r,o;for(i=0;i<t.length;i++)a=(s=t.eq(i)).attr("id"),n=s.attr("aria-label"),r=a.replace(/[0-9]+/g,e),o=n.replace(/[0-9]+/g,e),s.attr("id",r),s.attr("aria-label",o)},AblePlayer.prototype.getIconCredit=function(){return'<div id="able-vts-icon-credit">Action buttons made by <a target="_blank" rel="noreferrer" href="https://www.elegantthemes.com">Elegant Themes</a> from <a target="_blank" rel="noreferrer" href="https://www.flaticon.com">flaticon</a> are licensed by <a target="_blank" rel="noreferrer" href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC 3.0 BY</a></div>'},AblePlayer.prototype.getAllLangs=function(e){var i;for(i in e)e[i].hasOwnProperty("language")&&-1===t.inArray(e[i].language,this.langs)&&(this.langs[this.langs.length]=e[i].language)},AblePlayer.prototype.getAllRows=function(t){var e,i,s,a;for(a=[],e=0;e<this.vtsTracks.length;e++)if((i=this.vtsTracks[e]).language==t)for(s in i.cues)a.push({kind:i.kind,lang:t,id:i.cues[s].id,start:i.cues[s].start,end:i.cues[s].end,content:i.cues[s].content});return a.sort((function(t,e){return t.start>e.start?1:-1})),a},AblePlayer.prototype.onClickVtsActionButton=function(e){var i,s,a;s=(i=t(e).attr("id").split("-"))[3],a=i[4],"up"==s?this.moveRow(a,"up"):"down"==s?this.moveRow(a,"down"):"insert"==s?this.insertRow(a):"delete"==s&&this.deleteRow(a)},AblePlayer.prototype.insertRow=function(e){var i,s,a,n,r,o,l,h,p,c,u,d,f,g,m;for(a=(s=(i=t("#able-vts table")).find("tr")).length-1,n=parseInt(e)+1,r=t("<tr>",{id:"able-vts-row-"+n}),o=t("<td>").text(n),r.append(o),u=null,l=t("<select>",{id:"able-vts-kind-"+n,"aria-label":"What kind of track is this?",placeholder:"Select a kind"}).on("change",(function(){u=t(this).val(),d="kind-"+u,f=t(this).closest("tr"),t(this).parent().text(u),f.addClass(d)})),h=["","captions","chapters","descriptions","subtitles"],p=0;p<h.length;p++)c=t("<option>",{value:h[p]}).text(h[p]),l.append(c);for(o=t("<td>").append(l),r.append(o),o=t("<td>",{contenteditable:"true"}),r.append(o),o=t("<td>",{contenteditable:"true"}),r.append(o),o=t("<td>",{contenteditable:"true"}),r.append(o),o=this.addVtsActionButtons(n,a),r.append(o),i.find("tr").eq(e).after(r),p=n;p<=a;p++)g=p+1,s.eq(p).attr("id","able-vts-row-"+g),s.eq(p).find("td").eq(0).text(g),m=s.eq(p).find("button"),this.updateVtsActionButtons(m,g);this.adjustTimes(n),this.showVtsAlert("A new row "+n+" has been inserted"),l.trigger("focus")},AblePlayer.prototype.deleteRow=function(e){var i,s,a,n,r,o;for((i=t("#able-vts table"))[0].deleteRow(e),a=(s=i.find("tr")).length-1,n=e;n<=a;n++)r=n,s.eq(n).attr("id","able-vts-row-"+r),s.eq(n).find("td").eq(0).text(r),o=s.eq(n).find("button"),this.updateVtsActionButtons(o,r);this.showVtsAlert("Row "+e+" has been deleted")},AblePlayer.prototype.moveRow=function(e,i){var s,a,n,r;t("#able-vts table").find("tr"),s=t("#able-vts table").find("tr").eq(e),"up"==i?(a=parseInt(e)-1,(n=t("#able-vts table").find("tr").eq(a)).before(s)):"down"==i&&(a=parseInt(e)+1,(n=t("#able-vts table").find("tr").eq(a)).after(s)),s.attr("id","able-vts-row-"+a),s.find("td").eq(0).text(a),this.updateVtsActionButtons(s.find("button"),a),n.attr("id","able-vts-row-"+e),n.find("td").eq(0).text(e),this.updateVtsActionButtons(n.find("button"),e),this.adjustTimes(a),r="Row "+e+" has been moved "+i,r+=" and is now Row "+a,this.showVtsAlert(r)},AblePlayer.prototype.adjustTimes=function(e){var i,s,a,n,r,o,l,h,p,c,u,d,f,g,m,v;(i=[]).captions=.001,i.descriptions=.001,i.chapters=.001,h=(r=(s=t("#able-vts table").find("tr")).eq(e)).is('[class^="kind-"]')?this.getKindFromClass(r.attr("class")):"captions",u=this.getSecondsFromColonTime(r.find("td").eq(2).text()),g=this.getSecondsFromColonTime(r.find("td").eq(3).text()),e>1?(a=e-1,p=(o=s.eq(a)).is('[class^="kind-"]')?this.getKindFromClass(o.attr("class")):null,d=this.getSecondsFromColonTime(o.find("td").eq(2).text()),m=this.getSecondsFromColonTime(o.find("td").eq(3).text())):(a=null,o=null,p=null,d=null,m=null),e<s.length-1?(n=e+1,c=(l=s.eq(n)).is('[class^="kind-"]')?this.getKindFromClass(l.attr("class")):null,f=this.getSecondsFromColonTime(l.find("td").eq(2).text()),v=this.getSecondsFromColonTime(l.find("td").eq(3).text())):(n=null,l=null,c=null,f=null,v=null),isNaN(u)?(null==p&&(p="captions",o.attr("class","kind-captions"),o.find("td").eq(1).html("captions")),"captions"===p?(u=(parseFloat(m)+.001).toFixed(3),g=f?(parseFloat(f)-.001).toFixed(3):(parseFloat(u)+i[h]).toFixed(3)):"chapters"===p?(u=(parseFloat(d)+.001).toFixed(3),g=f?(parseFloat(f)-.001).toFixed(3):(parseFloat(u)+minDurartion[h]).toFixed(3)):"descriptions"===p&&(u=(parseFloat(d)+i.descriptions).toFixed(3),g=(parseFloat(u)+i.descriptions).toFixed(3))):d?d<u?u<f||(f=(parseFloat(u)+i[h]).toFixed(3),v=(parseFloat(f)+i[c]).toFixed(3)):(u=(parseFloat(d)+i[p]).toFixed(3),g=(parseFloat(u)+i[h]).toFixed(3)):u<f||(f=(parseFloat(u)+i[h]).toFixed(3),v=(parseFloat(f)+i[c]).toFixed(3)),g-u<i[h]&&(g=(parseFloat(u)+i[h]).toFixed(3),f&&(f=(parseFloat(g)+.001).toFixed(3))),r.find("td").eq(2).text(this.formatSecondsAsColonTime(u,!0)),r.find("td").eq(3).text(this.formatSecondsAsColonTime(g,!0)),o&&(o.find("td").eq(2).text(this.formatSecondsAsColonTime(d,!0)),o.find("td").eq(3).text(this.formatSecondsAsColonTime(m,!0))),l&&(l.find("td").eq(2).text(this.formatSecondsAsColonTime(f,!0)),l.find("td").eq(3).text(this.formatSecondsAsColonTime(v,!0)))},AblePlayer.prototype.getKindFromClass=function(t){var e,i;return e=t.indexOf("kind-")+5,-1==(i=t.indexOf(" ",e))?t.substring(e):t.substring(e,i)},AblePlayer.prototype.showVtsAlert=function(t){this.$vtsAlert.text(t).show().delay(3e3).fadeOut("slow")},AblePlayer.prototype.parseVtsOutput=function(e){var i,s,a,n,r,o,l,h,p,c;for(i=e.attr("lang"),a=["captions","chapters","descriptions","subtitles"],r={},s=0;s<a.length;s++)r[n=a[s]]="WEBVTT\n\n";if((o=e.find("tr")).length>0)for(s=0;s<o.length;s++)n=o.eq(s).find("td").eq(1).text(),-1!==t.inArray(n,a)&&(l=o.eq(s).find("td").eq(2).text(),h=o.eq(s).find("td").eq(3).text(),p=o.eq(s).find("td").eq(4).text(),void 0!==l&&void 0!==h&&(r[n]+=l+" --\x3e "+h+"\n","undefined"!==p&&(r[n]+=p),r[n]+="\n\n"));for(c=t("<div>",{id:"able-vts-output"}),t("#able-vts").append(c),s=0;s<a.length;s++)r[n=a[s]].length>8&&this.showWebVttOutput(n,r[n],i)},AblePlayer.prototype.showWebVttOutput=function(e,i,s){var a,n,r,o,l;a=t("<h3>").text(e.charAt(0).toUpperCase()+e.slice(1)),o="If you made changes, copy/paste the following content ",(n=this.getFilenameFromTracks(e,s))?(o+="to replace the original content of your "+this.getLanguageName(s)+" ",o+="<em>"+e+"</em> WebVTT file (<strong>"+n+"</strong>)."):o+="into a new "+this.getLanguageName(s)+" <em>"+e+"</em> WebVTT file.",r=t("<p>",{class:"able-vts-output-instructions"}).html(o),l=t("<textarea>").text(i),t("#able-vts-output").append(a,r,l)}}(jQuery),function(t){AblePlayer.prototype.initVimeoPlayer=function(){var e,i,s,a,n,r;return e=this,s=(i=new t.Deferred).promise(),a=this.mediaId+"_vimeo",this.$mediaContainer.prepend(t("<div>").attr("id",a)),n=this.vimeoDescId&&this.prefDesc?this.vimeoDescId:this.vimeoId,this.activeVimeoId=n,this.okToPlay?"true":"false",r=this.playerWidth?this.vimeoUrlHasParams?{url:n,width:this.playerWidth,controls:!1}:{id:n,width:this.playerWidth,controls:!1}:this.vimeoUrlHasParams?{url:n,controls:!1}:{id:n,controls:!1},this.vimeoPlayer=new Vimeo.Player(a,r),this.vimeoPlayer.ready().then((function(){t("#"+a).children("iframe").attr({tabindex:"-1","aria-hidden":!0}),e.vimeoPlayer.getVideoWidth().then((function(t){t&&e.vimeoPlayer.getVideoHeight().then((function(i){i&&e.resizePlayer(t,i)}))})).catch((function(t){})),e.hasPlaylist||(e.$media.remove(),e.vimeoPlaybackRate=1,e.vimeoPlayer.setPlaybackRate(e.vimeoPlaybackRate).then((function(t){e.vimeoSupportsPlaybackRateChange=!0})).catch((function(t){e.vimeoSupportsPlaybackRateChange=!1})),i.resolve())})),s},AblePlayer.prototype.getVimeoPaused=function(){var e,i;return i=(e=new t.Deferred).promise(),this.vimeoPlayer.getPaused().then((function(t){e.resolve(t)})),i},AblePlayer.prototype.getVimeoEnded=function(){var e,i;return i=(e=new t.Deferred).promise(),this.vimeoPlayer.getEnded().then((function(t){e.resolve(t)})),i},AblePlayer.prototype.getVimeoState=function(){var e,i,s,a,n;return i=(e=new t.Deferred).promise(),s=[],a=this.vimeoPlayer.getPaused(),n=this.vimeoPlayer.getEnded(),s.push(a),s.push(n),a.then((function(t){e.resolve(t)})),n.then((function(t){e.resolve(t)})),t.when.apply(t,s).then((function(){e.resolve()})),i},AblePlayer.prototype.getVimeoCaptionTracks=function(){var e,i,s,a=new t.Deferred,n=a.promise();return e=this,this.vimeoPlayer.getTextTracks().then((function(t){if(t.length){for(i=0;i<t.length;i++)e.hasCaptions=!0,1===e.prefCaptions?e.captionsOn=!0:e.captionsOn=!1,s=t[i].language===e.lang,e.tracks.push({kind:t[i].kind,language:t[i].language,label:t[i].label,def:s});e.captions=e.tracks,e.hasCaptions=!0,e.setupPopups("captions"),a.resolve()}else e.hasCaptions=!1,e.usingVimeoCaptions=!1,a.resolve()})),n},AblePlayer.prototype.getVimeoPosterUrl=function(t,e){var i="https://img.youtube.com/vi/"+youTubeId;return"120"==e?i+"/default.jpg":"320"==e||"480"==e?i+"/hqdefault.jpg":"640"==e&&i+"/sddefault.jpg"},AblePlayer.prototype.getVimeoId=function(t){return this.vimeoUrlHasParams=!1,"number"==typeof t?t:(urlObject=new URL(t),"vimeo.com"===urlObject.hostname||"player.vimeo.com"===urlObject.hostname?""!==urlObject.search?(this.vimeoUrlHasParams=!0,t):urlObject.pathname.replace("/video/",""):t)}}(jQuery);