if (typeof PingVpConfig == 'undefined') { 
var PingVpTracker=null,PingVpProtocol=("https:"==document.location.protocol?"https:":"http:"),PingVpConfig={"videoScriptsUri":"https:\/\/www.pingvp.com\/p\/","postersUri":"https:\/\/www.pingvp.com\/public\/posters\/","videosUri":"https:\/\/elsevier.pingvp.com\/","playerUri":"https:\/\/www.pingvp.com\/public\/webplayers\/6-1r2\/","imagesUri":"https:\/\/www.pingvp.com\/public\/playerimages\/","eventLogUri":"https:\/\/www.pingvp.com\/a.php","uaList":[{"weight":1,"regex":"iPhone","player":2},{"weight":2,"regex":"MSIE 6","player":1},{"weight":2,"regex":"MSIE 7","player":1},{"weight":2,"regex":"MSIE 8","player":1},{"weight":2,"regex":"MSIE 9","player":1},{"weight":3,"regex":"","player":2}],"brandingLogoSrc":"","brandingEndcardBg16x9":"","brandingEndcardBg1x1":"","brandingEndcardBg9x16":"","brandingEndcardColor":"","brandingEndcardFontSize":"","brandingEndcardBtnColor":"","brandingEndcardBtnBgColor":"","brandingEndcardBtnFontSize":"","brandingEndcardBtnHoverColor":"","brandingEndcardBtnHoverBgColor":"","brandingEndcardFont":"","subtitlesTextFontFamily":"Proportional Sans-Serif","subtitlesTextColor":"#ffffff","subtitlesTextSize":100,"subtitlesTextOpacity":100,"subtitlesTextOutline":"outline","subtitlesBackgroundColor":"#ffffff","subtitlesBackgroundBlur":true,"subtitlesBackgroundOpacity":0,"subtitlesWindowColor":"#ffffff","subtitlesWindowOpacity":0};
/*!
 *
 * __________.__             ____   ______________ 
 * \______   \__| ____    ___\   \ /   /\______   \
 *  |     ___/  |/    \  / ___\   Y   /  |     ___/
 *  |    |   |  |   |  \/ /_/  >     /   |    |    
 *  |____|   |__|___|  /\___  / \___/    |____|    
 *                   \//_____/                     
 *
 * PingVP Player https://www.pingvp.com/
 * Copyright (c) 2013-2025 PingVP. All rights reserved. 
 *
 */
 // *** 
if(typeof $ != 'undefined'){var jQuery = $;} 
if (typeof jQuery == 'undefined') { 
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});} 
if(typeof $ == 'undefined'){var $ = jQuery;} 
// *** 
(function($hx_exports,$global){$hx_exports.pingvp=$hx_exports.pingvp||{};$hx_exports.haxe=$hx_exports.haxe||{};$hx_exports.haxe["remoting"]=$hx_exports.haxe["remoting"]||{};var $hxClasses={},$estr=function(){return js_Boot.__string_rec(this,"")};function $extend(from,fields){function Inherit(){}Inherit.prototype=from;var proto=new Inherit();for(var name in fields){proto[name]=fields[name]}if(fields.toString!==Object.prototype.toString){proto.toString=fields.toString}return proto}var EReg=function(r,opt){this.r=new RegExp(r,opt.split("u").join(""))};$hxClasses.EReg=EReg;EReg.__name__=["EReg"];EReg.prototype={match:function(s){if(this.r.global){this.r.lastIndex=0}this.r.m=this.r.exec(s);this.r.s=s;return this.r.m!=null},__class__:EReg};var HxOverrides=function(){};$hxClasses.HxOverrides=HxOverrides;HxOverrides.__name__=["HxOverrides"];HxOverrides.strDate=function(s){var _g=s.length;switch(_g){case 8:var k=s.split(":");var d=new Date();d.setTime(0);d.setUTCHours(k[0]);d.setUTCMinutes(k[1]);d.setUTCSeconds(k[2]);return d;case 10:var k1=s.split("-");return new Date(k1[0],k1[1]-1,k1[2],0,0,0);case 19:var k2=s.split(" ");var y=k2[0].split("-");var t=k2[1].split(":");return new Date(y[0],y[1]-1,y[2],t[0],t[1],t[2]);default:throw new js__$Boot_HaxeError("Invalid date format : "+s)}};HxOverrides.cca=function(s,index){var x=s.charCodeAt(index);if(x!=x){return undefined}return x};HxOverrides.substr=function(s,pos,len){if(len==null){len=s.length}else{if(len<0){if(pos==0){len=s.length+len}else{return""}}}return s.substr(pos,len)};HxOverrides.remove=function(a,obj){var i=a.indexOf(obj);if(i==-1){return false}a.splice(i,1);return true};HxOverrides.iter=function(a){return{cur:0,arr:a,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var List=function(){this.length=0};$hxClasses.List=List;List.__name__=["List"];List.prototype={add:function(item){var x=new _$List_ListNode(item,null);if(this.h==null){this.h=x}else{this.q.next=x}this.q=x;this.length++},__class__:List};var _$List_ListNode=function(item,next){this.item=item;this.next=next};$hxClasses["_List.ListNode"]=_$List_ListNode;_$List_ListNode.__name__=["_List","ListNode"];_$List_ListNode.prototype={__class__:_$List_ListNode};var Main=function(){};$hxClasses.Main=Main;Main.__name__=["Main"];Main.main=function(){window.pingVpLoader=Main.main;Main._each=new pingvp_PingVpEach()};Math.__name__=["Math"];var Reflect=function(){};$hxClasses.Reflect=Reflect;Reflect.__name__=["Reflect"];Reflect.field=function(o,field){try{return o[field]}catch(e){return null}};Reflect.fields=function(o){var a=[];if(o!=null){var hasOwnProperty=Object.prototype.hasOwnProperty;for(var f in o){if(f!="__id__"&&f!="hx__closures__"&&hasOwnProperty.call(o,f)){a.push(f)}}}return a};Reflect.isFunction=function(f){if(typeof(f)=="function"){return !(f.__name__||f.__ename__)}else{return false}};Reflect.compare=function(a,b){if(a==b){return 0}else{if(a>b){return 1}else{return -1}}};Reflect.deleteField=function(o,field){if(!Object.prototype.hasOwnProperty.call(o,field)){return false}delete (o[field]);return true};var Std=function(){};$hxClasses.Std=Std;Std.__name__=["Std"];Std.string=function(s){return js_Boot.__string_rec(s,"")};Std.parseInt=function(x){var v=parseInt(x,10);if(v==0&&(HxOverrides.cca(x,1)==120||HxOverrides.cca(x,1)==88)){v=parseInt(x)}if(isNaN(v)){return null}return v};var StringBuf=function(){this.b=""};$hxClasses.StringBuf=StringBuf;StringBuf.__name__=["StringBuf"];StringBuf.prototype={__class__:StringBuf};var StringTools=function(){};$hxClasses.StringTools=StringTools;StringTools.__name__=["StringTools"];StringTools.htmlEscape=function(s,quotes){s=s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");if(quotes){return s.split('"').join("&quot;").split("'").join("&#039;")}else{return s}};StringTools.endsWith=function(s,end){var elen=end.length;var slen=s.length;if(slen>=elen){return HxOverrides.substr(s,slen-elen,elen)==end}else{return false}};StringTools.isSpace=function(s,pos){var c=HxOverrides.cca(s,pos);if(!(c>8&&c<14)){return c==32}else{return true}};StringTools.ltrim=function(s){var l=s.length;var r=0;while(r<l&&StringTools.isSpace(s,r)){++r}if(r>0){return HxOverrides.substr(s,r,l-r)}else{return s}};StringTools.rtrim=function(s){var l=s.length;var r=0;while(r<l&&StringTools.isSpace(s,l-r-1)){++r}if(r>0){return HxOverrides.substr(s,0,l-r)}else{return s}};StringTools.trim=function(s){return StringTools.ltrim(StringTools.rtrim(s))};StringTools.replace=function(s,sub,by){return s.split(sub).join(by)};var ValueType=$hxClasses.ValueType={__ename__:["ValueType"],__constructs__:["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"]};ValueType.TNull=["TNull",0];ValueType.TNull.toString=$estr;ValueType.TNull.__enum__=ValueType;ValueType.TInt=["TInt",1];ValueType.TInt.toString=$estr;ValueType.TInt.__enum__=ValueType;ValueType.TFloat=["TFloat",2];ValueType.TFloat.toString=$estr;ValueType.TFloat.__enum__=ValueType;ValueType.TBool=["TBool",3];ValueType.TBool.toString=$estr;ValueType.TBool.__enum__=ValueType;ValueType.TObject=["TObject",4];ValueType.TObject.toString=$estr;ValueType.TObject.__enum__=ValueType;ValueType.TFunction=["TFunction",5];ValueType.TFunction.toString=$estr;ValueType.TFunction.__enum__=ValueType;ValueType.TClass=function(c){var $x=["TClass",6,c];$x.__enum__=ValueType;$x.toString=$estr;return $x};ValueType.TEnum=function(e){var $x=["TEnum",7,e];$x.__enum__=ValueType;$x.toString=$estr;return $x};ValueType.TUnknown=["TUnknown",8];ValueType.TUnknown.toString=$estr;ValueType.TUnknown.__enum__=ValueType;var Type=function(){};$hxClasses.Type=Type;Type.__name__=["Type"];Type.getClassName=function(c){var a=c.__name__;if(a==null){return null}return a.join(".")};Type.getEnumName=function(e){var a=e.__ename__;return a.join(".")};Type.resolveClass=function(name){var cl=$hxClasses[name];if(cl==null||!cl.__name__){return null}return cl};Type.resolveEnum=function(name){var e=$hxClasses[name];if(e==null||!e.__ename__){return null}return e};Type.createEmptyInstance=function(cl){function empty(){}empty.prototype=cl.prototype;return new empty()};Type.createEnum=function(e,constr,params){var f=Reflect.field(e,constr);if(f==null){throw new js__$Boot_HaxeError("No such constructor "+constr)}if(Reflect.isFunction(f)){if(params==null){throw new js__$Boot_HaxeError("Constructor "+constr+" need parameters")}return f.apply(e,params)}if(params!=null&&params.length!=0){throw new js__$Boot_HaxeError("Constructor "+constr+" does not need parameters")}return f};Type["typeof"]=function(v){var _g=typeof(v);switch(_g){case"boolean":return ValueType.TBool;case"function":if(v.__name__||v.__ename__){return ValueType.TObject}return ValueType.TFunction;case"number":if(Math.ceil(v)==v%2147483648){return ValueType.TInt}return ValueType.TFloat;case"object":if(v==null){return ValueType.TNull}var e=v.__enum__;if(e!=null){return ValueType.TEnum(e)}var c=js_Boot.getClass(v);if(c!=null){return ValueType.TClass(c)}return ValueType.TObject;case"string":return ValueType.TClass(String);case"undefined":return ValueType.TNull;default:return ValueType.TUnknown}};var haxe_IMap=function(){};$hxClasses["haxe.IMap"]=haxe_IMap;haxe_IMap.__name__=["haxe","IMap"];var haxe_Serializer=function(){this.buf=new StringBuf();this.cache=[];this.useCache=haxe_Serializer.USE_CACHE;this.useEnumIndex=haxe_Serializer.USE_ENUM_INDEX;this.shash=new haxe_ds_StringMap();this.scount=0};$hxClasses["haxe.Serializer"]=haxe_Serializer;haxe_Serializer.__name__=["haxe","Serializer"];haxe_Serializer.prototype={toString:function(){return this.buf.b},serializeString:function(s){var _this=this.shash;var x=__map_reserved[s]!=null?_this.getReserved(s):_this.h[s];if(x!=null){this.buf.b+="R";this.buf.b+=x==null?"null":""+x;return}var _this1=this.shash;var value=this.scount++;if(__map_reserved[s]!=null){_this1.setReserved(s,value)}else{_this1.h[s]=value}this.buf.b+="y";s=encodeURIComponent(s);this.buf.b+=Std.string(s.length);this.buf.b+=":";this.buf.b+=s==null?"null":""+s},serializeRef:function(v){var vt=typeof(v);var _g1=0;var _g=this.cache.length;while(_g1<_g){var i=_g1++;var ci=this.cache[i];if(typeof(ci)==vt&&ci==v){this.buf.b+="r";this.buf.b+=i==null?"null":""+i;return true}}this.cache.push(v);return false},serializeFields:function(v){var _g=0;var _g1=Reflect.fields(v);while(_g<_g1.length){var f=_g1[_g];++_g;this.serializeString(f);this.serialize(Reflect.field(v,f))}this.buf.b+="g"},serialize:function(v){var _g=Type["typeof"](v);switch(_g[1]){case 0:this.buf.b+="n";break;case 1:var v1=v;if(v1==0){this.buf.b+="z";return}this.buf.b+="i";this.buf.b+=v1==null?"null":""+v1;break;case 2:var v2=v;if(isNaN(v2)){this.buf.b+="k"}else{if(!isFinite(v2)){this.buf.b+=v2<0?"m":"p"}else{this.buf.b+="d";this.buf.b+=v2==null?"null":""+v2}}break;case 3:this.buf.b+=v?"t":"f";break;case 4:if(js_Boot.__instanceof(v,Class)){var className=Type.getClassName(v);this.buf.b+="A";this.serializeString(className)}else{if(js_Boot.__instanceof(v,Enum)){this.buf.b+="B";this.serializeString(Type.getEnumName(v))}else{if(this.useCache&&this.serializeRef(v)){return}this.buf.b+="o";this.serializeFields(v)}}break;case 5:throw new js__$Boot_HaxeError("Cannot serialize function");break;case 6:var c=_g[2];if(c==String){this.serializeString(v);return}if(this.useCache&&this.serializeRef(v)){return}switch(c){case Array:var ucount=0;this.buf.b+="a";var l=v.length;var _g1=0;var _g2=l;while(_g1<_g2){var i=_g1++;if(v[i]==null){++ucount}else{if(ucount>0){if(ucount==1){this.buf.b+="n"}else{this.buf.b+="u";this.buf.b+=ucount==null?"null":""+ucount}ucount=0}this.serialize(v[i])}}if(ucount>0){if(ucount==1){this.buf.b+="n"}else{this.buf.b+="u";this.buf.b+=ucount==null?"null":""+ucount}}this.buf.b+="h";break;case Date:var d=v;this.buf.b+="v";this.buf.b+=Std.string(d.getTime());break;case List:this.buf.b+="l";var v3=v;var _g_head=v3.h;while(_g_head!=null){var val=_g_head.item;_g_head=_g_head.next;var i1=val;this.serialize(i1)}this.buf.b+="h";break;case haxe_ds_IntMap:this.buf.b+="q";var v4=v;var k=v4.keys();while(k.hasNext()){var k1=k.next();this.buf.b+=":";this.buf.b+=k1==null?"null":""+k1;this.serialize(v4.h[k1])}this.buf.b+="h";break;case haxe_ds_ObjectMap:this.buf.b+="M";var v5=v;var k2=v5.keys();while(k2.hasNext()){var k3=k2.next();var id=Reflect.field(k3,"__id__");Reflect.deleteField(k3,"__id__");this.serialize(k3);k3.__id__=id;this.serialize(v5.h[k3.__id__])}this.buf.b+="h";break;case haxe_ds_StringMap:this.buf.b+="b";var v6=v;var k4=v6.keys();while(k4.hasNext()){var k5=k4.next();this.serializeString(k5);this.serialize(__map_reserved[k5]!=null?v6.getReserved(k5):v6.h[k5])}this.buf.b+="h";break;case haxe_io_Bytes:var v7=v;this.buf.b+="s";this.buf.b+=Std.string(Math.ceil(v7.length*8/6));this.buf.b+=":";var i2=0;var max=v7.length-2;var b64=haxe_Serializer.BASE64_CODES;if(b64==null){var length=haxe_Serializer.BASE64.length;var this1=new Array(length);b64=this1;var _g11=0;var _g3=haxe_Serializer.BASE64.length;while(_g11<_g3){var i3=_g11++;b64[i3]=HxOverrides.cca(haxe_Serializer.BASE64,i3)}haxe_Serializer.BASE64_CODES=b64}while(i2<max){var b1=v7.b[i2++];var b2=v7.b[i2++];var b3=v7.b[i2++];this.buf.b+=String.fromCharCode(b64[b1>>2]);this.buf.b+=String.fromCharCode(b64[(b1<<4|b2>>4)&63]);this.buf.b+=String.fromCharCode(b64[(b2<<2|b3>>6)&63]);this.buf.b+=String.fromCharCode(b64[b3&63])}if(i2==max){var b11=v7.b[i2++];var b21=v7.b[i2++];this.buf.b+=String.fromCharCode(b64[b11>>2]);this.buf.b+=String.fromCharCode(b64[(b11<<4|b21>>4)&63]);this.buf.b+=String.fromCharCode(b64[b21<<2&63])}else{if(i2==max+1){var b12=v7.b[i2++];this.buf.b+=String.fromCharCode(b64[b12>>2]);this.buf.b+=String.fromCharCode(b64[b12<<4&63])}}break;default:if(this.useCache){this.cache.pop()}if(v.hxSerialize!=null){this.buf.b+="C";this.serializeString(Type.getClassName(c));if(this.useCache){this.cache.push(v)}v.hxSerialize(this);this.buf.b+="g"}else{this.buf.b+="c";this.serializeString(Type.getClassName(c));if(this.useCache){this.cache.push(v)}this.serializeFields(v)}}break;case 7:var e=_g[2];if(this.useCache){if(this.serializeRef(v)){return}this.cache.pop()}this.buf.b+=Std.string(this.useEnumIndex?"j":"w");this.serializeString(Type.getEnumName(e));if(this.useEnumIndex){this.buf.b+=":";this.buf.b+=Std.string(v[1])}else{this.serializeString(v[0])}this.buf.b+=":";var l1=v.length;this.buf.b+=Std.string(l1-2);var _g12=2;var _g4=l1;while(_g12<_g4){var i4=_g12++;this.serialize(v[i4])}if(this.useCache){this.cache.push(v)}break;default:throw new js__$Boot_HaxeError("Cannot serialize "+Std.string(v))}},serializeException:function(e){this.buf.b+="x";this.serialize(e)},__class__:haxe_Serializer};var haxe_Timer=function(time_ms){var me=this;this.id=setInterval(function(){me.run()},time_ms)};$hxClasses["haxe.Timer"]=haxe_Timer;haxe_Timer.__name__=["haxe","Timer"];haxe_Timer.delay=function(f,time_ms){var t=new haxe_Timer(time_ms);t.run=function(){t.stop();f()};return t};haxe_Timer.prototype={stop:function(){if(this.id==null){return}clearInterval(this.id);this.id=null},run:function(){},__class__:haxe_Timer};var haxe__$Unserializer_DefaultResolver=function(){};$hxClasses["haxe._Unserializer.DefaultResolver"]=haxe__$Unserializer_DefaultResolver;haxe__$Unserializer_DefaultResolver.__name__=["haxe","_Unserializer","DefaultResolver"];haxe__$Unserializer_DefaultResolver.prototype={resolveClass:function(name){return Type.resolveClass(name)},resolveEnum:function(name){return Type.resolveEnum(name)},__class__:haxe__$Unserializer_DefaultResolver};var haxe_Unserializer=function(buf){this.buf=buf;this.length=buf.length;this.pos=0;this.scache=[];this.cache=[];var r=haxe_Unserializer.DEFAULT_RESOLVER;if(r==null){r=new haxe__$Unserializer_DefaultResolver();haxe_Unserializer.DEFAULT_RESOLVER=r}this.resolver=r};$hxClasses["haxe.Unserializer"]=haxe_Unserializer;haxe_Unserializer.__name__=["haxe","Unserializer"];haxe_Unserializer.initCodes=function(){var codes=[];var _g1=0;var _g=haxe_Unserializer.BASE64.length;while(_g1<_g){var i=_g1++;codes[haxe_Unserializer.BASE64.charCodeAt(i)]=i}return codes};haxe_Unserializer.prototype={readDigits:function(){var k=0;var s=false;var fpos=this.pos;while(true){var c=this.buf.charCodeAt(this.pos);if(c!=c){break}if(c==45){if(this.pos!=fpos){break}s=true;this.pos++;continue}if(c<48||c>57){break}k=k*10+(c-48);this.pos++}if(s){k*=-1}return k},readFloat:function(){var p1=this.pos;while(true){var c=this.buf.charCodeAt(this.pos);if(c!=c){break}if(c>=43&&c<58||c==101||c==69){this.pos++}else{break}}return parseFloat(HxOverrides.substr(this.buf,p1,this.pos-p1))},unserializeObject:function(o){while(true){if(this.pos>=this.length){throw new js__$Boot_HaxeError("Invalid object")}if(this.buf.charCodeAt(this.pos)==103){break}var k=this.unserialize();if(typeof(k)!="string"){throw new js__$Boot_HaxeError("Invalid object key")}var v=this.unserialize();o[k]=v}this.pos++},unserializeEnum:function(edecl,tag){if(this.buf.charCodeAt(this.pos++)!=58){throw new js__$Boot_HaxeError("Invalid enum format")}var nargs=this.readDigits();if(nargs==0){return Type.createEnum(edecl,tag)}var args=[];while(nargs-->0){args.push(this.unserialize())}return Type.createEnum(edecl,tag,args)},unserialize:function(){var _g=this.buf.charCodeAt(this.pos++);switch(_g){case 65:var name=this.unserialize();var cl=this.resolver.resolveClass(name);if(cl==null){throw new js__$Boot_HaxeError("Class not found "+name)}return cl;case 66:var name1=this.unserialize();var e=this.resolver.resolveEnum(name1);if(e==null){throw new js__$Boot_HaxeError("Enum not found "+name1)}return e;case 67:var name2=this.unserialize();var cl1=this.resolver.resolveClass(name2);if(cl1==null){throw new js__$Boot_HaxeError("Class not found "+name2)}var o=Type.createEmptyInstance(cl1);this.cache.push(o);o.hxUnserialize(this);if(this.buf.charCodeAt(this.pos++)!=103){throw new js__$Boot_HaxeError("Invalid custom data")}return o;case 77:var h=new haxe_ds_ObjectMap();this.cache.push(h);var buf=this.buf;while(this.buf.charCodeAt(this.pos)!=104){var s=this.unserialize();h.set(s,this.unserialize())}this.pos++;return h;case 82:var n=this.readDigits();if(n<0||n>=this.scache.length){throw new js__$Boot_HaxeError("Invalid string reference")}return this.scache[n];case 97:var buf1=this.buf;var a=[];this.cache.push(a);while(true){var c=this.buf.charCodeAt(this.pos);if(c==104){this.pos++;break}if(c==117){this.pos++;var n1=this.readDigits();a[a.length+n1-1]=null}else{a.push(this.unserialize())}}return a;case 98:var h1=new haxe_ds_StringMap();this.cache.push(h1);var buf2=this.buf;while(this.buf.charCodeAt(this.pos)!=104){var s1=this.unserialize();var value=this.unserialize();if(__map_reserved[s1]!=null){h1.setReserved(s1,value)}else{h1.h[s1]=value}}this.pos++;return h1;case 99:var name3=this.unserialize();var cl2=this.resolver.resolveClass(name3);if(cl2==null){throw new js__$Boot_HaxeError("Class not found "+name3)}var o1=Type.createEmptyInstance(cl2);this.cache.push(o1);this.unserializeObject(o1);return o1;case 100:return this.readFloat();case 102:return false;case 105:return this.readDigits();case 106:var name4=this.unserialize();var edecl=this.resolver.resolveEnum(name4);if(edecl==null){throw new js__$Boot_HaxeError("Enum not found "+name4)}this.pos++;var index=this.readDigits();var tag=edecl.__constructs__.slice()[index];if(tag==null){throw new js__$Boot_HaxeError("Unknown enum index "+name4+"@"+index)}var e1=this.unserializeEnum(edecl,tag);this.cache.push(e1);return e1;case 107:return NaN;case 108:var l=new List();this.cache.push(l);var buf3=this.buf;while(this.buf.charCodeAt(this.pos)!=104){l.add(this.unserialize())}this.pos++;return l;case 109:return -Infinity;case 110:return null;case 111:var o2={};this.cache.push(o2);this.unserializeObject(o2);return o2;case 112:return Infinity;case 113:var h2=new haxe_ds_IntMap();this.cache.push(h2);var buf4=this.buf;var c1=this.buf.charCodeAt(this.pos++);while(c1==58){var i=this.readDigits();var value1=this.unserialize();h2.h[i]=value1;c1=this.buf.charCodeAt(this.pos++)}if(c1!=104){throw new js__$Boot_HaxeError("Invalid IntMap format")}return h2;case 114:var n2=this.readDigits();if(n2<0||n2>=this.cache.length){throw new js__$Boot_HaxeError("Invalid reference")}return this.cache[n2];case 115:var len=this.readDigits();var buf5=this.buf;if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos<len){throw new js__$Boot_HaxeError("Invalid bytes length")}var codes=haxe_Unserializer.CODES;if(codes==null){codes=haxe_Unserializer.initCodes();haxe_Unserializer.CODES=codes}var i1=this.pos;var rest=len&3;var size=(len>>2)*3+(rest>=2?rest-1:0);var max=i1+(len-rest);var bytes=new haxe_io_Bytes(new ArrayBuffer(size));var bpos=0;while(i1<max){var c11=codes[buf5.charCodeAt(i1++)];var c2=codes[buf5.charCodeAt(i1++)];bytes.b[bpos++]=(c11<<2|c2>>4)&255;var c3=codes[buf5.charCodeAt(i1++)];bytes.b[bpos++]=(c2<<4|c3>>2)&255;var c4=codes[buf5.charCodeAt(i1++)];bytes.b[bpos++]=(c3<<6|c4)&255}if(rest>=2){var c12=codes[buf5.charCodeAt(i1++)];var c21=codes[buf5.charCodeAt(i1++)];bytes.b[bpos++]=(c12<<2|c21>>4)&255;if(rest==3){var c31=codes[buf5.charCodeAt(i1++)];bytes.b[bpos++]=(c21<<4|c31>>2)&255}}this.pos+=len;this.cache.push(bytes);return bytes;case 116:return true;case 118:var d;if(this.buf.charCodeAt(this.pos)>=48&&this.buf.charCodeAt(this.pos)<=57&&this.buf.charCodeAt(this.pos+1)>=48&&this.buf.charCodeAt(this.pos+1)<=57&&this.buf.charCodeAt(this.pos+2)>=48&&this.buf.charCodeAt(this.pos+2)<=57&&this.buf.charCodeAt(this.pos+3)>=48&&this.buf.charCodeAt(this.pos+3)<=57&&this.buf.charCodeAt(this.pos+4)==45){d=HxOverrides.strDate(HxOverrides.substr(this.buf,this.pos,19));this.pos+=19}else{var t=this.readFloat();d=new Date(t)}this.cache.push(d);return d;case 119:var name5=this.unserialize();var edecl1=this.resolver.resolveEnum(name5);if(edecl1==null){throw new js__$Boot_HaxeError("Enum not found "+name5)}var e2=this.unserializeEnum(edecl1,this.unserialize());this.cache.push(e2);return e2;case 120:throw js__$Boot_HaxeError.wrap(this.unserialize());break;case 121:var len1=this.readDigits();if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos<len1){throw new js__$Boot_HaxeError("Invalid string length")}var s2=HxOverrides.substr(this.buf,this.pos,len1);this.pos+=len1;s2=decodeURIComponent(s2.split("+").join(" "));this.scache.push(s2);return s2;case 122:return 0;default:}this.pos--;throw new js__$Boot_HaxeError("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos)},__class__:haxe_Unserializer};var haxe_ds_IntMap=function(){this.h={}};$hxClasses["haxe.ds.IntMap"]=haxe_ds_IntMap;haxe_ds_IntMap.__name__=["haxe","ds","IntMap"];haxe_ds_IntMap.__interfaces__=[haxe_IMap];haxe_ds_IntMap.prototype={keys:function(){var a=[];for(var key in this.h){if(this.h.hasOwnProperty(key)){a.push(key|0)}}return HxOverrides.iter(a)},__class__:haxe_ds_IntMap};var haxe_ds_ObjectMap=function(){this.h={__keys__:{}}};$hxClasses["haxe.ds.ObjectMap"]=haxe_ds_ObjectMap;haxe_ds_ObjectMap.__name__=["haxe","ds","ObjectMap"];haxe_ds_ObjectMap.__interfaces__=[haxe_IMap];haxe_ds_ObjectMap.assignId=function(obj){return obj.__id__=++haxe_ds_ObjectMap.count};haxe_ds_ObjectMap.getId=function(obj){return obj.__id__};haxe_ds_ObjectMap.prototype={set:function(key,value){var id=key.__id__||(key.__id__=++haxe_ds_ObjectMap.count);this.h[id]=value;this.h.__keys__[id]=key},keys:function(){var a=[];for(var key in this.h.__keys__){if(this.h.hasOwnProperty(key)){a.push(this.h.__keys__[key])}}return HxOverrides.iter(a)},__class__:haxe_ds_ObjectMap};var haxe_ds_StringMap=function(){this.h={}};$hxClasses["haxe.ds.StringMap"]=haxe_ds_StringMap;haxe_ds_StringMap.__name__=["haxe","ds","StringMap"];haxe_ds_StringMap.__interfaces__=[haxe_IMap];haxe_ds_StringMap.prototype={setReserved:function(key,value){if(this.rh==null){this.rh={}}this.rh["$"+key]=value},getReserved:function(key){if(this.rh==null){return null}else{return this.rh["$"+key]}},keys:function(){return HxOverrides.iter(this.arrayKeys())},arrayKeys:function(){var out=[];for(var key in this.h){if(this.h.hasOwnProperty(key)){out.push(key)}}if(this.rh!=null){for(var key in this.rh){if(key.charCodeAt(0)==36){out.push(key.substr(1))}}}return out},__class__:haxe_ds_StringMap};var haxe_io_Bytes=function(data){this.length=data.byteLength;this.b=new Uint8Array(data);this.b.bufferValue=data;data.hxBytes=this;data.bytes=this.b};$hxClasses["haxe.io.Bytes"]=haxe_io_Bytes;haxe_io_Bytes.__name__=["haxe","io","Bytes"];haxe_io_Bytes.alloc=function(length){return new haxe_io_Bytes(new ArrayBuffer(length))};haxe_io_Bytes.ofString=function(s){var a=[];var i=0;while(i<s.length){var c=s.charCodeAt(i++);if(55296<=c&&c<=56319){c=c-55232<<10|s.charCodeAt(i++)&1023}if(c<=127){a.push(c)}else{if(c<=2047){a.push(192|c>>6);a.push(128|c&63)}else{if(c<=65535){a.push(224|c>>12);a.push(128|c>>6&63);a.push(128|c&63)}else{a.push(240|c>>18);a.push(128|c>>12&63);a.push(128|c>>6&63);a.push(128|c&63)}}}}return new haxe_io_Bytes(new Uint8Array(a).buffer)};haxe_io_Bytes.ofData=function(b){var hb=b.hxBytes;if(hb!=null){return hb}return new haxe_io_Bytes(b)};haxe_io_Bytes.fastGet=function(b,pos){return b.bytes[pos]};haxe_io_Bytes.prototype={__class__:haxe_io_Bytes};var haxe_remoting_Connection=function(){};$hxClasses["haxe.remoting.Connection"]=haxe_remoting_Connection;haxe_remoting_Connection.__name__=["haxe","remoting","Connection"];var haxe_remoting_Context=function(){};$hxClasses["haxe.remoting.Context"]=haxe_remoting_Context;haxe_remoting_Context.__name__=["haxe","remoting","Context"];haxe_remoting_Context.prototype={call:function(path,params){if(path.length<2){throw new js__$Boot_HaxeError("Invalid path '"+path.join(".")+"'")}var _this=this.objects;var key=path[0];var inf=__map_reserved[key]!=null?_this.getReserved(key):_this.h[key];if(inf==null){throw new js__$Boot_HaxeError("No such object "+path[0])}var o=inf.obj;var m=Reflect.field(o,path[1]);if(path.length>2){if(!inf.rec){throw new js__$Boot_HaxeError("Can't access "+path.join("."))}var _g1=2;var _g=path.length;while(_g1<_g){var i=_g1++;o=m;m=Reflect.field(o,path[i])}}if(!Reflect.isFunction(m)){throw new js__$Boot_HaxeError("No such method "+path.join("."))}return m.apply(o,params)},__class__:haxe_remoting_Context};var haxe_remoting_ExternalConnection=$hx_exports.haxe["remoting"]["ExternalConnection"]=function(){};$hxClasses["haxe.remoting.ExternalConnection"]=haxe_remoting_ExternalConnection;haxe_remoting_ExternalConnection.__name__=["haxe","remoting","ExternalConnection"];haxe_remoting_ExternalConnection.__interfaces__=[haxe_remoting_Connection];haxe_remoting_ExternalConnection.doCall=function(name,path,params){try{var _this=haxe_remoting_ExternalConnection.connections;var cnx=__map_reserved[name]!=null?_this.getReserved(name):_this.h[name];if(cnx==null){throw new js__$Boot_HaxeError("Unknown connection : "+name)}if(cnx.__data.ctx==null){throw new js__$Boot_HaxeError("No context shared for the connection "+name)}var params1=new haxe_Unserializer(params).unserialize();var ret=cnx.__data.ctx.call(path.split("."),params1);var s=new haxe_Serializer();s.serialize(ret);return s.toString()+"#"}catch(e){if(e instanceof js__$Boot_HaxeError){e=e.val}var s1=new haxe_Serializer();s1.serializeException(e);return s1.toString()}};haxe_remoting_ExternalConnection.prototype={__class__:haxe_remoting_ExternalConnection};var js__$Boot_HaxeError=function(val){Error.call(this);this.val=val;this.message=String(val);if(Error.captureStackTrace){Error.captureStackTrace(this,js__$Boot_HaxeError)}};$hxClasses["js._Boot.HaxeError"]=js__$Boot_HaxeError;js__$Boot_HaxeError.__name__=["js","_Boot","HaxeError"];js__$Boot_HaxeError.wrap=function(val){if((val instanceof Error)){return val}else{return new js__$Boot_HaxeError(val)}};js__$Boot_HaxeError.__super__=Error;js__$Boot_HaxeError.prototype=$extend(Error.prototype,{__class__:js__$Boot_HaxeError});var js_Boot=function(){};$hxClasses["js.Boot"]=js_Boot;js_Boot.__name__=["js","Boot"];js_Boot.getClass=function(o){if((o instanceof Array)&&o.__enum__==null){return Array}else{var cl=o.__class__;if(cl!=null){return cl}var name=js_Boot.__nativeClassName(o);if(name!=null){return js_Boot.__resolveNativeClass(name)}return null}};js_Boot.__string_rec=function(o,s){if(o==null){return"null"}if(s.length>=5){return"<...>"}var t=typeof(o);if(t=="function"&&(o.__name__||o.__ename__)){t="object"}switch(t){case"function":return"<function>";case"object":if(o instanceof Array){if(o.__enum__){if(o.length==2){return o[0]}var str=o[0]+"(";s+="\t";var _g1=2;var _g=o.length;while(_g1<_g){var i=_g1++;if(i!=2){str+=","+js_Boot.__string_rec(o[i],s)}else{str+=js_Boot.__string_rec(o[i],s)}}return str+")"}var l=o.length;var i1;var str1="[";s+="\t";var _g11=0;var _g2=l;while(_g11<_g2){var i2=_g11++;str1+=(i2>0?",":"")+js_Boot.__string_rec(o[i2],s)}str1+="]";return str1}var tostr;try{tostr=o.toString}catch(e){return"???"}if(tostr!=null&&tostr!=Object.toString&&typeof(tostr)=="function"){var s2=o.toString();if(s2!="[object Object]"){return s2}}var k=null;var str2="{\n";s+="\t";var hasp=o.hasOwnProperty!=null;for(var k in o){if(hasp&&!o.hasOwnProperty(k)){continue}if(k=="prototype"||k=="__class__"||k=="__super__"||k=="__interfaces__"||k=="__properties__"){continue}if(str2.length!=2){str2+=", \n"}str2+=s+k+" : "+js_Boot.__string_rec(o[k],s)}s=s.substring(1);str2+="\n"+s+"}";return str2;case"string":return o;default:return String(o)}};js_Boot.__interfLoop=function(cc,cl){if(cc==null){return false}if(cc==cl){return true}var intf=cc.__interfaces__;if(intf!=null){var _g1=0;var _g=intf.length;while(_g1<_g){var i=_g1++;var i1=intf[i];if(i1==cl||js_Boot.__interfLoop(i1,cl)){return true}}}return js_Boot.__interfLoop(cc.__super__,cl)};js_Boot.__instanceof=function(o,cl){if(cl==null){return false}switch(cl){case Array:if((o instanceof Array)){return o.__enum__==null}else{return false}break;case Bool:return typeof(o)=="boolean";case Dynamic:return true;case Float:return typeof(o)=="number";case Int:if(typeof(o)=="number"){return(o|0)===o}else{return false}break;case String:return typeof(o)=="string";default:if(o!=null){if(typeof(cl)=="function"){if(o instanceof cl){return true}if(js_Boot.__interfLoop(js_Boot.getClass(o),cl)){return true}}else{if(typeof(cl)=="object"&&js_Boot.__isNativeObj(cl)){if(o instanceof cl){return true}}}}else{return false}if(cl==Class?o.__name__!=null:false){return true}if(cl==Enum?o.__ename__!=null:false){return true}return o.__enum__==cl}};js_Boot.__nativeClassName=function(o){var name=js_Boot.__toStr.call(o).slice(8,-1);if(name=="Object"||name=="Function"||name=="Math"||name=="JSON"){return null}return name};js_Boot.__isNativeObj=function(o){return js_Boot.__nativeClassName(o)!=null};js_Boot.__resolveNativeClass=function(name){return $global[name]};var js_html_compat_ArrayBuffer=function(a){if((a instanceof Array)&&a.__enum__==null){this.a=a;this.byteLength=a.length}else{var len=a;this.a=[];var _g1=0;var _g=len;while(_g1<_g){var i=_g1++;this.a[i]=0}this.byteLength=len}};$hxClasses["js.html.compat.ArrayBuffer"]=js_html_compat_ArrayBuffer;js_html_compat_ArrayBuffer.__name__=["js","html","compat","ArrayBuffer"];js_html_compat_ArrayBuffer.sliceImpl=function(begin,end){var u=new Uint8Array(this,begin,end==null?null:end-begin);var result=new ArrayBuffer(u.byteLength);var resultArray=new Uint8Array(result);resultArray.set(u);return result};js_html_compat_ArrayBuffer.prototype={slice:function(begin,end){return new js_html_compat_ArrayBuffer(this.a.slice(begin,end))},__class__:js_html_compat_ArrayBuffer};var js_html_compat_Uint8Array=function(){};$hxClasses["js.html.compat.Uint8Array"]=js_html_compat_Uint8Array;js_html_compat_Uint8Array.__name__=["js","html","compat","Uint8Array"];js_html_compat_Uint8Array._new=function(arg1,offset,length){var arr;if(typeof(arg1)=="number"){arr=[];var _g1=0;var _g=arg1;while(_g1<_g){var i=_g1++;arr[i]=0}arr.byteLength=arr.length;arr.byteOffset=0;arr.buffer=new js_html_compat_ArrayBuffer(arr)}else{if(js_Boot.__instanceof(arg1,js_html_compat_ArrayBuffer)){var buffer=arg1;if(offset==null){offset=0}if(length==null){length=buffer.byteLength-offset}if(offset==0){arr=buffer.a}else{arr=buffer.a.slice(offset,offset+length)}arr.byteLength=arr.length;arr.byteOffset=offset;arr.buffer=buffer}else{if((arg1 instanceof Array)&&arg1.__enum__==null){arr=arg1.slice();arr.byteLength=arr.length;arr.byteOffset=0;arr.buffer=new js_html_compat_ArrayBuffer(arr)}else{throw new js__$Boot_HaxeError("TODO "+Std.string(arg1))}}}arr.subarray=js_html_compat_Uint8Array._subarray;arr.set=js_html_compat_Uint8Array._set;return arr};js_html_compat_Uint8Array._set=function(arg,offset){if(js_Boot.__instanceof(arg.buffer,js_html_compat_ArrayBuffer)){var a=arg;if(arg.byteLength+offset>this.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var _g1=0;var _g=arg.byteLength;while(_g1<_g){var i=_g1++;this[i+offset]=a[i]}}else{if((arg instanceof Array)&&arg.__enum__==null){var a1=arg;if(a1.length+offset>this.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var _g11=0;var _g2=a1.length;while(_g11<_g2){var i1=_g11++;this[i1+offset]=a1[i1]}}else{throw new js__$Boot_HaxeError("TODO")}}};js_html_compat_Uint8Array._subarray=function(start,end){var a=js_html_compat_Uint8Array._new(this.slice(start,end));a.byteOffset=start;return a};var pingvp_FamesPerSecond=function(){this._delta=0;this._last=new Date().getTime()};$hxClasses["pingvp.FamesPerSecond"]=pingvp_FamesPerSecond;pingvp_FamesPerSecond.__name__=["pingvp","FamesPerSecond"];pingvp_FamesPerSecond.prototype={tick:function(){var now=new Date().getTime();this._delta=(now-this._last)/1000;this._last=now;return this._delta},fps:function(){return Math.floor(1/this._delta)},__class__:pingvp_FamesPerSecond};var pingvp_InlineFrame=function(node,videoOid,embedUri){this.iFrame=window.document.createElement("iframe");this.iFrame.id="pingVpInlineFrame-"+videoOid;this.iFrame.frameBorder="0";this.iFrame.allowFullscreen=true;this.iFrame.width="100%";this.iFrame.height="100%";this.iFrame.src=embedUri;var fc=node.firstChild;while(fc!=null){node.removeChild(fc);fc=node.firstChild}node.appendChild(this.iFrame)};$hxClasses["pingvp.InlineFrame"]=pingvp_InlineFrame;pingvp_InlineFrame.__name__=["pingvp","InlineFrame"];pingvp_InlineFrame.prototype={isNotFramed:function(){return window.self==window.top},resize:function(width,height){this.iFrame.style.width=width+"px";this.iFrame.style.height=height+"px"},cleanUp:function(){this.iFrame.remove();this.iFrame=null},__class__:pingvp_InlineFrame};var pingvp_PingVpAiOverlay=function(videoOid,theme,text,container,hoverFix,enableAI,controlBarOnShow,videoTitle,postersUri,event){this._videoOid=videoOid;this._container=container;this._theme=theme;this._enableAI=enableAI;this._controlBarOnShow=controlBarOnShow;this._videoTitle=videoTitle;this._postersUri=postersUri;this._text=text;this._event=event;this._overlayIsActive=false;this._isOn=false;if(this._enableAI){this._isMobile=false;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._isMobile=true}var mobileModalClass="";var mobileOverlayClass="";if(this._isMobile){mobileModalClass="pingVpAIModalMobile";mobileOverlayClass="pingVpAIOverlayMobile"}this._overlayIsActive=true;this._overlay=$("#pingVpOverlay-"+this._videoOid);this._overlay.append('<div id="pingVpAIOverlay-'+videoOid+'" class="pingVpAIOverlay '+mobileOverlayClass+'"><div id="pingVpAIModal-'+videoOid+'" class="pingVpAIModal '+mobileModalClass+'"></div>');this._AIOverlay=$("#pingVpAIOverlay-"+this._videoOid);this._AIModal=$("#pingVpAIModal-"+this._videoOid);if(this._overlay.outerWidth()<480){this._AIModal.addClass("pingVpAIModalMobile")}this._AIModal.append('<span class="pingVpReset pingVpAIModalTitle">'+this._text.get("aiModalTitle")+"</span>");this._AIModal.append('<div id="pingVpAIModalWrapper-'+videoOid+'" class="pingVpAIModalWrapper"><div class="pingVpReset pingVpAIText"></div></div>');this._AIRows=$("#pingVpAIModalWrapper-"+videoOid+" .pingVpAIText");this._AIRows.html(this._text.get("aiModalText"));this._closeModalIcon=theme.getIcon(theme.getByKey("svgset"),"cross.svg","fff");this._AIModal.append('<div tabindex="0" role="button" aria-label="'+text.get("closeModalImg")+'" id="pingVpAIModalClose-'+videoOid+'" class="pingVpAIModalClose"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'" alt="'+this._text.get("closeModalImg")+'"/></div>');this._setButton=$("#pingVpAIenabled-"+videoOid);this._containerJquery=$("#pingVpOverlayPlayContainer-"+videoOid);this._closeModal=$("#pingVpAIModalClose-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hideAIOverlay));this._subtitlesWrapper=$("#pingVpSubtitles-"+this._videoOid);this._timeSlider=$("#pingVpTimeSlider-"+this._videoOid);this._AIOverlay.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onOverlayClick));this.resize(hoverFix)}};$hxClasses["pingvp.PingVpAiOverlay"]=pingvp_PingVpAiOverlay;pingvp_PingVpAiOverlay.__name__=["pingvp","PingVpAiOverlay"];pingvp_PingVpAiOverlay.prototype={showAIOverlay:function(){if(this.isShown()){this._controlBarOnShow(true);if(!this._isMobile){this._subtitlesWrapper.show();this._timeSlider.show()}this._AIOverlay.hide();this.resetHtmlFocus();this._isOn=false}else{if(this._setCloseOthersCall!=null){this._setCloseOthersCall()}this._controlBarOnShow(false);if(!this._isMobile){this._subtitlesWrapper.hide();this._timeSlider.hide()}this._AIOverlay.css("display","flex");this.setHtmlFocus();this._isOn=true}},hideAIOverlay:function(){if(this.isShown()){this._isOn=false;if(!this._isMobile){this._subtitlesWrapper.show();this._timeSlider.show()}this._AIOverlay.hide();if(this._buttonCall!=null){this._buttonCall(false)}this._focus=$(":focus");if(this._focus.parents(".pingVpAIOverlay").length!=0){this._setButton.focus()}this.resetHtmlFocus();this._controlBarOnShow(true)}},manualShowAIOverlay:function(){if(!this.isShown()){if(this._setCloseOthersCall!=null){this._setCloseOthersCall()}this._isOn=true;if(!this._isMobile){this._subtitlesWrapper.hide();this._timeSlider.hide()}this._AIOverlay.css("display","flex");this.setHtmlFocus();this._controlBarOnShow(false)}},setHtmlFocus:function(){this._AIModal.find('[tabindex="-1"]').attr("tabindex","0");this._AIModal.find('[tabindex="0"]').first().focus()},resetHtmlFocus:function(){this._AIModal.find('[tabindex="0"]').attr("tabindex","-1")},checkCloseKeys:function(e){e.preventDefault();this.hideAIOverlay()},resize:function(hoverFix){this._overlay=$("#pingVpOverlay-"+this._videoOid);var definer=960;var definerW=640;var currentWidth=this._overlay.outerWidth();var percent=100;var percentW=0.25;if(!this._isMobile){if(this._overlay.outerWidth()<480){this._AIModal.addClass("pingVpAIModalMobile")}else{this._AIModal.removeClass("pingVpAIModalMobile")}}if(currentWidth>definer){percent-=(definer-currentWidth)/32}else{if(currentWidth<definer){percent+=(currentWidth-definer)/32}}this._AIOverlay.css("font-size",percent+"%");var width=this._container.getWidth();var height=this._container.getHeight();this._AIOverlay.css("width",width);this._AIOverlay.css("height",height-hoverFix)},checkMenuActive:function(){return this._overlayIsActive},isShown:function(){return this._isOn},onOverlayClick:function(e){var _currentClicked=$(e.target);if(_currentClicked.parents(".pingVpAIModal").length==0&&_currentClicked.hasClass("pingVpAIOverlay")&&this._isOn){this.hideAIOverlay()}},setButtonHandler:function(call){this._buttonCall=call},setCloseOthersCall:function(call){this._setCloseOthersCall=call},__class__:pingvp_PingVpAiOverlay};var pingvp_PingVpAnnouncement=function(videoOid,theme,text,container){this._videoOid=videoOid;this._overlay=$("#pingVpOverlay-"+this._videoOid);this._overlay.append('<div id="PingVpAnnouncement-'+videoOid+'" class="PingVpAnnouncement" role="status" aria-live="polite"></div>');this._announcementElem=$("#PingVpAnnouncement-"+this._videoOid)};$hxClasses["pingvp.PingVpAnnouncement"]=pingvp_PingVpAnnouncement;pingvp_PingVpAnnouncement.__name__=["pingvp","PingVpAnnouncement"];pingvp_PingVpAnnouncement.prototype={setMessage:function(message){this._announcementElem.text(message)},__class__:pingvp_PingVpAnnouncement};var pingvp_PingVpBLockRating=function(videoOid,blockOid,block,args,funOnClick){this._block=block;this._funOnClick=funOnClick;this._rated=false;this._likeX=args.likeX!=null?args.likeX:0;this._likeY=args.likeY!=null?args.likeY:0;this._likeWidth=args.likeWidth!=null?args.likeWidth:50;this._likeHeight=args.likeHeight!=null?args.likeHeight:50;this._dislikeX=args.dislikeX!=null?args.dislikeX:0;this._dislikeY=args.dislikeY!=null?args.dislikeY:0;this._dislikeWidth=args.dislikeWidth!=null?args.dislikeWidth:50;this._dislikeHeight=args.dislikeHeight!=null?args.dislikeHeight:50;this._bgImage=args.bgImage!=null?pingvp_PingVpConfigRead.get().imagesUri+args.bgImage:"";this._likeImage=args.likeImage!=null?pingvp_PingVpConfigRead.get().imagesUri+args.likeImage:"";this._dislikeImage=args.dislikeImage!=null?pingvp_PingVpConfigRead.get().imagesUri+args.dislikeImage:"";if($("#pingVpBlockLike-"+videoOid+"-"+blockOid).length!=0){$("#pingVpBlockLike-"+videoOid+"-"+blockOid).remove()}if($("#pingVpBlockDislike-"+videoOid+"-"+blockOid).length!=0){$("#pingVpBlockDislike-"+videoOid+"-"+blockOid).remove()}block.css("backgroundImage","url("+this._bgImage+")");block.css("backgroundSize","100% 100%");block.css("cursor","default");block.append('<div id="pingVpBlockLike-'+videoOid+"-"+blockOid+'" class="pingVpBlockLike pingVpReset"></div>');block.append('<div id="pingVpBlockDislike-'+videoOid+"-"+blockOid+'" class="pingVpBlockDislike pingVpReset"></div>');this._likeButton=$("#pingVpBlockLike-"+videoOid+"-"+blockOid);this._dislikeButton=$("#pingVpBlockDislike-"+videoOid+"-"+blockOid);this._likeButton.css("left",this._likeX+"px");this._likeButton.css("top",this._likeY+"px");this._likeButton.css("width",this._likeWidth+"px");this._likeButton.css("height",this._likeHeight+"px");this._dislikeButton.css("left",this._dislikeX+"ps");this._dislikeButton.css("top",this._dislikeY+"ps");this._dislikeButton.css("width",this._dislikeWidth+"px");this._dislikeButton.css("height",this._dislikeHeight+"px");this._likeButton.css("backgroundImage","url("+this._likeImage+")");this._dislikeButton.css("backgroundImage","url("+this._dislikeImage+")");this._likeButton.css("cursor","pointer");this._dislikeButton.css("cursor","pointer");this._likeButton.click($bind(this,this.onLikeClick));this._dislikeButton.click($bind(this,this.onDislikeClick))};$hxClasses["pingvp.PingVpBLockRating"]=pingvp_PingVpBLockRating;pingvp_PingVpBLockRating.__name__=["pingvp","PingVpBLockRating"];pingvp_PingVpBLockRating.prototype={update:function(scale){if(this._rated){this._block.css("display","none");return}this._likeButton.css("left",this._likeX*scale+"px");this._likeButton.css("top",this._likeY*scale+"px");this._likeButton.css("width",this._likeWidth*scale+"px");this._likeButton.css("height",this._likeHeight*scale+"px");this._dislikeButton.css("left",this._dislikeX*scale+"px");this._dislikeButton.css("top",this._dislikeY*scale+"px");this._dislikeButton.css("width",this._dislikeWidth*scale+"px");this._dislikeButton.css("height",this._dislikeHeight*scale+"px")},onLikeClick:function(e){this._block.css("display","none");this._rated=true;if(this._funOnClick==null){return}this._funOnClick(true)},onDislikeClick:function(e){this._block.css("display","none");this._rated=true;if(this._funOnClick==null){return}this._funOnClick(false)},__class__:pingvp_PingVpBLockRating};var pingvp_PingVpBlock=function(videoScriptName,name,videoOid,blockOid,debug,videoPosLeft,videoPosTop,x,y,width,height,start,duration,action,args,scriptWidth,scriptHeight,onShow,onClose,onClick,playerType,funOnCtaClose,theme,text){var _gthis=this;this._name=name;this._videoOid=videoOid;this._blockOid=blockOid;this._width=width;this._height=height;this._scriptWidth=scriptWidth;this._scriptHeight=scriptHeight;this._x=x;this._y=y;this._fontSize=args.fontSize;this._showTrigger=true;this._closeTrigger=false;this._isAnnounced=false;this._onShow=onShow;this._onClose=onClose;this._onClick=onClick;this._action=action;this._args=args;this._start=start;this._duration=duration;this._theme=theme;this._text=text;if(playerType=="html5"){if(args.html5StartCorrection!=null){this._start+=args.html5StartCorrection}if(args.html5DurationCorrection!=null){this._duration+=args.html5DurationCorrection}}else{if(playerType=="canvas"){if(args.canvasStartCorrection!=null){this._start+=args.canvasStartCorrection}if(args.canvasDurationCorrection!=null){this._duration+=args.canvasDurationCorrection}}}$("#pingVpOverlay-"+videoOid).append('<div id="pingVpBlock-'+videoOid+"-"+blockOid+'" class="pingVpBlock pingVpReset"></div>');this._block=$("#pingVpBlock-"+videoOid+"-"+blockOid);this._block.css("display","none");var r_r=new RegExp("[^a-zA-Z0-9-]","g".split("u").join(""));var blockNameSafe=name.replace(r_r,"-");var videoScriptNameSafe=videoScriptName.replace(r_r,"-");this._block.addClass("pingVpBlockName-"+blockNameSafe);this._block.addClass("pingVpBlockName-"+videoScriptNameSafe+"-"+blockNameSafe);this._accessibilityTitle=name;if(this._args.ariaLabel!=null){this._accessibilityTitle=this._args.ariaLabel}if(debug){this._block.css("backgroundColor","rgba(214, 49, 49, 0.45)")}if(this._args.opacity!=null){this._block.css("opacity",this._args.opacity)}switch(action){case"image":this._preloadedImage=new pingvp_PreloadedImage(pingvp_PingVpConfigRead.get().imagesUri+args.image,args.hover!=null&&args.hover==true);$(this._block).append(this._preloadedImage.getDivElement());if(this._args.opacity!=null){this._preloadedImage.opacity(this._args.opacity)}if(args.url==null&&args.video==null){this._block.css("cursor","default")}else{this._block.css("cursor","pointer")}if(args.hover!=null&&args.hover==true){this._block.attr("aria-label",this._accessibilityTitle)}break;case"link":this._block.attr("alt",this._accessibilityTitle);this._block.attr("role","link");this._block.attr("aria-label",this._accessibilityTitle);this._block.attr("tabindex","0");this._block.css("cursor","pointer");this._block.attr("aria-label",this._accessibilityTitle);break;case"load":this._block.attr("alt",this._accessibilityTitle);this._block.attr("role","button");this._block.attr("aria-label",this._accessibilityTitle);this._block.attr("tabindex","0");this._block.css("cursor","pointer");this._block.attr("aria-label",this._accessibilityTitle);break;case"rating":this._rating=new pingvp_PingVpBLockRating(videoOid,blockOid,this._block,this._args,$bind(this,this.onRatingClick));this._block.css("cursor","default");break;case"text":this._block.html('<div class="pingVpBlockText pingVpReset">'+Std.string(args.text)+"</div>");this._blockText=$("#pingVpBlock-"+videoOid+"-"+blockOid+" .pingVpBlockText");if(this._args.opacity!=null){this._blockText.css("opacity",this._args.opacity)}this._blockText.css("height",height+"px");this._blockText.css("fontSize",Std.string(args.fontSize)+"%");if(args.textAlign!=null){this._block.css("textAlign",args.textAlign)}if(args.fontWeight!=null&&args.fontWeight=="bold"){$("#pingVpBlock-"+videoOid+"-"+blockOid+" .pingVpBlockText").css("fontWeight","bold !important")}if(args.url==null&&args.video==null){this._block.css("cursor","default")}else{this._block.css("cursor","pointer")}break;default:this._block.css("cursor","pointer");this._block.attr("aria-label",this._accessibilityTitle)}if(action=="cta"||this._args.cta==true){this._block.css("cursor","pointer");this._block.attr("tabindex","0");if(this._blockText!=null){this._blockText.css("cursor","pointer")}var styleClose=this._theme.getFull(this._theme.getByKey("svgset"),"cross.svg",theme.getByKey("defaultcolor"));var styleCloseHover=this._theme.getFull(this._theme.getByKey("svgset"),"cross.svg",theme.getByKey("hovercolor"));$("#pingVpOverlay-"+videoOid).append('<div id="pingVpBlock-'+videoOid+"-"+blockOid+'-ctaOpen" class="pingVpBlock pingVpReset "><div class="pingVpBlockCta pingVpReset"></div></div>');this._blockCtaOpen=$("#pingVpBlock-"+videoOid+"-"+blockOid+"-ctaOpen");this._blockCtaInner=$("#pingVpBlock-"+videoOid+"-"+blockOid+"-ctaOpen .pingVpBlockCta");this._blockCtaOpen.css("display","none");this._blockCtaOpen.addClass("pingVpBlockName-"+blockNameSafe+"-ctaOpen");this._blockCtaOpen.addClass("pingVpBlockName-"+videoScriptNameSafe+"-"+blockNameSafe+"-ctaOpen");if(this._args.ctaContentType=="html"&&this._args.ctaContent!=""){this._blockCtaInner.html(this._args.ctaContent)}else{if(this._args.ctaContentType=="iframe"&&this._args.ctaContent!=""){this._blockCtaInner.append('<iframe src="'+Std.string(this._args.ctaContent)+'" class="pingVpIframeCta" frameborder="0" allowfullscreen></iframe>')}}if(args.ctaCloseBtn==null||args.ctaCloseBtn==true){if(this._blockCtaInner.find("[data-cta='close']").length==0){this._blockCtaOpen.append('<div class="pingVpCtaClose" data-cta="close"><img class="closeCtaIcon" src="'+styleClose+'"></img></div>');this._blockCtaCrossIcon=$(".pingVpCtaClose[data-cta='close']");this._blockCtaCrossIcon.hover(function(e){_gthis._blockCtaCrossIcon.children("img").attr("src",styleCloseHover)},function(e1){_gthis._blockCtaCrossIcon.children("img").attr("src",styleClose)})}}if(this._blockCtaOpen.find("[data-cta='close']").length==1){this._blockCtaCloseBtn=this._blockCtaOpen.find('[data-cta="close"]');this._blockCtaCloseBtn.attr("tabindex","0");this._blockCtaCloseBtn.css("cursor","pointer");this._blockCtaCloseBtn.click(function(e2){_gthis._focus=$(":focus");_gthis._blockCtaOpen.hide();if(_gthis._args.ctaContentType=="iframe"&&_gthis._args.ctaContent!=""){_gthis._blockIframeElem=_gthis._blockCtaOpen.find("iframe.pingVpIframeCta");_gthis._blockIframeElem.attr("src",_gthis._blockIframeElem.attr("src"))}if(_gthis._blockCtaCloseBtn.is(_gthis._focus)){_gthis._block.focus()}if(args.ctaOnClose!=null&&args.ctaOnClose=="pause"){funOnCtaClose(false,false,true)}else{if(args.ctaOnClose!=null&&args.ctaOnClose=="play"){funOnCtaClose(false,true,true)}else{funOnCtaClose(false,true,false)}}})}}if(action!="rating"){this._block.on("click",null,function(e3){if(args.hover!=null&&args.hover==true){_gthis._block.css("backgroundPosition","100% top")}_gthis._onClick(_gthis._videoOid,_gthis._blockOid,_gthis._name,_gthis._action,_gthis._args)})}if(args.follow!=null){this._followPath=new pingvp_PingVpFollowPath(x,y,args.follow)}else{this._followPath=null;this._cssAnimation=null}if(this._blockText!=null&&args.textColor!=null){this._blockText.css("color","#"+Std.string(args.textColor))}if(this._blockText!=null&&args.textShadowX!=null&&args.textShadowY!=null&&args.textShadowBlur!=null&&args.textShadowColor!=null){this._blockText.css("textShadow",Std.string(args.textShadowX)+"px "+Std.string(args.textShadowY)+"px "+Std.string(args.textShadowBlur)+"px #"+Std.string(args.textShadowColor))}if(this._blockText!=null&&args.fontName!=null){var r_r1=new RegExp("[^a-zA-Z0-9]","g".split("u").join(""));var fontName=args.fontName.replace(r_r1,"-");this._blockText.addClass("pingVpFont-"+fontName)}this._counter=0;if(args.angle!=0){this._block.css("-webkit-transform","rotate("+Std.string(args.angle)+"deg)");this._block.css("-moz-transform","rotate("+Std.string(args.angle)+"deg)");this._block.css("-ms-transform","rotate("+Std.string(args.angle)+"deg)");this._block.css("-o-transform","rotate("+Std.string(args.angle)+"deg)");this._block.css("transform","rotate("+Std.string(args.angle)+"deg)")}if(args.fadeIn!=null){this._fadeIn=args.fadeIn}else{this._fadeIn=0}if(args.fadeOut!=null){this._fadeOut=args.fadeOut}else{this._fadeOut=0}this._cssFadeIn=new pingvp_PingVpCssFadeIn(this._block,this._fadeIn);this._cssFadeOut=new pingvp_PingVpCssFadeOut(this._block,this._fadeOut);this._block.css("display","none")};$hxClasses["pingvp.PingVpBlock"]=pingvp_PingVpBlock;pingvp_PingVpBlock.__name__=["pingvp","PingVpBlock"];pingvp_PingVpBlock.prototype={update:function(frameNo,time,videoPosLeft,videoPosTop,videoWidth,videoHeight,containerWidth,containerHeight,marginBottom){videoWidth=this._scriptWidth;videoHeight=this._scriptHeight;if(this._args.startFrame!=null&&this._args.stopFrame!=null){if(frameNo<this._args.startFrame||frameNo>this._args.stopFrame){this._block.css("display","none");if(this._closeTrigger){this._onClose(this._videoOid,this._block,this._blockOid,this._name,this._action,this._args);this._closeTrigger=false}if(this._isAnnounced){this._isAnnounced=false}this._showTrigger=true;return}}else{if(this._args.start!=null&&this._args.duration!=null){if(time*1000<this._start*1000||time*1000>(this._start+this._duration)*1000){this._block.css("display","none");if(this._closeTrigger){this._onClose(this._videoOid,this._block,this._blockOid,this._name,this._action,this._args);this._closeTrigger=false}this._showTrigger=true;if(this._cssFadeIn!=null){this._cssFadeIn.reset()}if(this._cssFadeOut!=null){this._cssFadeOut.reset()}if(this._isAnnounced){this._isAnnounced=false}return}}}if(this._cssFadeIn!=null){this._cssFadeIn.fade()}if(this._cssFadeOut!=null){this._cssFadeOut.fade(time,this._start+this._duration)}if(this._followPath!=null){this._followPath.update(time-this._start);this._x=this._followPath.getX();this._y=this._followPath.getY()}var scaleX=containerWidth/videoWidth;var scaleY=(containerHeight-marginBottom)/videoHeight;var centerX=containerWidth/2;var centerY=(containerHeight-marginBottom)/2;var scale=scaleX;if(scaleY<scaleX){scale=scaleY}var startX=centerX-videoWidth*scale/2;var startY=centerY-videoHeight*scale/2;var blockWidth=this._width*videoWidth/this._scriptWidth;var blockHeight=this._height*videoHeight/this._scriptHeight;var widthPercent=scale*blockWidth*100/containerWidth;var heightPercent=scale*blockHeight*100/containerHeight;var blockX=this._x*videoWidth/this._scriptWidth;var blockY=this._y*videoHeight/this._scriptHeight;var leftPercent=(startX+scale*blockX)*100/containerWidth;var topPercent=(startY+scale*blockY)*100/containerHeight;this._block.css("display","block");this._block.css("width",widthPercent+"%");this._block.css("height",heightPercent+"%");$("#pingVpBlock-"+this._videoOid+"-"+this._blockOid+" .pingVpBlockText").css("fontSize",scale*this._fontSize+"%");this._block.css("left",leftPercent+"%");this._block.css("top",topPercent+"%");if(this._args.textShadowX!=null&&this._args.textShadowY!=null&&this._args.textShadowBlur!=null&&this._args.textShadowColor!=null){this._block.css("textShadow",scale*this._args.textShadowX+"px "+scale*this._args.textShadowY+"px "+scale*this._args.textShadowBlur+"px #"+Std.string(this._args.textShadowColor))}if(this._action=="text"){$("#pingVpBlock-"+this._videoOid+"-"+this._blockOid+" .pingVpBlockText").css("height",this._height*scale+"px")}if(this._action=="rating"&&this._rating!=null){this._rating.update(scale)}if(this._action=="cta"||this._args.cta==true){var ctaBlockWidth=this._args.ctaWidth*videoWidth/this._scriptWidth;var ctaBlockHeight=this._args.ctaHeight*videoHeight/this._scriptHeight;var ctaWidthPercent=scale*ctaBlockWidth*100/containerWidth;var ctaHeightPercent=scale*ctaBlockHeight*100/containerHeight;var ctaBlockX=this._args.ctaX*videoWidth/this._scriptWidth;var ctaBlockY=this._args.ctaY*videoHeight/this._scriptHeight;var ctaLeftPercent=(startX+scale*ctaBlockX)*100/containerWidth;var ctaTopPercent=(startY+scale*ctaBlockY)*100/containerHeight;this._blockCtaOpen.css("width",ctaWidthPercent+"%");this._blockCtaOpen.css("height",ctaHeightPercent+"%");this._blockCtaOpen.css("left",ctaLeftPercent+"%");this._blockCtaOpen.css("top",ctaTopPercent+"%")}if(this._showTrigger){this._onShow(this._videoOid,this._block,this._blockOid,this._name,this._action,this._args);this._showTrigger=false}this._closeTrigger=true;if(!this._isAnnounced){this._isAnnounced=true;if(this._action=="link"||this._action=="load"){this._announcement.setMessage(this._text.get("announceButton")+this._accessibilityTitle)}}},zIndex:function(index){},remove:function(){this._block.unbind();this._block.remove()},get:function(){return this._block},onRatingClick:function(like){this._onClick(this._videoOid,this._blockOid,this._name,this._action,this._args,like)},setAnnounceClass:function(announceClass){this._announcement=announceClass},__class__:pingvp_PingVpBlock};var pingvp_PingVpBlocksAll=function(videoOid,debug,scriptWidth,scriptHeight,onShow,onClose,onClick,funOnPause,funOnSeek,funOnCtaClose,theme,text){this._videoOid=videoOid;this._blockSerial=1;this._debug=debug;this._scriptWidth=scriptWidth;this._scriptHeight=scriptHeight;this._onShow=onShow;this._onClose=onClose;this._onClick=onClick;this._blocks=[];this._funOnPause=funOnPause;this._funOnSeek=funOnSeek;this._funOnCtaClose=funOnCtaClose;this._theme=theme;this._text=text;this._otherCommands=[]};$hxClasses["pingvp.PingVpBlocksAll"]=pingvp_PingVpBlocksAll;pingvp_PingVpBlocksAll.__name__=["pingvp","PingVpBlocksAll"];pingvp_PingVpBlocksAll.prototype={getBlocks:function(){return this._blocks},addBlock:function(videoScriptName,name,videoPosLeft,videoPosTop,x,y,width,height,start,duration,action,args,playerType){var block=new pingvp_PingVpBlock(videoScriptName,name,this._videoOid,this._blockSerial++,this._debug,videoPosLeft,videoPosTop,x,y,width,height,start,duration,action,args,this._scriptWidth,this._scriptHeight,this._onShow,this._onClose,this._onClick,playerType,this._funOnCtaClose,this._theme,this._text);this._blocks.push(block)},executeScript:function(videoScriptName,videoPosLeft,videoPosTop,blockScript,syncTime,durationCorrection,playerType){var keysSorted=[];var _g=0;var _g1=Reflect.fields(blockScript);while(_g<_g1.length){var n=_g1[_g];++_g;keysSorted.push(n)}keysSorted.sort(function(a,b){return Reflect.compare(a,b)});var _g2=0;while(_g2<keysSorted.length){var n1=keysSorted[_g2];++_g2;var command=Reflect.field(blockScript,n1);var _g11=command.command;switch(_g11){case"pause":this._otherCommands.push(new pingvp_commons_Command(n1,command.position,command,this._funOnPause));break;case"rectangle":this.addBlock(videoScriptName,n1,videoPosLeft,videoPosTop,command.x,command.y,command.width,command.height,command.start+syncTime,command.duration+durationCorrection,command.action,command,playerType);break;case"seek":this._otherCommands.push(new pingvp_commons_Command(n1,command.position,command,this._funOnSeek));break}}},render:function(frameNo,time,videoPosLeft,videoPosTop,videoWidth,videoHeight,containerWidth,containerHeight,paddingBottom){var _g=0;var _g1=this._blocks;while(_g<_g1.length){var block=_g1[_g];++_g;block.update(frameNo,time,videoPosLeft,videoPosTop,videoWidth,videoHeight,containerWidth,containerHeight,paddingBottom)}var _g2=0;var _g11=this._otherCommands;while(_g2<_g11.length){var otherCommands=_g11[_g2];++_g2;otherCommands.update(time)}},setAnnounceClass:function(announceClass){var _g=0;var _g1=this._blocks;while(_g<_g1.length){var block=_g1[_g];++_g;block.setAnnounceClass(announceClass)}},__class__:pingvp_PingVpBlocksAll};var pingvp_PingVpBrandedStudio=function(videoOid,videoScript,videoScriptName,overlay,container,videoName,controlsBelowVideo,hasPlaybarVisible,event){var _gthis=this;this._container=container;this._videoOid=videoOid;this._videoScriptName=videoScriptName;this._videoName=videoName;this._videoScript=videoScript;this._scriptWidth=this._videoScript.getFragmentVideoWidth(this._videoName);this._scriptHeight=this._videoScript.getFragmentVideoHeight(this._videoName);this._logoBool=false;this._endcardBool=false;this._mobileCheck=false;this._event=event;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._mobileCheck=true}if($("#pingVpBrandedStudio-"+videoOid).length!=0){$("#pingVpBrandedStudio-"+videoOid).remove()}if(this._videoScript.getBrandedstudioHelper()){this._headerSettingWidth=this._videoScript.getHeaderHelper("responsiveWidth","");if(this._headerSettingWidth==""){this._headerSettingWidth=this._videoScript.getHeaderHelper("posterWidth","")}if(this._headerSettingWidth==""){this._headerSettingWidth=640}this._headerSettingHeight=this._videoScript.getHeaderHelper("responsiveHeight","");if(this._headerSettingHeight==""){this._headerSettingHeight=this._videoScript.getHeaderHelper("posterHeight","")}if(this._headerSettingHeight==""){this._headerSettingHeight=360}this._logoCheck=this._videoScript.getBrandedstudioCheckHelper("logo");this._endcardCheck=this._videoScript.getBrandedstudioCheckHelper("endcard");if(this._logoCheck){$("#pingVpOverlay-"+videoOid).append('<div id="pingVpBrandedStudio-'+videoOid+'" class="pingVpBrandedStudio pingVpBrandedNoClick pingVpReset"></div>');this._brandedStudioBlock=$("#pingVpBrandedStudio-"+videoOid);if(this._mobileCheck){this._brandedStudioBlock.addClass("pingVpBrandedStudioMobile")}this._logoBool=true;this._logoSrc=pingvp_PingVpConfigRead.get().brandingLogoSrc;this._logoPosition=this._videoScript.getBrandedstudioLogoHelper("position");$(this._brandedStudioBlock).append('<div id="pingVpBrandedStudioLogoWrapper-'+videoOid+'" class="pingVpBrandedStudioLogoWrapper pingVpReset"></div>');this._logoWrapper=this._brandedStudioBlock.children("#pingVpBrandedStudioLogoWrapper-"+videoOid);$(this._logoWrapper).append('<img src="'+this._logoSrc+'" class="pingVpBrandedStudioLogoStyle pingVpReset"></div>');this._logo=this._logoWrapper.children("img");if(this._logoPosition=="top_right"){this._logoWrapper.css("top","0");this._logoWrapper.css("right","0")}else{if(this._logoPosition=="bottom_left"){this._logoWrapper.css("left","0");this._logoWrapper.addClass("pingVpBrandedStudioLogoBottom-"+videoOid)}else{if(this._logoPosition=="bottom_right"){this._logoWrapper.css("right","0");this._logoWrapper.addClass("pingVpBrandedStudioLogoBottom-"+videoOid)}else{this._logoWrapper.css("top","0");this._logoWrapper.css("left","0")}}}if(!controlsBelowVideo){$(".pingVpBrandedStudioLogoBottom-"+this._videoOid).addClass("pingVpLogoExtraSpacing")}if(hasPlaybarVisible){$(".pingVpBrandedStudioLogoBottom-"+this._videoOid).addClass("pingVpControlBarVisible")}}if(this._endcardCheck){$("#pingVpOverlay-"+videoOid).append('<div id="pingVpBrandedStudio2-'+videoOid+'" class="pingVpBrandedStudio pingVpReset"></div>');this._brandedStudioBlock2=$("#pingVpBrandedStudio2-"+videoOid);if(this._mobileCheck){this._brandedStudioBlock2.addClass("pingVpBrandedStudioMobile")}this._endcardBool=true;this._endcardStart=0;this._endcardPosition=this._videoScript.getBrandedstudioEndcardHelper("endcard_position");this._endcardCta=this._videoScript.getBrandedstudioEndcardHelper("title");this._endcardCommands=this._videoScript.getBrandedstudioEndcardCommandHelper("commands");this._endcardColor=pingvp_PingVpConfigRead.get().brandingEndcardColor;this._endcardBtnColor=pingvp_PingVpConfigRead.get().brandingEndcardBtnColor;this._endcardBtnBgColor=pingvp_PingVpConfigRead.get().brandingEndcardBtnBgColor;var checkRatio=this._headerSettingWidth/this._headerSettingHeight;if(checkRatio<1){this._endcardBg=pingvp_PingVpConfigRead.get().brandingEndcardBg9x16}else{if(checkRatio==1){this._endcardBg=pingvp_PingVpConfigRead.get().brandingEndcardBg1x1}else{this._endcardBg=pingvp_PingVpConfigRead.get().brandingEndcardBg16x9}}this._endcardBtnColorHover=pingvp_PingVpConfigRead.get().brandingEndcardBtnHoverColor;this._endcardBtnBgColorHover=pingvp_PingVpConfigRead.get().brandingEndcardBtnHoverBgColor;this._endcardFont=pingvp_PingVpConfigRead.get().brandingEndcardFont;var r_r=new RegExp("[^a-zA-Z0-9-]","g".split("u").join(""));var posName=this._endcardPosition.replace(r_r,"-");$(this._brandedStudioBlock2).append('<div id="pingVpBrandedStudioEndcard-'+videoOid+'" class="pingVpBrandedStudioEndcard pingVpBrandedStudioEndcardPos-'+posName+' pingVpReset"></div>');this._endcardWrapper=this._brandedStudioBlock2.children("#pingVpBrandedStudioEndcard-"+videoOid);$(this._endcardWrapper).append('<div id="pingVpBrandedStudioEndcardBg-'+videoOid+'" class="pingVpBrandedStudioEndcardBg pingVpReset"></div>');this._endcardBlockBg=this._endcardWrapper.children("#pingVpBrandedStudioEndcardBg-"+videoOid);$(this._endcardWrapper).append('<div id="pingVpBrandedStudioEndcardContent-'+videoOid+'" class="pingVpBrandedStudioEndcardContent pingVpReset"></div>');this._endcardBlockContent=this._endcardWrapper.children("#pingVpBrandedStudioEndcardContent-"+videoOid);$(this._endcardBlockContent).append('<div id="pingVpBrandedStudioEndcardHeader-'+videoOid+'" class="pingVpBrandedStudioEndcardHeader pingVpReset"></div>');this._endcardBlockHeader=this._endcardBlockContent.children("#pingVpBrandedStudioEndcardHeader-"+videoOid);$(this._endcardBlockContent).append('<div id="pingVpBrandedStudioEndcardButtonsWrapper-'+videoOid+'" class="pingVpBrandedStudioEndcardButtonsWrapper pingVpReset"></div>');this._endcardBlockButtonsWrapper=this._endcardBlockContent.children("#pingVpBrandedStudioEndcardButtonsWrapper-"+videoOid);$(this._endcardBlockButtonsWrapper).append('<div id="pingVpBrandedStudioEndcardButtons-'+videoOid+'" class="pingVpBrandedStudioEndcardButtons pingVpReset"></div>');this._endcardBlockButtons=this._endcardBlockButtonsWrapper.children("#pingVpBrandedStudioEndcardButtons-"+videoOid);this._endcardBlockHeader.html(this._endcardCta);if(this._endcardCommands!=null){var _g=0;var _g1=Reflect.fields(this._endcardCommands);while(_g<_g1.length){var commandKey=_g1[_g];++_g;var commandValue=[Reflect.field(this._endcardCommands,commandKey)];var r_r1=new RegExp("[^a-zA-Z0-9-]","g".split("u").join(""));var blockNameSafe=commandKey.replace(r_r1,"-");$(this._endcardBlockButtons).append('<button id="pingVpBrandedStudioEndcardButton-'+blockNameSafe+"-"+videoOid+'" class="pingVpBrandedStudioBtnStyling pingVpBrandedStudioBtnStyling-'+videoOid+'"></button>');var tempCommand=[this._endcardBlockButtons.children("#pingVpBrandedStudioEndcardButton-"+blockNameSafe+"-"+videoOid)];tempCommand[0].html(commandValue[0].button_description);tempCommand[0].attr("tabindex","0");tempCommand[0].css("cursor","pointer");tempCommand[0].css("color","#"+this._endcardBtnColor);tempCommand[0].css("font-family","#"+this._endcardFont);tempCommand[0].css("background-color","#"+this._endcardBtnBgColor);var tmp=pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click";var tmp1=(function(commandValue1){return function(e){e.preventDefault();_gthis.brandedStudioLinkHelper(commandValue1[0])}})(commandValue);tempCommand[0].on(tmp,null,tmp1);var tmp2=(function(tempCommand1){return function(e1){tempCommand1[0].css("color","#"+_gthis._endcardBtnColorHover);tempCommand1[0].css("background-color","#"+_gthis._endcardBtnBgColorHover)}})(tempCommand);var tmp3=(function(tempCommand2){return function(e2){tempCommand2[0].css("color","#"+_gthis._endcardBtnColor);tempCommand2[0].css("background-color","#"+_gthis._endcardBtnBgColor)}})(tempCommand);tempCommand[0].hover(tmp2,tmp3)}}if(this._endcardBg!=null&&this._endcardPosition!="transparent"){this._endcardBlockBg.css("background-image","url("+this._endcardBg+")")}this._endcardFadeIn=new pingvp_PingVpCssFadeIn(this._endcardWrapper,3);this._endcardFadeOut=new pingvp_PingVpCssFadeOut(this._endcardWrapper,0);this._endcardWrapper.css("display","none");this._endcardBlockHeader.css("color","#"+this._endcardColor);this._endcardBlockHeader.css("font-family","#"+this._endcardColor);this._endcardAllCommands=this._endcardBlockButtons.children(".pingVpBrandedStudioBtnStyling-"+videoOid)}if(this._logoBool||this._endcardBool){this.resize(40)}}};$hxClasses["pingvp.PingVpBrandedStudio"]=pingvp_PingVpBrandedStudio;pingvp_PingVpBrandedStudio.__name__=["pingvp","PingVpBrandedStudio"];pingvp_PingVpBrandedStudio.prototype={resize:function(extraOffset){if(this._logoBool||this._endcardBool){var videoWidth=this._scriptWidth;var videoHeight=this._scriptHeight;var containerWidth=this._container.getWidth();var containerHeight=this._container.getHeight()-extraOffset;var ratioScaling=videoWidth/640;videoWidth=640;videoHeight/=ratioScaling;var scaleX=containerWidth/videoWidth;var scaleY=containerHeight/videoHeight;var centerX=containerWidth/2;var centerY=containerHeight/2;var scale=scaleX;if(scaleY<scaleX){scale=scaleY}var startX=centerX-videoWidth*scale/2;var startY=centerY-videoHeight*scale/2;if(this._endcardBool){this._endcardBlockHeader.css("font-size",pingvp_PingVpConfigRead.get().brandingEndcardFontSize*scale+"%");this._endcardAllCommands.css("font-size",pingvp_PingVpConfigRead.get().brandingEndcardBtnFontSize*scale+"%")}var scaledWidth=videoWidth*scale;var scaledHeight=videoHeight*scale;if(this._brandedStudioBlock!=null){this._brandedStudioBlock.css("left",startX+"px");this._brandedStudioBlock.css("top",startY+"px");this._brandedStudioBlock.css("width",scaledWidth+"px");this._brandedStudioBlock.css("height",scaledHeight+"px")}if(this._brandedStudioBlock2!=null){this._brandedStudioBlock2.css("left",startX+"px");this._brandedStudioBlock2.css("top",startY+"px");if(this._endcardPosition=="left"||this._endcardPosition=="right"){this._brandedStudioBlock2.css("width",scaledWidth/2+"px");if(this._endcardPosition=="right"){this._brandedStudioBlock2.css("left","unset");this._brandedStudioBlock2.css("right","0")}}else{this._brandedStudioBlock2.css("width",scaledWidth+"px")}this._brandedStudioBlock2.css("height",scaledHeight+"px")}var percentH=scaledWidth*0.028;if(scaledHeight>scaledWidth){percentH=scaledHeight*0.028}var marginOffset=10;var percentW=marginOffset*scale;if(this._logoBool){this._logoWrapper.css("margin",percentW+"px");if(this._logoPosition=="bottom_left"||this._logoPosition=="bottom_right"){var logoBottomOffset=10;if(extraOffset==0){logoBottomOffset=0}this._logoWrapper.css("bottom",logoBottomOffset+"px")}this._logo.css("height",percentH+"px");this._logo.css("width","auto")}if(this._brandedStudioBlock!=null){this._brandedStudioBlock.css("display","block")}if(this._brandedStudioBlock2!=null){this._brandedStudioBlock2.css("display","block")}}},update:function(time){if(this._logoBool||this._endcardBool){if(this._endcardStart!=null&&this._endcardDuration!=null){if(time*1000<this._endcardStart*1000||time*1000>(this._endcardStart+this._endcardDuration)*1000){this._endcardWrapper.css("display","none");if(this._brandedStudioBlock!=null){this._brandedStudioBlock.css("z-index","1")}if(this._brandedStudioBlock2!=null){this._brandedStudioBlock2.css("z-index","1")}if(this._endcardFadeIn!=null){this._endcardFadeIn.reset()}return}}if(this._endcardFadeIn!=null){this._endcardFadeIn.fade()}if(this._brandedStudioBlock!=null){this._brandedStudioBlock.css("z-index","4")}if(this._brandedStudioBlock2!=null){this._brandedStudioBlock2.css("z-index","3")}if(this._endcardBool){this._endcardWrapper.css("display","block");if(time==0){this._endcardWrapper.css("display","none")}}}},setEndcardStart:function(videoTag){if(this._logoBool||this._endcardBool){if(this._endcardBool){this._endcardStart=videoTag.getDuration()-3;this._endcardDuration=999}}},setLinkHelper:function(call){this._linkHelper=call},brandedStudioLinkHelper:function(args){if(this._linkHelper!=null){this._linkHelper(args,args.button_description,"Endcard click")}},__class__:pingvp_PingVpBrandedStudio};var pingvp_PingVpCalculations=function(){};$hxClasses["pingvp.PingVpCalculations"]=pingvp_PingVpCalculations;pingvp_PingVpCalculations.__name__=["pingvp","PingVpCalculations"];pingvp_PingVpCalculations.prototype={trim:function(number,precision){var num=number;num*=Math.pow(10,precision);num=Math.round(num)/Math.pow(10,precision);return num},__class__:pingvp_PingVpCalculations};var pingvp_PingVpCanvasFrame=function(baseUrl,frame,funBufferCheck){var _gthis=this;this._image=new Image();this._frame=frame+1;this._ready=false;this._funBufferCheck=funBufferCheck;var frameString="";frameString+=this.numberHelper(this._frame,7);frameString+=this.numberHelper(this._frame,6);frameString+=this.numberHelper(this._frame,5);frameString+=this.numberHelper(this._frame,4);frameString+=this.numberHelper(this._frame,3);frameString+=this.numberHelper(this._frame,2);frameString+=this.numberHelper(this._frame,1);frameString+=this.numberHelper(this._frame,0);this._image.addEventListener("load",function(e){_gthis._ready=true;if(_gthis._funBufferCheck!=null){_gthis._funBufferCheck()}},false);this._image.addEventListener("error",function(e1){_gthis._ready=false},false);this._image.src=baseUrl+"chunk_"+frameString+".jpg"};$hxClasses["pingvp.PingVpCanvasFrame"]=pingvp_PingVpCanvasFrame;pingvp_PingVpCanvasFrame.__name__=["pingvp","PingVpCanvasFrame"];pingvp_PingVpCanvasFrame.prototype={numberHelper:function(number,pos){return Std.string(Math.floor(number/Math.pow(10,pos))%10)},getFrameImage:function(){return this._image},getFrameNo:function(){return this._frame-1},getReady:function(){return this._ready},__class__:pingvp_PingVpCanvasFrame};var pingvp_PingVpPlayerBase=function(debug,videoOid,node,container,text,videoScript,controlsBelowVideo,controlsDisabled,tempStartFragment,analytics,events,autoStart,inOverlayPlay,inlinePlay,call){var _gthis=this;this._debug=debug;this._videoOid=videoOid;this._container=container;this._text=text;this._controlsBelowVideo=controlsBelowVideo;this._controlsDisabled=controlsDisabled;this._node=node;this._videoScript=videoScript;this._loop=true;this._inlinePlay=inlinePlay;this._inOverlayPlay=inOverlayPlay;this._call=call;this._events=events;this._percent0=this._percent10=this._percent20=this._percent30=this._percent40=this._percent50=this._percent60=this._percent70=this._percent80=this._percent90=this._percent100=true;this._replayEvent=false;this._displayHtmlOverview=false;this._hasWebSocket=false;this._mobileCheck=false;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._mobileCheck=true}this._checkDeviceFunctions=!pingvp_PingVpDevice.isIphone()&&!pingvp_PingVpDevice.isIpad()&&!pingvp_PingVpDevice.isAndroid();this.sendWebSiteStatistics();this._videoTitle=this._videoScript.script().getHeaderTitle();this._tempStartFragment=tempStartFragment;this._videoName=this._tempStartFragment;this._playerUri=pingvp_PingVpConfigRead.get().playerUri;this._videosUri=pingvp_PingVpConfigRead.get().videosUri;this._postersUri=pingvp_PingVpConfigRead.get().postersUri!=null?pingvp_PingVpConfigRead.get().postersUri:pingvp_PingVpConfigRead.get().videosUri;new pingvp_PingVpStyle(this._playerUri+"styles/pingvp.min.css","pingVpPlayerStyle");this._videoPath=new pingvp_PingVpPath();this._fullScreen=new pingvp_gui_fullscreen_FullScreen(this._videoOid);this._lastFragmentUuid="";this._startFragment=new pingvp_PingVpPathPair(videoScript.name(),this._tempStartFragment);this._tempTheme=this._videoScript.script().getHeaderTheme();this._theme=new pingvp_PingVpTheme(this._videoScript.script().getShowPlay(),this._controlsBelowVideo,this._tempTheme);this._theme.set("defaultcolor",this._videoScript.script().getHeaderDefaultColor());this._theme.set("hovercolor",this._videoScript.script().getHeaderHoverColor());this._headerThemeBase=this._playerUri+"themes/"+this._tempTheme+"/";this._headerPoster=this._postersUri+this._videoScript.script().getHeaderPoster();this._contextMenu=new pingvp_PingVpContextMenu(this._videoOid);this._pingVpClick=new pingvp_PingVpClick(this._videoOid,this._videoScript.name(),$bind(this,this.onPingVpClickPlay),$bind(this,this.onPingVpClickPause));this._preload=new pingvp_PingVpPreload(this._videoOid,this._videosUri);this._playLoop=this._videoScript.script().getFragmentLoop(this._videoScript.script().getHeaderStart());this._autoStart=autoStart;this._statsOverview=$('.pingVpStatsOverview[data-video="'+this._videoScript.script().getVideoName()+'"]');if(this._statsOverview.length>0){if(this._statsOverview.find("tbody").length==0){this._statsOverview.append('<h2 class="pingVpReset pingVpHeaderTable">'+this._text.get("statsTableHeaderAll")+'<span class="pingVpReset">'+this._text.get("statsTableHeaderAllEmpty")+'</span></h2><table class="pingVpReset pingVpStatsSuccesTable pingVpTable"><thead class="pingVpReset"><tr class="pingVpReset"><th class="pingVpReset">'+this._text.get("statsTableTh1")+'</th><th class="pingVpReset">'+this._text.get("statsTableTh2")+'</th></thead><tbody class="pingVpReset"></tbody></table>');this._statsOverviewTable=this._statsOverview.find("tbody");this._statsOverview.find(".pingVpHeaderTable span").on("click",null,function(e){_gthis._statsOverviewTable.html("")})}else{this._statsOverviewTable=this._statsOverview.find("tbody")}this._displayHtmlOverview=true}this.setVisibilityHook()};$hxClasses["pingvp.PingVpPlayerBase"]=pingvp_PingVpPlayerBase;pingvp_PingVpPlayerBase.__name__=["pingvp","PingVpPlayerBase"];pingvp_PingVpPlayerBase.prototype={loadFragment:function(fragment,changeQuality){},getPlayPercent:function(){return 0},getPlayDuration:function(){return 1},onPlayButton:function(ableToRepeat){},onPauseButton:function(){},onTimeSliderClick:function(){},onTimeSliderArrows:function(action){},on5secBackClick:function(){},onResize:function(e){},onTranscript:function(){},onShare:function(){},onPingVpClickPlay:function(){},onPingVpClickPause:function(){},onLinkHelper:function(args,name,statsName){},checkIsPlaying:function(){return true},sendWebSiteStatistics:function(){var title=this._videoScript.script().getHeaderTitle()},getEmbedUrl:function(){var url=window.location.href;return this.stripUrlParams(url)},getRefererUrl:function(){var url=window.document.referrer;if(url==null||url.length==0){return""}return this.stripUrlParams(url)},stripUrlParams:function(url){var arr=url.split("?");return arr[0]},onStartButton:function(){var _gthis=this;this.event("Start button");this._lastFragmentUuid=this._videoScript.script().getFragmentVideoUuid(this._videoName);this._videoPath.clear();this._videoScript.select(this._startFragment._scriptName,function(){_gthis.loadFragment(_gthis._startFragment._videoName,false)},function(){})},onBackButton:function(){var _gthis=this;this.event("Back button");this._lastFragmentUuid=this._videoScript.script().getFragmentVideoUuid(this._videoName);var pair=this._videoPath.back(this._startFragment);this._videoScript.select(pair._scriptName,function(){_gthis.loadFragment(pair._videoName,false)},function(){})},onRepeatButton:function(){this.event("Repeat button");this._lastFragmentUuid=this._videoScript.script().getFragmentVideoUuid(this._videoName);this.loadFragment(this._videoName,false)},onShortcutsButton:function(){this._shortcutOverlay.showShortcutOverlay();this.onPauseButton()},onReportButton:function(){this.event("Report button");var reportUrl="https://pingvp.com/controlpanel/report_a_problem.php";this._lastFragmentUuid=this._videoScript.script().getFragmentVideoUuid(this._videoName);var _errorFormElement=window.document.createElement("form");_errorFormElement.action=reportUrl;_errorFormElement.target="errorPingVP";_errorFormElement.method="post";var _g=new haxe_ds_StringMap();var value=this._videoScript.script().getVideoName();if(__map_reserved.video_name!=null){_g.setReserved("video_name",value)}else{_g.h.video_name=value}var value1=this._videoScript.script().getHeaderUuid();if(__map_reserved.video_uuid!=null){_g.setReserved("video_uuid",value1)}else{_g.h.video_uuid=value1}var value2=this._videoName;if(__map_reserved.clip_name!=null){_g.setReserved("clip_name",value2)}else{_g.h.clip_name=value2}var value3=this._lastFragmentUuid;if(__map_reserved.clip_uuid!=null){_g.setReserved("clip_uuid",value3)}else{_g.h.clip_uuid=value3}var inputs=_g;var input=inputs.keys();while(input.hasNext()){var input1=input.next();var _errorInputElement=window.document.createElement("input");_errorInputElement.type="hidden";_errorInputElement.name=input1;_errorInputElement.value=__map_reserved[input1]!=null?inputs.getReserved(input1):inputs.h[input1];_errorFormElement.appendChild(_errorInputElement)}window.document.body.appendChild(_errorFormElement);this.event("Report button ("+reportUrl+")");window.open(reportUrl,"errorPingVP");_errorFormElement.submit();window.document.body.removeChild(_errorFormElement)},onBrandButton:function(){var brandUrl=this._videoScript.script().getHeaderBrandUrl("https://www.pingvp.com/");this.event("Brand button ("+brandUrl+")");window.open(brandUrl,"_blank")},onFullScreenButton:function(){this.event("Enter full screen");if(this._fullScreen.support()){this._fullScreen.zIndex(this._videoOid,this._blocks,"2000");this._fullScreen.request();this._controlBar.setFullScreen()}else{if(this._fullScreen.isNotFramed()){this._fullScreen.setContainerAbsolute(this._videoOid);this._fullScreen.zIndex(this._videoOid,this._blocks,"2000");this._containerOldWidth=this._fullScreen.getContainerWidth(this._videoOid);this._containerOldHeight=this._fullScreen.getContainerHeight(this._videoOid);this._fullScreen.setContainerWidth(this._videoOid,"100%");this._fullScreen.setContainerHeight(this._videoOid,"100%");this._controlBar.setFullScreen()}}$("#pingVpVideoContainer-"+this._videoOid).addClass("pingVpVideoFullScreen")},onWindowedButton:function(){this.event("Leave full screen");if(this._fullScreen.support()){this._fullScreen.zIndex(this._videoOid,this._blocks,"auto");this._fullScreen.cancel();this._controlBar.setWindowed()}else{if(this._fullScreen.isNotFramed()){this._fullScreen.setContainerWidth(this._videoOid,this._containerOldWidth+"px");this._fullScreen.setContainerHeight(this._videoOid,this._containerOldHeight+"px");this._fullScreen.setContainerRelative(this._videoOid);this._fullScreen.zIndex(this._videoOid,this._blocks,"auto");this._controlBar.setWindowed()}}$("#pingVpVideoContainer-"+this._videoOid).removeClass("pingVpVideoFullScreen")},onBeginBuffering:function(){if(this._playLoop!=null&&this._playLoop.isLooping()){return}this._progress.enable()},onEndBuffering:function(){this._progress.disable();if(this._call!=null){this._call(this._videoName)}},onSettingsButton:function(){this._settings.showSettingsMenu();this._controlBar.setSettings(this._settings.checkSettingsMenu())},onShareButtonAlt:function(menuIsShown){this._controlBar.handleShareButtonAlt(menuIsShown)},onShareButton:function(){this._shareOverlay.showShareOverlay();this._controlBar.handleShareButtonAlt(this._shareOverlay.isShown());this.onPauseButton();this._announcement.setMessage(this._text.get("announceShareModal"))},onAIButtonAlt:function(menuIsShown){this._controlBar.handleAIButtonAlt(menuIsShown)},onAIButton:function(){this._aiOverlay.showAIOverlay();this._controlBar.handleAIButtonAlt(this._aiOverlay.isShown());this.onPauseButton()},onSubtitlesButton:function(){this._subtitlesOverlay.showSubtitlesMenu();this._controlBar.setSubtitles(this._subtitlesOverlay.checkSubtitlesMenu())},onAdButton:function(){if(this._activeAudioDescription){var _tempVideoName=Std.string(this._videoName);var getIndexAdStr=_tempVideoName.indexOf("_ad");if(getIndexAdStr>0){this.event("Audio Description turned off");_tempVideoName=HxOverrides.substr(_tempVideoName,0,getIndexAdStr);this._delayedAnnouncement=this._text.get("announceAdOff");this._controlBar.setAd(false);this._activeAudioDescription=false;this.loadFragment(_tempVideoName,false)}}else{var _tempVideoName1=this._videoName+"_ad";var checkAd=StringTools.endsWith(this._videoName,"_ad");if(checkAd==false){this.event("Audio Description turned on");this._delayedAnnouncement=this._text.get("announceAdOn");this._controlBar.setAd(true);this._activeAudioDescription=true;this.loadFragment(_tempVideoName1,false)}}},onAdButtonOn:function(){this.event("Audio Description turned on");var _tempVideoName=this._videoName+"_ad";var checkAd=StringTools.endsWith(this._videoName,"_ad");this._controlBar.setAd(true);this._activeAudioDescription=true;this.loadFragment(_tempVideoName,false)},onAdButtonOff:function(){this.event("Audio Description turned off");var _tempVideoName=Std.string(this._videoName);var getIndexAdStr=_tempVideoName.indexOf("_ad");_tempVideoName=HxOverrides.substr(_tempVideoName,0,getIndexAdStr);this._controlBar.setAd(false);this._activeAudioDescription=false;this.loadFragment(_tempVideoName,false)},setSettingsButton:function(action){this._controlBar.setSettings(action)},setSubtitlesButton:function(action){this._controlBar.setSubtitles(action)},checkHideEnable:function(value){if(value==false){this._controlBar.hideEnable(false)}else{var checkMobilePause=true;if(this._mobileCheck){if(!this.checkIsPlaying()){checkMobilePause=false}else{checkMobilePause=true}}var checkSettingsMenu=this._settings!=null?!this._settings.checkSettingsMenu():true;var checkSubtitlesMenu=this._subtitlesOverlay!=null?!this._subtitlesOverlay.checkSubtitlesMenu():true;var checkShareOverlay=this._shareOverlay!=null?!this._shareOverlay.isShown():true;var checkShortcutOverlay=this._shortcutOverlay!=null?!this._shortcutOverlay.isShown():true;this._controlBar.hideEnable((!this._controlsBelowVideo||this._controlBar.isFullScreen())&&checkSettingsMenu&&checkSubtitlesMenu&&checkShareOverlay&&checkShortcutOverlay&&checkMobilePause)}},checkHoverActive:function(value){if(value==false){this._controlBar.setActiveHover(false)}else{var checkSettingsMenu=this._settings!=null?!this._settings.checkSettingsMenu():true;var checkSubtitlesMenu=this._subtitlesOverlay!=null?!this._subtitlesOverlay.checkSubtitlesMenu():true;this._controlBar.setActiveHover(checkSettingsMenu&&checkSubtitlesMenu)}},createCommonControls:function(enableQuality,lastSubtitle,lastSpeedOption,lastFullscreen,lastHq,lastSubtitlesSettings,isHtmlPlayer,onLqButton,onHqButton){var subs=this._videoScript.script().getFragmentSubtitles(this._videoName);this._enableAI=this._videoScript.script().getHeaderAI()!=null&&this._videoScript.script().getHeaderAI()==true;this._enableSpeed=false;if(isHtmlPlayer){this._enableSpeed=true;var speed=this._node.attr("data-speed");this._enableSpeed=this._videoScript.script().getHeaderSpeed()!=null?this._videoScript.script().getHeaderSpeed()==true:this._enableSpeed;this._enableSpeed=speed!=null?StringTools.trim(speed)!="false":this._enableSpeed}this._enableShare=false;if(isHtmlPlayer){this._enableShare=true;var share=this._node.attr("data-share");this._enableShare=this._videoScript.script().getHeaderShare()!=null?this._videoScript.script().getHeaderShare()==true:this._enableShare;this._enableShare=share!=null?StringTools.trim(share)!="false":this._enableShare}this._enableAd=false;this._activeAudioDescription=false;if(isHtmlPlayer){var tempVideoName=this.getAdVersion(this._videoName);var checkAd=StringTools.endsWith(this._videoName,"_ad");this._activeAudioDescription=checkAd==true;this._enableAd=tempVideoName!=""}this._enableTranscript=false;this._transcript="";if(isHtmlPlayer){var overruleTranscript=this._videoScript.script().getHeaderTranscript();var seo=this._videoScript.script().getSeo();if(seo!=null){this._transcript=seo.transcript()}this._enableTranscript=this._transcript!=""||overruleTranscript!=null&&overruleTranscript}this._mobileFunctions=new pingvp_PingVpMobileFunctions(this._node,this._videoOid,this._videoScript.script());var defaultIconColor=this._videoScript.script().getHeaderDefaultColor();if(defaultIconColor==null||defaultIconColor==""){defaultIconColor=this._theme.getByKey("defaultcolor")}if(this._controlsBelowVideo!=true){defaultIconColor=this._theme.getSetDefaultColor()}this._collapsibleRows=new pingvp_PingVpCollapsibleRows(this._node,this._videoOid,this._overlay,this._videoScript.script(),isHtmlPlayer,this._text,this._videoName,this._container,this._theme,defaultIconColor,this._enableTranscript,this._transcript);this._controlBar=new pingvp_PingVpControlBar(this._videoOid,this._debug,this._controlsDisabled,this._overlay,this._videoScript.script(),true,enableQuality,subs!=null&&subs.length>0,this._enableAd,this._enableSpeed,this._enableShare,this._enableAI,this._controlsBelowVideo,this._theme,this._inOverlayPlay&&!this._inlinePlay,isHtmlPlayer,this._text,this._videoName,this._container,this._enableTranscript);this._controlBar.setWindowed();this._controlBar.setPlayHandler($bind(this,this.onPlayButton));this._controlBar.setPauseHandler($bind(this,this.onPauseButton));this._controlBar.setFullScreenHandler($bind(this,this.onFullScreenButton));this._controlBar.setWindowedHandler($bind(this,this.onWindowedButton));this._controlBar.setTimeSliderHandler($bind(this,this.onTimeSliderClick));this._controlBar.setTimeSliderArrowsHandler($bind(this,this.onTimeSliderArrows));this._controlBar.set5secBackButtonHandler($bind(this,this.on5secBackClick));var f=($_=this._contextMenu,$bind($_,$_.menuOpen));var a1=this._controlBar;var tmp=function(e){f(a1,e)};this._container.get().on("contextmenu",null,tmp);var isFullscreen=lastFullscreen!=null?lastFullscreen:this._controlBar.isFullScreen();var controlsBelowHeight=this._controlsBelowVideo&&!isFullscreen?40:0;this._progress=new pingvp_PingVpProgress(this._videoOid,this._overlay,this._container,this._theme,controlsBelowHeight);this._brandedStudio=new pingvp_PingVpBrandedStudio(this._videoOid,this._videoScript.script(),this._videoScript.name(),this._overlay,this._container,this._videoName,this._controlsBelowVideo,this._controlsBelowVideo&&!this._controlBar.isFullScreen(),$bind(this,this.event));this._subtitles=new pingvp_PingVpSubtitlesOverlay(this._videoOid,this._videoScript.script(),this._videoScript.name(),this._overlay,this._container,this._videoName,subs,this._text,this._controlsBelowVideo,this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0,this._theme,this._controlBar,$bind(this,this.event));this._speed=new pingvp_PingVpSpeedOverlay(this._videoOid,this._videoScript.name(),this._overlay,this._container,this._text,this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0,$bind(this,this.event));this._settings=new pingvp_PingVpSettingsMenuOverlay(this._videoOid,this._videoScript.name(),this._overlay,this._container,this._theme,this._text,this._controlsBelowVideo,this._controlsDisabled,this._controlBar,$bind(this,this.checkHideEnable),$bind(this,this.checkHoverActive),$bind(this,this.setSettingsButton),enableQuality,lastHq,onLqButton,onHqButton,subs,this._subtitles,lastSubtitle,lastSpeedOption,this._enableSpeed,this._speed,this._enableShare,this._enableAd,this._activeAudioDescription,$bind(this,this.onAdButtonOn),$bind(this,this.onAdButtonOff),this._messages,$bind(this,this.event));this._subtitlesOverlay=new pingvp_PingVpSubtitlesMenuOverlay(this._videoOid,this._videoScript.name(),this._overlay,this._container,this._theme,this._text,this._controlsBelowVideo,this._controlBar,$bind(this,this.checkHideEnable),$bind(this,this.checkHoverActive),$bind(this,this.setSubtitlesButton),subs,this._subtitles,lastSubtitle,this._enableShare,lastSubtitlesSettings,$bind(this,this.event));this._shareOverlay=new pingvp_PingVpShareOverlay(this._videoOid,this._theme,this._text,this._container,controlsBelowHeight,this._enableShare,$bind(this,this.checkHideEnable),this._videoTitle,this._headerPoster,$bind(this,this.event));this._shortcutOverlay=new pingvp_PingVpShortcutOverlay(this._videoOid,this._theme,this._text,this._container,controlsBelowHeight,true,$bind(this,this.checkHideEnable),this._videoTitle,this._headerPoster,$bind(this,this.event));this._aiOverlay=new pingvp_PingVpAiOverlay(this._videoOid,this._theme,this._text,this._container,controlsBelowHeight,this._enableAI,$bind(this,this.checkHideEnable),this._videoTitle,this._headerPoster,$bind(this,this.event));this._announcement=new pingvp_PingVpAnnouncement(this._videoOid,this._theme,this._text,this._container);this._controlBar.setAnnounceClass(this._announcement);this._speed.setAnnounceClass(this._announcement);this._blocks.setAnnounceClass(this._announcement);if(this._settings.checkMenuActive()){this._settings.setSubtitlesMenuHandler(this._subtitlesOverlay);this._settings.setSubtitlesMenuSubsHandler(($_=this._subtitlesOverlay,$bind($_,$_.setSubsMenuSelected)));this._settings.setShareMenuHandler(($_=this._shareOverlay,$bind($_,$_.manualShowShareOverlay)),$bind(this,this.onPauseButton));this._settings.setShortcutMenuHandler(($_=this._shortcutOverlay,$bind($_,$_.manualShowShortcutOverlay)),$bind(this,this.onPauseButton));var f1=($_=this._contextMenu,$bind($_,$_.menuOpenViaSettings));var a11=this._controlBar;var a2=this._controlsBelowVideo;var tmp1=function(){f1(a11,a2)};this._settings.setContextMenuHandler(tmp1);this._settings.setCloseOthersCall($bind(this,this.closeModals));this._controlBar.setSettingsHandler($bind(this,this.onSettingsButton),this._settings);this._controlBar.setSettings(false)}if(this._subtitlesOverlay.checkMenuActive()){this._subtitlesOverlay.setSettingsMenuHandler(this._settings);this._subtitlesOverlay.setSettingsMenuSubsHandler(($_=this._settings,$bind($_,$_.setSubsMenuSelected)));this._subtitlesOverlay.setCloseOthersCall($bind(this,this.closeModals));this._controlBar.setSubtitlesHandler($bind(this,this.onSubtitlesButton),this._subtitlesOverlay);this._controlBar.setSubtitles(false);this._subtitles.setAnnounceClass(this._announcement)}if(this._shareOverlay.checkMenuActive()){this._controlBar.setShareHandler($bind(this,this.onShareButton),this._shareOverlay);this._shareOverlay.setButtonHandler($bind(this,this.onShareButtonAlt));this._shareOverlay.setCloseOthersCall($bind(this,this.closeModals))}if(this._shortcutOverlay.checkMenuActive()){this._shortcutOverlay.setCloseOthersCall($bind(this,this.closeModals))}if(this._enableAd){this._controlBar.setAdHandler($bind(this,this.onAdButton),this._activeAudioDescription);this._controlBar.setAd(this._activeAudioDescription)}if(this._aiOverlay.checkMenuActive()){this._controlBar.setAIHandler($bind(this,this.onAIButton),this._aiOverlay);this._aiOverlay.setButtonHandler($bind(this,this.onAIButtonAlt));this._aiOverlay.setCloseOthersCall($bind(this,this.closeModals))}this._brandedStudio.setLinkHelper($bind(this,this.onLinkHelper))},closeModals:function(){if(this._shortcutOverlay.checkMenuActive()){this._shortcutOverlay.hideShortcutOverlay()}if(this._shareOverlay.checkMenuActive()){this._shareOverlay.hideShareOverlay()}if(this._aiOverlay.checkMenuActive()){this._aiOverlay.hideAIOverlay()}if(this._sidebar.isActive()){this._sidebar.hideSidebar()}},bindOnResize:function(first){var _gthis=this;this.onResize(null);if(first){$(window).resize(function(e){_gthis.onResize(e)});$(window).on("orientationchange",null,function(e1){_gthis.onResize(e1)})}},event:function(action){if(this._events==null){return}if(this._displayHtmlOverview){this._statsOverviewTable.prepend('<tr class="pingVpReset"><td class="pingVpReset">'+this._videoScript.script().getFragmentVideoTitle(this._videoName)+'</td><td class="pingVpReset">'+action+"</td></tr>")}var percent=this.getPlayPercent();this._events.update(this._videoScript.script().getHeaderUuid(),this._videoScript.script().getHeaderTitle(),this._videoScript.name());this._events.pushAction(this._videoScript.script().getFragmentVideoUuid(this._videoName),this._videoScript.script().getFragmentVideoTitle(this._videoName),action,percent,this._lastFragmentUuid)},interactiveEvent:function(action,args){if(this._events==null){return}if(this._displayHtmlOverview){this._statsOverviewTable.prepend('<tr class="pingVpReset"><td class="pingVpReset">'+this._videoScript.script().getFragmentVideoTitle(this._videoName)+'</td><td class="pingVpReset">'+action+"</td></tr>")}var percent=this.getPlayPercent();this._events.update(this._videoScript.script().getHeaderUuid(),this._videoScript.script().getHeaderTitle(),this._videoScript.name());this._events.pushActionInteractiveClick(this._videoScript.script().getFragmentVideoUuid(this._videoName),this._videoScript.script().getFragmentVideoTitle(this._videoName),action,percent,this._lastFragmentUuid,args.customerIdentifier)},wsevent:function(action){if(this._events==null){return}var script=this._videoScript.script();var percent=this.getPlayPercent();this._events.pushActionWs(script.getHeaderUuid(),script.getHeaderTitle(),script.getFragmentVideoUuid(this._videoName),script.getFragmentVideoTitle(this._videoName),action,percent)},percentEventLog:function(){this._percent=this.getPlayPercent();if(this._hasWebSocket){this.wsevent((this._percent|0)+"%")}else{if(this.getPlayDuration()>0){if(this._percent>=100){if(this._percent100){this.event("100%");this._percent100=false}this._percent0=this._percent10=this._percent20=this._percent30=this._percent40=this._percent50=this._percent60=this._percent70=this._percent80=this._percent90=true}else{if(this._percent>=90){if(this._percent90){this.event("90%");this._percent90=false}this._percent0=this._percent10=this._percent20=this._percent30=this._percent40=this._percent50=this._percent60=this._percent70=this._percent80=this._percent100=true}else{if(this._percent>=80){if(this._percent80){this.event("80%");this._percent80=false}this._percent0=this._percent10=this._percent20=this._percent30=this._percent40=this._percent50=this._percent60=this._percent70=this._percent90=this._percent100=true}else{if(this._percent>=70){if(this._percent70){this.event("70%");this._percent70=false}this._percent0=this._percent10=this._percent20=this._percent30=this._percent40=this._percent50=this._percent60=this._percent80=this._percent90=this._percent100=true}else{if(this._percent>=60){if(this._percent60){this.event("60%");this._percent60=false}this._percent0=this._percent10=this._percent20=this._percent30=this._percent40=this._percent50=this._percent70=this._percent80=this._percent90=this._percent100=true}else{if(this._percent>=50){if(this._percent50){this.event("50%");this._percent50=false}this._percent0=this._percent10=this._percent20=this._percent30=this._percent40=this._percent60=this._percent70=this._percent80=this._percent90=this._percent100=true}else{if(this._percent>=40){if(this._percent40){this.event("40%");this._percent40=false}this._percent0=this._percent10=this._percent20=this._percent30=this._percent50=this._percent60=this._percent70=this._percent80=this._percent90=this._percent100=true}else{if(this._percent>=30){if(this._percent30){this.event("30%");this._percent30=false}this._percent0=this._percent10=this._percent20=this._percent40=this._percent50=this._percent60=this._percent70=this._percent80=this._percent90=this._percent100=true}else{if(this._percent>=20){if(this._percent20){this.event("20%");this._percent20=false}this._percent0=this._percent10=this._percent30=this._percent40=this._percent50=this._percent60=this._percent70=this._percent80=this._percent90=this._percent100=true}else{if(this._percent>=10){if(this._percent10){this.event("10%");this._percent10=false}this._percent0=this._percent20=this._percent30=this._percent40=this._percent50=this._percent60=this._percent70=this._percent80=this._percent90=this._percent100=true}else{if(this._percent0){this.event("0%");this._percent0=false}this._percent10=this._percent20=this._percent30=this._percent40=this._percent50=this._percent60=this._percent70=this._percent80=this._percent90=this._percent100=true}}}}}}}}}}}}},isVideoPlaying:function(){return this.checkIsPlaying()},onVisibilityChanged:function(){if(this.isPageHidden()&&this.isVideoPlaying()){this.onPauseButton()}},isPageHidden:function(){if(this._attrHidden!=null){var hidden=Reflect.field(window.document,this._attrHidden);if(hidden!=null){return hidden}else{return false}}return false},setVisibilityHook:function(){var hidden=null;var visibilityChange=null;if(Reflect.field(window.document,"hidden")!=null){hidden="hidden";visibilityChange="visibilitychange"}else{if(Reflect.field(window.document,"mozHidden")!=null){hidden="mozHidden";visibilityChange="mozvisibilitychange"}else{if(Reflect.field(window.document,"webkitHidden")!=null){hidden="webkitHidden";visibilityChange="webkitvisibilitychange"}}}if(hidden!=null){this._attrHidden=hidden;window.document.addEventListener(visibilityChange,$bind(this,this.onVisibilityChanged),false)}},videoEndCallback:function(){if(this._videoEndCallback!=null&&this._videoEndCallback.length>0){var code=this._videoEndCallback+"("+this._videoOid+',"'+this._videoScript.name()+'");';try{eval(code)}catch(msg){if(msg instanceof js__$Boot_HaxeError){msg=msg.val}if(js_Boot.__instanceof(msg,String)){}else{throw (msg)}}}},getAdVersion:function(videoName){var checkAd=StringTools.endsWith(videoName,"_ad");var hasAdVersion=false;var reverseVideoName="";if(checkAd==false){hasAdVersion=this._videoScript.script().checkFragment(videoName+"_ad");if(hasAdVersion==true){reverseVideoName=videoName+"_ad"}}else{var tempVideoName=videoName==null?"null":""+videoName;var getIndexAdStr=tempVideoName.indexOf("_ad");tempVideoName=HxOverrides.substr(tempVideoName,0,getIndexAdStr);hasAdVersion=this._videoScript.script().checkFragment(tempVideoName);if(hasAdVersion==true){reverseVideoName=tempVideoName}}return reverseVideoName},__class__:pingvp_PingVpPlayerBase};var pingvp_PingVpCanvasPlayer=function(debug,videoOid,node,container,text,videoScript,controlsBelowVideo,controlsDisabled,tempStartFragment,analytics,events,autoStart,inOverlayPlay,inlinePlay,call,pingVpFunctions,keys,keysControlbar,keysSettingsMenu,keysSubtitlesMenu,keysShareMenu){pingvp_PingVpPlayerBase.call(this,debug,videoOid,node,container,text,videoScript,controlsBelowVideo,controlsDisabled,tempStartFragment,analytics,events,autoStart,inOverlayPlay,inlinePlay,call);pingVpFunctions.setResize($bind(this,this.onResize));this._focusActive=false;this._logProcentEvents=false;this._isPlaying=false;this._fullScreen.setFullScreenEventHandler($bind(this,this.onFullScreenEvent));this._fullScreen.setWindowedEventHandler($bind(this,this.onWindowedEvent));this._videoScriptSub=videoScript.script();this.defaultColor=this._videoScriptSub.getHeaderDefaultColor();this.hoverColor=this._videoScriptSub.getHeaderHoverColor();if(this._autoStart){this.loadFragment(this._startFragment._videoName,true)}else{this.loadFragmentPause(this._startFragment._videoName,true)}};$hxClasses["pingvp.PingVpCanvasPlayer"]=pingvp_PingVpCanvasPlayer;pingvp_PingVpCanvasPlayer.__name__=["pingvp","PingVpCanvasPlayer"];pingvp_PingVpCanvasPlayer.__super__=pingvp_PingVpPlayerBase;pingvp_PingVpCanvasPlayer.prototype=$extend(pingvp_PingVpPlayerBase.prototype,{loadFragment:function(videoName,first){this.loadFragmentPause(videoName,first);if(first&&this._autoStart&&!this._inlinePlay&&!this._inOverlayPlay){this._messages.showImmediatelyMessage("PlayerAutostartMute");this._audio.muted(true);if(this._checkDeviceFunctions){this._controlBar.setMute()}if(this._subtitles.hasSubs()&&this._subtitles.getSelected()==0){this._subtitles.onSubSelect(1);this._settings.setSubsMenuSelected(1)}}else{this._audio.play()}this._isPlaying=true;this._controlBar.setPlay()},loadFragmentPause:function(videoName,first){this._videoEndCallback=this._videoScript.script().getFragmentVideoEndCallback(videoName);this._playLoop=this._videoScript.script().getFragmentLoop(videoName);this._frameNum=1;this._videoName=videoName;this._numberFramesPerChunk=this._videoScript.script().getFragmentHeaderNumberFramesPerChunk(this._videoName,16);this._framePerSec=this._videoScript.script().getFragmentHeaderCanvasFramesPerSec(this._videoName,16);this._audioVideoSync=this._videoScript.script().getFragmentHeaderCanvasAudioVideoSync(this._videoName,-0.1);this._bufferSize=this._videoScript.script().getFragmentHeaderCanvasBufferSize(this._videoName,48);var playerWidth=this._container.getWidth();var playerHeight=this._container.getHeight();this._videoOriginalWidth=this._videoScript.script().getFragmentVideoWidth(videoName);this._videoOriginalHeight=this._videoScript.script().getFragmentVideoHeight(videoName);this._videoCanvasWidth=this._videoScript.script().getFragmentCanvasVideoWidth(videoName);this._videoCanvasHeight=this._videoScript.script().getFragmentCanvasVideoHeight(videoName);this._video=new pingvp_PingVpCanvasVideo(this._videoOid,playerWidth,playerHeight,this._videoCanvasWidth,this._videoCanvasHeight,this._videoOriginalWidth,this._videoOriginalHeight,this._numberFramesPerChunk,$bind(this,this.onBufferEmpty));var canvasVideo=this._videoScript.script().getFragmentHeaderCanvasVideo(videoName);if(this._audio!=null){this._audio.cleanup()}this._audio=new pingvp_canvasplayer_CanvasAudio(this._videoOid,this._videosUri+canvasVideo+"/",$bind(this,this.onLoadedMetaData),$bind(this,this.onBeginBuffering),$bind(this,this.onEndBuffering),$bind(this,this.onVideoEnd));this._percent0=true;this._percent20=true;this._percent50=true;this._percent80=true;this._buffer=new pingvp_canvasplayer_CanvasBuffer(this._bufferSize,this._videosUri+canvasVideo+"/",$bind(this,this.onBufferCheck));this._overlay=new pingvp_PingVpOverlay(this._videoOid,this._container,this._inOverlayPlay,this.defaultColor,this.hoverColor,this._controlsBelowVideo);this._overlay.onScreenClick($bind(this,this.onScreenClick));if(this._inOverlayPlay){this._overlay.setCloseButton($bind(this,this.cleanup))}this._blocks=new pingvp_PingVpBlocksAll(this._videoOid,this._debug,this._videoOriginalWidth,this._videoOriginalHeight,null,null,$bind(this,this.onBlockClick),$bind(this,this.onPauseCommand),$bind(this,this.onSeekCommand),$bind(this,this.onCtaAction),this._theme,this._text);this._blocks.executeScript(this._videoScript.name(),this._video.getPosLeft(),this._video.getPosTop(),this._videoScript.script().getFragmentCommands(this._videoName),this._videoScript.script().getFragmentHeaderCanvasSync(this._videoName),this._videoScript.script().getFragmentHeaderCanvasDurationCorrection(this._videoName),"canvas");this._messages=new pingvp_PingVpMessages(this._videoOid,this._theme,playerWidth,playerHeight,this._controlsBelowVideo?50:0);this._messages.setMessage("PlayerActionPlay","play_button","center_center",true);this._messages.setMessage("PlayerActionPause","pause_button","center_center",true);this._messages.setMessage("PlayerAutostartMute","sound_on","right",true);this._messages.onClickClose("PlayerAutostartMute",$bind(this,this.onUnmuteButton),true);this._focusActive=this._overlay.getActive();var lastFullScreen=false;if(this._controlBar!=null){lastFullScreen=this._controlBar.isFullScreen()}this._contextMenu.setupContextMenus(this._container,this._theme,false);this._contextMenu.addOption("pingVpOptionStart-"+this._videoOid,this._text.get("contextbarStart"),null,$bind(this,this.onStartButton));this._contextMenu.addOption("pingVpOptionBack-"+this._videoOid,this._text.get("contextbarBack"),null,$bind(this,this.onBackButton));this._contextMenu.addOption("pingVpOptionReplay-"+this._videoOid,this._text.get("contextbarRepeat"),null,$bind(this,this.onRepeatButton));this._contextMenu.addHr();this._contextMenu.addOption("pingVpOptionReport-"+this._videoOid,this._text.get("contextbarReport"),null,$bind(this,this.onReportButton));this._contextMenu.addOption("pingVpOptionBrand-"+this._videoOid,this._text.get("contextbarBrand"),null,$bind(this,this.onBrandButton));if(this._subtitles!=null){this._lastSubtitle=this._subtitles.getSelected()}else{this._lastSubtitle=-1}this.createCommonControls(false,this._lastSubtitle,null,null,true,false,false,false,false);this._controlBar.setPause();this._controlBar.hideEnable(false);this._controlBar.setVolumeSliderHandler($bind(this,this.onVolumeSliderClick));this._controlBar.setVolumeSliderArrowsHandler($bind(this,this.onVolumeSliderArrows));this._controlBar.setVolumeSlider(this._audio.getVolume());this._controlBar.setMuteHandler($bind(this,this.onMuteButton));this._controlBar.setUnmuteHandler($bind(this,this.onUnmuteButton));this._overlay.setFullScreenCloseHandler(this._controlBar,$bind(this,this.onWindowedButton));if(lastFullScreen){this._controlBar.setFullScreen()}if(this._renderInterval!=null){this._renderInterval.stop()}this._renderInterval=new pingvp_PingVpInterval($bind(this,this.onRenderer),100,100,20);this._renderInterval.start();this.bindOnResize(first);this._pingVpClick.onPingVpClickPlay($bind(this,this.onPlayButton));this._pingVpClick.onPingVpClickPause($bind(this,this.onPauseButton));this._overlay.setActive(this._focusActive)},onPosterClick:function(){this.event("Poster click");this.event("Load video");if(!this._autoStart){if(this._videoScript.script().getHeaderHelper("posterRatio","")!="fixed"){this._poster.removePoster()}else{this._posterRatio.removePoster()}}this._audio.play();this._controlBar.setPlay();this._isPlaying=true;this._logProcentEvents=true},play:function(ableToRepeat){if(this._replayEvent){if(ableToRepeat||ableToRepeat==null){this._audio.play();this._controlBar.setPlay();this._isPlaying=true;this.event("Replay");this._replayEvent=false}}else{this._audio.play();this._controlBar.setPlay();this._isPlaying=true;this.event("Play")}if(!this._logProcentEvents){this.event("Load video")}this._logProcentEvents=true},onBuffering:function(){var framesTotal=Math.floor(this._audio.getDuration()*this._framePerSec);this._buffer.buffering(Math.floor(this._frameNum/this._numberFramesPerChunk),Math.floor(framesTotal/this._numberFramesPerChunk))},onRenderer:function(){if(!this._loop){return}this.onBuffering();var duration=this._audio.getDuration();var currentTime=this._audio.getCurrentTime()+this._audioVideoSync;var framesTotal=Math.floor(duration*this._framePerSec);if(currentTime<0){currentTime=0}if(currentTime>duration-1){currentTime=duration-1}if(this._playLoop!=null){if(currentTime>=this._playLoop.start()){currentTime=this._playLoop.seek();this._playLoop.setLooping(true);this._audio.setCurrentTime(currentTime)}}this._controlBar.setTimeSlider(this._audio.getCurrentTime(),this._audio.getDuration());this._controlBar.setTime(this._audio.getCurrentTime(),this._audio.getDuration());if(this._subtitles!=null){this._subtitles.setTime(this._audio.getCurrentTime())}this._blocks.render(this._audio.getFrame(25),this._audio.getCurrentTime(),0,0,this._videoOriginalWidth,this._videoOriginalHeight,this._container.getWidth(),this._container.getHeight(),this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0);this._frameNum=Math.floor(currentTime*this._framePerSec);this._video.renderFrame(this._container,this._buffer,this._frameNum,framesTotal,this._framePerSec,this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0);if(this._logProcentEvents){this.percentEventLog()}},onLoadedMetaData:function(){this._controlBar.setTimeSlider(this._audio.getCurrentTime(),this._audio.getDuration());this._controlBar.setTime(this._audio.getCurrentTime(),this._audio.getDuration());this._progress.disable()},onPlayButton:function(ableToRepeat){this._shareOverlay.hideShareOverlay();if(!this._autoStart){if(this._videoScript.script().getHeaderHelper("posterRatio","")!="fixed"){this._poster.removePoster()}else{this._posterRatio.removePoster()}}this._isPlaying=true;this.play(ableToRepeat)},onPauseButton:function(){this._isPlaying=false;this._audio.pause();this._controlBar.setPause();this.event("Pause")},onCtaAction:function(getAction,playerAction){if(getAction){this.onPlayButton(false)}else{this.onPauseButton()}},onScreenClick:function(){if(!this._contextMenu.isShown()&&!this._settings.checkSettingsMenu()){if(this._controlBar.isPlaying()){this._messages.hideImmediatelyMessage("PlayerActionPlay");this.onPauseButton();this._messages.showIconMessage("PlayerActionPause",600)}else{if(!this._replayEvent){this._messages.hideImmediatelyMessage("PlayerActionPause");this.onPlayButton(false);this._messages.showIconMessage("PlayerActionPlay",600)}else{if(this._audio.getCurrentTime()!=this._audio.getDuration()){this._messages.hideImmediatelyMessage("PlayerActionPause");this.onPlayButton(true);this._messages.showIconMessage("PlayerActionPlay",600)}}}}},getPlayDuration:function(){return this._audio.getDuration()},onTimeSliderClick:function(){this.event("Seek to "+(this._controlBar.getTimeSliderPercent()|0)+"%");if(!this._autoStart){if(this._videoScript.script().getHeaderHelper("posterRatio","")!="fixed"){this._poster.removePoster()}else{this._posterRatio.removePoster()}}this._audio.setCurrentTime(this._controlBar.getTimeSlider(this._audio.getDuration()));this._controlBar.setTime(this._audio.getCurrentTime(),this._audio.getDuration())},onTimeSliderArrows:function(action){this._controlBar.setTimeSliderArrows(this._audio.getCurrentTime(),this._audio.getDuration(),action,false);this.event("Seek to "+(this._controlBar.getTimeSliderPercent()|0)+"%");if(!this._autoStart){if(this._videoScript.script().getHeaderHelper("posterRatio","")!="fixed"){this._poster.removePoster()}else{this._posterRatio.removePoster()}}this._audio.setCurrentTime(this._controlBar.getTimeSlider(this._audio.getDuration()));this._controlBar.setTime(this._audio.getCurrentTime(),this._audio.getDuration())},onVolumeSliderClick:function(){var getVolumeSlider=this._controlBar.getVolumeSlider();this.event("Volume change to "+getVolumeSlider);var isMuted=this._controlBar.isMute();this._audio.setVolume(getVolumeSlider);if(isMuted&&getVolumeSlider!=0){this._audio.muted(false);this._controlBar.setUnmute()}else{if(!isMuted&&getVolumeSlider==0){this._audio.muted(true);this._controlBar.setMute()}}},onVolumeSliderArrows:function(action){var getVolumeSlider=this._controlBar.getVolumeSlider();var getVolumeSliderOrig=getVolumeSlider;var getVolumeSliderInt=0;var getVolumeSliderStr="";if(getVolumeSlider!=0&&getVolumeSlider!=1){getVolumeSliderStr=HxOverrides.substr(getVolumeSlider==null?"null":""+getVolumeSlider,2,1);getVolumeSliderInt=Std.parseInt(getVolumeSliderStr);if(action==39){getVolumeSliderInt+=2}else{getVolumeSliderInt-=2}if(getVolumeSliderInt==10){getVolumeSlider=1}else{getVolumeSlider=parseFloat("0."+getVolumeSliderInt)}}else{if(getVolumeSlider==1){if(action==39){getVolumeSlider=getVolumeSlider}else{getVolumeSlider=0.8}}else{if(action==39){getVolumeSlider=0.2}else{getVolumeSlider=getVolumeSlider}}}if(getVolumeSlider>1){getVolumeSlider=1}if(getVolumeSlider<0){getVolumeSlider=0}if(getVolumeSliderOrig!=getVolumeSlider){this.event("Volume change to "+getVolumeSlider)}var isMuted=this._controlBar.isMute();this._controlBar.setVolumeSlider(getVolumeSlider);this._audio.setVolume(getVolumeSlider);if(isMuted&&getVolumeSlider!=0){this._audio.muted(false);this._controlBar.setUnmute()}else{if(!isMuted&&getVolumeSlider==0){this._audio.muted(true);this._controlBar.setMute()}}},onMuteButton:function(){this.event("Audio muted");this._audio.muted(true);this._controlBar.setMute()},onUnmuteButton:function(){this.event("Audio unmuted");if(this._messages.isShown("PlayerAutostartMute")){this._messages.hideImmediatelyMessage("PlayerAutostartMute")}this._audio.muted(false);if(this._checkDeviceFunctions){var getVolumeSlider=this._controlBar.getVolumeSlider();this._controlBar.setUnmute();if(getVolumeSlider==0){this._controlBar.setVolumeSlider(0.2);this._audio.setVolume(0.2)}}},onVideoEnd:function(){var _gthis=this;this._isPlaying=false;this._controlBar.setPause();this.event("End Video");this._replayEvent=true;this.videoEndCallback();if(this._videoScript.script().getFragmentOnEndRepeat(this._videoName)){this.event("End repeat");this._audio.setCurrentTime(0);this._audio.play();this._controlBar.setPlay()}else{var onEndVideoLoad=this._videoScript.script().getFragmentOnEndVideoLoad(this._videoName);if(onEndVideoLoad!=""){this.event("End load");this._lastFragmentUuid=this._videoScript.script().getFragmentVideoUuid(this._videoName);var onEndVideoLoad1=this._videoScript.script().getFragmentOnEndVideoLoad(this._videoName);var onEndVideoScript=this._videoScript.script().getFragmentOnEndVideoScript(this._videoName);var lastVideoScriptName=this._videoScript.name();var videoScriptName=onEndVideoScript!=""?onEndVideoScript:lastVideoScriptName;this._videoScript.select(videoScriptName,function(){_gthis._videoPath.add(lastVideoScriptName,_gthis._videoName);_gthis.loadFragment(onEndVideoLoad1,false)},function(){})}}},onBlockClick:function(videoOid,blockOid,name,action,args,like){switch(action){case"back":this.onBackButton();break;case"cta":this.ctaHelper(videoOid,blockOid,args,name);break;case"image":this.loadHelper(args,name);this.linkHelper(args,name,"Image link");this.ctaHelper(videoOid,blockOid,args,name);break;case"link":this.linkHelper(args,name,"Link");break;case"load":this.loadHelper(args,name);break;case"play":this._audio.play();this._controlBar.setPlay();break;case"rating":this.event("Rating "+(like?"like":"dislike"));break;case"repeat":this.onRepeatButton();break;case"seek":if(args.position!=null){this.event("Seek button ("+name+")");this._audio.setCurrentTime(args.position);this._controlBar.setTime(this._audio.getCurrentTime(),this._audio.getDuration());this._audio.play();this._controlBar.setPlay()}break;case"start":this.onStartButton();break;case"text":this.linkHelper(args,name,"Text link");this.ctaHelper(videoOid,blockOid,args,name);break}},onPauseCommand:function(command){this._isPlaying=false;this._audio.pause();this._controlBar.setPause();this.event("Pause command")},onSeekCommand:function(command){if(command.seekTo==null){return}this._audio.setCurrentTime(command.seekTo);this.event("Seek command")},getPlayPercent:function(){if(this._audio==null||isNaN(this._audio.getDuration())){return 0}return this._audio.getCurrentTime()*100/this._audio.getDuration()},onResize:function(e){if(!this._loop){return}var playerWidth=this._container.getWidth();var playerHeight=this._container.getHeight();this._controlBar.rezize();this._controlBar.hideEnable(!(this._controlsBelowVideo&&!this._controlBar.isFullScreen()));if(this._posterRatio!=null){this._posterRatio.resize(this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)}if(this._video!=null){var duration=this._audio.getDuration();var framesTotal=Math.floor(duration*this._framePerSec);this._video.renderFrame(this._container,this._buffer,this._frameNum,framesTotal,this._framePerSec,this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)}if(this._settings!=null&&this._settings.checkMenuActive()){this._settings.resize()}if(this._subtitles!=null){this._subtitles.resize()}if(this._messages!=null){this._messages.resize(playerWidth,playerHeight,this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)}},onBufferEmpty:function(){this._audio.pause();this._controlBar.setPause();if(!pingvp_PingVpDevice.isIpad()&&!this._replayEvent){this._progress.enable()}else{this._progress.disable()}},onBufferCheck:function(){if(this._buffer.bufferCheck(Math.floor(this._frameNum/this._numberFramesPerChunk))){this._progress.disable();if(this._isPlaying){this._audio.play();this._controlBar.setPlay()}}},cleanup:function(){this._audio.pause();this._loop=false;if(this._bufferTimer!=null){this._bufferTimer.stop()}this._bufferTimer=null;if(this._renderTimer!=null){this._renderTimer.stop()}this._renderTimer=null;this._container.get().html("");this._audio.cleanup();this._audio=null},linkHelper:function(args,name,statsName){if(args.url!=null){var target="_top";if(args.target!=null){if(args.target=="blank"){target="_blank"}else{if(args.target=="top"){target="_top"}else{target=args.target}}}if(target=="_top"){this.event(statsName+' "'+name+'"');this._isPlaying=false;this._audio.pause();this._progress.enable();this._controlBar.setPause();haxe_Timer.delay(function(){window.open(args.url,target)},1500)}else{this.event(statsName+' "'+name+'" (new tab)');window.open(args.url,target)}return true}return false},loadHelper:function(args,name){var _gthis=this;if(args.video!=null){this.event('Load "'+name+'"');this._replayEvent=false;this._lastFragmentUuid=this._videoScript.script().getFragmentVideoUuid(this._videoName);if(args.videoScriptName!=null){var _videoScriptName=this._videoScript.name();this._videoScript.select(args.videoScriptName,function(){_gthis._videoPath.add(_videoScriptName,_gthis._videoName);_gthis.loadFragment(args.video,false)},function(){});return true}this._videoPath.add(this._videoScript.name(),this._videoName);this.loadFragment(args.video,false);return true}return false},ctaHelper:function(videoOid,blockOid,args,name){this.event('CtaClick "'+name+'"');var _jqyCtaBlock=$("#pingVpBlock-"+videoOid+"-"+blockOid+"-ctaOpen");if(args.ctaToggle==true){if(_jqyCtaBlock.css("display")=="none"){_jqyCtaBlock.show();if(args.ctaOnOpen!=null&&args.ctaOnOpen=="pause"){this.onCtaAction(false,false)}else{if(args.ctaOnOpen!=null&&args.ctaOnOpen=="play"){this.onCtaAction(true,false)}}}else{_jqyCtaBlock.hide();if(args.ctaOnClose!=null&&args.ctaOnClose=="pause"){this.onCtaAction(false,false)}else{if(args.ctaOnClose!=null&&args.ctaOnClose=="play"){this.onCtaAction(true,false)}}}}else{_jqyCtaBlock.show();if(args.ctaOnOpen!=null&&args.ctaOnOpen=="pause"){this.onCtaAction(false,false)}else{if(args.ctaOnOpen!=null&&args.ctaOnOpen=="play"){this.onCtaAction(true,false)}}}},onFullScreenEvent:function(){if(!this._controlBar.isFullScreen()){this.event("Enter full screen")}if(this._fullScreen!=null&&this._fullScreen.isFullWindowSelected()){this._fullScreen.setChild(this._container.get().get(0));if(this._controlBar.isPlaying()){this._audio.play()}}this.onResize(null)},onWindowedEvent:function(){if(this._controlBar.isFullScreen()){this.event("Leave full screen")}this._controlBar.setWindowed();if(this._fullScreen!=null&&this._fullScreen.isFullWindowSelected()){this._fullScreen.removeChild();this._container.reset();if(this._controlBar.isPlaying()){this._audio.play()}}this.onResize(null)},__class__:pingvp_PingVpCanvasPlayer});var pingvp_PingVpCanvasVideo=function(videoOid,containerWidth,containerHeight,frameWidth,frameHeight,videoWidth,videoHeight,numberFramesPerChunk,funBufferEmpty){this._frameWidth=frameWidth;this._frameHeight=frameHeight;this._videoWidth=videoWidth;this._videoHeight=videoHeight;this._numFramesInChunk=numberFramesPerChunk;this._lastSequence=-1;this._lastFrame=0;this._lastFrameImage=null;this._funBufferEmpty=funBufferEmpty;$("#pingVpVideoContainer-"+videoOid).html('<canvas id="pingVpCanvas-'+videoOid+'" class="pingVpCanvas pingVpReset"></canvas>');this._canvas=window.document.getElementById("pingVpCanvas-"+videoOid);$(this._canvas).css("backgroundColor","#000000");this._context=this._canvas.getContext("2d");this._context.scale(1,1)};$hxClasses["pingvp.PingVpCanvasVideo"]=pingvp_PingVpCanvasVideo;pingvp_PingVpCanvasVideo.__name__=["pingvp","PingVpCanvasVideo"];pingvp_PingVpCanvasVideo.prototype={setOnClick:function(onClick){$(this._canvas).click(onClick)},renderFrame:function(container,buffer,frame,framesTotal,framePerSec,paddingBelow){var currentSequence=frame/this._numFramesInChunk|0;var sequenceImage=null;if(frame<framesTotal){sequenceImage=buffer.getSequenceImage(currentSequence)}if(sequenceImage!=null){this._lastFrameImage=sequenceImage;this._lastSequence=currentSequence;this._lastFrame=frame}else{sequenceImage=this._lastFrameImage;currentSequence=this._lastSequence;frame=this._lastFrame;if(this._funBufferEmpty!=null){this._funBufferEmpty()}}var playableWidth=container.getWidth();var playableHeight=container.getHeight()-paddingBelow;$(this._canvas).width(playableWidth);$(this._canvas).height(playableHeight);this._canvas.width=playableWidth;this._canvas.height=playableHeight;var renderWidth;var renderHeight;if(playableWidth>playableHeight*this._videoWidth/this._videoHeight){renderWidth=playableHeight*this._videoWidth/this._videoHeight;renderHeight=playableHeight}else{renderWidth=playableWidth;renderHeight=playableWidth*this._videoHeight/this._videoWidth}var x=(playableWidth-renderWidth)/2|0;var y=(playableHeight-renderHeight)/2|0;if(this._context!=null&&sequenceImage!=null){this._context.drawImage(sequenceImage,frame%this._numFramesInChunk*this._frameWidth,0,this._frameWidth,this._frameHeight,x,y,renderWidth+1|0,renderHeight+1|0)}},getPosLeft:function(){return $(this._canvas).position().left},getPosTop:function(){return $(this._canvas).position().top},getWidth:function(){return $(this._canvas).width()},getHeight:function(){return $(this._canvas).height()},__class__:pingvp_PingVpCanvasVideo};var pingvp_PingVpClick=function(videoOid,videoScriptName,onPingVpClickPlay,onPingVpClickPause){var _gthis=this;this._onPingVpClickPlay=onPingVpClickPlay;this._onPingVpClickPause=onPingVpClickPause;this._html=$("html");this._html.on("click",".pingVpPlay[data-video='"+videoScriptName+"']",function(e){e.preventDefault();_gthis._onPingVpClickPlay(true)});this._html.on("click",".pingVpPause[data-video='"+videoScriptName+"']",function(e1){e1.preventDefault();_gthis._onPingVpClickPause()})};$hxClasses["pingvp.PingVpClick"]=pingvp_PingVpClick;pingvp_PingVpClick.__name__=["pingvp","PingVpClick"];pingvp_PingVpClick.prototype={onPingVpClickPlay:function(onPingVpClickPlay){this._onPingVpClickPlay=onPingVpClickPlay},onPingVpClickPause:function(onPingVpClickPause){this._onPingVpClickPause=onPingVpClickPause},__class__:pingvp_PingVpClick};var pingvp_PingVpCollapsibleRows=function(node,videoOid,overlay,videoScript,isHtmlPlayer,text,videoName,container,theme,defaultIconColor,enableTranscript,transcript){this._node=node;this._videoOid=videoOid;this._container=container;this._theme=theme;this._text=text;this._defaultIconColor=defaultIconColor;this._enableTranscript=enableTranscript;this._transcript=transcript;this._transcriptActive=false;this._transcriptOpen=false;this._enableTranscript=false;this._mobileCheck=false;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._mobileCheck=true}if($("#pingVpcollapsibleRows-"+this._videoOid).length>0){$("#pingVpcollapsibleRows-"+this._videoOid).remove()}this._collapsibleRows=window.document.createElement("div");this._collapsibleRows.id="pingVpcollapsibleRows-"+this._videoOid;this._collapsibleRows.className="pingVpcollapsibleRows pingVpReset";if(this._enableTranscript){this.setupTranscript()}this._node.append(this._collapsibleRows);if(this._transcriptActive){$("#pingVpTranscriptRow-"+this._videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.showTranscript))}};$hxClasses["pingvp.PingVpCollapsibleRows"]=pingvp_PingVpCollapsibleRows;pingvp_PingVpCollapsibleRows.__name__=["pingvp","PingVpCollapsibleRows"];pingvp_PingVpCollapsibleRows.prototype={setupTranscript:function(){this._transcriptActive=true;var transcriptPanel=window.document.createElement("div");transcriptPanel.id="pingVpPanel-"+this._videoOid;transcriptPanel.className="pingVpPanel pingVpReset";var tmp=this._theme.getByKey("controlbarcolor");transcriptPanel.style.backgroundColor="#"+tmp;var transcriptClickable=window.document.createElement("div");transcriptClickable.id="pingVpTranscriptRow-"+this._videoOid;transcriptClickable.className="pingVpTranscriptRow pingVpClickableRow pingVpReset";transcriptClickable.innerHTML="<h2 class='pingVpReset'>"+this._text.get("collapsibleTranscriptTitle")+"</h2><img alt='"+this._text.get("collapsibleTranscriptLabelOff")+"' class='PingVpTranscriptChevron' src='"+this._theme.getIcon(this._theme.getByKey("svgset"),"chevron_down.svg","000")+"'>";transcriptClickable.setAttribute("tabindex","0");transcriptClickable.setAttribute("role","button");transcriptClickable.setAttribute("aria-expanded","false");transcriptClickable.setAttribute("aria-label",this._text.get("collapsibleTranscriptLabelOff"));transcriptPanel.appendChild(transcriptClickable);var transcriptCollapse=window.document.createElement("div");transcriptCollapse.id="pingVpTranscriptCollapse-"+this._videoOid;transcriptCollapse.className="pingVpTranscriptCollapse pingVpReset";transcriptCollapse.innerHTML=this._transcript.split("\n").join("<br>");transcriptCollapse.setAttribute("tabindex","-1");transcriptPanel.appendChild(transcriptCollapse);this._collapsibleRows.appendChild(transcriptPanel)},showTranscript:function(){this._transcriptOpen=!this._transcriptOpen;var _transcriptRow=$("#pingVpTranscriptRow-"+this._videoOid);if(this._transcriptOpen){_transcriptRow.addClass("pingVpPanelOpen");_transcriptRow.attr("aria-label",this._text.get("collapsibleTranscriptLabelOn"));_transcriptRow.find("img").attr("alt",this._text.get("collapsibleTranscriptLabelOn"));_transcriptRow.attr("aria-expanded","true")}else{_transcriptRow.removeClass("pingVpPanelOpen");_transcriptRow.attr("aria-label",this._text.get("collapsibleTranscriptLabelOff"));_transcriptRow.find("img").attr("alt",this._text.get("collapsibleTranscriptLabelOff"));_transcriptRow.attr("aria-expanded","false")}$("#pingVpTranscriptCollapse-"+this._videoOid).slideToggle()},getTranscriptRowActive:function(){return this._transcriptActive},__class__:pingvp_PingVpCollapsibleRows};var pingvp_PingVpConfigRead=function(){};$hxClasses["pingvp.PingVpConfigRead"]=pingvp_PingVpConfigRead;pingvp_PingVpConfigRead.__name__=["pingvp","PingVpConfigRead"];pingvp_PingVpConfigRead.get=function(){return PingVpConfig};var pingvp_PingVpContextMenu=function(videoOid){this._videoOid=videoOid;this._open=false;this._options=[]};$hxClasses["pingvp.PingVpContextMenu"]=pingvp_PingVpContextMenu;pingvp_PingVpContextMenu.__name__=["pingvp","PingVpContextMenu"];pingvp_PingVpContextMenu.prototype={setupContextMenus:function(container,theme,mobileCheck){this._theme=theme;this._container=container;this._mobileCheck=mobileCheck;if($("#pingVpContextMenu-"+this._videoOid).length==0){$(window.document.body).append('<ul class="pingVpContextMenu pingVpMenuFocus pingVpContextNonFullScreen pingVpReset" id="pingVpContextMenu-'+this._videoOid+'" role="list"><ul>')}if($("#pingVpContextMenuFs-"+this._videoOid).length==0){$(this._container.get()).append('<ul class="pingVpContextMenu pingVpMenuFocus pingVpContextIsFullScreen pingVpReset" id="pingVpContextMenuFs-'+this._videoOid+'" role="list"><ul>')}this._menu=$("#pingVpContextMenu-"+this._videoOid+"");this._menu.html("");this._menu.css("background-color","#"+theme.getByKey("menubackcolor")).css("color","#"+theme.getByKey("menucolor"));this._menu.css("display","none");this._menu.css("position","absolute");this._menu.css("zIndex","2147483647");this._menuFS=$("#pingVpContextMenuFs-"+this._videoOid+"");this._menuFS.html("");this._menuFS.css("background-color","#"+theme.getByKey("menubackcolor")).css("color","#"+theme.getByKey("menucolor"));this._menuFS.css("display","none");this._menuFS.css("position","absolute");this._menuFS.css("zIndex","2147483647");$(window.document.body).click($bind(this,this.onBodyClickClose))},addOption:function(id,label,bg,fun){if($("#"+StringTools.htmlEscape(id)).length==0){this._menu.append('<li class="pingVpContextOption pingVpReset '+StringTools.htmlEscape(id)+'" id="'+StringTools.htmlEscape(id)+"-"+this._videoOid+'"><div role="button" aria-label="'+StringTools.htmlEscape(label)+'" tabindex="0">'+StringTools.htmlEscape(label)+"</div></li>");var option=$("#"+StringTools.htmlEscape(id)+"-"+this._videoOid);if(bg!=null){option.css("backgroundImage","url("+StringTools.htmlEscape(bg)+")");option.addClass("pingVpContextIcon")}var f=$bind(this,this.onOptionClick);var a1=fun;option.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e){f(a1,e)});this._options.push(option)}if($("#pingVpFs-"+StringTools.htmlEscape(id)).length==0){this._menuFS.append('<li class="pingVpContextOption pingVpReset '+StringTools.htmlEscape(id)+'" id="pingVpFs-'+StringTools.htmlEscape(id)+"-"+this._videoOid+'"><div role="button" aria-label="'+StringTools.htmlEscape(label)+'" tabindex="0">'+StringTools.htmlEscape(label)+"</div></li>");var optionFs=$("#pingVpFs-"+StringTools.htmlEscape(id)+"-"+this._videoOid);if(bg!=null){optionFs.css("backgroundImage","url("+StringTools.htmlEscape(bg)+")");optionFs.addClass("pingVpContextIcon")}var f1=$bind(this,this.onOptionClick);var a11=fun;optionFs.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e1){f1(a11,e1)})}},addHr:function(){if($("#pingVpContextHrMenu").length==0){this._menu.append('<hr id="pingVpContextHrMenu">')}if($("#pingVpContextHrMenuFS").length==0){this._menuFS.append('<hr id="pingVpContextHrMenuFS">')}},menuOpen:function(fullscreen,e){if($(e.target).closest("#pingVpControlBarTime-"+this._videoOid).length==0&&$(e.target).closest(".pingVpControlToggleSvg").length==0){if(fullscreen.isFullScreen()){this._currentlySelected=this._menuFS;this._currentlySelectedRev=this._menu}else{this._currentlySelected=this._menu;this._currentlySelectedRev=this._menuFS}this._currentlySelectedRev.css("display","none");this._currentlySelected.css("display","block");if(fullscreen.isFullScreen()){this._currentlySelected.css("left",e.pageX);this._currentlySelected.css("top",e.pageY-$(this._container.get()).offset().top)}else{this._currentlySelected.css("left",e.pageX);this._currentlySelected.css("top",e.pageY)}this._currentlySelected.find('[tabindex="0"]').first().focus()}else{this.onBodyClickClose(null)}e.preventDefault()},menuOpenViaSettings:function(fullscreen,controlsBelowVideo){if(fullscreen.isFullScreen()){this._currentlySelected=this._menuFS;this._currentlySelectedRev=this._menu}else{this._currentlySelected=this._menu;this._currentlySelectedRev=this._menuFS}this._currentlySelectedRev.css("display","none");this._currentlySelected.css("display","block");var tempContainer=$(this._container.get());var locationBottom=controlsBelowVideo?57:69;var defaultContainerHeight=tempContainer.outerHeight()+tempContainer.offset().top;var defaultContainerWidth=tempContainer.outerWidth()+tempContainer.offset().left;if(this._mobileCheck){var calcMenuTop=(defaultContainerHeight-this._currentlySelected.outerHeight())/2;var calcMenuLeft=(defaultContainerWidth-this._currentlySelected.outerWidth())/2;this._currentlySelected.css("left",calcMenuLeft+"px");this._currentlySelected.css("top",calcMenuTop+"px")}else{var calcMenuTop1=defaultContainerHeight-locationBottom-this._currentlySelected.outerHeight();var calcMenuLeft1=defaultContainerWidth-7-this._currentlySelected.outerWidth();this._currentlySelected.css("left",calcMenuLeft1+"px");this._currentlySelected.css("top",calcMenuTop1+"px")}this._focus=$(":focus");if(this._focus.hasClass("pingVpSettingsMenuItemContext")){this._currentlySelected.find('[tabindex="0"]').first().focus()}},hideContextMenu:function(){if(this.isShown()){this._menu.css("display","none");this._menuFS.css("display","none")}},onOptionClick:function(fun,e){if(fun!=null){fun()}this._menu.css("display","none");this._menuFS.css("display","none")},onBodyClickClose:function(e){if($(e.target).hasClass("pingVpDisableContextClosing")){return}this._menu.css("display","none");this._menuFS.css("display","none")},isShown:function(){if(this._menu.css("display")=="none"){return this._menuFS.css("display")!="none"}else{return true}},__class__:pingvp_PingVpContextMenu};var pingvp_PingVpControlBar=function(videoOid,debug,disabled,overlay,videoScript,enableFullScreen,enableQuality,enableCc,enableAd,enableSpeed,enableShare,enableAI,controlsBelowVideo,theme,inOverlay,isHtmlPlayer,text,videoName,container,enableTranscript){var _gthis=this;this._pingVpElement=$(".PingVP");this._debug=debug;this._disabled=disabled;this._hideEnable=false;this._hideEnableLast=false;this._jqyVolumeSliderHover=false;this._videoOid=videoOid;this._enableFullScreen=enableFullScreen;this._videoScript=videoScript;this._enableQuality=enableQuality;this._enableCc=enableCc;this._enableAd=enableAd;this._enableSpeed=enableSpeed;this._enableShare=enableShare;this._enableAI=enableAI;this._enableTranscript=enableTranscript;this._controlsBelowVideo=controlsBelowVideo;this._theme=theme;this._inOverlay=inOverlay;this._isHtmlPlayer=isHtmlPlayer;this._text=text;this._justUsedFocus=false;this._overlay=$("#pingVpOverlay-"+this._videoOid);this._scriptWidth=this._videoScript.getFragmentVideoWidth(videoName);this._scriptHeight=this._videoScript.getFragmentVideoHeight(videoName);this._container=container;this._mobileCheck=false;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._mobileCheck=true}this._buttonWidth=34;this._generalLeftOffset=0;this._generalRightOffset=0;this._controlBarElement=window.document.createElement("div");this._controlBarElement.id="pingVpControlBar-"+videoOid;var mobileClass=this._mobileCheck?"pingVpControlOverlay":"";var controlBackground=this._mobileCheck?"":"PingVpControlBarBackground";if(this._controlsBelowVideo==false){this._controlBarElement.className="pingVpControlBar "+mobileClass+" pingVpReset pingVpControlBarHovering "+controlBackground}else{this._controlBarElement.className="pingVpControlBar "+mobileClass+" pingVpReset pingVpControlBarSticky"}if(this._disabled){this._controlBarElement.style.display="none"}if(!this._mobileCheck){this._controlBarChildTime=window.document.createElement("div");this._controlBarChildTime.id="pingVpControlBarTime-"+videoOid;this._controlBarChildTime.className="pingVpControlBarChildTime";this._controlBarElement.appendChild(this._controlBarChildTime)}this._controlBarChildOther=window.document.createElement("div");this._controlBarChildOther.id="pingVpControlBarOther-"+videoOid;this._controlBarChildOther.className="pingVpControlBarChildOther";this._controlBarLeftSide=window.document.createElement("div");this._controlBarLeftSide.id="pingVpControlLeftSide-"+videoOid;this._controlBarLeftSide.className="pingVpControlLeftSide";this._controlBarRightSide=window.document.createElement("div");this._controlBarRightSide.id="pingVpControlRightSide-"+videoOid;this._controlBarRightSide.className="pingVpControlRightSide";this._controlBarChildOther.appendChild(this._controlBarLeftSide);this._controlBarChildOther.appendChild(this._controlBarRightSide);this._controlBarElement.appendChild(this._controlBarChildOther);if(this._mobileCheck){this._controlBarChildTime=window.document.createElement("div");this._controlBarChildTime.id="pingVpControlBarTime-"+videoOid;this._controlBarChildTime.className="pingVpControlBarChildTime";this._controlBarElement.appendChild(this._controlBarChildTime)}this._controlBarCollect=window.document.createElement("div");this._controlBarCollect.id="pingVpControlCollected-"+videoOid;var mobileCollectedClass=this._mobileCheck?"pingVpCollectMobile":"";if(this._controlsBelowVideo==true){this._controlBarCollect.className="pingVpCollectBar "+mobileCollectedClass}else{this._controlBarCollect.className="pingVpCollectBar pingVpCollectBarFloat "+mobileCollectedClass}if(this._mobileCheck){this._controlBarOverlayMobile=window.document.createElement("div");this._controlBarOverlayMobile.id="pingVpControlOverlayMobile-"+videoOid;this._controlBarOverlayMobile.className="pingVpControlOverlayMobile";this._controlBarTopBar=window.document.createElement("div");this._controlBarTopBar.id="pingVpControlBarTop-"+videoOid;this._controlBarTopBar.className="pingVpControlBarTop";this._controlBarLeftTopSide=window.document.createElement("div");this._controlBarLeftTopSide.id="pingVpControlLeftTopSide-"+videoOid;this._controlBarLeftTopSide.className="pingVpControlLeftTopSide";this._controlBarTopBar.appendChild(this._controlBarLeftTopSide);this._controlBarRightTopSide=window.document.createElement("div");this._controlBarRightTopSide.id="pingVpControlRightTopSide-"+videoOid;this._controlBarRightTopSide.className="pingVpControlRightTopSide";this._controlBarTopBar.appendChild(this._controlBarRightTopSide);this._controlBarOverlayMobile.appendChild(this._controlBarTopBar);this._controlBarCenter=window.document.createElement("div");this._controlBarCenter.id="pingVpControlBarCenter-"+videoOid;this._controlBarCenter.className="pingVpControlBarCenter";this._controlBarCenterHorizontal=window.document.createElement("div");this._controlBarCenterHorizontal.id="pingVpControlBarCenterHorizontal-"+videoOid;this._controlBarCenterHorizontal.className="pingVpControlBarCenterHorizontal";this._controlBarCenter.appendChild(this._controlBarCenterHorizontal);this._controlBarOverlayMobile.appendChild(this._controlBarCenter);this._controlBarOverlayMobile.appendChild(this._controlBarElement);this._controlBarCollect.appendChild(this._controlBarOverlayMobile)}else{this._controlBarCollect.appendChild(this._controlBarElement)}overlay.get().append(this._controlBarCollect);if(this._controlsBelowVideo==true){this._setBackgroundColorBar=$("#pingVpControlBarOther-"+videoOid);this._setBackgroundColorBar.css("background-color","#"+theme.getByKey("controlbarcolor"))}var defaultColor=videoScript.getHeaderDefaultColor();if(defaultColor==null||defaultColor==""){defaultColor=theme.getByKey("defaultcolor")}if(this._controlsBelowVideo!=true){defaultColor=theme.getSetDefaultColor()}var hoverColor=videoScript.getHeaderHoverColor();if(hoverColor==null||hoverColor==""){hoverColor=theme.getByKey("hovercolor")}if(this._controlsBelowVideo!=true){hoverColor=theme.getSetHoverColor()}var width=this._controlBarElement.clientWidth;var width2=$("#pingVpOverlayPlayContainer-"+videoOid).width();var marginClass="";var minMarginClass="";var displayClass="";var paddingClass="";if(width2<width){width=width2}if(paddingClass!=""){$(this._controlBarChildOther).addClass(paddingClass)}if(this._mobileCheck){this._5secBackButton=new pingvp_PingVpControlToggleSvg("pingVpControl5sBack",videoOid,"5sback_mobile","5sback_mobile",defaultColor,hoverColor,theme,false,false,"pingVpControlBarCenterHorizontal",marginClass+" pingVpControlPlayMobile","pingVpLargeCenterSvg",this._controlsBelowVideo,this._text.get("altControlbar5sec"),this._text.get("altControlbar5sec"),true,false);this._5secBackButton.setOnHandler($bind(this,this.on5secBackButtonClick));this._5secBackButton.setOffHandler($bind(this,this.on5secBackButtonClick))}this._playButtonOffset=0;if(!this._mobileCheck){var playColor=videoScript.getHeaderDefaultColor();if(playColor==null||playColor==""){playColor=defaultColor}this._playButton=new pingvp_PingVpControlToggleSvg("pingVpControlPlay",videoOid,"pause_button","play_button",playColor,hoverColor,theme,false,false,"left",marginClass,"",this._controlsBelowVideo,this._text.get("altControlbarPause"),this._text.get("altControlbarPlay"),true,false);this._playButton.setOnHandler($bind(this,this.onPlay));this._playButton.setOffHandler($bind(this,this.onPause));this._playButton.setHoverHandler(this._text.get("controlPlayLabelOn"),this._text.get("controlPlayLabelOff"),true,this._playButtonOffset)}else{this._playButton=new pingvp_PingVpControlToggleSvg("pingVpControlPlay",videoOid,"pause_button_mobile","play_button_mobile",defaultColor,hoverColor,theme,false,false,"pingVpControlBarCenterHorizontal",marginClass+" pingVpControlPlayMobile","pingVpLargeCenterSvg",this._controlsBelowVideo,this._text.get("altControlbarPause"),this._text.get("altControlbarPlay"),true,false);this._playButton.setOnHandler($bind(this,this.onPlay));this._playButton.setOffHandler($bind(this,this.onPause))}var timeColor=videoScript.getHeaderTimeColor();if(timeColor==null||timeColor==""){timeColor=theme.getByKey("timecolor")}if(this._controlsBelowVideo!=true){timeColor="fff"}this._timeSlider=new pingvp_PingVpControlSliderSvg("pingVpTimeSlider",videoOid,overlay,this.setTimeSliderWidth(),"slider","button",this._text,theme,this._controlsBelowVideo,"");this._timeSlider.setClickHandler($bind(this,this.onTimeSliderClick));this._timeSlider.setArrowHandler($bind(this,this.onTimeSliderArrows));this._timeText=new pingvp_PingVpControlTime(videoOid,timeColor,this._debug,displayClass);this._getTimeTextWidth=$("#pingVpControlPos-"+this._videoOid);this._timeTextOffset=this._getTimeTextWidth.outerWidth();if(width2<370){this._timeTextOffset=0;this._getTimeTextWidth.hide()}if(!this._mobileCheck){this._5secBackButtonOffset=this._buttonWidth+this._timeTextOffset;this._5secBackButton=new pingvp_PingVpControlToggleSvg("pingVpControl5sBack",videoOid,"5sback_icon","5sback_icon",defaultColor,hoverColor,theme,false,false,"left",marginClass,"",this._controlsBelowVideo,this._text.get("altControlbar5sec"),this._text.get("altControlbar5sec"),true,false);this._5secBackButton.setOnHandler($bind(this,this.on5secBackButtonClick));this._5secBackButton.setOffHandler($bind(this,this.on5secBackButtonClick));this._5secBackButton.setHoverHandler(this._text.get("control5SecBackLabel"),this._text.get("control5SecBackLabel"),false,this._5secBackButtonOffset)}if(this._isHtmlPlayer){var mutePosition=this._mobileCheck?"right":"left";this._muteButtonOffset=this._buttonWidth*2+this._timeTextOffset;this._muteButton=new pingvp_PingVpControlToggleSvg("pingVpControlMute",videoOid,"sound_on","sound_off",defaultColor,hoverColor,theme,false,false,mutePosition,minMarginClass,"",this._controlsBelowVideo,this._text.get("altControlbarSoundOn"),this._text.get("altControlbarSoundOff"),true,false);this._muteButton.setOnHandler($bind(this,this.onUnmute));this._muteButton.setOffHandler($bind(this,this.onMute));if(!this._mobileCheck){this._muteButton.setHoverHandler(this._text.get("muteLabel"),this._text.get("muteLabel"),false,this._muteButtonOffset)}this._jqyMuteButton=$("#pingVpControlMute-"+videoOid)}if(!this._mobileCheck&&this._isHtmlPlayer){this._volumeSlider=new pingvp_PingVpControlSliderSvg("pingVpVolumeSlider",videoOid,overlay,80,"slider","button",this._text,theme,this._controlsBelowVideo,marginClass);this._volumeSlider.setClickHandler($bind(this,this.onVolumeSliderClick));this._volumeSlider.setArrowHandler($bind(this,this.onVolumeSliderArrows));this._jqyVolumeSlider=$("#pingVpVolumeSlider-"+videoOid);this._jqyVolumeSliderOverlay=$("#pingVpVolumeSliderOverlay-"+videoOid);if(width2<460){this._jqyVolumeSlider.addClass("pingVpHideSmallEmbed")}this._jqyMuteButton.hover(function(e){if(_gthis._jqyVolumeSlider!=null){if(_gthis._jqyVolumeSliderTimer!=null){_gthis._jqyVolumeSliderTimer.stop()}_gthis._jqyVolumeSlider.stop().animate({width:"show"});_gthis._jqyVolumeSliderHover=true}},function(e1){if(_gthis._jqyVolumeSlider!=null){_gthis._jqyVolumeSlider.stop().animate({width:"hide"})}_gthis._jqyVolumeSliderHover=false});this._jqyMuteButton.focus(function(e2){if(_gthis._jqyVolumeSlider!=null){if(_gthis._jqyVolumeSliderTimer!=null){_gthis._jqyVolumeSliderTimer.stop()}_gthis._jqyVolumeSlider.stop().animate({width:"show"});_gthis._jqyVolumeSliderHover=true}});this._jqyMuteButton.blur(function(e3){if(_gthis._jqyVolumeSlider!=null){_gthis._jqyVolumeSlider.stop().animate({width:"hide"})}_gthis._jqyVolumeSliderHover=false});this._jqyVolumeSlider.hover(function(e4){if(_gthis._jqyVolumeSlider!=null){if(_gthis._jqyVolumeSliderTimer!=null){_gthis._jqyVolumeSliderTimer.stop()}_gthis._jqyVolumeSlider.stop().animate({width:"show"});_gthis._jqyVolumeSliderHover=true}},function(e5){if(_gthis._jqyVolumeSlider!=null){_gthis._jqyVolumeSlider.stop().animate({width:"hide"})}_gthis._jqyVolumeSliderHover=false});this._jqyVolumeSliderOverlay.focus(function(e6){if(_gthis._jqyVolumeSlider!=null){if(_gthis._jqyVolumeSliderTimer!=null){_gthis._jqyVolumeSliderTimer.stop()}_gthis._jqyVolumeSlider.stop().animate({width:"show"});_gthis._jqyVolumeSliderHover=true}});this._jqyVolumeSliderOverlay.blur(function(e7){if(_gthis._jqyVolumeSlider!=null){_gthis._jqyVolumeSlider.stop().animate({width:"hide"})}_gthis._jqyVolumeSliderHover=false})}if(enableCc){var subtitlesPosition=this._mobileCheck?"pingVpControlRightTopSide":"right";this._subtitlesButtonOffset=0;this._subtitlesButtonOffset=this._enableAd?this._subtitlesButtonOffset+this._buttonWidth:this._subtitlesButtonOffset;this._subtitlesButtonOffset=enableShare?this._subtitlesButtonOffset+this._buttonWidth:this._subtitlesButtonOffset;this._subtitlesButtonOffset=this._enableTranscript?this._subtitlesButtonOffset+this._buttonWidth:this._subtitlesButtonOffset;this._subtitlesButtonOffset=enableQuality||enableCc||enableSpeed||enableShare?this._subtitlesButtonOffset+this._buttonWidth:this._subtitlesButtonOffset;this._subtitlesButtonOffset=enableFullScreen?this._subtitlesButtonOffset+this._buttonWidth:this._subtitlesButtonOffset;this._subtitlesButton=new pingvp_PingVpControlToggleSvg("pingVpControlSubtitles",videoOid,"subtitles","subtitles",defaultColor,hoverColor,theme,false,false,subtitlesPosition,minMarginClass,"",this._controlsBelowVideo,this._text.get("altControlbarSubtitle"),this._text.get("altControlbarSubtitleOff"),true,true);this._subtitlesButton.setOnIcon("subtitles_on");this._subtitlesButton.setOnHandler($bind(this,this.onSubtitles));this._subtitlesButton.setOffHandler($bind(this,this.onSubtitles));if(!this._mobileCheck){this._subtitlesButton.setHoverHandler(this._text.get("subtitlesLabel"),this._text.get("subtitlesLabel"),false,this._subtitlesButtonOffset)}}if(this._enableAd){var adPosition=this._mobileCheck?"pingVpControlRightTopSide":"right";this._adButtonOffset=0;this._adButtonOffset=enableShare?this._adButtonOffset+this._buttonWidth:this._adButtonOffset;this._adButtonOffset=this._enableTranscript?this._adButtonOffset+this._buttonWidth:this._adButtonOffset;this._adButtonOffset=enableQuality||enableCc||enableSpeed||enableShare?this._adButtonOffset+this._buttonWidth:this._adButtonOffset;this._adButtonOffset=enableFullScreen?this._adButtonOffset+this._buttonWidth:this._adButtonOffset;this._adButton=new pingvp_PingVpControlToggleSvg("pingVpControlAd",videoOid,"audio_description_on","audio_description",defaultColor,hoverColor,theme,false,false,adPosition,minMarginClass,"",this._controlsBelowVideo,this._text.get("altControlbarAdOff"),this._text.get("altControlbarAdOn"),true,false);this._adButton.setOnIcon("audio_description_on");this._adButton.setOnHandler($bind(this,this.onAd));this._adButton.setOffHandler($bind(this,this.onAd));if(!this._mobileCheck){this._adButton.setHoverHandler(this._text.get("adLabel"),this._text.get("adLabel"),false,this._adButtonOffset)}}if(enableShare){var sharePosition=this._mobileCheck?"pingVpControlLeftTopSide":"right";this._shareButtonOffset=0;this._shareButtonOffset=this._enableTranscript?this._shareButtonOffset+this._buttonWidth:this._shareButtonOffset;this._shareButtonOffset=enableQuality||enableCc||enableSpeed||enableShare?this._shareButtonOffset+this._buttonWidth:this._shareButtonOffset;this._shareButtonOffset=enableFullScreen?this._shareButtonOffset+this._buttonWidth:this._shareButtonOffset;this._shareButton=new pingvp_PingVpControlToggleSvg("pingVpControlShare",videoOid,"share","share",defaultColor,hoverColor,theme,false,false,sharePosition,minMarginClass,"",this._controlsBelowVideo,this._text.get("altControlbarShare"),this._text.get("altControlbarShareOff"),true,true);this._shareButton.setOnHandler($bind(this,this.onShare));this._shareButton.setOffHandler($bind(this,this.onShare));if(!this._mobileCheck){this._shareButton.setHoverHandler(this._text.get("shareLabel"),this._text.get("shareLabel"),false,this._shareButtonOffset)}}if(this._enableTranscript){var transcriptPosition=this._mobileCheck?"pingVpControlRightTopSide":"right";this._transcriptButtonOffset=0;this._transcriptButtonOffset=enableQuality||enableCc||enableSpeed||enableShare?this._transcriptButtonOffset+this._buttonWidth:this._transcriptButtonOffset;this._transcriptButtonOffset=enableFullScreen?this._transcriptButtonOffset+this._buttonWidth:this._transcriptButtonOffset;this._transcriptButton=new pingvp_PingVpControlToggleSvg("pingVpControlTranscript",videoOid,"transcript_on","transcript_off",defaultColor,hoverColor,theme,false,false,transcriptPosition,minMarginClass,"",this._controlsBelowVideo,this._text.get("altControlbarTranscriptOn"),this._text.get("altControlbarTranscriptOff"),true,true);this._transcriptButton.setOnHandler($bind(this,this.onTranscript));this._transcriptButton.setOffHandler($bind(this,this.onTranscript));if(!this._mobileCheck){this._transcriptButton.setHoverHandler(this._text.get("transcriptLabel"),this._text.get("transcriptLabel"),false,this._transcriptButtonOffset)}}if(enableQuality||enableCc||enableSpeed||enableShare){var settingsPosition=this._mobileCheck?"pingVpControlRightTopSide":"right";this._settingsButtonOffset=enableFullScreen?this._buttonWidth:0;this._settingsButton=new pingvp_PingVpControlToggleSvg("pingVpControlSettings",videoOid,"setting","setting",defaultColor,hoverColor,theme,false,false,settingsPosition,minMarginClass,"",this._controlsBelowVideo,this._text.get("altControlbarSettings"),this._text.get("altControlbarSettingsOff"),true,true);this._settingsButton.setOnHandler($bind(this,this.onSettings));this._settingsButton.setOffHandler($bind(this,this.onSettings));if(!this._mobileCheck){this._settingsButton.setHoverHandler(this._text.get("settingsLabel"),this._text.get("settingsLabel"),false,this._settingsButtonOffset)}}if(enableFullScreen){this._fullScreenButtonOffset=0;this._fullScreenButton=new pingvp_PingVpControlToggleSvg("pingVpControlFullScreen",videoOid,"small_screen","full_screen",defaultColor,hoverColor,theme,false,false,"right",minMarginClass,"",this._controlsBelowVideo,this._text.get("altControlbarSmallscreen"),this._text.get("altControlbarFullscreen"),true,false);this._fullScreenButton.setOnHandler($bind(this,this.onFullScreen));this._fullScreenButton.setOffHandler($bind(this,this.onWindowed));if(!this._mobileCheck){this._fullScreenButton.setHoverHandler(this._text.get("fullscreenLabel"),this._text.get("smallscreenLabel"),true,this._fullScreenButtonOffset)}}this._controlBarLeftSideJQ=$("#pingVpControlLeftSide-"+videoOid);this._controlBarRightSideJQ=$("#pingVpControlRightSide-"+videoOid);if(this._mobileCheck){this._selectedShowElement=this._controlBarOverlayMobile;this._selectedShowJQuery=$("#pingVpControlOverlayMobile-"+this._videoOid)}else{this._selectedShowElement=this._controlBarElement;this._selectedShowJQuery=$("#pingVpControlBar-"+this._videoOid)}if(enableAI){var aiPosition=this._mobileCheck?"pingVpControlLeftTopSide":"left";this._aiButtonOffset=this._buttonWidth*3+this._timeTextOffset;this._aiButton=new pingvp_PingVpControlToggleSvg("pingVpAIenabled",videoOid,"ai_icon","ai_icon","676767","676767",theme,false,false,aiPosition,marginClass,"",this._controlsBelowVideo,this._text.get("altControlbarAIOn"),this._text.get("altControlbarAIOff"),true,true);this._aiButton.setOnHandler($bind(this,this.onAI));this._aiButton.setOffHandler($bind(this,this.onAI));if(!this._mobileCheck){this._aiButton.setHoverHandler(this._text.get("controlAILabel"),this._text.get("controlAILabel"),false,this._aiButtonOffset)}}var tmp=this._mobileCheck;$("#pingVpOverlay-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onShow));if(!this._mobileCheck){$("#pingVpOverlay-"+videoOid).mousemove($bind(this,this.onShow))}$("#pingVpControlBarCenterHorizontal-"+videoOid).append('<div id="pingVpCenter5SecAndPlay-'+videoOid+'" class="pingVpControlPlayMobile pingVpControlCenteredOffset"></div>');$("body").on("keyup click contextmenu",null,$bind(this,this.onShowTab));this._selectedShowJQuery.css("opacity",0);this._buttonsEnable=true;this._focus=$(":focus");this._pingVpElement=$(".pingVpWebplayerSelector,#pingVpOverlayPlayContainer-"+this._videoOid+",.PingVP");if((this._focus.hasClass("pingVpOverlayPlayButton")||this._focus.hasClass("pingVpOverlayPlay"))&&this._pingVpElement.hasClass("pingVpIsTabbing")){this._pingVpElement.find('[tabindex="0"]:visible, .pingVpControlBar [tabindex="0"]').first().focus();this._focus=$(":focus");if(this._focus.parents(".pingVpControlBar").length!=0||this._focus.parents(".pingVpSettingsMenu").length!=0||this._focus.parents(".pingVpSubtitlesMenu").length!=0||this._focus.parents(".pingVpShareOverlay").length!=0||this._focus.parents(".pingVpShortcutOverlay").length!=0){if(!this._disabled){this._selectedShowJQuery.stop(null,false,false);this._selectedShowJQuery.css("opacity",1);$("#pingVpControlCollected-"+this._videoOid+" .pingVpSubtitles").addClass("pingVpControlBarVisible");$(".pingVpBrandedStudioLogoBottom-"+this._videoOid).addClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+this._videoOid).addClass("pingVpCollectedVisible");this._buttonsEnable=true;this._isFadding=false}}}};$hxClasses["pingvp.PingVpControlBar"]=pingvp_PingVpControlBar;pingvp_PingVpControlBar.__name__=["pingvp","PingVpControlBar"];pingvp_PingVpControlBar.prototype={showTimeSliderKeys:function(){this.onShow(null)},showVolumeSliderKeys:function(){var _gthis=this;this.onShow(null);if(this._jqyVolumeSlider!=null&&!this._jqyVolumeSliderHover){if(this._jqyVolumeSliderTimer!=null){this._jqyVolumeSliderTimer.stop()}this._jqyVolumeSlider.stop().animate({width:"show"});this._jqyVolumeSliderTimer=haxe_Timer.delay(function(){_gthis._jqyVolumeSlider.stop().animate({width:"hide"})},1500)}},onPlay:function(){if(this._playCall!=null&&this._buttonsEnable){this._playCall()}},onPause:function(){if(this._pauseCall!=null&&this._buttonsEnable){this._pauseCall()}},onFullScreen:function(){if(this._fullScreenCall!=null&&this._buttonsEnable){this._fullScreenCall()}},onWindowed:function(){if(this._windowedCall!=null&&this._buttonsEnable){this._windowedCall()}},onMute:function(){if(this._muteCall!=null&&this._buttonsEnable){this._muteCall()}},onUnmute:function(){if(this._unmuteCall!=null&&this._buttonsEnable){this._unmuteCall()}},onSettings:function(){if(this._settingsCall!=null&&this._buttonsEnable){this._settingsCall()}},onShare:function(){if(this._shareCall!=null&&this._buttonsEnable){this._shareCall()}},onAI:function(){if(this._aiCall!=null&&this._buttonsEnable){this._aiCall()}},onTranscript:function(){if(this._transcriptCall!=null&&this._buttonsEnable){this._transcriptCall()}},onSubtitles:function(){if(this._subtitlesCall!=null&&this._buttonsEnable){this._subtitlesCall()}},onAd:function(){if(this._adCall!=null&&this._buttonsEnable){this._adCall()}},onTimeSliderClick:function(){if(this._timeSliderCall!=null&&this._buttonsEnable){this._timeSliderCall()}},onTimeSliderArrows:function(action){if(this._timeSliderCallArrows!=null&&this._buttonsEnable){this._timeSliderCallArrows(action)}},on5secBackButtonClick:function(){if(this._5secBackButtonCall!=null&&this._buttonsEnable){this._5secBackButtonCall()}},onVolumeSliderClick:function(){if(this._volumeSliderCall!=null&&this._buttonsEnable){this._volumeSliderCall()}},onVolumeSliderArrows:function(action){if(this._volumeSliderCallArrows!=null&&this._buttonsEnable&&!this._justUsedFocus){this._volumeSliderCallArrows(action)}},setPlayHandler:function(call){this._playCall=call},setPauseHandler:function(call){this._pauseCall=call},setFullScreenHandler:function(call){this._fullScreenCall=call},setWindowedHandler:function(call){this._windowedCall=call},setMuteHandler:function(call){this._muteCall=call},setUnmuteHandler:function(call){this._unmuteCall=call},setSettingsHandler:function(call,settings){this._settingsCall=call;this._settings=settings},setShareHandler:function(call,share){this._shareCall=call;this._share=share},setTranscriptHandler:function(call,share){this._transcriptCall=call},setAIHandler:function(call,aiModal){this._aiCall=call;this._aiModal=aiModal},setSubtitlesHandler:function(call,subtitles){this._subtitlesCall=call;this._subtitles=subtitles},setAdHandler:function(call,activeAudioDescription){this._adCall=call;this._activeAudioDescription=activeAudioDescription},setTimeSliderHandler:function(call){this._timeSliderCall=call},setTimeSliderArrowsHandler:function(call){this._timeSliderCallArrows=call},set5secBackButtonHandler:function(call){this._5secBackButtonCall=call},setVolumeSliderHandler:function(call){this._volumeSliderCall=call},setVolumeSliderArrowsHandler:function(call){this._volumeSliderCallArrows=call},setSubsOnIcon:function(icon){if(this._subtitlesButton!=null){this._subtitlesButton.setOnIcon(icon)}},setAdOnIcon:function(icon){if(this._adButton!=null){this._adButton.setOnIcon(icon)}},setPlay:function(){if(this._playButton!=null){this._playButton.setOn()}},setPause:function(){if(this._playButton!=null){this._playButton.setOff()}},setPauseIcon:function(){if(this._playButton!=null){this._playButton.setOffIcon("pause_button")}},setReplay:function(){if(this._playButton!=null){this._playButton.setTempOffIcon("replay")}},isPlaying:function(){return this._playButton.isOn()},setFullScreen:function(){if(this._enableFullScreen){this._fullScreenButton.setOn()}},setWindowed:function(){if(this._enableFullScreen){this._fullScreenButton.setOff()}},handleShareButtonAlt:function(shareIsShown){if(this._shareButton!=null){if(shareIsShown){this._shareButton.setOnAlt();this._shareButton.setAriaExpanded(true);this._shareButton.setAriaLabel(this._text.get("altControlbarShareOff"))}else{this._shareButton.setOffAlt();this._shareButton.setAriaExpanded(false);this._shareButton.setAriaLabel(this._text.get("altControlbarShare"))}}},handleAIButtonAlt:function(aiIsShown){if(this._aiButton!=null){if(aiIsShown){this._aiButton.setOnAlt();this._aiButton.setAriaExpanded(true);this._aiButton.setAriaLabel(this._text.get("altControlbarAIOff"))}else{this._aiButton.setOffAlt();this._aiButton.setAriaExpanded(false);this._aiButton.setAriaLabel(this._text.get("altControlbarAIOn"))}}},isFullScreen:function(){if(!this._enableFullScreen){return false}return this._fullScreenButton.isOn()},setMute:function(){this._muteButton.setOff()},setUnmute:function(){this._muteButton.setOn()},isMute:function(){if(this._muteButton!=null){return !this._muteButton.isOn()}else{return false}},setSettings:function(enable){if(enable){this._settingsButton.setOn();this._settingsButton.setRotateOn()}else{this._settingsButton.setOff();this._settingsButton.setRotateOff()}},setSubtitles:function(enable){if(this._subtitlesButton!=null){if(enable){this._subtitlesButton.setOn()}else{this._subtitlesButton.setOff()}}},setAd:function(enable){if(this._adButton!=null){if(enable){this._adButton.setOn();this._activeAudioDescription=true}else{this._adButton.setOff();this._activeAudioDescription=false}}},setTranscript:function(enable){if(this._transcriptButton!=null&&enable){this._transcriptButton.setOn()}if(this._transcriptButton!=null&&!enable){this._transcriptButton.setOff()}},onShow:function(e){var _gthis=this;if(this._disabled){return}if(this._mobileCheck){this._checkClick=$(e.target);if(this._hideEnable&&this._buttonsEnable&&((this._checkClick.hasClass("pingVpCollectMobile")||this._checkClick.parents(".pingVpCollectMobile").length!=0)&&(!this._checkClick.hasClass("pingVpControlToggleSvg")&&this._checkClick.parents(".pingVpControlToggleSvg").length==0&&!this._checkClick.hasClass("pingVpControlSlider")&&this._checkClick.parents(".pingVpControlSlider").length==0&&!this._checkClick.hasClass("pingVpBlock")&&this._checkClick.parents(".pingVpBlock").length==0))){this._selectedShowJQuery.stop(null,false,false);this._selectedShowJQuery.css("opacity",0);$("#pingVpControlCollected-"+this._videoOid+" .pingVpSubtitles").removeClass("pingVpControlBarVisible");$(".pingVpBrandedStudioLogoBottom-"+this._videoOid).removeClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+this._videoOid).removeClass("pingVpCollectedVisible");this._buttonsEnable=false;this._isFadding=false}else{this._selectedShowJQuery.stop(null,false,false);this._selectedShowJQuery.css("opacity",1);$("#pingVpControlCollected-"+this._videoOid+" .pingVpSubtitles").addClass("pingVpControlBarVisible");$(".pingVpBrandedStudioLogoBottom-"+this._videoOid).addClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+this._videoOid).addClass("pingVpCollectedVisible");this._buttonsEnable=true;this._isFadding=false;this._focus=$(":focus");if(this._hideEnable&&(this._focus.parents(".pingVpControlBar").length==0&&(this._focus.parents(".pingVpSettingsMenu").length==0||this._focus.parents(".pingVpSubtitlesMenu").length==0||this._focus.parents(".pingVpShareOverlay").length==0||this._focus.parents(".pingVpShortcutOverlay").length==0)||!this._pingVpElement.hasClass("pingVpIsTabbing"))){this._isFadding=true;this._selectedShowJQuery.stop(null,true,false).animate({opacity:0},2000,null,function(){_gthis._buttonsEnable=false;$("#pingVpControlCollected-"+_gthis._videoOid+" .pingVpSubtitles").removeClass("pingVpControlBarVisible");$(".pingVpBrandedStudioLogoBottom-"+_gthis._videoOid).removeClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+_gthis._videoOid).removeClass("pingVpCollectedVisible")})}}}else{this._selectedShowJQuery.stop(null,false,false);this._selectedShowJQuery.css("opacity",1);$("#pingVpControlCollected-"+this._videoOid+" .pingVpSubtitles").addClass("pingVpControlBarVisible");$(".pingVpBrandedStudioLogoBottom-"+this._videoOid).addClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+this._videoOid).addClass("pingVpCollectedVisible");this._buttonsEnable=true;this._isFadding=false;this._focus=$(":focus");if(this._hideEnable&&(this._focus.parents(".pingVpControlBar").length==0&&(this._focus.parents(".pingVpSettingsMenu").length==0||this._focus.parents(".pingVpSubtitlesMenu").length==0||this._focus.parents(".pingVpShareOverlay").length==0||this._focus.parents(".pingVpShortcutOverlay").length==0)||!this._pingVpElement.hasClass("pingVpIsTabbing"))){this._isFadding=true;this._selectedShowJQuery.stop(null,true,false).animate({opacity:0},2000,null,function(){_gthis._buttonsEnable=false;$("#pingVpControlCollected-"+_gthis._videoOid+" .pingVpSubtitles").removeClass("pingVpControlBarVisible");$(".pingVpBrandedStudioLogoBottom-"+_gthis._videoOid).removeClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+_gthis._videoOid).addClass("pingVpCollectedVisible")})}}},onShowTab:function(e){var _gthis=this;if(e.which==9||e.which==1||e.which==3){this._focus=$(":focus");if(this._hideEnable){if((this._focus.parents(".pingVpControlBar").length!=0||this._focus.parents(".pingVpSettingsMenu").length!=0||this._focus.parents(".pingVpSubtitlesMenu").length!=0||this._focus.parents(".pingVpShareOverlay").length!=0||this._focus.parents(".pingVpShortcutOverlay").length!=0)&&this._pingVpElement.hasClass("pingVpIsTabbing")){this.onShow(e)}else{if(this._buttonsEnable&&!this._isFadding){this._isFadding=true;this._selectedShowJQuery.stop(null,true,false).animate({opacity:0},2000,null,function(){_gthis._buttonsEnable=false;$("#pingVpControlCollected-"+_gthis._videoOid+" .pingVpSubtitles").removeClass("pingVpControlBarVisible");$(".pingVpBrandedStudioLogoBottom-"+_gthis._videoOid).removeClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+_gthis._videoOid).removeClass("pingVpCollectedVisible")})}}}}},checkLeftAndRightKeys:function(e){this._focus=$(":focus");this._justUsedFocus=false;var keyCheckLeft=this._focus.parents(".pingVpControlBarChildOther").length!=0&&(!this._jqyVolumeSliderOverlay.is(this._focus)||this._jqyVolumeSliderOverlay.is(this._focus)&&this._volumeSlider.getPercent()==0)&&this._pingVpElement.hasClass("pingVpIsTabbing");var keyCheckRight=this._focus.parents(".pingVpControlBarChildOther").length!=0&&(!this._jqyVolumeSliderOverlay.is(this._focus)||this._jqyVolumeSliderOverlay.is(this._focus)&&this._volumeSlider.getPercent()==100)&&this._pingVpElement.hasClass("pingVpIsTabbing");if(e.which==37&&keyCheckLeft){e.preventDefault();if(this._controlBarRightSideJQ.find('[tabindex="0"]').first()["is"](this._focus)){this._controlBarLeftSideJQ.find('[tabindex="0"]:visible').last().focus()}else{if(this._jqyVolumeSliderOverlay.is(this._focus)){this._jqyMuteButton.focus()}else{this._focus.prevAll('[tabindex="0"]').first().focus()}}}if(e.which==39&&keyCheckRight){e.preventDefault();if(this._controlBarLeftSideJQ.find('[tabindex="0"]').last()["is"](this._focus)){if(this._controlBarRightSideJQ.find('[tabindex="0"]:visible').first()["is"](this._jqyVolumeSlider.find(".pingVpSvgObjectOverlay"))){this._justUsedFocus=true;this._controlBarRightSideJQ.find('[tabindex="0"]:visible').first().focus()}else{this._controlBarRightSideJQ.find('[tabindex="0"]:visible').first().focus()}}else{if(this._jqyMuteButton.is(this._focus)){this._justUsedFocus=true;this._jqyVolumeSliderOverlay.focus()}else{this._focus.nextAll("#pingVpControlBarOther-"+this._videoOid+' [tabindex="0"]').first().focus()}}}},hideEnable:function(value){var _gthis=this;if(this._disabled){return}this._hideEnable=value;if(this._hideEnableLast!=this._hideEnable){this._focus=$(":focus");if(this._hideEnable&&(this._focus.parents(".pingVpControlBar").length==0&&this._focus.parents(".pingVpSettingsMenu").length==0&&this._focus.parents(".pingVpSubtitlesMenu").length==0&&this._focus.parents(".pingVpShareOverlay").length==0&&!this._focus.hasClass(".pingVpShareOverlay")&&this._focus.parents(".pingVpShortcutOverlay").length==0&&!this._focus.hasClass(".pingVpShortcutOverlay")||!this._pingVpElement.hasClass("pingVpIsTabbing"))){this._selectedShowJQuery.stop(null,true,false).animate({opacity:0},2000,null,function(){_gthis._buttonsEnable=false;$("#pingVpControlCollected-"+_gthis._videoOid+" .pingVpSubtitles").removeClass("pingVpControlBarVisible");$(".pingVpBrandedStudioLogoBottom-"+_gthis._videoOid).removeClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+_gthis._videoOid).removeClass("pingVpCollectedVisible")})}else{this._buttonsEnable=true;this._selectedShowJQuery.stop(null,false,false);this._selectedShowJQuery.css("opacity",1);$("#pingVpControlCollected-"+this._videoOid+" .pingVpSubtitles").addClass("pingVpControlBarVisible");$(".pingVpBrandedStudioLogoBottom-"+this._videoOid).addClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+this._videoOid).addClass("pingVpCollectedVisible")}}if(!this._hideEnable){this._buttonsEnable=true;this._selectedShowJQuery.stop(null,true,false);this._selectedShowJQuery.css("opacity",1)}this._hideEnableLast=this._hideEnable},onClickHide:function(e){},setTimeSliderArrows:function(currentTime,duration,action,round){var newCurrentTime=action==39?currentTime+5:currentTime-5;var percent=Math.round(newCurrentTime*100/duration*100);percent/=100;if(percent>100){percent=100}if(percent<0){percent=0}this._timeSlider.setPercent(newCurrentTime,percent)},setTimeSlider:function(currentTime,duration){var percent=currentTime*100/duration;if(percent>100){percent=100}if(percent<0){percent=0}this._timeSlider.setPercent(currentTime,percent)},setBuffered:function(buffered,duration){var percent=buffered*100/duration;if(percent>100){percent=100}if(percent<0){percent=0}this._timeSlider.setBufferedPercent(buffered,percent)},getTimeSlider:function(duration){var percent=this._timeSlider.getPercent();return percent*duration/100},getTimeSliderPercent:function(){return this._timeSlider.getPercent()},setVolumeSlider:function(volume){if(this._volumeSlider==null){return}var step=volume*10|0;var percent=step*100/10;if(percent>100){percent=100}if(percent<0){percent=0}this._volumeSlider.setPercent(step,percent);if(percent>0){if(percent>79){this._muteButton.setOnIcon("sound_high")}else{if(percent>24){this._muteButton.setOnIcon("sound_on")}else{this._muteButton.setOnIcon("sound_low")}}}},getVolumeSlider:function(){var percent=this._volumeSlider.getPercent();var step=percent*10/100|0;var volume=step/10;if(volume>1){volume=1}this.setVolumeSlider(volume);return volume},rezize:function(){this._timeSlider.setWidth(this.setTimeSliderWidth());var _jqyVolumeSliderTemp=$("#pingVpVolumeSlider-"+this._videoOid);var maxWidth=this._overlay.outerWidth();if(maxWidth<370){this._timeTextOffset=0;this._getTimeTextWidth.hide()}else{this._getTimeTextWidth.show();this._timeTextOffset=this._getTimeTextWidth.outerWidth()}if(maxWidth<460){_jqyVolumeSliderTemp.addClass("pingVpHideSmallEmbed")}else{_jqyVolumeSliderTemp.removeClass("pingVpHideSmallEmbed")}var combinedWidth=maxWidth-(this._controlBarLeftSideJQ.outerWidth()+this._controlBarRightSideJQ.outerWidth()+20);if(combinedWidth<90&&_jqyVolumeSliderTemp.css("display")!="block"){this._jqyVolumeSlider=null}else{this._jqyVolumeSlider=$("#pingVpVolumeSlider-"+this._videoOid)}if(!this._mobileCheck){this._getTimeTextWidth=$("#pingVpControlPos-"+this._videoOid);this._5secBackButtonOffset=this._timeTextOffset+40;this._muteButtonOffset=this._timeTextOffset+80;this._aiButtonOffset=this._timeTextOffset+120;if(this._playButton!=null){this._playButton.resizeLabel(this._playButtonOffset)}if(this._5secBackButton!=null){this._5secBackButton.resizeLabel(this._5secBackButtonOffset)}if(this._muteButton!=null){this._muteButton.resizeLabel(this._muteButtonOffset)}if(this._aiButton!=null){this._aiButton.resizeLabel(this._aiButtonOffset)}if(this._enableCc&&this._subtitlesButton!=null){this._subtitlesButton.resizeLabel(this._subtitlesButtonOffset)}if(this._enableAd&&this._adButton!=null){this._adButton.resizeLabel(this._adButtonOffset)}if(this._enableShare&&this._shareButton!=null){this._shareButton.resizeLabel(this._shareButtonOffset)}if(this._enableTranscript&&this._transcriptButton!=null){this._transcriptButton.resizeLabel(this._transcriptButtonOffset)}if((this._enableQuality||this._enableCc||this._enableSpeed||this._enableShare)&&this._settingsButton!=null){this._settingsButton.resizeLabel(this._settingsButtonOffset)}if(this._enableFullScreen&&this._fullScreenButton!=null){this._fullScreenButton.resizeLabel(this._fullScreenButtonOffset)}}else{if(!pingvp_PingVpDevice.isLandscape()&&this.isFullScreen()){var videoWidth=this._scriptWidth;var videoHeight=this._scriptHeight;var containerWidth=this._container.getWidth();var containerHeight=this._container.getHeight();var scaleX=containerWidth/videoWidth;var scaleY=containerHeight/videoHeight;var centerX=containerWidth/2;var centerY=containerHeight/2;var scale=scaleX;if(scaleY<scaleX){scale=scaleY}var startX=centerX-videoWidth*scale/2;var startY=centerY-videoHeight*scale/2;var scaledWidth=videoWidth*scale;var scaledHeight=videoHeight*scale;$("#pingVpControlCollected-"+this._videoOid).css("left",startX+"px");$("#pingVpControlCollected-"+this._videoOid).css("top",startY+"px");$("#pingVpControlCollected-"+this._videoOid).css("width",scaledWidth+"px");$("#pingVpControlCollected-"+this._videoOid).css("height",scaledHeight+"px")}else{$("#pingVpControlCollected-"+this._videoOid).css("left","0");$("#pingVpControlCollected-"+this._videoOid).css("top","0");$("#pingVpControlCollected-"+this._videoOid).css("width","100%");$("#pingVpControlCollected-"+this._videoOid).css("height","100%")}}},setActiveHover:function(status){if(this._playButton!=null){this._playButton.setActiveHover(status)}if(this._5secBackButton!=null){this._5secBackButton.setActiveHover(status)}if(this._muteButton!=null){this._muteButton.setActiveHover(status)}if(this._adButton!=null){this._adButton.setActiveHover(status)}if(this._subtitlesButton!=null){this._subtitlesButton.setActiveHover(status)}if(this._shareButton!=null){this._shareButton.setActiveHover(status)}if(this._settingsButton!=null){this._settingsButton.setActiveHover(status)}if(this._fullScreenButton!=null){this._fullScreenButton.setActiveHover(status)}},setTime:function(currentTime,duration){this._timeText.set(currentTime,duration)},setTimeSliderWidth:function(){var width=$("#pingVpControlBar-"+this._videoOid+" .pingVpControlBarChildTime").width();var timeSliderWidth=0;timeSliderWidth=width;return timeSliderWidth},setAnnounceClass:function(announceClass){this._announcement=announceClass;if(this._timeText!=null){this._timeText.setAnnounceClass(announceClass)}},__class__:pingvp_PingVpControlBar};var pingvp_PingVpControlSliderSvg=function(className,videoOid,_overlay,width,image,buttonImage,text,theme,controlsBelowVideo,extraClass){var _gthis=this;this._className=className;this._videoOid=videoOid;this._width=width;this._image=image;this._text=text;this._theme=theme;this._isIE=pingvp_PingVpDevice.isMSIE();this._mobileCheck=false;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._mobileCheck=true}if(className=="pingVpVolumeSlider"){this._foregroundColor=controlsBelowVideo?theme.getByKey("sliderfg"):"fff"}else{this._foregroundColor=theme.getByKey("sliderfg");if(this._mobileCheck){this._foregroundColor="fff"}}this._backgroundImage=theme.getSlider(theme.getByKey("svgset"),this._image+".svg",theme.getByKey("sliderbg"));this._bufferImage=theme.getSlider(theme.getByKey("svgset"),this._image+".svg",theme.getByKey("sliderbuffer"));this._foregroundImage=theme.getSlider(theme.getByKey("svgset"),this._image+".svg",this._foregroundColor);if(className=="pingVpVolumeSlider"){this._buttonImage=theme.getButton(theme.getByKey("svgset"),buttonImage+".svg",this._foregroundColor)}else{this._buttonImage=theme.getButton(theme.getByKey("svgset"),buttonImage+".svg",theme.getByKey("sliderbutton"))}this._bufferedPercent=100;this._start=0;this._isDragging=false;if(this._className=="pingVpTimeSlider"){this.controlBar=$("#pingVpControlBar-"+videoOid+" .pingVpControlBarChildTime")}else{this.controlBar=$("#pingVpControlBar-"+videoOid+" .pingVpControlBarChildOther .pingVpControlLeftSide")}var _beforeTagImg=this._isIE?'<object tabindex="-1" data="':'<img tabindex="-1" src="';var _betweenTagImg='" alt="';var _afterTagImg=this._isIE?'"></object>':'"/>';if(this._className=="pingVpTimeSlider"){var slideWidth=controlsBelowVideo?"100%":"calc(100% - 20px)";this.controlBar.append('<div role="slider" aria-label="'+this._text.get("sliderTimeLabel")+'" id="'+className+"-"+videoOid+'" class="pingVpControlSlider '+className+'" style="width: '+width+'px;"><div id="'+className+"Bg-"+videoOid+'" class="pingVpSvgSlider" style="width: '+slideWidth+';">'+_beforeTagImg+this._backgroundImage+_betweenTagImg+""+_afterTagImg+'</div><div id="'+className+"Buffered-"+videoOid+'" class="pingVpSvgSlider" style="width: '+slideWidth+';">'+_beforeTagImg+this._bufferImage+_betweenTagImg+this._text.get("sliderTimeBuffer")+_afterTagImg+'</div><div id="'+className+"Fg-"+videoOid+'" class="pingVpSvgSlider" style="width: 0px;">'+_beforeTagImg+this._foregroundImage+_betweenTagImg+this._text.get("sliderTimeForeground")+_afterTagImg+'</div><div id="'+className+"Bol-"+videoOid+'" class="'+className+'Bol" style="background-image: url('+this._buttonImage+');"></div><div id="'+className+"Overlay-"+videoOid+'" tabindex="0" class="pingVpSvgSlider pingVpSvgObjectOverlay pingVpSvgObjectOverlayTimeSlider" style="width: '+slideWidth+';"></div></div>')}else{this.controlBar.append('<div role="slider" aria-label="'+this._text.get("sliderVolumeLabel")+'" id="'+className+"-"+videoOid+'" class="pingVpControlSlider '+className+" "+extraClass+'" style="width: '+width+'px;"><div id="'+className+"Bg-"+videoOid+'" class="pingVpSvgSlider" style="width: calc(100% - 10px);">'+_beforeTagImg+this._backgroundImage+_betweenTagImg+this._text.get("sliderVolumeBackground")+_afterTagImg+'</div><div id="'+className+"Fg-"+videoOid+'" class="pingVpSvgSlider pingVpVolumeSliderFg" style="width: 0px;">'+_beforeTagImg+this._foregroundImage+_betweenTagImg+this._text.get("sliderVolumeForeground")+_afterTagImg+'</div><div id="'+className+"Overlay-"+videoOid+'" class="pingVpSvgSlider pingVpSvgObjectOverlay '+className+'Focus" tabindex="0" style="width: calc(100% - 10px)"></div><div id="'+className+"Bol-"+videoOid+'" class="'+className+'Bol" style="background-image: url('+this._buttonImage+');"></div></div>')}this._slider=$("#"+className+"-"+videoOid);this._bg=$("#"+className+"Bg-"+videoOid);this._buffered=$("#"+className+"Buffered-"+videoOid);this._fg=$("#"+className+"Fg-"+videoOid);this._objectOverlay=$("#"+className+"Overlay-"+videoOid);this._bol=$("#"+className+"Bol-"+videoOid);this._bol.css("backgroundImage","url("+this._buttonImage+")");this._bol.css("position","absolute");this._bol.css("width","16px");this._bol.css("height","16px");this._bol.css("backgroundSize","100% 100%");this._bol.css("backgroundRepeat","no-repeat");if(this._className=="pingVpTimeSlider"){this._bol.css("backgroundPosition","-40px -40px")}else{this._bol.css("backgroundPosition","0px 0px")}this._bol.css("marginTop","0");this._bol.css("zIndex","100");this._bol.css("display","block");this._bol.css("margin-left","-5px");if(className=="pingVpVolumeSlider"){this._bol.css("margin-top","-7px")}$("#"+className+"-"+videoOid).mouseover($bind(this,this.onMouseOver));$("#"+className+"-"+videoOid).mouseout($bind(this,this.onMouseOut));if(this._className=="pingVpTimeSlider"){this._slider.mouseenter(function(e){_gthis._bol.css("backgroundPosition","0px 0px")});this._slider.mouseleave(function(e1){_gthis._bol.css("backgroundPosition","-40px -40px")})}this._slider.mousedown(function(e2){_gthis._isDragging=true});$("body").mousemove(function(e3){if(_gthis._isDragging){_gthis.onClick(e3)}});$("body").mouseup(function(e4){if(_gthis._isDragging){_gthis._isDragging=false;_gthis.onClick(e4)}});if(this._className=="pingVpTimeSlider"){$("body").keydown($bind(this,this.arrowKeys))}else{$("body").keydown($bind(this,this.arrowKeysSound))}};$hxClasses["pingvp.PingVpControlSliderSvg"]=pingvp_PingVpControlSliderSvg;pingvp_PingVpControlSliderSvg.__name__=["pingvp","PingVpControlSliderSvg"];pingvp_PingVpControlSliderSvg.prototype={setPercent:function(currentPosition,percent){if(this._isDragging){return}if(this._className=="pingVpTimeSlider"){this._fg.find("img").attr("alt",this.formatTime(currentPosition)+" "+this._text.get("timeSliderAltForeground"))}else{this._fg.find("img").attr("alt",currentPosition*10+"% volume")}this._percent=percent;var size=this._percent*(this._width-this._start)/100+this._start;this._fg.css("width",size+"px");var tempWidth=this._width-6;var tempSize=this._percent*(tempWidth-this._start)/100+this._start;this._bol.css("marginLeft",tempSize-5+"px")},setBufferedPercent:function(buffered,percent){this._buffered.find("img").attr("alt",this.formatTime(buffered)+" "+this._text.get("timeSliderAltBuffer"));this._bufferedPercent=percent;var size=this._bufferedPercent*(this._width-this._start)/100+this._start;this._buffered.css("width",size+"px")},formatTime:function(time){var calcText=Math.floor(time/60)+":"+(time%60<10?"0":"")+Math.floor(time%60);return calcText},onClick:function(e){if(this._width==0){this._width=this.controlBar.width()}var posX=$("#"+this._className+"-"+this._videoOid).offset().left;posX+=this._start;var pageX=0;if(e.type=="touchstart"){var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];pageX=touch.pageX}else{pageX=e.pageX}var posRelX=pageX-posX;if(posRelX<0){posRelX=0}this._percent=posRelX*100/(this._width-this._start);if(this._percent>100){this._percent=100}var size=this._percent*(this._width-this._start)/100+this._start;this._fg.css("width",size+"px");var tempWidth=this._width-6;var tempSize=this._percent*(tempWidth-this._start)/100+this._start;this._bol.css("marginLeft",tempSize-5+"px");if(!this._isDragging&&this._call!=null){this._call()}},setClickHandler:function(call){this._call=call},setArrowHandler:function(call){this._callArrow=call},getPercentPrevious:function(){return this._percentPrevious},getPercent:function(){return this._percent},setWidth:function(width){this._width=width;$("#"+this._className+"-"+this._videoOid).css("width",width+"px");var size=this._bufferedPercent*(this._width-this._start)/100+this._start;this._buffered.css("width",size+"px");size=this._percent*(width-this._start)/100+this._start;this._fg.css("width",size+"px");var tempWidth=width-6;var tempSize=this._percent*(tempWidth-this._start)/100+this._start;this._bol.css("marginLeft",tempSize-5+"px")},onMouseOver:function(e){},onMouseOut:function(e){this._bg.css("backgroundImage","url("+this._backgroundImage+")");this._buffered.css("backgroundImage","url("+this._bufferImage+")");this._fg.css("backgroundImage","url("+this._foregroundImage+")")},arrowKeys:function(e){if(this._objectOverlay.is(":focus")&&(e.which==37||e.which==39)){if(this._callArrow!=null){this._callArrow(e.which)}}},arrowKeysSound:function(e){if(this._objectOverlay.is(":focus")&&(e.which==37||e.which==39)){e.preventDefault();if(this._callArrow!=null){this._callArrow(e.which)}}},__class__:pingvp_PingVpControlSliderSvg};var pingvp_PingVpControlTime=function(videoOid,textColor,debug,extraClass){this._videoOid=videoOid;this._debug=debug;this._elapsed=0;if(this._debug){this._fps=new pingvp_FamesPerSecond()}$("#pingVpControlBar-"+videoOid+" .pingVpControlBarChildOther .pingVpControlLeftSide").append('<div id="pingVpControlPos-'+videoOid+'" class="pingVpControlPos '+extraClass+'" tabindex="0" role="timer" aria-live="off" style="color: #'+textColor+';">0:00 / 0:00</div>');this._posJq=$("#pingVpControlPos-"+this._videoOid);this._timeBar=$("#pingVpTimeSliderOverlay-"+this._videoOid);this._posJq.css("fontSize","12px");this._posJq.on("focus blur",null,$bind(this,this.focusChange));this._timeBar.on("focus blur",null,$bind(this,this.focusChange))};$hxClasses["pingvp.PingVpControlTime"]=pingvp_PingVpControlTime;pingvp_PingVpControlTime.__name__=["pingvp","PingVpControlTime"];pingvp_PingVpControlTime.prototype={focusChange:function(e){this._pingVpElement=$(".pingVpWebplayerSelector,#pingVpOverlayPlayContainer-"+this._videoOid+",.PingVP");this._isFocus=e.type=="focus"&&this._pingVpElement.hasClass("pingVpIsTabbing")},set:function(currentTime,duration){if(this._debug){this._elapsed+=this._fps.tick()}if(this._elapsed<1){if(!isNaN(duration)){var calcText=Math.floor(currentTime/60)+":"+(currentTime%60<10?"0":"")+Math.floor(currentTime%60)+" / "+Math.floor(duration/60)+":"+(duration%60<10?"0":"")+Math.floor(duration%60);var currentSeconds=Math.floor(currentTime);if(currentSeconds%5==0&&currentSeconds!=this._lastAnnouncedTime&&this._isFocus){this._lastAnnouncedTime=currentSeconds;if(this._announcement!=null){this._announcement.setMessage(calcText)}}if(this._posJq.html()!=calcText){this._posJq.html(calcText)}}}else{this._elapsed=0}},setAnnounceClass:function(announceClass){this._announcement=announceClass},__class__:pingvp_PingVpControlTime};var pingvp_PingVpControlToggleSvg=function(className,videoOid,selectIconOn,selectIconOff,defaultColor,hoverColor,theme,iconHoverChange,colorChange,positionBar,extraClass,extraSvgClass,controlsBelowVideo,altTextOn,altTextOff,clickEnabled,ariaExpanded){var _gthis=this;this._className=className;this._videoOid=videoOid;this._theme=theme;this._position=positionBar;this._controlsBelowVideo=controlsBelowVideo;this._overlay=$("#pingVpOverlay-"+this._videoOid);this._hasLabel=false;this._hasTempOnIcon=false;this._hasTempOffIcon=false;this._originalIconOn=selectIconOn;this._originalIconOff=selectIconOff;this._clickEnabled=clickEnabled;this._oneIconSvg=true;this._altTextOn=altTextOn;this._altTextOff=altTextOff;this._ariaExpanded=ariaExpanded;this.ariaExpandedAttr="";this._iconHoverChange=iconHoverChange;this._colorChange=colorChange;this._defaultColor=defaultColor;if(this._defaultColor==null||this._defaultColor==""){this._defaultColor=theme.getByKey("defaultcolor")}this._hoverColor=hoverColor;if(this._hoverColor==null||this._hoverColor==""){this._hoverColor=theme.getByKey("hovercolor")}this._isOn=true;this._combineIcons="";this._selectIconOnNormal=theme.getIcon(theme.getByKey("svgset"),selectIconOn+".svg",this._defaultColor);this._selectIconOnHover=theme.getIcon(theme.getByKey("svgset"),selectIconOn+".svg",this._hoverColor);this._combineIcons+='<img alt="'+altTextOn+'" class="pingVpResetSvg pingVpSvgOn '+extraSvgClass+'" src="'+this._selectIconOnNormal+'"/>';this._combineIcons+='<img alt="'+altTextOn+'" class="pingVpResetSvg pingVpSvgOnHover '+extraSvgClass+' pingVpHideIcon" src="'+this._selectIconOnHover+'"/>';this._ariaLabel=altTextOn;if(selectIconOn!=selectIconOff){this._oneIconSvg=false;this._selectIconOffNormal=theme.getIcon(theme.getByKey("svgset"),selectIconOff+".svg",this._defaultColor);this._selectIconOffHover=theme.getIcon(theme.getByKey("svgset"),selectIconOff+".svg",this._hoverColor);this._combineIcons+='<img alt="'+altTextOff+'" class="pingVpResetSvg pingVpSvgOff '+extraSvgClass+' pingVpHideIcon" src="'+this._selectIconOffNormal+'"/>';this._combineIcons+='<img alt="'+altTextOff+'" class="pingVpResetSvg pingVpSvgOffHover '+extraSvgClass+' pingVpHideIcon" src="'+this._selectIconOffHover+'"/>'}if(this._ariaExpanded){this.ariaExpandedAttr='aria-expanded="false"'}this._positionBar=positionBar;if(positionBar=="left"){this._positionBar="pingVpControlLeftSide"}if(positionBar=="center"){this._positionBar="pingVpControlBarCenter"}if(positionBar=="right"){this._positionBar="pingVpControlRightSide"}$("#"+this._positionBar+"-"+videoOid).append('<div tabindex="0" role="button" aria-label="'+this._ariaLabel+'" id="'+className+"-"+videoOid+'" class="pingVpControlToggleSvg '+className+" "+extraClass+'" '+this.ariaExpandedAttr+">"+this._combineIcons+"</div>");this._iconElementOn="img.pingVpSvgOn";this._iconElementOnHover="img.pingVpSvgOnHover";this._iconElementOff="img.pingVpSvgOn";this._iconElementOffHover="img.pingVpSvgOnHover";if(selectIconOn!=selectIconOff){this._iconElementOff="img.pingVpSvgOff";this._iconElementOffHover="img.pingVpSvgOffHover"}if(className=="pingVpControlSubtitles"){$("#"+className+"-"+videoOid).append('<div id="pingVpSubsActiveStripe-'+videoOid+'" class="pingVpReset pingVpSubsActiveStripe"></div>');this._setStripe=$("#pingVpSubsActiveStripe-"+videoOid);if(this._controlsBelowVideo){this._setStripe.css("background-color","#"+this._defaultColor)}else{this._setStripe.css("background-color","#fff")}}this._setButton=$("#"+className+"-"+videoOid);this._setButton.hover(function(e){_gthis._setButton.find("img").addClass("pingVpHideIcon");if(_gthis._isOn){if(_gthis._iconHoverChange){_gthis._setButton.find(_gthis._iconElementOffHover).removeClass("pingVpHideIcon")}else{_gthis._setButton.find(_gthis._iconElementOnHover).removeClass("pingVpHideIcon")}}else{if(_gthis._iconHoverChange){if(_gthis._colorChange){_gthis._setButton.find(_gthis._iconElementOn).removeClass("pingVpHideIcon")}else{_gthis._setButton.find(_gthis._iconElementOnHover).removeClass("pingVpHideIcon")}}else{if(_gthis._colorChange){_gthis._setButton.find(_gthis._iconElementOff).removeClass("pingVpHideIcon")}else{_gthis._setButton.find(_gthis._iconElementOffHover).removeClass("pingVpHideIcon")}}}},function(e1){_gthis._setButton.find("img").addClass("pingVpHideIcon");if(_gthis._isOn){_gthis._setButton.find(_gthis._iconElementOn).removeClass("pingVpHideIcon")}else{if(_gthis._colorChange){_gthis._setButton.find(_gthis._iconElementOffHover).removeClass("pingVpHideIcon")}else{_gthis._setButton.find(_gthis._iconElementOff).removeClass("pingVpHideIcon")}}});if(this._clickEnabled){this._setButton.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onClick))}};$hxClasses["pingvp.PingVpControlToggleSvg"]=pingvp_PingVpControlToggleSvg;pingvp_PingVpControlToggleSvg.__name__=["pingvp","PingVpControlToggleSvg"];pingvp_PingVpControlToggleSvg.prototype={onClick:function(e){if(this._onCall!=null&&!this._isOn){this._onCall()}else{if(this._offCall!=null&&this._isOn){this._offCall()}}},setOnHandler:function(call){this._onCall=call},setOffHandler:function(call){this._offCall=call},setHoverHandler:function(textOn,textOff,changeLabelStatus,labelOffset){var _gthis=this;if(!pingvp_PingVpDevice.isTouchEventDevice()){this._activeHover=true;this._hasLabel=true;this._labelOnText=textOn;this._labelOffText=textOff;this._labelOffset=labelOffset;this._changeLabelStatus=changeLabelStatus;this._overlay.append('<div id="'+this._className+"-label-"+this._videoOid+'" class="pingVpReset pingVpHoverLabel '+this._className+'-label"></div>');this._setHoverLabel=$("#"+this._className+"-label-"+this._videoOid);var currLabelText=!this._isOn?textOn:textOff;this._setHoverLabel.html(currLabelText);this._setHoverLabel.css("background-color","#"+this._theme.getByKey("menubackcolor")).css("color","#"+this._theme.getByKey("menucolor"));this._setHoverLabel.css("display","none");this._setHoverLabel.css("position","absolute");this._setHoverLabel.css("zIndex","2147483647");this.resizeLabel(labelOffset);this._setButton.hover(function(e){if(_gthis._activeHover){_gthis._setHoverLabel.css("display","block")}},function(e1){_gthis._setHoverLabel.css("display","none")})}},setActiveHover:function(status){this._activeHover=status;if(this._hasLabel){if(status==false){this._setHoverLabel.css("display","none")}}},resizeLabel:function(labelOffset){if(this._hasLabel){var definer=960;var definerW=640;var currentWidth=this._overlay.outerWidth();var percent=100;var percentW=0.25;if(currentWidth>definer){percent-=(definer-currentWidth)/32}else{if(currentWidth<definer){percent+=(currentWidth-definer)/32}}this._setHoverLabel.css("font-size",percent+"%");var bottomPos=this._controlsBelowVideo?57:69;this._setHoverLabel.css("bottom",bottomPos+"px");var cssPosition=this._position=="left"?"left":"right";var labelWidth=this._setHoverLabel.outerWidth();var defaultMin=this._controlsBelowVideo?5:10;var paddingCorrection=this._controlsBelowVideo?5:0;var maxWidth=(labelOffset+paddingCorrection)*2+40;if(labelWidth<maxWidth){var calcOffset=(maxWidth-labelWidth)/2+defaultMin;this._setHoverLabel.css(cssPosition,calcOffset+"px")}else{this._setHoverLabel.css(cssPosition,defaultMin+"px")}}},setOn:function(){this._isOn=true;if(this._oneIconSvg){this.setAriaLabel(this._altTextOff);this.setOnAlt()}else{this.setAriaLabel(this._altTextOn)}if(this._ariaExpanded){this.setAriaExpanded(true)}if(this._hasTempOnIcon){this.onlySetOnIcon(this._originalIconOn)}if(this._hasTempOffIcon){this.onlySetOffIcon(this._originalIconOff)}this._setButton.find("img").addClass("pingVpHideIcon");this._setButton.find(this._iconElementOn).removeClass("pingVpHideIcon");if(this._hasLabel&&this._changeLabelStatus){this._setHoverLabel.html(this._labelOffText);this.resizeLabel(this._labelOffset)}},setRotateOn:function(){this._setButton.find("img").addClass("pingVpRotate30")},setOff:function(){this._isOn=false;if(this._oneIconSvg){this.setAriaLabel(this._altTextOn);this.setOffAlt()}else{this.setAriaLabel(this._altTextOff)}if(this._ariaExpanded){this.setAriaExpanded(false)}if(this._hasTempOnIcon){this.onlySetOnIcon(this._originalIconOn)}if(this._hasTempOffIcon){this.onlySetOffIcon(this._originalIconOff)}this._setButton.find("img").addClass("pingVpHideIcon");if(this._colorChange){this._setButton.find(this._iconElementOffHover).removeClass("pingVpHideIcon")}else{this._setButton.find(this._iconElementOff).removeClass("pingVpHideIcon")}if(this._hasLabel&&this._changeLabelStatus){this._setHoverLabel.html(this._labelOnText);this.resizeLabel(this._labelOffset)}},setAriaExpanded:function(active){var ariaValue="false";if(active){ariaValue="true"}this._setButton.attr("aria-expanded",ariaValue)},setRotateOff:function(){this._setButton.find("img").removeClass("pingVpRotate30")},setOnAlt:function(){this._setButton.find("img").attr("alt",this._altTextOff)},setOffAlt:function(){this._setButton.find("img").attr("alt",this._altTextOn)},setAriaLabel:function(_labelText){this._setButton.attr("aria-label",_labelText)},onlySetOnIcon:function(selectIconOn){this._selectIconOnNormal=this._theme.getIcon(this._theme.getByKey("svgset"),selectIconOn+".svg",this._defaultColor);this._selectIconOnHover=this._theme.getIcon(this._theme.getByKey("svgset"),selectIconOn+".svg",this._hoverColor);this._setButton.find("img.pingVpSvgOn").attr("src",this._selectIconOnNormal);this._setButton.find("img.pingVpSvgOnHover").attr("src",this._selectIconOnHover)},setOnIcon:function(selectIconOn){this._selectIconOnNormal=this._theme.getIcon(this._theme.getByKey("svgset"),selectIconOn+".svg",this._defaultColor);this._selectIconOnHover=this._theme.getIcon(this._theme.getByKey("svgset"),selectIconOn+".svg",this._hoverColor);this._setButton.find("img.pingVpSvgOn").attr("src",this._selectIconOnNormal);this._setButton.find("img.pingVpSvgOnHover").attr("src",this._selectIconOnHover)},onlySetOffIcon:function(selectIconOff){this._selectIconOffNormal=this._theme.getIcon(this._theme.getByKey("svgset"),selectIconOff+".svg",this._defaultColor);this._selectIconOffHover=this._theme.getIcon(this._theme.getByKey("svgset"),selectIconOff+".svg",this._hoverColor);this._setButton.find("img.pingVpSvgOff").attr("src",this._selectIconOffNormal);this._setButton.find("img.pingVpSvgOffHover").attr("src",this._selectIconOffHover)},setOffIcon:function(selectIconOff){this._selectIconOffNormal=this._theme.getIcon(this._theme.getByKey("svgset"),selectIconOff+".svg",this._defaultColor);this._selectIconOffHover=this._theme.getIcon(this._theme.getByKey("svgset"),selectIconOff+".svg",this._hoverColor);this._setButton.find("img.pingVpSvgOff").attr("src",this._selectIconOffNormal);this._setButton.find("img.pingVpSvgOffHover").attr("src",this._selectIconOffHover)},setTempOffIcon:function(selectTempIcon){this._hasTempOffIcon=true;this._selectIconOffNormal=this._theme.getIcon(this._theme.getByKey("svgset"),selectTempIcon+".svg",this._defaultColor);this._selectIconOffHover=this._theme.getIcon(this._theme.getByKey("svgset"),selectTempIcon+".svg",this._hoverColor);this._setButton.find("img.pingVpSvgOff").attr("src",this._selectIconOffNormal);this._setButton.find("img.pingVpSvgOffHover").attr("src",this._selectIconOffHover)},isOn:function(){return this._isOn},__class__:pingvp_PingVpControlToggleSvg};var pingvp_PingVpCssAnimation=function(block,id,path,duration){this._block=block;this._id=id;this._path=path;this._duration=duration;this._elapsedTime=0;var style=document.createElement("style");style.innerHTML="@-webkit-keyframes "+id+" { }";document.head.appendChild(style);block.on("animationiteration webkitAnimationIteration mozAnimationIteration MSAnimationIteration oAnimationIteration",null,$bind(this,this.aminationEvent))};$hxClasses["pingvp.PingVpCssAnimation"]=pingvp_PingVpCssAnimation;pingvp_PingVpCssAnimation.__name__=["pingvp","PingVpCssAnimation"];pingvp_PingVpCssAnimation.prototype={update:function(start,videoWidth,videoHeight,scriptWidth,scriptHeight,containerWidth,containerHeight,width,height,marginBottom){var _gthis=this;var newArray=this.convertArrayHelper(this._path,start,videoWidth,videoHeight,scriptWidth,scriptHeight,containerWidth,containerHeight,width,height,marginBottom);var keyframes=this.findKeyframesRuleHelper(this._id);var i=0;while(i<newArray.length){var sec=newArray[i];var x=newArray[i+1];var y=newArray[i+2];var percent=sec*100/this._duration;if(keyframes.findRule(percent+"%")!=null){keyframes.deleteRule(percent+"%")}keyframes.insertRule(percent+"% {left: "+x+"%; top: "+y+"%;} ");i+=3}this._elapsedTime=0;this._block.css("-webkit-animation-duration",this._duration+"s");this._block.css("-webkit-animation-timing-function","linear");this._block.css("-webkit-animation-name","none");haxe_Timer.delay(function(){_gthis._block.css("-webkit-animation-name",_gthis._id)},2)},convertArrayHelper:function(path,start,videoWidth,videoHeight,scriptWidth,scriptHeight,containerWidth,containerHeight,width,height,marginBottom){var ret=[];var scaleX=containerWidth/videoWidth;var scaleY=(containerHeight-marginBottom)/videoHeight;var centerX=containerWidth/2;var centerY=(containerHeight-marginBottom)/2;var scale=scaleX;if(scaleY<scaleX){scale=scaleY}var startX=centerX-videoWidth*scale/2;var startY=centerY-videoHeight*scale/2;var i=0;while(i<path.length){var sec=path[i];var x=path[i+1];var y=path[i+2];if(sec<start){continue}var blockX=x*videoWidth/scriptWidth;var blockY=y*videoHeight/scriptHeight;var leftPercent=(startX+scale*blockX)*100/containerWidth;var topPercent=(startY+scale*blockY)*100/containerHeight;ret.push(sec);ret.push(leftPercent);ret.push(topPercent);i+=3}return ret},findKeyframesRuleHelper:function(rule){var ss=document.styleSheets;for(var i=0;i<ss.length;++i){for(var j=0;j<ss[i].cssRules.length;++j){if(ss[i].cssRules[j].type==window.CSSRule.WEBKIT_KEYFRAMES_RULE&&ss[i].cssRules[j].name==rule){return ss[i].cssRules[j]}}}return null},aminationEvent:function(e){this._elapsedTime=e.originalEvent.elapsedTime},getElapsedTime:function(){return this._elapsedTime},__class__:pingvp_PingVpCssAnimation};var pingvp_PingVpCssFadeIn=function(block,sec){this._block=block;this._sec=sec;this._once=true;this._block.css("opacity","0")};$hxClasses["pingvp.PingVpCssFadeIn"]=pingvp_PingVpCssFadeIn;pingvp_PingVpCssFadeIn.__name__=["pingvp","PingVpCssFadeIn"];pingvp_PingVpCssFadeIn.prototype={fade:function(){if(!this._once){return}this._once=false;this._block.css("opacity","1");this._block.css("-webkit-animation","pingvpfadein "+this._sec+"s");this._block.css("-moz-animation","pingvpfadein "+this._sec+"s");this._block.css("-ms-animation","pingvpfadein "+this._sec+"s");this._block.css("-o-animation","pingvpfadein "+this._sec+"s");this._block.css("animation","pingvpfadein "+this._sec+"s")},reset:function(){if(this._once){return}this._once=true;this._block.css("-webkit-animation","none");this._block.css("-moz-animation","none");this._block.css("-ms-animation","none");this._block.css("-o-animation","none");this._block.css("animation","none")},__class__:pingvp_PingVpCssFadeIn};var pingvp_PingVpCssFadeOut=function(block,sec){this._block=block;this._sec=sec;this._once=true};$hxClasses["pingvp.PingVpCssFadeOut"]=pingvp_PingVpCssFadeOut;pingvp_PingVpCssFadeOut.__name__=["pingvp","PingVpCssFadeOut"];pingvp_PingVpCssFadeOut.prototype={fade:function(time,end){if(time<end-this._sec){return}if(!this._once){return}this._once=false;this._block.css("opacity","0");this._block.css("-webkit-animation","pingvpfadeout "+this._sec+"s");this._block.css("-moz-animation","pingvpfadeout "+this._sec+"s");this._block.css("-ms-animation","pingvpfadeout "+this._sec+"s");this._block.css("-o-animation","pingvpfadeout "+this._sec+"s");this._block.css("animation","pingvpfadeout "+this._sec+"s")},reset:function(){if(this._once){return}this._once=true;this._block.css("-webkit-animation","none");this._block.css("-moz-animation","none");this._block.css("-ms-animation","none");this._block.css("-o-animation","none");this._block.css("animation","none")},__class__:pingvp_PingVpCssFadeOut};var pingvp_PingVpDebug=function(traceEnable){this._traceEnable=traceEnable};$hxClasses["pingvp.PingVpDebug"]=pingvp_PingVpDebug;pingvp_PingVpDebug.__name__=["pingvp","PingVpDebug"];pingvp_PingVpDebug.prototype={log:function(message){if(!this._traceEnable){return}console.log(message)},isOn:function(){return this._traceEnable},__class__:pingvp_PingVpDebug};var pingvp_PingVpDevice=function(){};$hxClasses["pingvp.PingVpDevice"]=pingvp_PingVpDevice;pingvp_PingVpDevice.__name__=["pingvp","PingVpDevice"];pingvp_PingVpDevice.isIpad=function(){return(navigator.userAgent.indexOf("iPad")!=-1)};pingvp_PingVpDevice.isIphone=function(){return(navigator.userAgent.indexOf("iPhone")!=-1)};pingvp_PingVpDevice.isIpod=function(){return(navigator.userAgent.indexOf("iPod")!=-1)};pingvp_PingVpDevice.isAndroid=function(){return(navigator.userAgent.indexOf("Android")!=-1)};pingvp_PingVpDevice.isBlackBerry=function(){return(navigator.userAgent.indexOf("BlackBerry")!=-1)};pingvp_PingVpDevice.isWindowsPhone=function(){return(navigator.userAgent.indexOf("Windows Phone")!=-1)};pingvp_PingVpDevice.isSymbian=function(){return(navigator.userAgent.indexOf("Symbian")!=-1)};pingvp_PingVpDevice.isMSIE=function(){var msie=(navigator.userAgent.indexOf("MSIE ")!=-1);var trident=(navigator.userAgent.indexOf("Trident/")!=-1);var edge=(navigator.userAgent.indexOf("Edge/")!=-1);if(!(msie||trident)){return edge}else{return true}};pingvp_PingVpDevice.isTouchEventDevice=function(){return false};pingvp_PingVpDevice.isAllTouchDevices=function(){if(!(pingvp_PingVpDevice.isAndroid()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isIphone())){return pingvp_PingVpDevice.isIpod()}else{return true}};pingvp_PingVpDevice.isAllMobileDevices=function(){if(!(pingvp_PingVpDevice.isAndroid()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isIphone())){return pingvp_PingVpDevice.isIpod()}else{return true}};pingvp_PingVpDevice.isSafariDevice=function(){return(navigator.userAgent.indexOf("Safari")!=-1)&&navigator.userAgent.indexOf("Chrome")==-1};pingvp_PingVpDevice.isChromeBrowser=function(){return navigator.userAgent.search("Chrome")>=0};pingvp_PingVpDevice.isAndroidNativeBrowser=function(){var navU=navigator.userAgent;var isAndroidMobile=navU.indexOf("Android")>-1&&navU.indexOf("Mozilla/5.0")>-1&&navU.indexOf("AppleWebKit")>-1;var regExAppleWebKit=new RegExp(/AppleWebKit\/([\d.]+)/);var resultAppleWebKitRegEx=regExAppleWebKit.exec(navU);var appleWebKitVersion=(resultAppleWebKitRegEx===null?null:parseFloat(regExAppleWebKit.exec(navU)[1]));var regExChrome=new RegExp(/Chrome\/([\d.]+)/);var resultChromeRegEx=regExChrome.exec(navU);var chromeVersion=(resultChromeRegEx===null?null:parseFloat(regExChrome.exec(navU)[1]));return isAndroidMobile&&(appleWebKitVersion!==null&&appleWebKitVersion<537)||(chromeVersion!==null&&chromeVersion<37)};pingvp_PingVpDevice.isLandscape=function(){return window.innerWidth>window.innerHeight};var pingvp_PingVpEach=function(){this.pingVpFunctions=new pingvp_PingVpExternFunctions();if(typeof window.pingVpFunctions=="undefined"){window.pingVpFunctions=this.pingVpFunctions}window.pingvp.loaded=false;this._selectors=[];$($bind(this,this.onPageLoaded))};$hxClasses["pingvp.PingVpEach"]=pingvp_PingVpEach;pingvp_PingVpEach.__name__=["pingvp","PingVpEach"];pingvp_PingVpEach.prototype={onPageLoaded:function(){$("div.PingVP").each($bind(this,this.onNodeFound));window.pingvp.loaded=true;if(typeof pingvpCallback=="function"){pingvpCallback()}},onNodeFound:function(i,node){var jqNode=$(node);if(jqNode.find(".pingVpOverlayPlayContainer").length!=0){return}var dataVideo=jqNode.data("video");if(dataVideo==null){dataVideo=""}var dataHash=jqNode.data("hash");if(dataHash==null){dataHash=""}var dataIV=jqNode.data("iv");if(dataIV==null){dataIV=""}var dataDebug=false;if(jqNode.data("debug")!=null){dataDebug=jqNode.data("debug")}var dataLanguage=jqNode.data("language");if(dataLanguage==null){dataLanguage="English"}var startFragment=jqNode.data("startfragment");if(startFragment==null){startFragment=""}var startSubs=jqNode.data("startsubtitles");if(startSubs==null){startSubs=""}var dataSelect=jqNode.data("select");if(dataSelect==null){dataSelect="Flash"}var dataControlsBelow=false;if(jqNode.data("controls")!=null){dataControlsBelow=jqNode.data("controls")=="below"}var dataControlsDisabled=false;if(jqNode.data("controls")!=null){dataControlsDisabled=jqNode.data("controls")=="disable"}var dataIsFramed=false;if(jqNode.data("isframed")!=null){dataIsFramed=jqNode.data("isframed")}var dataAutoStart=false;if(jqNode.data("autostart")!=null){dataAutoStart=jqNode.data("autostart")}var dataAutoHeight=true;if(jqNode.data("autoheight")!=null){dataAutoHeight=jqNode.data("autoheight")}var dataOverlayPlay=false;if(jqNode.data("overlayplay")!=null){dataOverlayPlay=jqNode.data("overlayplay")}var dataInlinePlay=true;if(jqNode.data("inlineplay")!=null){dataInlinePlay=jqNode.data("inlineplay")}if(jqNode.attr("preload")!=null){dataInlinePlay=jqNode.attr("preload")!="true"}console.log(dataInlinePlay);this._selectors.push(new pingvp_PingVpLoader(pingvp_PingVpEach._oid++,jqNode,dataVideo,dataHash,dataIV,dataDebug,dataLanguage,startFragment,startSubs,dataSelect,dataControlsBelow,dataControlsDisabled,dataIsFramed,dataAutoStart,dataAutoHeight,dataOverlayPlay,dataInlinePlay,this.pingVpFunctions))},__class__:pingvp_PingVpEach};var pingvp_PingVpEventItem=function(fragmentUuid,fragmentTitle,action,percent,lastFragmentUuid,eventType,customerIdentifier){this._deleteMe=false;this._age=0;this._readyToSend=true;this._fragmentUuid=fragmentUuid;this._fragmentTitle=fragmentTitle;this._action=action;this._percent=percent;this._lastFragmentUuid=lastFragmentUuid;this._eventType=eventType;this._customerIdentifier=customerIdentifier};$hxClasses["pingvp.PingVpEventItem"]=pingvp_PingVpEventItem;pingvp_PingVpEventItem.__name__=["pingvp","PingVpEventItem"];pingvp_PingVpEventItem.prototype={getAge:function(){return this._age},agePlusOne:function(){this._age++},getFragmentUuid:function(){return this._fragmentUuid},getFragmentTitle:function(){return this._fragmentTitle},getAction:function(){return this._action},getPercent:function(){return this._percent},getLastFragmentUuid:function(){return this._lastFragmentUuid},getEventType:function(){return this._eventType},getCustomerIdentifier:function(){return this._customerIdentifier},readyToSend:function(){return this._readyToSend},deleteMe:function(){return this._deleteMe},sending:function(){this._readyToSend=false;this._age++},sendFailure:function(){this._readyToSend=true},sendSuccess:function(){this._deleteMe=true},__class__:pingvp_PingVpEventItem};var pingvp_PingVpEventQueue=function(debug){this._debug=debug;this._queue=[]};$hxClasses["pingvp.PingVpEventQueue"]=pingvp_PingVpEventQueue;pingvp_PingVpEventQueue.__name__=["pingvp","PingVpEventQueue"];pingvp_PingVpEventQueue.getUniqueValues=function(array){var l=[];var _g=0;while(_g<array.length){var v=array[_g];++_g;if(l.indexOf(v)==-1){l.push(v)}}return l};pingvp_PingVpEventQueue.prototype={add:function(fragmentUuid,fragmentTitle,action,percent,lastFragmentUuid,eventType,customerIdentifier){var _gthis=this;this._currentItem=new pingvp_PingVpEventItem(fragmentUuid,fragmentTitle,action,percent,lastFragmentUuid,eventType,customerIdentifier);var array=pingvp_PingVpEventQueue.getUniqueValues(this._queue);var array1=array.filter(function(v){if(!(v.getAction()!=_gthis._currentItem.getAction()||v.getPercent()!=_gthis._currentItem.getPercent()||v.getFragmentUuid()!=_gthis._currentItem.getFragmentUuid())){return v.readyToSend()!=_gthis._currentItem.readyToSend()}else{return true}});this._queue=array1;this._queue.push(this._currentItem)},prepareSendList:function(){var sendList=[];var _g=0;var _g1=this._queue;while(_g<_g1.length){var o=_g1[_g];++_g;if(o.readyToSend()&&o.getAge()<3){sendList.push(o);break}}return sendList},cleanOne:function(){var _g=0;var _g1=this._queue;while(_g<_g1.length){var o=_g1[_g];++_g;if(o.deleteMe()||o.getAge()>=3){HxOverrides.remove(this._queue,o);return true}}return false},clean:function(){while(this.cleanOne()){continue}},print:function(){var out="Queue: ";var _g=0;var _g1=this._queue;while(_g<_g1.length){var o=_g1[_g];++_g;out=out+o.getAction()+"; "}},full:function(){return this._queue.length>50},__class__:pingvp_PingVpEventQueue};var pingvp_PingVpEventSender=function(playerOid,debug,logUrl,success,failure,productionUuid,productionTitle,scriptName,text){this._playerOid=playerOid;this._debug=debug;this._logUrl=logUrl;this._productionUuid=productionUuid;this._productionTitle=productionTitle;this._scriptName=scriptName;this._success=success;this._failure=failure;this._text=text;this._displayHtmlTable=false;if(this._debug.isOn()){var warningText=this._logUrl==""?" <small>("+this._text.get("statsWarningText")+")":"";this._statsTable=$('.pingVpStatsTable[data-video="'+this._scriptName+'"]');if(this._statsTable.length>0){this._displayHtmlTable=true;this._statsTable.append('<h2 class="pingVpReset pingVpHeaderTable">'+this._text.get("statsTableHeaderSucces")+warningText+'</h2><table class="pingVpReset pingVpStatsSuccesTable pingVpTable"><thead class="pingVpReset"><tr class="pingVpReset"><th class="pingVpReset">'+this._text.get("statsTableTh1")+'</th><th class="pingVpReset">'+this._text.get("statsTableTh2")+'</th><th class="pingVpReset">'+this._text.get("statsTableTh3")+'</th></tr></thead><tbody class="pingVpReset"></tbody></table>');this._statsTable.append('<h2 class="pingVpReset pingVpHeaderTable">'+this._text.get("statsTableHeaderError")+'</h2><table class="pingVpReset pingVpStatsFailedTable pingVpTable"><thead class="pingVpReset"><tr class="pingVpReset"><th class="pingVpReset">'+this._text.get("statsTableTh1")+'</th><th class="pingVpReset">'+this._text.get("statsTableTh2")+'</th><th class="pingVpReset">'+this._text.get("statsTableTh3")+'</th></tr></thead><tbody class="pingVpReset"></tbody></table>');this._statsTableSuccesBody=$('.pingVpStatsTable[data-video="'+this._scriptName+'"] .pingVpStatsSuccesTable tbody');this._statsTableFailedBody=$('.pingVpStatsTable[data-video="'+this._scriptName+'"] .pingVpStatsFailedTable tbody')}}};$hxClasses["pingvp.PingVpEventSender"]=pingvp_PingVpEventSender;pingvp_PingVpEventSender.__name__=["pingvp","PingVpEventSender"];pingvp_PingVpEventSender.prototype={update:function(productionUuid,productionTitle,scriptName){this._productionUuid=productionUuid;this._productionTitle=productionTitle;this._scriptName=scriptName},sendList:function(actionList){if(actionList.length<=0){return false}actionList[0].sending();var vars="";var s=this._productionTitle;vars=vars+"1="+encodeURIComponent(s);var s1=this._productionUuid;vars=vars+"&2="+encodeURIComponent(s1);var s2=window.screen.width;vars=vars+"&3="+encodeURIComponent(s2);var s3=window.screen.height;vars=vars+"&4="+encodeURIComponent(s3);var s4=actionList[0].getFragmentTitle();vars=vars+"&5="+encodeURIComponent(s4);var s5=actionList[0].getFragmentUuid();vars=vars+"&6="+encodeURIComponent(s5);var s6=actionList[0].getAction();vars=vars+"&7="+encodeURIComponent(s6);var s7=Std.string(actionList[0].getPercent());var i=s7.indexOf(".");var s8=HxOverrides.substr(s7,0,i+3);vars=vars+"&8="+encodeURIComponent(s8);var s9=actionList[0].getLastFragmentUuid();vars=vars+"&11="+encodeURIComponent(s9);vars=vars+"&12="+this.getEmbedUrl();var s10=actionList[0].getEventType();vars=vars+"&13="+encodeURIComponent(s10);var s11=actionList[0].getCustomerIdentifier();vars=vars+"&14="+encodeURIComponent(s11);if(this._logUrl!=""){var f=$bind(this,this.onRetrieveResult);var a1=actionList;var tmp=function(a2){f(a1,a2)};var f1=$bind(this,this.onFailure);var a11=actionList;var tmp1=function(){f1(a11)};$.ajax({type:"GET",url:this._logUrl+"?"+vars,async:true,contentType:"application/json",dataType:"jsonp",success:tmp,error:tmp1})}else{this.onSuccess(actionList)}return true},getEmbedUrl:function(){var url=window.location.href;if(window.self!=window.top){url=window.top.location.href}return this.stripUrlParams(url)},stripUrlParams:function(url){var arr=url.split("?");return arr[0]},onRetrieveResult:function(actionList,data){if(Reflect.field(data,"result")!="success"){this.onFailure(actionList)}else{this.onSuccess(actionList)}},onSuccess:function(actionList){var _g=0;while(_g<actionList.length){var o=actionList[_g];++_g;o.sendSuccess();if(this._displayHtmlTable){if(o.getFragmentTitle()!=""){var tmp=this._statsTableSuccesBody;var tmp1='tr[data-fragment="'+StringTools.htmlEscape(o.getFragmentTitle())+'"][data-uuid="'+o.getFragmentUuid()+'"][data-action="';var s=o.getAction();this._statsTableCheck=tmp.find(tmp1+encodeURIComponent(s)+'"]');if(this._statsTableCheck.length>0){var currentCount=Std.parseInt(this._statsTableCheck.find("td.pingVpTableCountingTd").text());this._statsTableCheck.find("td.pingVpTableCountingTd").text(currentCount+1)}else{var tmp2=this._statsTableSuccesBody;var tmp3='<tr class="pingVpReset" data-fragment="'+StringTools.htmlEscape(o.getFragmentTitle())+'" data-uuid="'+o.getFragmentUuid()+'" data-action="';var s1=o.getAction();tmp2.append(tmp3+encodeURIComponent(s1)+'"><td class="pingVpReset">'+StringTools.htmlEscape(o.getFragmentTitle())+'</td><td class="pingVpReset">'+o.getAction()+'</td><td class="pingVpTableCountingTd pingVpReset">1</td></tr>')}}}}this._success()},onFailure:function(actionList){var _g=0;while(_g<actionList.length){var o=actionList[_g];++_g;o.sendFailure();if(this._displayHtmlTable){if(o.getFragmentTitle()!=""){var tmp=this._statsTableFailedBody;var tmp1='tr[data-fragment="'+StringTools.htmlEscape(o.getFragmentTitle())+'"][data-uuid="'+o.getFragmentUuid()+'"][data-action="';var s=o.getAction();this._statsTableCheck=tmp.find(tmp1+encodeURIComponent(s)+'"]');if(this._statsTableCheck.length>0){var currentCount=Std.parseInt(this._statsTableCheck.find("td.pingVpTableCountingTd").text());this._statsTableCheck.find("td.pingVpTableCountingTd").text(currentCount+1)}else{var tmp2=this._statsTableFailedBody;var tmp3='<tr class="pingVpReset" data-fragment="'+StringTools.htmlEscape(o.getFragmentTitle())+'" data-uuid="'+o.getFragmentUuid()+'" data-action="';var s1=o.getAction();tmp2.append(tmp3+encodeURIComponent(s1)+'"><td class="pingVpReset">'+StringTools.htmlEscape(o.getFragmentTitle())+'</td><td class="pingVpReset">'+o.getAction()+'</td><td class="pingVpTableCountingTd pingVpReset">1</td><tr>')}}}}this._failure()},__class__:pingvp_PingVpEventSender};var pingvp_PingVpEvents=function(playerOid,debug,logUrl,productionUuid,productionTitle,scriptName,text){this._debug=debug;this._failedTimes=0;this._sender=new pingvp_PingVpEventSender(playerOid,this._debug,logUrl,$bind(this,this.onSuccess),$bind(this,this.onFailure),productionUuid,productionTitle,scriptName,text);this._wssender=new pingvp_PingVpWebSocketSender(playerOid);this._queue=new pingvp_PingVpEventQueue(this._debug);this._interval=new haxe_Timer(200);this._interval.run=$bind(this,this.queueInterval)};$hxClasses["pingvp.PingVpEvents"]=pingvp_PingVpEvents;pingvp_PingVpEvents.__name__=["pingvp","PingVpEvents"];pingvp_PingVpEvents.prototype={update:function(productionUuid,productionTitle,scriptName){this._sender.update(productionUuid,productionTitle,scriptName)},pushAction:function(fragmentUuid,fragmentTitle,action,percent,lastFragmentUuid){if(this._queue.full()){this._debug.log("Error: Event queue is full!!! - event skipped: "+action);return false}if(this._failedTimes>20){this._debug.log("Error: Too many event queue send failures (>20), queue stoped!!!");this._interval.stop();return false}this._queue.add(fragmentUuid,fragmentTitle,action,percent,lastFragmentUuid,"normal","");return true},pushActionInteractiveClick:function(fragmentUuid,fragmentTitle,action,percent,lastFragmentUuid,customerIdentifier){if(this._queue.full()){this._debug.log("Error: Event queue is full!!! - event skipped: "+action);return false}if(this._failedTimes>20){this._debug.log("Error: Too many event queue send failures (>20), queue stoped!!!");this._interval.stop();return false}this._queue.add(fragmentUuid,fragmentTitle,action,percent,lastFragmentUuid,"interactive",customerIdentifier);return true},sendQueueNow:function(){this.queueInterval()},queueInterval:function(){var sendList=this._queue.prepareSendList();if(sendList.length>0){this._sender.sendList(sendList)}this._queue.clean();this._queue.print()},onSuccess:function(){this._failedTimes=0},onFailure:function(){this._failedTimes++},stopQueue:function(){haxe_Timer.delay($bind(this,this.stopQueueDelay),5000)},stopQueueDelay:function(){this._interval.stop()},pushActionWs:function(productionUuid,productionTitle,fragmentUuid,fragmentTitle,action,percent){this._wssender.update(productionUuid,productionTitle,fragmentUuid,fragmentTitle,percent|0,action)},__class__:pingvp_PingVpEvents};var pingvp_PingVpExternFunctions=function(){this._callResize=[]};$hxClasses["pingvp.PingVpExternFunctions"]=pingvp_PingVpExternFunctions;pingvp_PingVpExternFunctions.__name__=["pingvp","PingVpExternFunctions"];pingvp_PingVpExternFunctions.prototype={setName:function(videoScriptName){this._videoScriptName=videoScriptName},setResize:function(call){this._callResize.push(call);this._callResizeOnce=call},resize:function(callName){if(this._callResize.length>0){var _g=0;var _g1=this._callResize;while(_g<_g1.length){var call=_g1[_g];++_g;call(null)}}},__class__:pingvp_PingVpExternFunctions};var pingvp_PingVpFailure=function(node,message){node.html('<div class="pingVpFailure"><div>'+message+"</div></div>")};$hxClasses["pingvp.PingVpFailure"]=pingvp_PingVpFailure;pingvp_PingVpFailure.__name__=["pingvp","PingVpFailure"];pingvp_PingVpFailure.prototype={__class__:pingvp_PingVpFailure};var pingvp_PingVpFallBackImage=function(videoOid,node,fallBackImageUrl,videoWidth,videoHeight){this._videoOid=videoOid;this._node=node;this._videoWidth=videoWidth;this._videoHeight=videoHeight;var videoContainer=$("#pingVpVideoContainer-"+videoOid);videoContainer.html('<img id="pingVpFallBackImage-'+videoOid+'" class="pingVpFallBackImage" src="'+fallBackImageUrl+'" alt="">');this._fallBackImage=$("#pingVpFallBackImage-"+videoOid);this._node.css("background-color","transparent");videoContainer.css("background-color","transparent");this._fallBackImage.css("background-color","transparent");this.onRezise(null);$(window).resize($bind(this,this.onRezise));var f=$bind(this,this.onRezise);haxe_Timer.delay(function(){f(null)},200)};$hxClasses["pingvp.PingVpFallBackImage"]=pingvp_PingVpFallBackImage;pingvp_PingVpFallBackImage.__name__=["pingvp","PingVpFallBackImage"];pingvp_PingVpFallBackImage.prototype={onRezise:function(e){var containerWidth=this._node.width();var containerHeight=this._node.height();var containerCenterX=containerWidth/2;var containerCenterY=containerHeight/2;var videoHalfWidth=this._videoWidth/2;var videoHalfHeigth=this._videoHeight/2;var scaleX=containerWidth/this._videoWidth;var scaleY=containerHeight/this._videoHeight;var scale=scaleX;if(scaleX>scaleY){scale=scaleY}this._fallBackImage.css("left",containerCenterX-videoHalfWidth*scale+"px");this._fallBackImage.css("top",containerCenterY-videoHalfHeigth*scale+"px");this._fallBackImage.css("width",this._videoWidth*scale+"px");this._fallBackImage.css("height",this._videoHeight*scale+"px")},__class__:pingvp_PingVpFallBackImage};var pingvp_PingVpFocus=function(videoOid,node){this._node=node;this._videoOid=videoOid;this._pingVpElement=$(".pingVpWebplayerSelector,#pingVpOverlayPlayContainer-"+this._videoOid+",.PingVP");$("body").mousedown($bind(this,this.removeTab));$("body").click($bind(this,this.removeTab2));$("body").keydown($bind(this,this.triggerTab));$("body").keydown($bind(this,this.triggerClick));$("body").on("click keydown keyup mousemove contextmenu",null,$bind(this,this.checkElement));if(pingvp_PingVpDevice.isChromeBrowser()){this._pingVpElement.addClass("pingVpBrowserChrome")}};$hxClasses["pingvp.PingVpFocus"]=pingvp_PingVpFocus;pingvp_PingVpFocus.__name__=["pingvp","PingVpFocus"];pingvp_PingVpFocus.prototype={triggerTab:function(e){if(e.which==9){this._pingVpElement.addClass("pingVpIsTabbing")}},checkElement:function(e){this._focus=$(":focus");if(this._focus.hasClass("pingVpSvgObjectOverlayTimeSlider")){$("#pingVpTimeSlider-"+this._videoOid).addClass("pingVpControlSliderHasFocus")}else{$("#pingVpTimeSlider-"+this._videoOid).removeClass("pingVpControlSliderHasFocus")}},removeTab:function(e){if(this._pingVpElement.hasClass("pingVpTriggerClick")){this._pingVpElement.removeClass("pingVpTriggerClick")}else{this._pingVpElement.removeClass("pingVpIsTabbing")}},removeTab2:function(e){if(this._pingVpElement.hasClass("pingVpTriggerClick")){this._pingVpElement.removeClass("pingVpTriggerClick")}else{this._pingVpElement.removeClass("pingVpIsTabbing")}$("#pingVpTimeSlider-"+this._videoOid).removeClass("pingVpControlSliderHasFocus")},triggerClick:function(e){if(e.which==13){this._focus=$(":focus");if(this._focus.parents(".PingVP").length!=0||this._focus.parents("#pingVpOverlayPlayContainer-"+this._videoOid).length!=0||this._focus.parents(".pingVpWebplayerSelector").length!=0||this._focus.parents(".pingVpContextMenu").length!=0){this._pingVpElement.addClass("pingVpTriggerClick");if(!this._focus.hasClass("pingVpSvgSlider")){this._focus.trigger("click")}}}},__class__:pingvp_PingVpFocus};var pingvp_PingVpFollowPath=function(startX,startY,path){this._path=path;this._startX=startX;this._startY=startY;this._x=startX;this._y=startY};$hxClasses["pingvp.PingVpFollowPath"]=pingvp_PingVpFollowPath;pingvp_PingVpFollowPath.__name__=["pingvp","PingVpFollowPath"];pingvp_PingVpFollowPath.prototype={update:function(seconds){var beginX=this._startX;var beginY=this._startY;var endX=0;var endY=0;var beginLastSec=0;var endLastSec=99999;var i=0;while(i<this._path.length){var s=this._path[i];if(s<seconds){if(s>beginLastSec){beginX=this._path[i+1];beginY=this._path[i+2];beginLastSec=s}}if(s>seconds){if(s<endLastSec){endX=this._path[i+1];endY=this._path[i+2];endLastSec=s}}i+=3}var xas=endX-beginX;var yos=endY-beginY;var totalTime=endLastSec-beginLastSec;var currentTime=seconds-beginLastSec;this._x=beginX+xas*currentTime/totalTime;this._y=beginY+yos*currentTime/totalTime},getX:function(){return this._x},getY:function(){return this._y},__class__:pingvp_PingVpFollowPath};var pingvp_PingVpInterval=function(call,time,loopTimes,multiplier){this._call=call;this._time=time;this._multiplier=multiplier;this._loopTimes=loopTimes;this._vsyncTimer=new pingvp_VsyncTimer();this._timed=0};$hxClasses["pingvp.PingVpInterval"]=pingvp_PingVpInterval;pingvp_PingVpInterval.__name__=["pingvp","PingVpInterval"];pingvp_PingVpInterval.prototype={start:function(){if(this._vsyncTimer.isSupported()){this._vsyncTimer.start(this._call)}else{this._timer=new haxe_Timer(10);this._timer.run=$bind(this,this.onInterval);haxe_Timer.delay($bind(this,this.onInterval),0)}},stop:function(){if(this._vsyncTimer.isSupported()){this._vsyncTimer.stop()}else{if(this._timer!=null){this._timer.stop()}}},onInterval:function(){if(!this._vsyncTimer.isSupported()){var i=0;while(i<this._loopTimes){haxe_Timer.delay(this._call,i*this._multiplier);++i}}},__class__:pingvp_PingVpInterval};var pingvp_PingVpKeyFunctions=function(videoOid){var _gthis=this;$("body").keydown(function(e){if(_gthis._onKey!=null){_gthis._onKey(e)}})};$hxClasses["pingvp.PingVpKeyFunctions"]=pingvp_PingVpKeyFunctions;pingvp_PingVpKeyFunctions.__name__=["pingvp","PingVpKeyFunctions"];pingvp_PingVpKeyFunctions.prototype={bindKey:function(onKey){this._onKey=onKey},__class__:pingvp_PingVpKeyFunctions};var pingvp_PingVpLanguage=function(language){language=this.checkLanguage(language);this._language=language;switch(language){case"de":this._text={langCode:"de",generalError:"Video konnte nicht geladen werden",unsuportedDevice:"Gerät nicht unterstützt, sehen Sie dieses interaktive Video auf iPad, Mac, Android-Tablet/Smartphone oder Windows-PC.",subtitlesNone:"Keine",subtitlesSettings:"Options",subtitlesSettignsTitle:"Options",subtitlesSettingsText:"Text",subtitlesTextFontFamily:"Font",subtitlesTextColor:"Color",subtitlesTextFontsize:"Font size",subtitlesTextOpacity:"Opacity",subtitlesTextOutline:"Outline",subtitlesSettingsBackground:"Background",subtitlesSettingsWindow:"Window",subtitlesSettingsReset:"Reset Changes",subtitlesSettingsResetText:"Reset Text",subtitlesSettingsResetBackground:"Reset Background",subtitlesSettingsResetWindow:"Reset Window",subtitlesSettingsTextOutlineNone:"None",subtitlesSettingsTextOutlineDropShadow:"Drop shadow",subtitlesSettingsTextOutlineRaised:"Raised",subtitlesSettingsTextOutlineDepressed:"Depressed",subtitlesSettingsTextOutlineOutline:"Outline",subtitlesSettingsTextFontFamilyMonosaceSerif:"Monosace Serif",subtitlesSettingsTextFontFamilyProportionalSerif:"Proportional Serif",subtitlesSettingsTextFontFamilyMonospaceSansSerif:"Monospace Sans-Serif",subtitlesSettingsTextFontFamilyProportionalSansSerif:"Proportional Sans-Serif",subtitlesSettingsTextFontFamilyCasual:"Casual",subtitlesSettingsTextFontFamilyCursive:"Cursive",subtitlesSettingsTextFontFamilySmallCapitals:"Small Capitals",subtitlesBackgroundColor:"Color",subtitlesBackgroundOpacity:"Opacity",subtitlesBackgroundBlur:"Blur",subtitlesWindowColor:"Color",subtitlesWindowOpacity:"Opacity",share:"Teilen",shareReturn:"&lt; Zurück zum Video",copy:"URL kopieren",copiedToClip:"In die Zwischenablage kopiert.",pressCtrlC:"Drücken Sie STRG+C zum Kopieren",emailSubject:"Schau dir dieses Video an",emailBody1:"Hallo,\n\nich möchte dieses Video teilen: ",emailBody2:"\n\nMit freundlichen Grüßen,",contextbarStart:"Zum Anfang gehen",contextbarBack:"Einen Schritt zurück",contextbarRepeat:"Video wiederholen",contextbarShortcut:"Tastenkombinationen",contextbarReport:"Ein Problem melden",contextbarBrand:"Ping Video Player (PingVP)",settingsHeadQuality:"Qualität",settingsQualityHDFull:"High Definition (HD)",settingsQualityHD:"HD",settingsQualitySDFull:"Standard Definition (SD)",settingsQualitySD:"SD",settingsHeadAd:"Audio-Beschreibung",settingsAdOnFull:"An",settingsAdOn:"An",settingsAdOffFull:"Aus",settingsAdOff:"Aus",settingsHeadSubs:"Untertitel/CC",settingsHeadSpeed:"Wiedergabegeschwindigkeit",settingsHeadShare:"Teilen",settingsHeadShortcuts:"Tastenkombinationen",settingsShareLink:"URL kopieren",linkIsCopiedSucces:"Link kopiert",linkIsCopiedFailed:"Kopieren fehlgeschlagen",settingsShareFacebook:"Auf Facebook teilen",settingsShareTwitter:"Auf Twitter teilen",settingsBackToHead:"Zurück zu den Einstellungen",settingsMenuTitle:"EINSTELLUNGEN",settingsQualityTitle:"QUALITÄT",settingsAdTitle:"AUDIO-BESCHREIBUNG",settingsSubtitlesTitle:"UNTERTITEL/CC",settingsSpeedTitle:"WIEDERGABEGESCHWINDIGKEIT",playerIsPlayed:"Abspielen",playerIsPaused:"Pause",playerIsMuted:"Stummschalten aufheben",statsTableHeaderAll:"Alle Statistiken",statsTableHeaderAllEmpty:"Leeren",statsTableHeaderSucces:"Erfolgsstatistiken",statsTableHeaderError:"Fehlgeschlagene Statistiken",statsWarningText:"Stats-URL leer, alle Statistiken werden erfolgreich angezeigt",statsTableTh1:"Clipname",statsTableTh2:"Aktion",statsTableTh3:"Anzahl",controlPlayLabelOn:"Abspielen (Leertaste)",controlPlayLabelOff:"Pause (Leertaste)",control5SecBackLabel:"5 Sek. zurück",muteLabel:"Lautstärke (m)",subtitlesLabel:"Untertitel (c)",shareLabel:"Teilen (s)",transcriptLabel:"Transkript (T)",settingsLabel:"Einstellungen",smallscreenLabel:"Vollbild schließen (f)",fullscreenLabel:"Vollbild (f)",adLabel:"Audio-Beschreibung (a)",controlAILabel:"Dieses Video enthält KI",transcriptTitle:"Transkript",shareModalTitle:"Video teilen",shareCopyButton:"URL kopieren",shareEmailSubject:"Ich möchte einen Link mit Ihnen teilen",aiModalTitle:"AI Content",aiModalText:"Deze video bevat audio en/of beeld dat bewerkt of gegenereerd is door of met behulp van AI.",aiModalLink:"Meer lezen",shortcutModalTitle:"Tastenkombinationen",shortcutModalM:"Ton ein/aus",shortcutModalUp:"Lautstärke erhöhen",shortcutModalDown:"Lautstärke verringern",shortcutModalRight:"5 Sekunden vor",shortcutModalLeft:"5 Sekunden zurück",shortcutModalSpace:"Abspielen/Pause",shortcutModalF:"Vollbild",shortcutModalC:"Untertitel ein/aus",shortcutModalChevRight:"Schnellere Wiedergabegeschwindigkeit",shortcutModalChevLeft:"Langsamere Wiedergabegeschwindigkeit",shortcutModalS:"Video teilen",shortcutModalT:"Transkript anzeigen",shortcutModalA:"Audio-Beschreibung",shortcutModalEsc:"Menü schließen",altPosterPlay:"Video abspielen",altPosterPlay2:"Hier klicken zum Ansehen.",altControlbarPlay:"Video abspielen",altControlbarPause:"Pause video",altControlbar5sec:"5 Sekunden zurück",altControlbarSoundOn:"Ton aus",altControlbarSoundOff:"Ton ein",altControlbarSubtitle:"Untertitelmenü öffnen",altControlbarShare:"Teilen-Menü öffnen",altControlbarSettings:"Einstellungen öffnen",altControlbarFullscreen:"Video im Vollbildmodus öffnen",altControlbarSmallscreen:"Video im kleinen Bildschirmmodus öffnen",altControlbarAd:"Audio-Beschreibung",altControlbarAI:"Dieses Video enthält KI",collapsibleTranscriptTitle:"Transkript",collapsibleTranscriptLabelOff:"Ausgeschriebener Text ausklappen",collapsibleTranscriptLabelOn:"Ausgeschriebener Text einklappen",selectColorWhite:"Weiß wählen",selectColorYellow:"Gelb wählen",selectColorGreen:"Grün wählen",selectColorCyan:"Cyan wählen",selectColorBlue:"Blau wählen",selectColorMagenta:"Magenta wählen",selectColorRed:"Rot wählen",selectColorBlack:"Schwarz wählen",timeSliderAccesLabel:"Zeitschieberegler"};break;case"en":this._text={langCode:"en",generalError:"Video loading failed",unsuportedDevice:"Device not supported, watch this interactive video on iPad, Mac, Android tablet/smartphone, or Windows PC.",subtitlesNone:"None",subtitlesSettings:"Options",subtitlesArrowNext:"Open submenu",subtitlesSettingsLabel:"Go to subtitle settings",subtitlesSettingsLabelGo:"Go to ",subtitlesSettingsLabelEdit:" edit",subtitlesSettingsLabelReset:"Reset changes",subtitlesSettignsTitle:"Options",subtitlesSettingsText:"Text",subtitlesTextFontFamily:"Font",subtitlesTextColor:"Color",subtitlesTextFontsize:"Font size",subtitlesTextOpacity:"Opacity",subtitlesTextOutline:"Outline",subtitlesSettingsBackground:"Background",subtitlesSettingsWindow:"Window",subtitlesSettingsReset:"Reset Changes",subtitlesSettingsResetText:"Reset Text",subtitlesSettingsResetBackground:"Reset Background",subtitlesSettingsResetWindow:"Reset Window",subtitlesSettingsTextOutlineNone:"None",subtitlesSettingsTextOutlineDropShadow:"Drop shadow",subtitlesSettingsTextOutlineRaised:"Raised",subtitlesSettingsTextOutlineDepressed:"Depressed",subtitlesSettingsTextOutlineOutline:"Outline",subtitlesSettingsTextFontFamilyMonosaceSerif:"Monospace Serif",subtitlesSettingsTextFontFamilyProportionalSerif:"Proportional Serif",subtitlesSettingsTextFontFamilyMonospaceSansSerif:"Monospace Sans-Serif",subtitlesSettingsTextFontFamilyProportionalSansSerif:"Proportional Sans-Serif",subtitlesSettingsTextFontFamilyCasual:"Casual",subtitlesSettingsTextFontFamilyCursive:"Cursive",subtitlesSettingsTextFontFamilySmallCapitals:"Small Capitals",subtitlesBackgroundColor:"Color",subtitlesBackgroundOpacity:"Opacity",subtitlesBackgroundBlur:"Blur",subtitlesWindowColor:"Color",subtitlesWindowOpacity:"Opacity",share:"Share",shareReturn:"&lt; Return to video",copy:"Copy URL",copiedToClip:"Copied to clipboard.",pressCtrlC:"Press CTRL+C to copy",emailSubject:"Check out this video",emailBody1:"Hi,\n\nI would like to share this video: ",emailBody2:"\n\nKind regards,",contextbarStart:"Go to start",contextbarBack:"Go one step back",contextbarRepeat:"Repeat video",contextbarShortcut:"Keyboard shortcuts",contextbarReport:"Report a problem",contextbarBrand:"Ping Video Player (PingVP)",settingsGoTo:"Go to ",settingsGoBack:"Go back",settingsOpen:"Open ",settingsOpenWindow:" window",settingsHeadQuality:"Quality",settingsQualityHDFull:"High Definition (HD)",settingsQualityHD:"HD",settingsQualityHDSelect:"Select HD quality",settingsQualitySDFull:"Standard Definition (SD)",settingsQualitySD:"SD",settingsQualitySDSelect:"Select SD quality",settingsHeadAd:"Audio description",settingsAdOnFull:"On",settingsAdOnLabel:"Turn on audio description",settingsAdOn:"on",settingsAdOffFull:"Off",settingsAdOff:"off",settingsAdOffLabel:"Turn off audio description",settingsHeadSubs:"Subtitles/CC",settingsHeadSpeed:"Speed",settingsHeadShare:"Share",settingsHeadShortcuts:"Shortcuts",settingsHeadContext:"Context menu",settingsShareLink:"Copy URL",linkIsCopiedSucces:"Link copied",linkIsCopiedFailed:"Copy failed",settingsShareFacebook:"Share on Facebook",settingsShareTwitter:"Share on Twitter",settingsBackToHead:"Back to settings",settingsMenuLabel:"Video Player Settings",settingsMenuTitle:"SETTINGS",settingsQualityTitle:"QUALITY",settingsAdTitle:"AUDIO DESCRIPTION",settingsSubtitlesTitle:"SUBTITLES",settingsSubtitlesTurnOn1:"Turn ",settingsSubtitlesTurnOn2:" subtitles on",settingsSubtitlesTurnOff:"Turn subtitles off",settingsSpeedTitle:"PLAYBACK SPEED",settingsSpeed05label:"Playback speed slowed down to 0.5x",settingsSpeed1label:"Standard playback speed",settingsSpeed15label:"Playback speed increased to 1.5x",settingsSpeed2label:"Playback speed increased to 2x",playerIsPlayed:"Playing",playerIsPaused:"Paused",playerIsMuted:"Unmute",statsTableHeaderAll:"All statistics",statsTableHeaderAllEmpty:"Refresh",statsTableHeaderSucces:"Successful statistics",statsTableHeaderError:"Failed statistics",statsWarningText:"Statistics URL is empty, everything will be considered successful",statsTableTh1:"Clip Name",statsTableTh2:"Action",statsTableTh3:"Count",settingsGoBackToSubSettings:"Go back to subtitle settings",controlPlayLabelOn:"Play (space)",controlPlayLabelOff:"Pause (space)",control5SecBackLabel:"5 Sec. back (<div class='pingVpReset pingVpLabelTriangle'></div>)",muteLabel:"Volume (m)",subtitlesLabel:"Subtitles (c)",shareLabel:"Share (s)",transcriptLabel:"Transcript (T)",settingsLabel:"Settings",smallscreenLabel:"Close Fullscreen (f)",fullscreenLabel:"Fullscreen (f)",adLabel:"Audio description (a)",controlAILabel:"This video includes AI",transcriptTitle:"Transcript",shareModalTitle:"Share Video",shareCopyButton:"Copy URL",shareEmailSubject:"I would like to share this link with you",shareCopyLabel:"Shareable URL",shareLabelVia:"Share via ",shareLabelOn:"Share on ",aiModalTitle:"AI Content",aiModalText:"This video contains audio and/or visuals that have been edited or generated by or with the help of AI.",aiModalLink:"Read more",shortcutModalTitle:"Keyboard Shortcuts",shortcutModalM:"Mute/Unmute",shortcutModalUp:"Increase volume",shortcutModalDown:"Decrease volume",shortcutModalRight:"Skip forward 5 seconds",shortcutModalLeft:"Rewind 5 seconds",shortcutModalSpace:"Play/Pause",shortcutModalF:"Fullscreen",shortcutModalC:"Toggle subtitles",shortcutModalChevRight:"Increase playback speed",shortcutModalChevLeft:"Decrease playback speed",shortcutModalS:"Share video",shortcutModalT:"Show transcript",shortcutModalA:"Audio description",shortcutModalEsc:"Close menu",altPosterPlay:"Play video",altPosterPlay2:"Click here to watch.",altControlbarPlay:"Play video",altControlbarPause:"Pause video",altControlbar5sec:"5 seconds back",altControlbarSoundOn:"Sound off",altControlbarSoundOff:"Sound on",altControlbarSubtitle:"Open subtitle menu",altControlbarSubtitleOff:"Close subtitle menu",altControlbarShare:"Open share menu",altControlbarShareOff:"Close share menu",altControlbarSettings:"Open settings menu",altControlbarSettingsOff:"Close settings menu",altControlbarFullscreen:"Open video in fullscreen",altControlbarSmallscreen:"Exit fullscreen",altControlbarAdOn:"Audio description on",altControlbarAdOff:"Audio description off",altControlbarAIOn:"Open AI description",altControlbarAIOff:"Close AI description",altControlbarTranscriptOn:"Transcript sluiten",altControlbarTranscriptOff:"Transcript openen",collapsibleTranscriptTitle:"Transcript",collapsibleTranscriptLabelOff:"Open transcript",collapsibleTranscriptLabelOn:"Close transcript",sliderTimeLabel:"Time control",sliderTimeBackground:"Time background",sliderTimeBuffer:"Time buffer",sliderTimeForeground:"Time foreground",sliderVolumeLabel:"Volume control",sliderVolumeBackground:"Volume background",sliderVolumeBuffer:"Volume buffer",sliderVolumeForeground:"Volume foreground",closeModalImg:"Close window",selectColorWhite:"Select white",selectColorYellow:"Select yellow",selectColorGreen:"Select green",selectColorCyan:"Select cyan",selectColorBlue:"Select blue",selectColorMagenta:"Select magenta",selectColorRed:"Select red",selectColorBlack:"Select black",selectOpacity0:"Set opacity to 0 percent",selectOpacity25:"Set opacity to 25 percent",selectOpacity50:"Set opacity to 50 percent",selectOpacity75:"Set opacity to 75 percent",selectOpacity100:"Disable opacity",selectFontSize50:"Set text size to 50 percent",selectFontSize100:"Set text size to normal",selectFontSize150:"Set text size to 150 percent",selectFontSize200:"Set text size to 200 percent",selectFontFamily:"Set font to ",selectOutline:"Set outline to ",selectBlurOff:"Turn blur off",selectBlurOn:"Turn blur on",announcePause:"Video paused",announceReplay:"Replay video",announcePlay:"Play video",announce5SecBack:"Rewind video 5 seconds",announce5SecForward:"Skip video forward 5 seconds",announceSoundMuted:"Sound off",announceSoundUnmuted:"Sound on",announceSoundLower:"Volume decreased",announceSoundHigher:"Volume increased",announceSoundPercentage:"Volume to ",announceFullscreen:"Playing video in fullscreen mode",announceWindowed:"Playing video in windowed mode",announceSubOn:"Subtitles on",announceSubOff:"Subtitles off",announceSpeed0:"Speed reset to normal",announceSpeed1:"Speed decreased to half",announceSpeed2:"Speed increased to 1.5x normal",announceSpeed3:"Speed doubled",announceShareModal:"Open share video popup",announceAdOff:"Audio description off",announceAdOn:"Audio description on",announceButton:"Video shows button ",announceCloseMenu:"Close menu",announceCloseModal:"Close popup",timeSliderAccesLabel:"Time slider",timeSliderAltForeground:"played",timeSliderAltBuffer:"loaded"};break;case"fr":this._text={langCode:"en",generalError:"Video loading failed",unsuportedDevice:"Device not supported, watch this interactive video on iPad, Mac, Android tablet/smartphone or Windows PC.",subtitlesNone:"None",subtitlesSettings:"Options",subtitlesSettignsTitle:"Options",subtitlesSettingsText:"Text",subtitlesTextFontFamily:"Font",subtitlesTextColor:"Color",subtitlesTextFontsize:"Font size",subtitlesTextOpacity:"Opacity",subtitlesTextOutline:"Outline",subtitlesSettingsBackground:"Background",subtitlesSettingsWindow:"Window",subtitlesSettingsReset:"Reset Changes",subtitlesSettingsResetText:"Reset Text",subtitlesSettingsResetBackground:"Reset Background",subtitlesSettingsResetWindow:"Reset Window",subtitlesSettingsTextOutlineNone:"None",subtitlesSettingsTextOutlineDropShadow:"Drop shadow",subtitlesSettingsTextOutlineRaised:"Raised",subtitlesSettingsTextOutlineDepressed:"Depressed",subtitlesSettingsTextOutlineOutline:"Outline",subtitlesSettingsTextFontFamilyMonosaceSerif:"Monosace Serif",subtitlesSettingsTextFontFamilyProportionalSerif:"Proportional Serif",subtitlesSettingsTextFontFamilyMonospaceSansSerif:"Monospace Sans-Serif",subtitlesSettingsTextFontFamilyProportionalSansSerif:"Proportional Sans-Serif",subtitlesSettingsTextFontFamilyCasual:"Casual",subtitlesSettingsTextFontFamilyCursive:"Cursive",subtitlesSettingsTextFontFamilySmallCapitals:"Small Capitals",subtitlesBackgroundColor:"Color",subtitlesBackgroundOpacity:"Opacity",subtitlesBackgroundBlur:"Blur",subtitlesWindowColor:"Color",subtitlesWindowOpacity:"Opacity",share:"Share",shareReturn:"&lt; Return to video",copy:"Copy URL",copiedToClip:"Copied to clipboard.",pressCtrlC:"Press CTRL+C to copy",emailSubject:"Check out this video",emailBody1:"Hi,\n\nI would like to share this video: ",emailBody2:"\n\nKind regards,",contextbarStart:"Go to start - fr",contextbarBack:"Go one step back",contextbarRepeat:"Repeat video",contextbarShortcut:"Keyboard shortcuts",contextbarReport:"Report a problem",contextbarBrand:"Ping Video Player (PingVP)",settingsHeadQuality:"Quality",settingsQualityHDFull:"High Definition (HD)",settingsQualityHD:"HD",settingsQualitySDFull:"Standard Definition (SD)",settingsQualitySD:"SD",settingsHeadAd:"Audio description",settingsAdOnFull:"On",settingsAdOn:"on",settingsAdOffFull:"Off",settingsAdOff:"off",settingsHeadSubs:"Subtitles/CC",settingsHeadSpeed:"Playback speed",settingsHeadShare:"Share",settingsHeadShortcuts:"Shortcuts",settingsShareLink:"Copy url",linkIsCopiedSucces:"Link copied",linkIsCopiedFailed:"Copying failed",settingsShareFacebook:"Share on Facebook",settingsShareTwitter:"Share on Twitter",settingsBackToHead:"Back to settings",settingsMenuTitle:"SETTINGS",settingsQualityTitle:"QUALITY",settingsAdTitle:"AUDIO DESCRIPTION",settingsSubtitlesTitle:"SUBTITLES/CC",settingsSpeedTitle:"PLAYBACK SPEED",playerIsPlayed:"Play",playerIsPaused:"Paused",playerIsMuted:"Unmute",statsTableHeaderAll:"All statistics",statsTableHeaderAllEmpty:"Clean",statsTableHeaderSucces:"Success statistics",statsTableHeaderError:"Failed statistics",statsWarningText:"Stats url empty, all stats will result succesfull",statsTableTh1:"Clipname",statsTableTh2:"Action",statsTableTh3:"Amount",controlPlayLabelOn:"Play (space)",controlPlayLabelOff:"Pause (space)",control5SecBackLabel:"5 Sec. back (<div class='pingVpReset pingVpLabelTriangle'></div>)",muteLabel:"Volume (m)",subtitlesLabel:"Subtitles (c)",shareLabel:"Share (s)",transcriptLabel:"Transcript (T)",settingsLabel:"Settings",smallscreenLabel:"Close Fullscreen (f)",fullscreenLabel:"Fullscreen (f)",adLabel:"Audio description (a)",controlAILabel:"This video includes AI",transcriptTitle:"Transcript",shareModalTitle:"Share video",shareCopyButton:"Copy url",shareCopyLabel:"Shareable url",shareEmailSubject:"I'd like to share a link with you",shareLabelVia:"Share via ",shareLabelOn:"Share on ",aiModalTitle:"AI Content",aiModalText:"Deze video bevat audio en/of beeld dat bewerkt of gegenereerd is door of met behulp van AI.",aiModalLink:"Meer lezen",shortcutModalTitle:"Keyboard shortcuts",shortcutModalM:"Sound on/off",shortcutModalUp:"Volume up",shortcutModalDown:"Volume down",shortcutModalRight:"5 seconds foward",shortcutModalLeft:"5 seconds backward",shortcutModalSpace:"Play/Pause",shortcutModalF:"Fullscreen",shortcutModalC:"Subtitles on/off",shortcutModalChevRight:"Faster playback speed",shortcutModalChevLeft:"Slower playback speed",shortcutModalS:"Video sharing",shortcutModalT:"Show transcript",shortcutModalA:"Audio description",shortcutModalEsc:"Close menu",altPosterPlay:"Play video",altPosterPlay2:"Click here to watch.",altControlbarPlay:"Play video",altControlbarPause:"Pause video",altControlbar5sec:"5 seconds back",altControlbarSoundOn:"Sound off",altControlbarSoundOff:"Sound on",altControlbarSubtitle:"Open subtitle menu",altControlbarShare:"Open share menu",altControlbarSettings:"Open settings menu",altControlbarFullscreen:"Open video in fullscreen",altControlbarSmallscreen:"Close fullscreen",altControlbarAd:"Audio description",altControlbarAI:"This video includes AI",collapsibleTranscriptTitle:"Transcript",collapsibleTranscriptLabelOff:"Expand written text",collapsibleTranscriptLabelOn:"Collapse written text",selectColorWhite:"Choose white",selectColorYellow:"Choose yellow",selectColorGreen:"Choose green",selectColorCyan:"Choose cyan",selectColorBlue:"Choose blue",selectColorMagenta:"Choose magenta",selectColorRed:"Choose red",selectColorBlack:"Choose black",timeSliderAccesLabel:"Timeslider"};break;default:this._text={langCode:"nl",generalError:"Fout bij het laden van de video",unsuportedDevice:"Uw apparaat wordt nog niet ondersteund, bekijk deze interactieve video op iPad, Mac, Android tablet/smartphone of Windows PC.",subtitlesNone:"Geen",subtitlesSettings:"Aanpassen",subtitlesArrowNext:"Open submenu",subtitlesSettingsLabel:"Ga naar ondertiteling aanpassen",subtitlesSettingsLabelGo:"Ga naar ",subtitlesSettingsLabelEdit:" aanpassen",subtitlesSettingsLabelReset:"Reset de aanpassingen",subtitlesSettignsTitle:"Aanpassen",subtitlesSettingsText:"Tekst",subtitlesTextFontFamily:"Lettertype",subtitlesTextColor:"Kleur",subtitlesTextFontsize:"Lettergrootte",subtitlesTextOpacity:"Transparantie",subtitlesTextOutline:"Rand",subtitlesSettingsBackground:"Achtergrond",subtitlesSettingsWindow:"Venster",subtitlesSettingsReset:"Aanpassingen Resetten",subtitlesSettingsResetText:"Tekst Resetten",subtitlesSettingsResetBackground:"Achtergrond Resetten",subtitlesSettingsResetWindow:"Venster Resetten",subtitlesSettingsTextOutlineNone:"Geen",subtitlesSettingsTextOutlineDropShadow:"Drop shadow",subtitlesSettingsTextOutlineRaised:"Raised",subtitlesSettingsTextOutlineDepressed:"Depressed",subtitlesSettingsTextOutlineOutline:"Outline",subtitlesSettingsTextFontFamilyMonosaceSerif:"Monosace Serif",subtitlesSettingsTextFontFamilyProportionalSerif:"Proportional Serif",subtitlesSettingsTextFontFamilyMonospaceSansSerif:"Monospace Sans-Serif",subtitlesSettingsTextFontFamilyProportionalSansSerif:"Proportional Sans-Serif",subtitlesSettingsTextFontFamilyCasual:"Casual",subtitlesSettingsTextFontFamilyCursive:"Cursive",subtitlesSettingsTextFontFamilySmallCapitals:"Small Capitals",subtitlesBackgroundColor:"Kleur",subtitlesBackgroundOpacity:"Transparantie",subtitlesBackgroundBlur:"Blur",subtitlesWindowColor:"Kleur",subtitlesWindowOpacity:"Transparantie",share:"Delen",shareReturn:"&lt; Terug naar de video",copy:"Kopieer URL",copiedToClip:"Gekopieerd naar het klembord.",pressCtrlC:"Druk op CTRL-C om te kopieren",emailSubject:"Ik wil deze video graag met je delen",emailBody1:"Hoi,\n\nIk wil deze video graag met je delen: ",emailBody2:"\n\nGroeten,",contextbarStart:"Ga naar start",contextbarBack:"Ga een stap terug",contextbarRepeat:"Herhaal video",contextbarShortcut:"Toetsenbord sneltoetsen",contextbarReport:"Meld een probleem",contextbarBrand:"Ping Video Player (PingVP)",settingsGoTo:"Ga naar ",settingsGoBack:"Ga terug",settingsOpen:"Open ",settingsOpenWindow:" venster",settingsHeadQuality:"Kwaliteit",settingsQualityHDFull:"High Definition (HD)",settingsQualityHD:"HD",settingsQualityHDSelect:"Selecteer HD kwaliteit",settingsQualitySDFull:"Standard Definition (SD)",settingsQualitySD:"SD",settingsQualitySDSelect:"Selecteer SD kwaliteit",settingsHeadAd:"Audio descriptie",settingsAdOnFull:"Aan",settingsAdOnLabel:"Zet audio descriptie aan",settingsAdOn:"aan",settingsAdOffFull:"Uit",settingsAdOff:"uit",settingsAdOffLabel:"Zet audio descriptie uit",settingsHeadSubs:"Ondertiteling/CC",settingsHeadSpeed:"Snelheid",settingsHeadShare:"Delen",settingsHeadShortcuts:"Sneltoetsen",settingsHeadContext:"Context menu",settingsShareLink:"Url kopieren",linkIsCopiedSucces:"Link gekopiëerd",linkIsCopiedFailed:"Kopieren mislukt",settingsShareFacebook:"Delen op Facebook",settingsShareTwitter:"Delen op Twitter",settingsBackToHead:"Terug naar instellingen",settingsMenuLabel:"Video Player Settings",settingsMenuTitle:"INSTELLINGEN",settingsQualityTitle:"KWALITEIT",settingsAdTitle:"AUDIO DESCRIPTIE",settingsSubtitlesTitle:"ONDERTITELING",settingsSubtitlesTurnOn1:"Zet ",settingsSubtitlesTurnOn2:" ondertiteling aan",settingsSubtitlesTurnOff:"Zet ondertiteling uit",settingsSpeedTitle:"AFSPEELSNELHEID",settingsSpeed05label:"Afspeelsnelheid vertraagd keer 0.5",settingsSpeed1label:"Standaard afspeelsnelheid",settingsSpeed15label:"Afspeelsnelheid versneld keer 1.5",settingsSpeed2label:"Afspeelsnelheid versneld keer 2",playerIsPlayed:"Afspelen",playerIsPaused:"Gepauzeerd",playerIsMuted:"Zet geluid aan",statsTableHeaderAll:"Alle statistieken",statsTableHeaderAllEmpty:"Vernieuwen",statsTableHeaderSucces:"Succesvolle statistieken",statsTableHeaderError:"Mislukte statistieken",statsWarningText:"statistieken url is leeg, alles zal succesvol zijn",statsTableTh1:"Clipnaam",statsTableTh2:"Actie",statsTableTh3:"Aantal",settingsGoBackToSubSettings:"Ga terug naar ondertiteling instellingen",controlPlayLabelOn:"Afspelen (spatie)",controlPlayLabelOff:"Pauzeren (spatie)",control5SecBackLabel:"5 Sec. terug (<div class='pingVpReset pingVpLabelTriangle'></div>)",muteLabel:"Volume (m)",subtitlesLabel:"Ondertiteling (c)",shareLabel:"Delen (s)",transcriptLabel:"Transcript (T)",settingsLabel:"Instellingen",smallscreenLabel:"Sluit fullscreen (f)",fullscreenLabel:"Fullscreen (f)",adLabel:"Audio beschrijving (a)",controlAILabel:"Deze video bevat AI",transcriptTitle:"Transcript",shareModalTitle:"Video delen",shareCopyButton:"Kopieer URL",shareEmailSubject:"Ik zou graag deze link met je delen",shareCopyLabel:"Deelbare URL",shareLabelVia:"Deel via ",shareLabelOn:"Deel op ",aiModalTitle:"AI-inhoud",aiModalText:"Deze video bevat audio en/of beeld dat bewerkt of gegenereerd is door of met behulp van AI.",aiModalLink:"Meer lezen",shortcutModalTitle:"Toetsenbord sneltoetsen",shortcutModalM:"Geluid aan/uit",shortcutModalUp:"Volume omhoog",shortcutModalDown:"Volume omlaag",shortcutModalRight:"5 seconden vooruit",shortcutModalLeft:"5 seconden terug",shortcutModalSpace:"Afspelen/Pauzeren",shortcutModalF:"Volledig scherm",shortcutModalC:"Ondertiteling aan/uit",shortcutModalChevRight:"Sneller afspelen",shortcutModalChevLeft:"Langzamer afspelen",shortcutModalS:"Video delen",shortcutModalT:"Transcript tonen",shortcutModalA:"Audiobeschrijving",shortcutModalEsc:"Menu sluiten",altPosterPlay:"Video afspelen",altPosterPlay2:"Klik hier om te kijken.",altControlbarPlay:"Video afspelen",altControlbarPause:"Video pauzeren",altControlbar5sec:"5 seconden terug",altControlbarSoundOn:"Geluid uit",altControlbarSoundOff:"Geluid aan",altControlbarSubtitle:"Ondertitelmenu openen",altControlbarSubtitleOff:"Ondertitelmenu sluiten",altControlbarShare:"Deelmenu openen",altControlbarShareOff:"Deelmenu sluiten",altControlbarSettings:"Instellingenmenu openen",altControlbarSettingsOff:"Instellingenmenu sluiten",altControlbarFullscreen:"Video openen in volledig scherm",altControlbarSmallscreen:"Volledig scherm afsluiten",altControlbarAdOn:"Audiobeschrijving aan",altControlbarAdOff:"Audiobeschrijving uit",altControlbarAIOn:"AI-beschrijving openen",altControlbarAIOff:"AI-beschrijving sluiten",altControlbarTranscriptOn:"Transcript sluiten",altControlbarTranscriptOff:"Transcript openen",collapsibleTranscriptTitle:"Transcript",collapsibleTranscriptLabelOff:"Transcript openen",collapsibleTranscriptLabelOn:"Transcript sluiten",sliderTimeLabel:"Tijdregeling",sliderTimeBackground:"Tijdachtergrond",sliderTimeBuffer:"Tijdbuffer",sliderTimeForeground:"Tijdvoorgrond",sliderVolumeLabel:"Volumeregeling",sliderVolumeBackground:"Volumeachtergrond",sliderVolumeBuffer:"Volumebuffer",sliderVolumeForeground:"Volumevoorgrond",closeModalImg:"Venster sluiten",selectColorWhite:"Kies wit",selectColorYellow:"Kies geel",selectColorGreen:"Kies groen",selectColorCyan:"Kies cyaan",selectColorBlue:"Kies blauw",selectColorMagenta:"Kies magenta",selectColorRed:"Kies rood",selectColorBlack:"Kies zwart",selectOpacity0:"Zet doorzichtigheid naar 0 procent",selectOpacity25:"Zet doorzichtigheid naar 25 procent",selectOpacity50:"Zet doorzichtigheid naar 50 procent",selectOpacity75:"Zet doorzichtigheid naar 75 procent",selectOpacity100:"Zet doorzichtigheid uit",selectFontSize50:"Zet tekst grootte naar 50 procent",selectFontSize100:"Zet tekst grootte naar normaal",selectFontSize150:"Zet tekst grootte naar 150 procent",selectFontSize200:"Zet tekst grootte naar 200 procent",selectFontFamily:"Zet lettertype op ",selectOutline:"Zet rand op ",selectBlurOff:"Zet blur uit",selectBlurOn:"Zet blur aan",announcePause:"Video gepauzeerd",announceReplay:"Video opnieuw afspelen",announcePlay:"Video afspelen",announce5SecBack:"Video 5 seconden terugspoelen",announce5SecForward:"Video 5 seconden vooruitspoelen",announceSoundMuted:"Geluid uit",announceSoundUnmuted:"Geluid aan",announceSoundLower:"Geluid zachter",announceSoundHigher:"Geluid harder",announceSoundPercentage:"Geluid naar ",announceFullscreen:"Video afspelen in volledig scherm",announceWindowed:"Video afspelen in venstermodus",announceSubOn:"Ondertiteling aan",announceSubOff:"Ondertiteling uit",announceSpeed0:"Snelheid terug naar normaal",announceSpeed1:"Snelheid verlaagd naar de helft",announceSpeed2:"Snelheid verhoogd naar anderhalf keer normaal",announceSpeed3:"Snelheid verdubbeld",announceShareModal:"Video delen pop-up openen",announceAdOff:"Audiobeschrijving uit",announceAdOn:"Audiobeschrijving aan",announceButton:"Video toont knop",announceCloseMenu:"Menu sluiten",announceCloseModal:"Pop-up sluiten",timeSliderAccesLabel:"Tijdregelaar",timeSliderAltForeground:"afgespeeld",timeSliderAltBuffer:"gebuffered"}}};$hxClasses["pingvp.PingVpLanguage"]=pingvp_PingVpLanguage;pingvp_PingVpLanguage.__name__=["pingvp","PingVpLanguage"];pingvp_PingVpLanguage.prototype={get:function(key){return Reflect.field(this._text,key)},getLanguage:function(){return this._language},checkLanguage:function(language){if(language.toLowerCase()=="french"||language.toLowerCase()=="fr"||language.toLowerCase()=="frans"){return"fr"}else{if(language.toLowerCase()=="deutsch"||language.toLowerCase()=="de"||language.toLowerCase()=="duits"){return"de"}else{if(language.toLowerCase()=="english"||language.toLowerCase()=="en"||language.toLowerCase()=="engels"){return"en"}else{return"nl"}}}},__class__:pingvp_PingVpLanguage};var pingvp_PingVpLoader=function(videoOid,node,scriptName,hash,iv,debug,language,startFragment,startSubs,select,controlsBelowVideo,controlsDisable,isFramed,autoStart,autoHeight,inOverlayPlay,inlinePlay,pingVpFunctions){var _gthis=this;this._language=language;this._startFragment=startFragment;this._startSubs=startSubs;this._videoOid=videoOid;this._node=node;this._debug=debug;this._select=select;this._controlsBelowVideo=controlsBelowVideo;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._controlsBelowVideo=false}this._controlsDisable=controlsDisable;this._isFramed=isFramed;this._autoStart=autoStart;this._autoHeight=autoHeight;this._inOverlayPlay=inOverlayPlay;this._inlinePlay=inlinePlay;this._playerUri=pingvp_PingVpConfigRead.get().playerUri;this._videoScriptsUri=pingvp_PingVpConfigRead.get().videoScriptsUri;this._videosUri=pingvp_PingVpConfigRead.get().videosUri;this._imagesUri=pingvp_PingVpConfigRead.get().imagesUri;this._postersUri=pingvp_PingVpConfigRead.get().postersUri!=null?pingvp_PingVpConfigRead.get().postersUri:pingvp_PingVpConfigRead.get().videosUri;this._eventLogUri=pingvp_PingVpConfigRead.get().eventLogUri;this._scriptName=scriptName;this._hash=hash;this._iv=iv;this._responsiveWidth=16;this._responsiveHeight=9;this._posterRemove=false;this._displayHtmlOverview=false;this._pingVpFunctions=pingVpFunctions;this._pingVpFunctions.setResize($bind(this,this.onResize));this._keys=new pingvp_PingVpKeyFunctions(this._videoOid);this._keysControlbar=new pingvp_PingVpKeyFunctions(this._videoOid);this._keysSettingsMenu=new pingvp_PingVpKeyFunctions(this._videoOid);this._keysSubtitlesMenu=new pingvp_PingVpKeyFunctions(this._videoOid);this._keysShareMenu=new pingvp_PingVpKeyFunctions(this._videoOid);this._text=new pingvp_PingVpLanguage(language);this._statsOverview=$('.pingVpStatsOverview[data-video="'+this._scriptName+'"]');if(this._statsOverview.length>0){if(this._statsOverview.find("tbody").length==0){this._statsOverview.append('<h2 class="pingVpReset pingVpHeaderTable">'+this._text.get("statsTableHeaderAll")+'<span class="pingVpReset">'+this._text.get("statsTableHeaderAllEmpty")+'</span></h2><table class="pingVpReset pingVpStatsSuccesTable pingVpTable"><thead class="pingVpReset"><tr class="pingVpReset"><th class="pingVpReset">'+this._text.get("statsTableTh1")+'</th><th class="pingVpReset">'+this._text.get("statsTableTh2")+'</th></thead><tbody class="pingVpReset"></tbody></table>');this._statsOverviewTable=this._statsOverview.find("tbody");this._statsOverview.find(".pingVpHeaderTable span").on("click",null,function(e){_gthis._statsOverviewTable.html("")})}else{this._statsOverviewTable=this._statsOverview.find("tbody")}this._displayHtmlOverview=true}this._videoScript=new pingvp_PingVpVideoScriptSelect(this._videoOid,this._videoScriptsUri,this._hash,this._iv);this._videoScript.select(this._scriptName,$bind(this,this.onSuccess),$bind(this,this.onFailed))};$hxClasses["pingvp.PingVpLoader"]=pingvp_PingVpLoader;pingvp_PingVpLoader.__name__=["pingvp","PingVpLoader"];pingvp_PingVpLoader.prototype={onSuccess:function(){var _gthis=this;if(this._node.find(".pingVpOverlayPlayContainer").length!=0){return}this._debug=this._videoScript.script().checktHeader("debug")?this._videoScript.script().getHeaderDebug():this._debug;this._select=this._videoScript.script().checktHeader("select")?this._videoScript.script().getHeaderSelect():this._select;this._controlsBelowVideo=this._videoScript.script().checktHeader("controls")?this._videoScript.script().getHeaderControlsBelow():this._controlsBelowVideo;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._controlsBelowVideo=false}this._controlsDisable=this._videoScript.script().checktHeader("controls")?this._videoScript.script().getHeaderControlsDisable():this._controlsDisable;this._autoStart=this._videoScript.script().checktHeader("autoStart")?this._videoScript.script().getHeaderAutoStart():this._autoStart;if(this._startFragment==""||this._videoScript.script().checkFragment(this._startFragment)==false){this._startFragment=this._videoScript.script().getHeaderStart()}this._autoHeight=this._videoScript.script().checktHeader("autoHeight")?this._videoScript.script().getHeaderAutoHeight():this._autoHeight;this._inOverlayPlay=this._videoScript.script().checktHeader("overlayPlay")?this._videoScript.script().getHeaderOverlayPlay():this._inOverlayPlay;this._inlinePlay=this._videoScript.script().checktHeader("inlinePlay")?this._videoScript.script().getHeaderInlinePlay():this._inlinePlay;if(this._isFramed){this._inOverlayPlay=false}this._events=new pingvp_PingVpEvents(this._videoOid,new pingvp_PingVpDebug(this._debug),this._eventLogUri,this._videoScript.script().getHeaderUuid(),this._videoScript.script().getHeaderTitle(),this._videoScript.name(),this._text);this.event("Video script loaded",this._videoScript.script().getHeaderStart());this._responsiveWidth=this._videoScript.script().getHeaderFloatHelper("responsiveWidth",16);this._responsiveHeight=this._videoScript.script().getHeaderFloatHelper("responsiveHeight",9);this.onResize(null);$(window).on("orientationchange resize",null,function(e){_gthis.onResize(e)});this._theme=new pingvp_PingVpTheme(this._videoScript.script().getShowPlay(),this._controlsBelowVideo,this._videoScript.script().getHeaderTheme());this._theme.set("defaultcolor",this._videoScript.script().getHeaderDefaultColor());this._theme.set("hovercolor",this._videoScript.script().getHeaderHoverColor());if(this._inlinePlay){this._inOverlayPlay=false;this._autoStart=true;new pingvp_PingVpStyle(this._playerUri+"styles/pingvp.min.css","pingVpPlayerStyle");this._container=new pingvp_PingVpVideoContainer(this._videoOid,this._node,this._controlsBelowVideo,false,this._videoScript.script());this._focus=new pingvp_PingVpFocus(this._videoOid,this._node);var posterWidth=this._videoScript.script().getHeaderFloatHelper("posterWidth",16);var posterHeight=this._videoScript.script().getHeaderFloatHelper("posterHeight",9);var headerPoster=this._postersUri+this._videoScript.script().getHeaderPoster();var headerThemeBase=this._playerUri+"themes/"+this._videoScript.script().getHeaderTheme()+"/";var accessibilityTitlePoster=this._videoScript.script().getHeaderHelper("accessibilityTitlePoster","");var seo=this._videoScript.script().getSeo();this._overlayPlayPoster=new pingvp_PingVpOverlayPlayPoster(this._videoOid,this._node,this._container,headerPoster,"play_button_thumb",this._controlsBelowVideo?40:0,posterWidth,posterHeight,this._theme,this._text,accessibilityTitlePoster,seo);this._overlayPlayPoster.setClickHandler($bind(this,this.onInlinePlayPosterClick));this.onResize(null);this._pingVpClick=new pingvp_PingVpClick(this._videoOid,this._videoScript.name(),$bind(this,this.onInlinePlayPosterClick),$bind(this,this.onPingVpClickPause))}else{if(this._inOverlayPlay){new pingvp_PingVpStyle(this._playerUri+"styles/pingvp.min.css","pingVpPlayerStyle");this._container=new pingvp_PingVpVideoContainer(this._videoOid,$("body"),this._controlsBelowVideo,true,this._videoScript.script());this._container.hide();this._focus=new pingvp_PingVpFocus(this._videoOid,this._node);var posterWidth1=this._videoScript.script().getHeaderFloatHelper("posterWidth",16);var posterHeight1=this._videoScript.script().getHeaderFloatHelper("posterHeight",9);var headerPoster1=this._postersUri+this._videoScript.script().getHeaderPoster();var headerThemeBase1=this._playerUri+"themes/"+this._videoScript.script().getHeaderTheme()+"/";var accessibilityTitlePoster1=this._videoScript.script().getHeaderHelper("accessibilityTitlePoster","");var seo1=this._videoScript.script().getSeo();this._overlayPlayPoster=new pingvp_PingVpOverlayPlayPoster(this._videoOid,this._node,this._container,headerPoster1,"play_button_thumb",this._controlsBelowVideo?40:0,posterWidth1,posterHeight1,this._theme,this._text,accessibilityTitlePoster1,seo1);this._overlayPlayPoster.setClickHandler($bind(this,this.onOverlayPlayPosterClick));this.onResize(null);this._pingVpClick=new pingvp_PingVpClick(this._videoOid,this._videoScript.name(),$bind(this,this.onOverlayPlayPosterClick),$bind(this,this.onPingVpClickPause))}else{this._container=new pingvp_PingVpVideoContainer(this._videoOid,this._node,this._controlsBelowVideo,false,this._videoScript.script());this._focus=new pingvp_PingVpFocus(this._videoOid,this._node);this.onResize(null);this.load()}}},onPingVpClickPlay:function(){},onPingVpClickPause:function(){},newOnPingVpClickPlay:function(){this.event("Inline play poster click",this._videoScript.script().getHeaderStart());this._container.setResponsiveSize(this._responsiveWidth,this._responsiveHeight);this._container.show();this._overlayPlayPoster.removePoster();this.load()},onVideoBuffered:function(videoName){this._overlayPlayPoster.removePoster()},onInlinePlayPosterClick:function(){this.event("Inline play poster click",this._videoScript.script().getHeaderStart());this._container.setResponsiveSize(this._responsiveWidth,this._responsiveHeight);this._container.show();this.load($bind(this,this.onVideoBuffered));this._pingVpClick.onPingVpClickPlay($bind(this,this.onPingVpClickPlay))},onOverlayPlayPosterClick:function(){var _gthis=this;this.event("Overlay play poster click",this._videoScript.script().getHeaderStart());this._videoScript.select(this._scriptName,function(){_gthis._container.setResponsiveSize(_gthis._responsiveWidth,_gthis._responsiveHeight);_gthis._container.enableOverlayPlay($bind(_gthis,_gthis.onOverlayPlayReturn));_gthis._container.show();_gthis.load()},function(){})},onOverlayPlayReturn:function(){this.event("Overlay play return",this._videoScript.script().getHeaderStart());this._container.hide();if(this._player!=null){this._player.cleanup();this._player=null}if(this._canvasPlayer!=null){this._canvasPlayer.cleanup();this._canvasPlayer=null}if(this._fallbackPlayer!=null){this._fallbackPlayer.cleanUp();this._fallbackPlayer=null}if(this._inlineFrame!=null){this._inlineFrame.cleanUp();this._inlineFrame=null}},load:function(call){if(this._videoScript.script().checktHeader("responseCode")){var responseCode=this._videoScript.script().getHeaderFloatHelper("responseCode",0);if(responseCode==101){var responseImage=this._imagesUri+this._videoScript.script().getHeaderHelper("responseImage","");var fallbackImageWidth=this._videoScript.script().getHeaderFloatHelper("fallbackImageWidth",16);var fallbackImageHeight=this._videoScript.script().getHeaderFloatHelper("fallbackImageHeight",9);new pingvp_PingVpFallBackImage(this._videoOid,this._node,responseImage,fallbackImageWidth,fallbackImageHeight);return}}if(!this._isFramed&&this._select=="iframe"){this.loadInlineFrame();return}var disabledList=[];if(!this._videoScript.script().getHeaderBoolHelper("canvasEnabled")){disabledList.push(3)}if(pingvp_PingVpUserAgentSelect.select(disabledList)){var _g=pingvp_PingVpUserAgentSelect.player;switch(_g){case 1:this.loadSelectPlayer(call);return;case 2:this.loadHtml5(call);return;case 3:this.loadCanvas(call);return;case 4:if(!this.loadFallbackPlayer()){new pingvp_PingVpStyle(this._playerUri+"styles/pingvp.min.css","pingVpPlayerStyle");this.fallbackImg()}return}}if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpod()||pingvp_PingVpDevice.isBlackBerry()||pingvp_PingVpDevice.isWindowsPhone()||pingvp_PingVpDevice.isSymbian()){if(!this.loadFallbackPlayer()){new pingvp_PingVpStyle(this._playerUri+"styles/pingvp.min.css","pingVpPlayerStyle");this.fallbackImg()}return}if(this._videoScript.script().getHeaderBoolHelper("canvasEnabled")&&(pingvp_PingVpDevice.isIphone()||this._select=="canvas")){this.loadCanvas();return}if(pingvp_PingVpDevice.isIpad()){if(!!document.createElement("video").canPlayType){this.loadHtml5(call)}return}this.loadSelectPlayer(call)},loadSelectPlayer:function(call){this.loadHtml5(call)},loadHtml5:function(call){if(!!document.createElement("video").canPlayType){this.event("HTML5 selected",this._videoScript.script().getHeaderStart());this._player=new pingvp_PingVpPlayer(this._debug,this._videoOid,this._node,this._container,this._text,this._videoScript,this._controlsBelowVideo,this._controlsDisable,this._startFragment,null,this._events,this._autoStart,this._inOverlayPlay,this._inlinePlay,call,this._pingVpFunctions,this._keys,this._keysControlbar,this._keysSettingsMenu,this._keysSubtitlesMenu,this._keysShareMenu)}else{new pingvp_PingVpStyle(this._playerUri+"styles/pingvp.min.css","pingVpPlayerStyle");this.fallbackImg()}},loadCanvas:function(call){this.event("Canvas selected",this._videoScript.script().getHeaderStart());this._canvasPlayer=new pingvp_PingVpCanvasPlayer(this._debug,this._videoOid,this._node,this._container,this._text,this._videoScript,this._controlsBelowVideo,this._controlsDisable,this._startFragment,null,this._events,this._autoStart,this._inOverlayPlay,this._inlinePlay,call,this._pingVpFunctions,this._keys,this._keysControlbar,this._keysSettingsMenu,this._keysSubtitlesMenu,this._keysShareMenu)},loadInlineFrame:function(){this.event("Iframe selected",this._videoScript.script().getHeaderStart());var tmp=this._container.get().get(0);var tmp1=this._videoOid;var s=this._scriptName;var tmp2=this._playerUri+"embed.php?video="+encodeURIComponent(s)+"&debug=";var s1=this._language;var tmp3=tmp2+(this._debug?"true":"false")+"&language="+encodeURIComponent(s1)+"&select=";var s2=this._select;var tmp4=tmp3+encodeURIComponent(s2)+"&controls=";var s3=this._startFragment;this._inlineFrame=new pingvp_InlineFrame(tmp,tmp1,tmp4+(this._controlsBelowVideo?"below":"fade")+"&startfragment="+encodeURIComponent(s3))},loadFallbackPlayer:function(){if(!this._videoScript.script().checktHeader("fallbackPoster")&&this._videoScript.script().getHeaderFallbackPoster()!=""){return false}var poster=this._videosUri+this._videoScript.script().getHeaderFallbackPoster();this.event("Fallback player selected",this._videoScript.script().getHeaderStart());var UrlMp4="";if(this._videoScript.script().checktHeader("fallbackVideoMp4")&&this._videoScript.script().getHeaderFallbackMp4()!=""){UrlMp4=this._videosUri+this._videoScript.script().getHeaderFallbackMp4()}var UrlWebm="";if(this._videoScript.script().checktHeader("fallbackVideoWebm")&&this._videoScript.script().getHeaderFallbackWebm()!=""){UrlWebm=this._videosUri+this._videoScript.script().getHeaderFallbackWebm()}var UrlOgg="";if(this._videoScript.script().checktHeader("fallbackVideoOgv")&&this._videoScript.script().getHeaderFallbackOgv()!=""){UrlOgg=this._videosUri+this._videoScript.script().getHeaderFallbackOgv()}var UrlFallbackImg="";if(this._videoScript.script().checktHeader("fallbackImage")&&this._videoScript.script().getHeaderFallbackImage()!=""){UrlFallbackImg=this._videosUri+this._videoScript.script().getHeaderFallbackImage()}this._fallbackPlayer=new pingvp_fallbackplayer_FallbackVideo(this._container.get().get(0),this._videoOid,poster,UrlMp4,UrlWebm,UrlOgg,UrlFallbackImg);return true},onFailed:function(){this.onResize(null);$(window).resize($bind(this,this.onResize));$(window).on("orientationchange",null,$bind(this,this.onResize));new pingvp_PingVpStyle(this._playerUri+"styles/pingvp.min.css","pingVpPlayerStyle");new pingvp_PingVpFailure(this._node,this._text.get("generalError"))},event:function(action,videoName){if(this._events==null){return}if(this._displayHtmlOverview){this._statsOverviewTable.prepend('<tr class="pingVpReset"><td class="pingVpReset">'+this._videoScript.script().getFragmentVideoTitle(videoName)+'</td><td class="pingVpReset">'+action+"</td></tr>")}this._events.pushAction(this._videoScript.script().getFragmentVideoUuid(videoName),this._videoScript.script().getFragmentVideoTitle(videoName),action,-1,"")},onResize:function(e){if(this._autoHeight){var nodeHeight=this._node.width()*this._responsiveHeight/this._responsiveWidth+(this._controlsBelowVideo?40:0);this._node.height(nodeHeight)}var width=this._node.width();var height=width*this._responsiveHeight/this._responsiveWidth;var nodeHeight1=height+(this._controlsBelowVideo?40:0);if((this._inlinePlay||this._inOverlayPlay)&&this._overlayPlayPoster!=null){this._overlayPlayPoster.resize(this._controlsBelowVideo?40:0)}if(this._container!=null){this._container.resize()}if(this._fallbackPlayer!=null){this._fallbackPlayer.resize(this._container.get().width(),this._container.get().height())}if(this._inlineFrame!=null){this._inlineFrame.resize(this._container.get().width(),this._container.get().height())}},fallbackImg:function(){if(this._videoScript.script().checktHeader("fallbackImage")){var UrlFallbackImg=this._imagesUri+this._videoScript.script().getHeaderFallbackImage();var fallbackImageWidth=this._videoScript.script().getHeaderFloatHelper("fallbackImageWidth",16);var fallbackImageHeight=this._videoScript.script().getHeaderFloatHelper("fallbackImageHeight",9);new pingvp_PingVpFallBackImage(this._videoOid,this._node,UrlFallbackImg,fallbackImageWidth,fallbackImageHeight)}else{new pingvp_PingVpFailure(this._node,this._text.get("unsuportedDevice"))}},__class__:pingvp_PingVpLoader};var pingvp_PingVpLoop=function(loop){this._loop=loop};$hxClasses["pingvp.PingVpLoop"]=pingvp_PingVpLoop;pingvp_PingVpLoop.__name__=["pingvp","PingVpLoop"];pingvp_PingVpLoop.prototype={start:function(){return this.getFloatField("position")},seek:function(){return this.getFloatField("seekTo")},action:function(){return this.getStringField("command")},getStringField:function(field){if(this._loop==null){return null}var value=Reflect.field(this._loop,field);if(value==null){return null}return Std.string(value)},getFloatField:function(field){if(this._loop==null){return null}var ret=Reflect.field(this._loop,field);return ret},isLooping:function(){return this._looping},setLooping:function(value){return this._looping=value},__class__:pingvp_PingVpLoop};var pingvp_PingVpMessages=function(videoOid,theme,width,height,pixels){this._videoOid=videoOid;this._theme=theme;this._overlay=$("#pingVpOverlay-"+this._videoOid);this._overlay.append('<div id="pingVpMessageOverlay-'+videoOid+'" class="pingVpMessageOverlay"><div id="pingVpMessage-'+videoOid+'-left" class="pingVpMessage pingVpMessagePositionLeft"></div><div id="pingVpMessage-'+videoOid+'-center" class="pingVpMessage pingVpMessagePositionCenter"></div><div id="pingVpMessage-'+videoOid+'-right" class="pingVpMessage pingVpMessagePositionRight"></div></div>');this._messageOverlay=$("#pingVpMessageOverlay-"+this._videoOid);this._messageOverlay.css("width",width);this._messageOverlay.css("height",height-pixels);this._messageLeft=$("#pingVpMessage-"+this._videoOid+"-left");this._messageCenter=$("#pingVpMessage-"+this._videoOid+"-center");this._messageRight=$("#pingVpMessage-"+this._videoOid+"-right")};$hxClasses["pingvp.PingVpMessages"]=pingvp_PingVpMessages;pingvp_PingVpMessages.__name__=["pingvp","PingVpMessages"];pingvp_PingVpMessages.prototype={instantMessage:function(messageName,messageText,messageDuration,messagePosition){var _gthis=this;if($("#pingVpMessage-"+messageName+"-"+this._videoOid).length==0){if(messagePosition=="left"){this._selectedPosition=this._messageLeft}else{if(messagePosition=="right"){this._selectedPosition=this._messageRight}else{if(messagePosition=="center_center"){this._selectedPosition=this._messageCenter}else{this._selectedPosition=this._messageCenter}}}this._selectedPosition.append('<div id="pingVpMessage-'+messageName+"-"+this._videoOid+'" class="pingVpMessageBlock"><div class="pingVpMessageText">'+messageText+"</div>");this._selectedElement=$("#pingVpMessage-"+messageName+"-"+this._videoOid);this._selectedElement.find(".pingVpMessageText").css("background-color","#"+this._theme.getByKey("menucolor")).css("color","#"+this._theme.getByKey("defaultcolor"));this._selectedElement.stop().css("display","block").animate({opacity:1},600,null,function(){if(messageDuration!=0){haxe_Timer.delay(function(){_gthis._selectedAfterTimer=$("#pingVpMessage-"+messageName+"-"+_gthis._videoOid);_gthis._selectedAfterTimer.stop().animate({opacity:0},600,null,function(){_gthis._selectedAfterTimer.css("display","none")})},messageDuration)}})}},setMessage:function(messageName,content,messagePosition,isIcon){if($("#pingVpMessage-"+messageName+"-"+this._videoOid).length==0){if(messagePosition=="left"){this._selectedPosition=this._messageLeft}else{if(messagePosition=="right"){this._selectedPosition=this._messageRight}else{if(messagePosition=="center_center"){this._selectedPosition=this._messageCenter}else{this._selectedPosition=this._messageCenter}}}if(isIcon!=null&&isIcon){this._centerClass="";if(messagePosition=="center_center"){this._centerClass="pingVpMessageCenterCenter"}this._content=this._theme.getIcon(this._theme.getByKey("svgset"),content+".svg",this._theme.getByKey("defaultcolor"));this._selectedPosition.append('<div id="pingVpMessage-'+messageName+"-"+this._videoOid+'" class="pingVpMessageBlock"><div class="pingVpMessageText pingVpMessageIcon '+this._centerClass+'"><img class="pingVpResetSvg" src="'+this._content+'"/></div>')}else{this._content=content;this._selectedPosition.append('<div id="pingVpMessage-'+messageName+"-"+this._videoOid+'" class="pingVpMessageBlock"><div class="pingVpMessageText">'+this._content+"</div>")}this._selectedElement=$("#pingVpMessage-"+messageName+"-"+this._videoOid);this._selectedElement.css("opacity",0.7);this._selectedElement.find(".pingVpMessageText").css("background-color","#"+this._theme.getByKey("menucolor")).css("color","#"+this._theme.getByKey("defaultcolor"));this._selectedElement.hide()}},onClickClose:function(messageName,call,hideOnClick){var _gthis=this;this._selectedElement=$("#pingVpMessage-"+messageName+"-"+this._videoOid+" .pingVpMessageText");this._selectedElement.addClass("pingVpMessageBlockClickable");this._selectedElement.attr("tabindex","0");this._selectedElement.on("click",null,function(e){if(call!=null){call()}if(hideOnClick){_gthis.hideImmediatelyMessage(messageName)}})},showMessage:function(messageName,messageDuration){var _gthis=this;this._selectedElement=$("#pingVpMessage-"+messageName+"-"+this._videoOid);this._selectedElement.stop().css("display","block").animate({opacity:1},600,null,function(){if(messageDuration!=0){haxe_Timer.delay(function(){_gthis._selectedAfterTimer=$("#pingVpMessage-"+messageName+"-"+_gthis._videoOid);_gthis._selectedAfterTimer.stop().animate({opacity:0},600,null,function(){_gthis._selectedAfterTimer.css("display","none")})},messageDuration)}else{_gthis._selectedAfterTimer=$("#pingVpMessage-"+messageName+"-"+_gthis._videoOid);_gthis._selectedAfterTimer.stop().animate({opacity:0},600,null,function(){_gthis._selectedAfterTimer.css("display","none")})}})},showIconMessage:function(messageName,messageDuration){var _gthis=this;this._selectedElement=$("#pingVpMessage-"+messageName+"-"+this._videoOid);this._selectedElement.stop().css("display","block").css("opacity",0.7).addClass("pingVpMessageIconGrow").animate({opacity:0},600,null,function(){_gthis._selectedElement.css("display","none").css("opacity",0.7).removeClass("pingVpMessageIconGrow")})},showImmediatelyMessage:function(messageName){this._selectedElement=$("#pingVpMessage-"+messageName+"-"+this._videoOid);this._selectedElement.stop().css("display","block").css("opacity",1)},hideMessage:function(messageName){var _gthis=this;this._selectedElement=$("#pingVpMessage-"+messageName+"-"+this._videoOid);this._selectedElement.stop().animate({opacity:0},600,null,function(){_gthis._selectedElement.css("display","none")})},hideImmediatelyMessage:function(messageName){this._selectedElement=$("#pingVpMessage-"+messageName+"-"+this._videoOid);this._selectedElement.stop().css("display","none").css("opacity",0)},resize:function(width,height,pixels){var percent=100*this._overlay.outerWidth()/640;this._messageOverlay.css("font-size",percent+"%");this._messageOverlay.css("width",width);this._messageOverlay.css("height",height-pixels)},isShown:function(messageName){this._selectedElement=$("#pingVpMessage-"+messageName+"-"+this._videoOid);if(this._selectedElement.css("display")=="none"){return false}else{return true}},__class__:pingvp_PingVpMessages};var pingvp_PingVpMobileFunctions=function(node,videoOid,videoScript){this._node=node;this._videoOid=videoOid;this._scriptTitle=videoScript.getHeaderTitle();this._scriptPoster=videoScript.getHeaderPoster();this._postersUri=pingvp_PingVpConfigRead.get().postersUri!=null?pingvp_PingVpConfigRead.get().postersUri:pingvp_PingVpConfigRead.get().videosUri;var fullPosterPath=this._postersUri+this._scriptPoster;if("mediaSession" in navigator){navigator.mediaSession.metadata=new MediaMetadata({title:this._scriptTitle,artist:"PingVP",artwork:[{src:fullPosterPath,sizes:"96x96",type:"image/jpg"},{src:fullPosterPath,sizes:"128x128",type:"image/jpg"},{src:fullPosterPath,sizes:"192x192",type:"image/jpg"},{src:fullPosterPath,sizes:"256x256",type:"image/jpg"},{src:fullPosterPath,sizes:"384x384",type:"image/jpg"},{src:fullPosterPath,sizes:"512x512",type:"image/jpg"}]})}};$hxClasses["pingvp.PingVpMobileFunctions"]=pingvp_PingVpMobileFunctions;pingvp_PingVpMobileFunctions.__name__=["pingvp","PingVpMobileFunctions"];pingvp_PingVpMobileFunctions.prototype={__class__:pingvp_PingVpMobileFunctions};var pingvp_PingVpOverlay=function(videoOid,container,enableOverlay,defaultColor,hoverColor,controlsBelowVideo){var _gthis=this;this._isActive=false;container.get().append('<div id="pingVpOverlay-'+videoOid+'" class="pingVpOverlay pingVpReset"></div>');this._videoOid=videoOid;this._container=container;this._overlay=$("#pingVpOverlay-"+videoOid);this._overlay.hide();this._checkDiv=$("#pingVpOverlayPlayContainer-"+videoOid);this._body=$("body");this._body.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onNonActive));this._body.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onActiveHover));this._overlay.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onActive));this._defaultColor=defaultColor;if(this._defaultColor==null||this._defaultColor==""){this._defaultColor="fff"}this._hoverColor=hoverColor;if(this._hoverColor==null||this._hoverColor==""){this._hoverColor="c6c6c6"}this._controlsBelowVideo=controlsBelowVideo;if(enableOverlay==true){this._overlay.append('<div id="pingVpCloseOverlayButton-'+videoOid+'" tabindex="0" class="pingVpCloseOverlayButton"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 600 600" style="enable-background:new 0 0 600 600;" xml:space="preserve"><polygon class="pingVpCloseIcon" points="521.5,111.7 520.4,110.3 381.7,110.3 300.6,212.5 219.5,110.3 78.5,110.3 230.1,301.4 80.7,489.8 221.7,489.8 300.6,390.3 379.4,489.8 520.4,489.8 371,301.4 520.4,113.1 " fill="#'+this._defaultColor+'"/></svg></div>');this._closeOverlayButton=$("#pingVpCloseOverlayButton-"+videoOid);if(this._closeOverlayButton.find("polygon").length!=0){this._svgTag="polygon"}else{if(this._closeOverlayButton.find("path").length!=0){this._svgTag="path"}else{this._svgTag=""}}this._closeOverlayButton.css("display","none");this._closeOverlayButton.css("opacity",0);this._overlay.mousemove($bind(this,this.onShow));this._overlayPlayBgJq=$("#pingVpOverlayPlayBg-"+videoOid);this._overlayPlayContainer=$("#pingVpOverlayPlayContainer-"+videoOid);this._closeOverlayButton.click($bind(this,this.onDisable));this._closeOverlayButton.hover(function(e){_gthis._closeOverlayButton.find(_gthis._svgTag+".pingVpCloseIcon").attr("fill","#"+_gthis._hoverColor)},function(e1){_gthis._closeOverlayButton.find(_gthis._svgTag+".pingVpCloseIcon").attr("fill","#"+_gthis._defaultColor)})}};$hxClasses["pingvp.PingVpOverlay"]=pingvp_PingVpOverlay;pingvp_PingVpOverlay.__name__=["pingvp","PingVpOverlay"];pingvp_PingVpOverlay.prototype={get:function(){return this._overlay},getActive:function(){return this._isActive},setActive:function(isActive){if(isActive){this._checkDiv.addClass("pingVpActive-"+this._videoOid)}else{this._checkDiv.removeClass("pingVpActive-"+this._videoOid)}this._isActive=isActive},setCloseButton:function(funCleanUp){this._funCleanUp=funCleanUp;this._closeOverlayButton.click($bind(this,this.onDisable))},onActive:function(e){this._checkDiv.addClass("pingVpActive-"+this._videoOid);this._isActive=true;var _currentClicked=$(e.target);if(_currentClicked.parents(".pingVpMessageText").length==0&&(_currentClicked.parents(".pingVpBlock").length==0||_currentClicked.parents(".pingVpBlock").length!=0&&_currentClicked.parents(".pingVpBlock").hasClass("pingVpBlockName-text"))&&!_currentClicked.hasClass("pingVpPosterPlayButton")&&!_currentClicked.hasClass("pingVpPoster")&&!_currentClicked.hasClass("pingVpMessageBlockClickable")&&!_currentClicked.hasClass("pingVpShareOverlay")&&!_currentClicked.hasClass("pingVpShortcutOverlay")&&_currentClicked.parents(".pingVpSettingsMenu").length==0&&_currentClicked.parents(".pingVpSubtitlesMenu").length==0&&_currentClicked.parents(".pingVpShareOverlay").length==0&&_currentClicked.parents(".pingVpShortcutOverlay").length==0&&_currentClicked.parents(".pingVpControlBar").length==0&&(!_currentClicked.hasClass("pingVpBlock")||_currentClicked.hasClass("pingVpBlock")&&_currentClicked.hasClass("pingVpBlockName-text"))&&_currentClicked.parents(".pingVpCloseOverlayButton").length==0&&!_currentClicked.hasClass("pingVpCloseOverlayButton")){if(this._onScreenClick!=null){this._onScreenClick()}}},onActiveHover:function(e){this._checkClick=$(e.target);if(this._checkClick.attr("id")=="pingVpOverlayPlay-"+this._videoOid||this._checkClick.attr("id")=="pingVpOverlayPlayButton-"+this._videoOid){this._checkDiv.addClass("pingVpActive-"+this._videoOid);this._isActive=true}},onNonActive:function(e){this._checkClick=$(e.target);if(this._checkClick.attr("id")!="pingVpVideoContainer-"+this._videoOid&&this._checkClick.attr("id")!="pingVpPosterPlayButton-"+this._videoOid&&this._checkClick.attr("id")!="pingVpOverlayPlayButton-"+this._videoOid&&this._checkClick.attr("id")!="pingVpOverlayPlay-"+this._videoOid&&this._checkClick.attr("id")!="pingVpPoster-"+this._videoOid&&this._checkClick.parents("#pingVpVideoContainer-"+this._videoOid).length==0&&this._checkClick.parents("#pingVpOverlay-"+this._videoOid).length==0&&this._checkClick.parents("#pingVpContextMenu-"+this._videoOid).length==0){this._checkDiv.removeClass("pingVpActive-"+this._videoOid);this._isActive=false}},onDisable:function(e){if(this._onFullScreenClose!=null&&this._controlBar.isFullScreen()){this._onFullScreenClose()}this._overlayPlayBgJq.css("display","none");this._overlayPlayContainer.css("top","0");this._overlayPlayContainer.css("left","0");this._overlayPlayContainer.css("width","100%");this._overlayPlayContainer.css("height","100%");this._overlayPlayContainer.css("position","relative");this._overlayPlayContainer.css("zIndex","auto");this._container.setOverlayPlayEnable(false);this._overlayPlayBgJq.css("zIndex","auto");if(this._funCleanUp!=null){this._funCleanUp()}},onShow:function(e){var _gthis=this;this._closeOverlayButton.stop(null,false,false);this._closeOverlayButton.css("display","block");this._closeOverlayButton.css("opacity",1);if(!this._controlsBelowVideo){this._closeOverlayButton.animate({opacity:0},2000,null,function(){_gthis._closeOverlayButton.css("display","none")})}},onScreenClick:function(call){this._onScreenClick=call},setFullScreenCloseHandler:function(controlBar,call){this._controlBar=controlBar;this._onFullScreenClose=call},__class__:pingvp_PingVpOverlay};var pingvp_PingVpOverlayPlayPoster=function(videoOid,node,container,posterImage,posterPlayImage,controlsBelowHeight,posterWidth,posterHeight,theme,text,accessibilityTitlePoster,seo){var _gthis=this;this._videoOid=videoOid;this._node=node;this._container=container;this._posterWidth=posterWidth;this._posterHeight=posterHeight;this._controlsBelowHeight=controlsBelowHeight;this._text=text;this._seo=seo;if($("#pingVpOverlayPlayButton-"+videoOid).length!=0){$("#pingVpOverlayPlayButton-"+videoOid).remove()}if($("#pingVpOverlayPlay-"+videoOid).length!=0){$("#pingVpOverlayPlay-"+videoOid).remove()}this._theme=theme;this._tabIndexOverlay=this._theme.showPlay()?"":'tabindex="0"';this._tabIndexButton=this._theme.showPlay()?'tabindex="0"':"";if(seo!=null){this._altText=this._text.get("altPosterPlay")+": "+Std.string(seo.name())+" "+this._text.get("altPosterPlay2")}else{this._altText=this._text.get("altPosterPlay")}if(accessibilityTitlePoster!=""){this._altText=accessibilityTitlePoster}this._node.append('<img alt="'+this._altText+'" id="pingVpOverlayPlay-'+videoOid+'" '+this._tabIndexOverlay+' class="pingVpOverlayPlay" src="'+posterImage+'" alt="" />');this._posterImg=$("#pingVpOverlayPlay-"+videoOid);this._posterPlayImage=theme.getThumbIcon(theme.getByKey("svgset"),posterPlayImage+".svg",theme.getByKey("defaultcolor"),theme.getByKey("backgroundPlay"));this._posterPlayImageHover=theme.getThumbIcon(theme.getByKey("svgset"),posterPlayImage+".svg",theme.getByKey("hovercolor"),theme.getByKey("backgroundPlayHover"));if(this._theme.showPlay()){this._node.append('<img id="pingVpOverlayPlayButton-'+videoOid+'" '+this._tabIndexButton+' class="pingVpOverlayPlayButton" src="'+this._posterPlayImage+'"/>');this._node.hover(function(e){_gthis._node.children("img#pingVpOverlayPlayButton-"+videoOid).attr("src",_gthis._posterPlayImageHover)},function(e1){_gthis._node.children("img#pingVpOverlayPlayButton-"+videoOid).attr("src",_gthis._posterPlayImage)});this._buttonDiv=$("#pingVpOverlayPlayButton-"+videoOid);this._buttonDiv.on("click",null,$bind(this,this.onClick))}this._posterImg.on("click",null,$bind(this,this.onClick));this.resize(this._controlsBelowHeight)};$hxClasses["pingvp.PingVpOverlayPlayPoster"]=pingvp_PingVpOverlayPlayPoster;pingvp_PingVpOverlayPlayPoster.__name__=["pingvp","PingVpOverlayPlayPoster"];pingvp_PingVpOverlayPlayPoster.prototype={onClick:function(e){if(this._call!=null){this._call()}},setClickHandler:function(call){this._call=call},resize:function(controlsBelowHeight){this._controlsBelowHeight=controlsBelowHeight;var containerWidth=this._node.width();var containerHeight=this._node.height();containerHeight-=this._controlsBelowHeight;var containerCenterX=containerWidth/2;var containerCenterY=containerHeight/2;var posterHalfWidth=this._posterWidth/2;var posterHalfHeigth=this._posterHeight/2;var scaleX=containerWidth/this._posterWidth;var scaleY=containerHeight/this._posterHeight;var scale=scaleX;if(scaleX>scaleY){scale=scaleY}this._posterImg.css("left",containerCenterX-posterHalfWidth*scale+"px");this._posterImg.css("top",containerCenterY-posterHalfHeigth*scale+"px");this._posterImg.css("width",this._posterWidth*scale+"px");this._posterImg.css("height",this._posterHeight*scale+"px");var buttonTop=containerHeight/2;if(this._theme.showPlay()){this._buttonDiv.css("top",buttonTop+"px")}},removePoster:function(){if(this._theme.showPlay()){this._buttonDiv.remove()}this._posterImg.remove()},__class__:pingvp_PingVpOverlayPlayPoster};var pingvp_PingVpPath=function(){this.path=[]};$hxClasses["pingvp.PingVpPath"]=pingvp_PingVpPath;pingvp_PingVpPath.__name__=["pingvp","PingVpPath"];pingvp_PingVpPath.prototype={add:function(scriptName,videoName){this.path.push(new pingvp_PingVpPathPair(scriptName,videoName))},back:function(start){if(this.path.length==0){return start}return this.path.pop()},clear:function(){this.path=[]},trace:function(){var max=this.path.length;var i=0;while(i<max){++i}},__class__:pingvp_PingVpPath};var pingvp_PingVpPathPair=function(scriptName,videoName){this._scriptName=scriptName;this._videoName=videoName};$hxClasses["pingvp.PingVpPathPair"]=pingvp_PingVpPathPair;pingvp_PingVpPathPair.__name__=["pingvp","PingVpPathPair"];pingvp_PingVpPathPair.prototype={__class__:pingvp_PingVpPathPair};var pingvp_PingVpPlayer=function(debug,videoOid,node,container,text,videoScript,controlsBelowVideo,controlsDisabled,tempStartFragment,analytics,events,autoStart,inOverlayPlay,inlinePlay,call,pingVpFunctions,keys,keysControlbar,keysSettingsMenu,keysSubtitlesMenu,keysShareMenu){this._lastSubtitlesSettings=new haxe_ds_StringMap();pingvp_PingVpPlayerBase.call(this,debug,videoOid,node,container,text,videoScript,controlsBelowVideo,controlsDisabled,tempStartFragment,analytics,events,autoStart,inOverlayPlay,inlinePlay,call);pingVpFunctions.setName(videoScript.name());pingVpFunctions.setResize($bind(this,this.onResize));this._focusActive=false;this._videoScriptSub=videoScript.script();this.defaultColor=this._videoScriptSub.getHeaderDefaultColor();this.hoverColor=this._videoScriptSub.getHeaderHoverColor();this._enableOverlay=inOverlayPlay;this._keysControlbar=keysControlbar;this._keysSettingsMenu=keysSettingsMenu;this._keysSubtitlesMenu=keysSubtitlesMenu;this._keysShareMenu=keysShareMenu;this._keys=keys;if(this._videoScript.script().getFragmentVideoMp4Lq(this._videoName)!=""){this._videoMp4Lq=this._videosUri+this._videoScript.script().getFragmentVideoMp4Lq(this._videoName)}else{this._videoMp4Lq=""}if(this._videoScript.script().getFragmentVideoWebmLq(this._videoName)!=""){this._videoWebmLq=this._videosUri+this._videoScript.script().getFragmentVideoWebmLq(this._videoName)}else{this._videoWebmLq=""}if(this._videoScript.script().getFragmentVideoOgvLq(this._videoName)!=""){this._videoOgvLq=this._videosUri+this._videoScript.script().getFragmentVideoOgvLq(this._videoName)}else{this._videoOgvLq=""}if(this._videoScript.script().getFragmentVideoMp4Hq(this._videoName)!=""){this._videoMp4Hq=this._videosUri+this._videoScript.script().getFragmentVideoMp4Hq(this._videoName)}else{this._videoMp4Hq=""}if(this._videoScript.script().getFragmentVideoWebmHq(this._videoName)!=""){this._videoWebmHq=this._videosUri+this._videoScript.script().getFragmentVideoWebmHq(this._videoName)}else{this._videoWebmHq=""}if(this._videoScript.script().getFragmentVideoOgvHq(this._videoName)!=""){this._videoOgvHq=this._videosUri+this._videoScript.script().getFragmentVideoOgvHq(this._videoName)}else{this._videoOgvHq=""}if(this._videoScript.script().getFragmentBackgroundImage(this._videoName)!=""){this._backgroundImage=this._postersUri+this._videoScript.script().getFragmentBackgroundImage(this._videoName)}else{this._backgroundImage=""}this._videoOriginalWidth=this._videoScript.script().getFragmentVideoWidth(this._videoName);this._videoOriginalHeight=this._videoScript.script().getFragmentVideoHeight(this._videoName);if(this._interval!=null){this._interval.stop()}this._interval=new pingvp_PingVpInterval($bind(this,this.onPlaying),100,100,20);this.firstRun()};$hxClasses["pingvp.PingVpPlayer"]=pingvp_PingVpPlayer;pingvp_PingVpPlayer.__name__=["pingvp","PingVpPlayer"];pingvp_PingVpPlayer.__super__=pingvp_PingVpPlayerBase;pingvp_PingVpPlayer.prototype=$extend(pingvp_PingVpPlayerBase.prototype,{cleanup:function(){this._loop=false;this._interval.stop();if(this._fullScreen!=null){this._fullScreen.claenUp();this._fullScreen=null}if(this._videoTag!=null){this._videoTag.pause();this._videoTag.cleanUp();this._videoTag=null}},firstRun:function(){var _gthis=this;this.resetPlayer(false);this.loadPlayer(!this._autoStart);this._fullScreen.setFullScreenEventHandler($bind(this,this.onFullScreenEvent));this._fullScreen.setWindowedEventHandler($bind(this,this.onWindowedEvent));this.bindOnResize(true);this._videoTag.load();if(pingvp_PingVpDevice.isIpad()){this._videoTag.setCurrentTimeDelay(0.1)}if(this._autoStart){this.event("Load video");if(!this._inlinePlay&&!this._enableOverlay){this._messages.showImmediatelyMessage("PlayerAutostartMute");this._videoTag.muted(true);this._controlBar.setMute();if(this._subtitles.hasSubs()&&this._subtitles.getSelected()==0){this._subtitles.onSubSelect(1);this._settings.setSubsMenuSelected(1)}}this._videoTag.play();this._controlBar.setPlay();this.onPlaying();this._interval.start()}this.onResize(null);this.handlePreloadVideo();haxe_Timer.delay(function(){_gthis.backgroundImage()},500)},onPosterClick:function(){this.event("Poster click");this.event("Load video");this._videoTag.play();this._controlBar.setPlay();this._announcement.setMessage(this._text.get("announcePlay"));this._interval.start();this.checkHideEnable(true)},loadFragment:function(fragment,changeQuality){var _gthis=this;this._focusActive=this._overlay.getActive();if(!this._videoScript.script().checkFragment(fragment)){return}this._playLoop=this._videoScript.script().getFragmentLoop(fragment);this._interval.stop();this.resetPlayer(changeQuality);this._videoName=fragment;this._videoMp4Lq=this._videosUri+this._videoScript.script().getFragmentVideoMp4Lq(this._videoName);this._videoWebmLq=this._videosUri+this._videoScript.script().getFragmentVideoWebmLq(this._videoName);this._videoOgvLq=this._videosUri+this._videoScript.script().getFragmentVideoOgvLq(this._videoName);this._videoMp4Hq=this._videosUri+this._videoScript.script().getFragmentVideoMp4Hq(this._videoName);this._videoWebmHq=this._videosUri+this._videoScript.script().getFragmentVideoWebmHq(this._videoName);this._videoOgvHq=this._videosUri+this._videoScript.script().getFragmentVideoOgvHq(this._videoName);this._backgroundImage=this._postersUri+this._videoScript.script().getFragmentBackgroundImage(this._videoName);this._videoOriginalWidth=this._videoScript.script().getFragmentVideoWidth(this._videoName);this._videoOriginalHeight=this._videoScript.script().getFragmentVideoHeight(this._videoName);this.wasShownBefore=this._messages.isShown("PlayerAutostartMute");this.loadPlayer(false);this._percent0=true;this._percent20=true;this._percent50=true;this._percent80=true;if(!changeQuality){this.event("Load video")}else{this.event("Quality change to "+(this._lastHq?"high":"low"))}if(this._lastTime!=0){this._videoTag.setCurrentTimeDelay(this._lastTime)}else{if(pingvp_PingVpDevice.isIpad()){this._videoTag.setCurrentTimeDelay(0.1)}}this._videoTag.play();this.onPlaying();this._controlBar.setPlay();this._interval.start();this.onResize(null);this._overlay.setActive(this._focusActive);this.handlePreloadVideo();haxe_Timer.delay(function(){_gthis.backgroundImage()},500)},loadPlayer:function(loadPoster){this._videoEndCallback=this._videoScript.script().getFragmentVideoEndCallback(this._videoName);if(this._lastHq){this._videoTag=new pingvp_html5player_VideoTag(this._videoOid,this._container.get().get(0),this._videoMp4Hq,this._videoWebmHq,this._videoOgvHq,$bind(this,this.onBeginBuffering),$bind(this,this.onEndBuffering),null,this._autoStart)}else{this._videoTag=new pingvp_html5player_VideoTag(this._videoOid,this._container.get().get(0),this._videoMp4Lq,this._videoWebmLq,this._videoOgvLq,$bind(this,this.onBeginBuffering),$bind(this,this.onEndBuffering),null,this._autoStart)}this._videoTag.paddingBottom(this._container,this._container.getWidth(),this._container.getHeight(),this._controlsBelowVideo?40:0);this._videoTag.setPlayHandler($bind(this,this.onVideoPlay));this._videoTag.setPauseHandler($bind(this,this.onVideoPause));this._videoTag.setEndHandler($bind(this,this.onVideoEnd));this._videoTag.setLoadedMetaData($bind(this,this.onLoadedMetaData));this._overlay=new pingvp_PingVpOverlay(this._videoOid,this._container,this._enableOverlay,this.defaultColor,this.hoverColor,this._controlsBelowVideo);this._overlay.onScreenClick($bind(this,this.onScreenClick));this._sidebar=new pingvp_PingVpSidebar(this._videoOid,this._container,this._videoScript.script(),this._controlBar,$bind(this,this.checkHideEnable),this._text,this._theme,$bind(this,this.onResize));if(this._enableOverlay){this._overlay.setCloseButton($bind(this,this.cleanup))}this._blocks=new pingvp_PingVpBlocksAll(this._videoOid,this._debug,this._videoOriginalWidth,this._videoOriginalHeight,$bind(this,this.onBlockShow),$bind(this,this.onBlockClose),$bind(this,this.onBlockClick),$bind(this,this.onPauseCommand),$bind(this,this.onSeekCommand),$bind(this,this.onCtaAction),this._theme,this._text);this._blocks.executeScript(this._videoScript.name(),this._videoTag.getPosLeft(),this._videoTag.getPosTop(),this._videoScript.script().getFragmentCommands(this._videoName),this._videoScript.script().getFragmentHeaderHtml5Sync(this._videoName),this._videoScript.script().getFragmentHeaderHtml5DurationCorrection(this._videoName),"html5");this._messages=new pingvp_PingVpMessages(this._videoOid,this._theme,this._container.getWidth(),this._container.getHeight(),this._controlsBelowVideo?50:0);this._messages.setMessage("PlayerActionPlay","play_button_center","center_center",true);this._messages.setMessage("PlayerActionPause","pause_button_center","center_center",true);this._messages.setMessage("PlayerAutostartMute","sound_on","right",true);this._messages.onClickClose("PlayerAutostartMute",$bind(this,this.onUnmuteButton),true);if(this.wasShownBefore!=null&&this.wasShownBefore){this._messages.showImmediatelyMessage("PlayerAutostartMute")}if(loadPoster){var accessibilityTitlePoster=this._videoScript.script().getHeaderHelper("accessibilityTitlePoster","");if(this._videoScript.script().getHeaderPosterRatio()!="fixed"){var seo=this._videoScript.script().getSeo();this._poster=new pingvp_PingVpPoster(this._videoOid,this._overlay,this._headerPoster,"play_button_thumb",this._controlsBelowVideo,this._theme,this._text,accessibilityTitlePoster,seo);this._poster.setClickHandler($bind(this,this.onPosterClick))}else{var seo1=this._videoScript.script().getSeo();var posterWidth=this._videoScript.script().getHeaderFloatHelper("posterWidth",16);var posterHeight=this._videoScript.script().getHeaderFloatHelper("posterHeight",9);this._posterRatio=new pingvp_PingVpPosterRatio(this._node,this._videoOid,this._container,this._overlay,this._headerPoster,"play_button_thumb",this._controlsBelowVideo,this._controlsBelowVideo&&!this._lastFullScreen?40:0,posterWidth,posterHeight,this._theme,this._text,accessibilityTitlePoster,seo1);this._posterRatio.setClickHandler($bind(this,this.onPosterClick))}}this._contextMenu.setupContextMenus(this._container,this._theme,this._mobileCheck);this._contextMenu.addOption("pingVpOptionStart",this._text.get("contextbarStart"),null,$bind(this,this.onStartButton));this._contextMenu.addOption("pingVpOptionBack",this._text.get("contextbarBack"),null,$bind(this,this.onBackButton));this._contextMenu.addOption("pingVpOptionReplay",this._text.get("contextbarRepeat"),null,$bind(this,this.onRepeatButton));this._contextMenu.addHr();if(!this._controlsDisabled){this._contextMenu.addOption("pingVpOptionShortcut",this._text.get("contextbarShortcut"),null,$bind(this,this.onShortcutsButton))}this._contextMenu.addOption("pingVpOptionReport",this._text.get("contextbarReport"),null,$bind(this,this.onReportButton));this._contextMenu.addOption("pingVpOptionBrand",this._text.get("contextbarBrand"),null,$bind(this,this.onBrandButton));this.createCommonControls(true,this._lastSubtitle,this._lastSpeedOption,this._lastFullScreen,this._lastHq,this._lastSubtitlesSettings,true,$bind(this,this.onLqButton),$bind(this,this.onHqButton));this._controlBar.setPause();this._controlBar.setMuteHandler($bind(this,this.onMuteButton));this._controlBar.setUnmuteHandler($bind(this,this.onUnmuteButton));this._controlBar.setVolumeSliderHandler($bind(this,this.onVolumeSliderClick));this._controlBar.setVolumeSliderArrowsHandler($bind(this,this.onVolumeSliderArrows));this._overlay.setFullScreenCloseHandler(this._controlBar,$bind(this,this.onWindowedButton));if(this._sidebar.isActive()){this._controlBar.setTranscriptHandler($bind(this,this.onTranscriptButton));this._controlBar.setTranscript(false);this._sidebar.setCloseOthersCall($bind(this,this.closeModals))}if(this._lastMute){this._videoTag.muted(true);this._controlBar.setMute()}if(!pingvp_PingVpDevice.isIphone()&&!pingvp_PingVpDevice.isIpad()&&!pingvp_PingVpDevice.isAndroid()){if(this._lastVolume!=1){this._videoTag.setVolume(this._lastVolume)}}if(this._lastFullScreen){this._controlBar.setFullScreen()}if(!pingvp_PingVpDevice.isIphone()&&!pingvp_PingVpDevice.isIpad()&&!pingvp_PingVpDevice.isAndroid()){this._controlBar.setVolumeSlider(this._videoTag.getVolume())}if(!pingvp_PingVpDevice.isIphone()&&pingvp_PingVpDevice.isIpad()){this._progress.disable()}this._keys.bindKey($bind(this,this.onKeys));this._keysControlbar.bindKey($bind(this,this.onControlBarKeys));this._keysSettingsMenu.bindKey(($_=this._settings,$bind($_,$_.checkUpAndDownKeys)));this._keysSubtitlesMenu.bindKey(($_=this._subtitlesOverlay,$bind($_,$_.checkUpAndDownKeys)));this._keysShareMenu.bindKey(($_=this._shareOverlay,$bind($_,$_.checkUpAndDownKeys)));this._pingVpClick.onPingVpClickPlay($bind(this,this.onPlayButton));this._pingVpClick.onPingVpClickPause($bind(this,this.onPauseButton));if(this._delayedAnnouncement!=null){this._announcement.setMessage(this._delayedAnnouncement);this._delayedAnnouncement=null}},handlePreloadVideo:function(){var onEndVideoScript=this._videoScript.script().getFragmentOnEndVideoScript(this._videoName);var onEndVideoLoad=this._videoScript.script().getFragmentOnEndVideoLoad(this._videoName);if(onEndVideoLoad!=""&&onEndVideoScript==""){var preloadVideoMp4Lq=this._videosUri+this._videoScript.script().getFragmentVideoMp4Lq(onEndVideoLoad);var preloadVideoMp4Hq=this._videosUri+this._videoScript.script().getFragmentVideoMp4Hq(onEndVideoLoad);this._preload.preload(preloadVideoMp4Lq);this._preload.preload(preloadVideoMp4Hq)}},backgroundImage:function(){this._setOverlayElement=$("#pingVpVideoContainer-"+this._videoOid);this._setOverlayElement.css("background-image","url("+this._backgroundImage+")")},backgroundImageResize:function(offsetControlbar){this._setOverlayElement=$("#pingVpVideoContainer-"+this._videoOid);if(this._backgroundImage!=""){var videoWidth=this._videoScript.script().getHeaderFloatHelper("responsiveWidth",16);var videoHeight=this._videoScript.script().getHeaderFloatHelper("responsiveHeight",9);var containerWidth=this._container.getWidth();var containerHeight=this._container.getHeight()-offsetControlbar;var scaleX=containerWidth/videoWidth;var scaleY=containerHeight/videoHeight;var centerX=containerWidth/2;var centerY=containerHeight/2;var scale=scaleX;if(scaleY<scaleX){scale=scaleY}var startX=centerX-videoWidth*scale/2;var startY=centerY-videoHeight*scale/2;var scaledWidth=videoWidth*scale;var scaledHeight=videoHeight*scale;this._setOverlayElement.css("background-size",scaledWidth+"px "+scaledHeight+"px");if(this._controlBar.isFullScreen()){this._setOverlayElement.css("background-position","center center")}else{this._setOverlayElement.css("background-position","top")}}},resetPlayer:function(changeQuality){if(this._subtitlesOverlay!=null){var tempLastSubtitlesSettings=this._subtitlesOverlay.getCurrentSettings();if(tempLastSubtitlesSettings!=""){this._lastSubtitlesSettings=tempLastSubtitlesSettings}}if(changeQuality&&this._controlBar!=null){this._lastTime=this._videoTag.getCurrentTime()}else{this._lastTime=0}if(this._subtitles!=null){this._lastSubtitle=this._subtitles.getSelected()}else{this._lastSubtitle=-1}if(this._speed!=null){this._lastSpeedOption=this._speed.getSelected()}else{this._lastSpeedOption=0}if(this._controlBar!=null){if(this._lastHq==null){if(!this._videoScript.script().checktHeader("videoQuality")){this._lastHq=pingvp_PingVpConfigRead.get().videoQuality!="LQ"}else{this._lastHq=this._videoScript.script().getHeaderVideoQuality()!="LQ"}}else{if(changeQuality){this._lastHq=this._lastHq?false:true}}if(!pingvp_PingVpDevice.isIphone()&&!pingvp_PingVpDevice.isIpad()&&!pingvp_PingVpDevice.isAndroid()){this._lastMute=this._controlBar.isMute();this._lastVolume=this._controlBar.getVolumeSlider()}this._lastFullScreen=this._controlBar.isFullScreen();this.checkHideEnable(false)}else{if(!this._videoScript.script().checktHeader("videoQuality")){this._lastHq=pingvp_PingVpConfigRead.get().videoQuality!="LQ"}else{this._lastHq=this._videoScript.script().getHeaderVideoQuality()!="LQ"}if(!pingvp_PingVpDevice.isIphone()&&!pingvp_PingVpDevice.isIpad()&&!pingvp_PingVpDevice.isAndroid()){this._lastMute=false;this._lastVolume=1}this._lastFullScreen=false}if(this._videoTag!=null){this._videoTag.pause();this._videoTag.cleanUp();this._videoTag=null}},onPlayButton:function(ableToRepeat){this._shareOverlay.hideShareOverlay();this._interval.start();if(!this._autoStart){if(this._videoScript.script().getHeaderHelper("posterRatio","")!="fixed"){this._poster.removePoster()}else{this._posterRatio.removePoster()}}if(this._replayEvent){if(ableToRepeat||ableToRepeat==null){this._videoTag.play();this._controlBar.setPauseIcon();this._controlBar.setPlay();this._announcement.setMessage(this._text.get("announceReplay"));this.onPlaying();if(this._mobileCheck){this.checkHideEnable(true)}this.event("Replay");this._replayEvent=false}}else{this._videoTag.play();this._controlBar.setPlay();this._announcement.setMessage(this._text.get("announcePlay"));this.onPlaying();if(this._mobileCheck){this.checkHideEnable(true)}this.event("Play")}},onPauseButton:function(){this._videoTag.pause();this._controlBar.setPause();this._announcement.setMessage(this._text.get("announcePause"));this.onPlaying();if(this._mobileCheck){this.checkHideEnable(false)}this.event("Pause")},onCtaAction:function(getAction,playerAction){if(playerAction){if(getAction){this.onPlayButton(false)}else{this.onPauseButton()}}},onKeys:function(e){var _containerElement=$("#pingVpOverlayPlayContainer-"+this._videoOid);var _focus=$(":focus");var _pingVpElement=$(".pingVpWebplayerSelector,#pingVpOverlayPlayContainer-"+this._videoOid+",.PingVP");if(_containerElement.hasClass("pingVpActive-"+this._videoOid)||_focus.parents(".pingVpShareOverlay").length!=0&&_focus.parents(".pingVpShortcutOverlay").length!=0){if(e.which==37||e.which==39){if(_focus.length<1){e.preventDefault();this._controlBar.showTimeSliderKeys();this.onTimeSliderArrows(e.which|0)}}if(e.which==38||e.which==40){if(_focus.length<1||(_focus.hasClass("pingVpVolumeSliderFocus")||_focus.hasClass("pingVpControlMute"))){e.preventDefault();this._controlBar.showVolumeSliderKeys();this.onVolumeSliderArrows(e.which|0)}}if(e.which==77&&(_focus.length<1||_focus.hasClass("pingVpControlMute"))){if(this._controlBar.isMute()){this.onUnmuteButton()}else{this.onMuteButton()}}if(e.which==70&&(_focus.length<1||_focus.hasClass("pingVpControlFullScreen"))){if(this._controlBar.isFullScreen()){this.onWindowedButton()}else{this.onFullScreenButton()}}if(e.which==190&&this._enableSpeed&&(_focus.length<1||_focus.hasClass("pingVpSettingsMenuItemSpeed")||_focus.parents(".pingVpSettingsSubMenuSpeed").length!=0)){this._speed.setSpeedUp();this._settings.setSpeedSetting(this._speed.getSelected())}if(e.which==188&&this._enableSpeed&&(_focus.length<1||_focus.hasClass("pingVpSettingsMenuItemSpeed")||_focus.parents(".pingVpSettingsSubMenuSpeed").length!=0)){this._speed.setSpeedDown();this._settings.setSpeedSetting(this._speed.getSelected())}if(e.which==83&&(_focus.length<1||_focus.hasClass("pingVpControlShare")||_focus.hasClass("pingVpSettingsMenuItemShare"))){if(this._settings.checkSettingsMenu()){this._settings.forceHideSettingsMenu()}this.onShareButton()}if(e.which==67&&(_focus.length<1||_focus.hasClass("pingVpControlSubtitles")||_focus.hasClass("pingVpSettingsMenuItemSubs")||_focus.parents(".pingVpSettingsSubMenuSubs").length!=0||_focus.parents(".pingVpSubtitlesMenu").length!=0)){var setSubId=this._subtitles.keyAssist();this._subtitles.onSubSelect(setSubId);this._settings.setSubsMenuSelected(setSubId)}if(e.which==27){if(this._shortcutOverlay.checkMenuActive()&&this._shortcutOverlay.isShown()){this._announcement.setMessage(this._text.get("announceCloseModal"));this._shortcutOverlay.hideShortcutOverlay()}if(this._shareOverlay.checkMenuActive()&&this._shareOverlay.isShown()){this._announcement.setMessage(this._text.get("announceCloseModal"));this._shareOverlay.hideShareOverlay()}if(this._contextMenu.isShown()){this._announcement.setMessage(this._text.get("announceCloseMenu"));this._contextMenu.hideContextMenu()}if(this._settings.checkMenuActive()&&this._settings.checkSettingsMenu()){this._announcement.setMessage(this._text.get("announceCloseMenu"));this._settings.checkCloseKeys(e)}if(this._subtitlesOverlay.checkMenuActive()&&this._subtitlesOverlay.checkSubtitlesMenu()){this._announcement.setMessage(this._text.get("announceCloseMenu"));this._subtitlesOverlay.checkCloseKeys(e)}if(this._aiOverlay.checkMenuActive()&&this._aiOverlay.isShown()){this._announcement.setMessage(this._text.get("announceCloseModal"));this._aiOverlay.checkCloseKeys(e)}if(this._aiOverlay.checkMenuActive()&&this._aiOverlay.isShown()){this._announcement.setMessage(this._text.get("announceCloseModal"));this._aiOverlay.checkCloseKeys(e)}if(this._sidebar.isActive()&&this._sidebar.isShown()){this._announcement.setMessage(this._text.get("announceCloseModal"));this._sidebar.hideSidebar()}}if(e.which==65&&(_focus.length<1||_focus.hasClass("pingVpControlAd")||_focus.hasClass("pingVpSettingsMenuItemAd")||_focus.parents(".pingVpSettingsSubMenuAd").length!=0)){this.onAdButton()}if(e.which==79&&(_focus.length<1||_focus.hasClass("pingVpSettingsMenuItemContext"))){if(this._settings.checkSettingsMenu()){this._settings.forceHideSettingsMenu()}this._contextMenu.menuOpenViaSettings(this._controlBar,this._controlsBelowVideo)}if(e.which==32&&(_focus.length<1||_focus.hasClass("pingVpControlPlay"))){e.preventDefault();if(this._videoTag.isPlaying()){this._messages.hideImmediatelyMessage("PlayerActionPlay");this.onPauseButton();this._messages.showIconMessage("PlayerActionPause",0)}else{this._messages.hideImmediatelyMessage("PlayerActionPause");this.onPlayButton(true);this._messages.showIconMessage("PlayerActionPlay",0)}}if(e.which==9){if(this._lastBlockSetFocus!=null){e.preventDefault();this._lastBlockSetFocus.focus();this._lastBlockSetFocus=null}else{if(_focus.parents(".pingVpMenuFocus").length!=0){var parentContainer=_focus.parents(".pingVpMenuFocus");if(e.shiftKey&&_focus.is(parentContainer.find("[tabindex]").filter(":visible").first())){e.preventDefault()}if(!e.shiftKey&&_focus.is(parentContainer.find("[tabindex]").filter(":visible").last())){e.preventDefault()}}}}if(e.which==84){if(this._settings.checkSettingsMenu()){this._settings.forceHideSettingsMenu()}this.onTranscriptButton()}}},onControlBarKeys:function(e){this._controlBar.checkLeftAndRightKeys(e)},onScreenClick:function(){if(!this._contextMenu.isShown()&&!this._settings.checkSettingsMenu()&&!this._subtitlesOverlay.checkSubtitlesMenu()){if(this._videoTag.isPlaying()){if(!this._mobileCheck){this._messages.hideImmediatelyMessage("PlayerActionPlay");this.onPauseButton();this._messages.showIconMessage("PlayerActionPause",0)}}else{if(!this._replayEvent){if(!this._mobileCheck){this._messages.hideImmediatelyMessage("PlayerActionPause");this.onPlayButton(false);this._messages.showIconMessage("PlayerActionPlay",0)}}else{if(this._videoTag.getCurrentTime()!=this._videoTag.getDuration()){if(!this._mobileCheck){this._messages.hideImmediatelyMessage("PlayerActionPause");this.onPlayButton(true);this._messages.showIconMessage("PlayerActionPlay",0)}}}}}},onFullScreenEvent:function(){if(!this._controlBar.isFullScreen()){this.event("Enter full screen")}if(this._fullScreen!=null&&this._fullScreen.isFullWindowSelected()){this._fullScreen.setChild(this._container.get().get(0));if(this._videoTag.isPlaying()){this._videoTag.play()}}this._announcement.setMessage(this._text.get("announceFullscreen"));this.onResize(null)},onWindowedEvent:function(){if(this._controlBar.isFullScreen()){this.event("Leave full screen")}this._controlBar.setWindowed();if(this._fullScreen!=null&&this._fullScreen.isFullWindowSelected()){this._fullScreen.removeChild();this._container.reset();if(this._videoTag.isPlaying()){this._videoTag.play()}}this._announcement.setMessage(this._text.get("announceWindowed"));this.onResize(null)},onMuteButton:function(){this.event("Audio muted");this._videoTag.muted(true);this._controlBar.setMute();this._announcement.setMessage(this._text.get("announceSoundMuted"))},onUnmuteButton:function(){this.event("Audio unmuted");if(this._messages.isShown("PlayerAutostartMute")){this._messages.hideImmediatelyMessage("PlayerAutostartMute")}this._videoTag.muted(false);this._announcement.setMessage(this._text.get("announceSoundUnmuted"));if(this._checkDeviceFunctions){var getVolumeSlider=this._controlBar.getVolumeSlider();this._controlBar.setUnmute();if(getVolumeSlider==0){this._controlBar.setVolumeSlider(0.1);this._videoTag.setVolume(0.1)}}else{this._controlBar.setUnmute();this._controlBar.setVolumeSlider(1);this._videoTag.setVolume(1)}},onLqButton:function(){this.loadFragment(this._videoName,true)},onHqButton:function(){this.loadFragment(this._videoName,true)},onTranscriptButton:function(){if(this._sidebar.isActive()){this._sidebar.showSidebar();this._controlBar.setTranscript(this._sidebar.isShown())}},onVideoPlay:function(){this._controlBar.setPlay();this.onPlaying()},onVideoPause:function(){this._controlBar.setPause();this.onPlaying()},onVideoEnd:function(){var _gthis=this;this._controlBar.setReplay();this.onPlaying();this.event("End video");this._replayEvent=true;this.videoEndCallback();if(this._videoScript.script().getFragmentOnEndRepeat(this._videoName)){this.event("End repeat");this._videoTag.setCurrentTime(0);this._videoTag.play();this._controlBar.setPlay();this._announcement.setMessage(this._text.get("announceReplay"))}else{var onEndVideoLoad=this._videoScript.script().getFragmentOnEndVideoLoad(this._videoName);if(onEndVideoLoad!=""){this.event("End load");this._lastFragmentUuid=this._videoScript.script().getFragmentVideoUuid(this._videoName);var onEndVideoLoad1=this._videoScript.script().getFragmentOnEndVideoLoad(this._videoName);var onEndVideoScript=this._videoScript.script().getFragmentOnEndVideoScript(this._videoName);var lastVideoScriptName=this._videoScript.name();var videoScriptName=onEndVideoScript!=""?onEndVideoScript:lastVideoScriptName;this._videoScript.select(videoScriptName,function(){_gthis._videoPath.add(lastVideoScriptName,_gthis._videoName);_gthis.loadFragment(onEndVideoLoad1,false)},function(){})}}},onPlaying:function(){if(!this._loop){return}if(this._videoTag.supportBuffered()){if(this._videoTag.getBuffered()+0.5<this._videoTag.getCurrentTime()){this._controlBar.setBuffered(this._videoTag.getCurrentTime(),this._videoTag.getDuration())}else{this._controlBar.setBuffered(this._videoTag.getBuffered()+0.5,this._videoTag.getDuration())}}if(this._playLoop!=null){if(this._videoTag.getCurrentTime()>=this._playLoop.start()){this._playLoop.setLooping(true);this._videoTag.setCurrentTime(this._playLoop.seek())}}if(this._subtitles!=null){this._subtitles.setTime(this._videoTag.getCurrentTime())}this._controlBar.setTimeSlider(this._videoTag.getCurrentTime(),this._videoTag.getDuration());this._controlBar.setTime(this._videoTag.getCurrentTime(),this._videoTag.getDuration());this._controlBar.rezize();this._videoTag.paddingBottom(this._container,this._container.getWidth(),this._container.getHeight(),this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0);var setContainerWidth=$("#pingVpOverlay-"+this._videoOid).width();var setContainerHeight=$("#pingVpOverlay-"+this._videoOid).height();this._blocks.render(this._videoTag.getFrame(25),this._videoTag.getCurrentTime(),0,0,this._videoTag.getWidth(),this._videoTag.getHeight(),setContainerWidth,setContainerHeight,this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0);if(this._brandedStudio!=null){this._brandedStudio.update(this._videoTag.getCurrentTime())}this.percentEventLog()},getPlayDuration:function(){return this._videoTag.getDuration()},onTimeSliderClick:function(){this.event("Seek to "+(this._controlBar.getTimeSliderPercent()|0)+" % ");if(!this._autoStart){if(this._videoScript.script().getHeaderHelper("posterRatio","")!="fixed"){this._poster.removePoster()}else{this._posterRatio.removePoster()}}this._videoTag.setCurrentTime(this._controlBar.getTimeSlider(this._videoTag.getDuration()));this._controlBar.setTime(this._videoTag.getCurrentTime(),this._videoTag.getDuration())},onTimeSliderArrows:function(action){this._controlBar.setTimeSliderArrows(this._videoTag.getCurrentTime(),this._videoTag.getDuration(),action,true);this.event("Seek to "+(this._controlBar.getTimeSliderPercent()|0)+" % ");if(!this._autoStart){if(this._videoScript.script().getHeaderHelper("posterRatio","")!="fixed"){this._poster.removePoster()}else{this._posterRatio.removePoster()}}this._videoTag.setCurrentTime(this._controlBar.getTimeSlider(this._videoTag.getDuration()));this._controlBar.setTime(this._videoTag.getCurrentTime(),this._videoTag.getDuration());if(action==39){this._announcement.setMessage(this._text.get("announce5SecForward"))}if(action==37){this._announcement.setMessage(this._text.get("announce5SecBack"))}},on5secBackClick:function(){var currentTime=this._videoTag.getCurrentTime();if(currentTime!=0){var newTime=currentTime-5;if(newTime<0){newTime=0}var eventTime=Math.round((newTime*100|0)/10)/10;this.event("back by 5 seconds ("+eventTime+")");this._videoTag.setCurrentTime(newTime);this._controlBar.setTime(this._videoTag.getCurrentTime(),this._videoTag.getDuration());this._announcement.setMessage(this._text.get("announce5SecBack"))}},onVolumeSliderClick:function(){var getVolumeSlider=this._controlBar.getVolumeSlider();this.event("Volume change to "+getVolumeSlider);if(this._messages.isShown("PlayerAutostartMute")){this._messages.hideImmediatelyMessage("PlayerAutostartMute")}var isMuted=this._controlBar.isMute();this._videoTag.setVolume(getVolumeSlider);if(isMuted&&getVolumeSlider!=0){this._videoTag.muted(false);this._controlBar.setUnmute();this._announcement.setMessage(this._text.get("announceSoundUnmuted"))}else{if(!isMuted&&getVolumeSlider==0){this._videoTag.muted(true);this._controlBar.setMute();this._announcement.setMessage(this._text.get("announceSoundMuted"))}}},onVolumeSliderArrows:function(action){var getVolumeSlider=this._controlBar.getVolumeSlider();var getVolumeSliderOrig=getVolumeSlider;var getVolumeSliderInt=0;var getVolumeSliderStr="";if(this._messages.isShown("PlayerAutostartMute")){this._messages.hideImmediatelyMessage("PlayerAutostartMute")}if(getVolumeSlider!=0&&getVolumeSlider!=1){getVolumeSliderStr=HxOverrides.substr(getVolumeSlider==null?"null":""+getVolumeSlider,2,1);getVolumeSliderInt=Std.parseInt(getVolumeSliderStr);if(action==39||action==38){++getVolumeSliderInt}else{--getVolumeSliderInt}if(getVolumeSliderInt==10){getVolumeSlider=1}else{getVolumeSlider=parseFloat("0."+getVolumeSliderInt)}}else{if(getVolumeSlider==1){if(action==39||action==38){getVolumeSlider=getVolumeSlider}else{getVolumeSlider=0.9}}else{if(action==39||action==38){getVolumeSlider=0.1}else{getVolumeSlider=getVolumeSlider}}}if(getVolumeSlider>1){getVolumeSlider=1}if(getVolumeSlider<0){getVolumeSlider=0}if(getVolumeSliderOrig!=getVolumeSlider){this.event("Volume change to "+getVolumeSlider)}var isMuted=this._controlBar.isMute();this._controlBar.setVolumeSlider(getVolumeSlider);this._videoTag.setVolume(getVolumeSlider);if(isMuted&&getVolumeSlider!=0){this._videoTag.muted(false);this._controlBar.setUnmute();this._announcement.setMessage(this._text.get("announceSoundPercentage")+" "+getVolumeSlider*100+"%")}else{if(!isMuted&&getVolumeSlider==0){this._videoTag.muted(true);this._controlBar.setMute();this._announcement.setMessage(this._text.get("announceSoundMuted"))}else{if((action==39||action==38)&&getVolumeSliderOrig!=getVolumeSlider){this._announcement.setMessage(this._text.get("announceSoundPercentage")+" "+getVolumeSlider*100+"%")}if((action==37||action==40)&&getVolumeSliderOrig!=getVolumeSlider){this._announcement.setMessage(this._text.get("announceSoundPercentage")+" "+getVolumeSlider*100+"%")}}}},onResize:function(e){if(!this._loop){return}this._controlBar.rezize();this._videoTag.paddingBottom(this._container,this._container.getWidth(),this._container.getHeight(),this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0);this.checkHideEnable(true);var setContainerWidth=$("#pingVpOverlay-"+this._videoOid).width();var setContainerHeight=$("#pingVpOverlay-"+this._videoOid).height();this._blocks.render(this._videoTag.getFrame(25),this._videoTag.getCurrentTime(),0,0,this._videoTag.getWidth(),this._videoTag.getHeight(),setContainerWidth,setContainerHeight,this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0);if(this._brandedStudio!=null){this._brandedStudio.update(this._videoTag.getCurrentTime())}if(this._posterRatio!=null){this._posterRatio.resize(this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)}this._progress.resize(this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0);if(this._settings!=null&&this._settings.checkMenuActive()){this._settings.resize()}if(this._subtitlesOverlay!=null&&this._subtitlesOverlay.checkMenuActive()){this._subtitlesOverlay.resize()}if(this._subtitles!=null){this._subtitles.resize()}if(this._messages!=null){this._messages.resize(this._container.getWidth(),this._container.getHeight(),this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)}if(this._shareOverlay!=null&&this._shareOverlay.checkMenuActive()){this._shareOverlay.resize(this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)}if(this._shortcutOverlay!=null&&this._shortcutOverlay.checkMenuActive()){this._shortcutOverlay.resize(this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)}if(this._aiOverlay!=null&&this._aiOverlay.checkMenuActive()){this._aiOverlay.resize(this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)}if(this._brandedStudio!=null){this._brandedStudio.resize(this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)}if(this._sidebar!=null){this._sidebar.resizeSidebar()}this.backgroundImageResize(this._controlsBelowVideo&&!this._controlBar.isFullScreen()?40:0)},onBlockShow:function(videoOid,block,blockOid,name,action,args){this._lastBlockSetFocus=block},onBlockClose:function(videoOid,block,blockOid,name,action,args){if(this._lastBlockSetFocus==block){this._lastBlockSetFocus=null}},onBlockClick:function(videoOid,blockOid,name,action,args,like){switch(action){case"back":this.onBackButton();break;case"cta":this.ctaHelper(videoOid,blockOid,args,name);break;case"gotopay":$([document.documentElement,document.body]).animate({scrollTop:$("#factuurbetalen").offset().top-40},2000);break;case"image":this.loadHelper(args,name);this.linkHelper(args,name,"Image link");this.ctaHelper(videoOid,blockOid,args,name);break;case"link":this.linkHelper(args,name,"Link");break;case"load":this.loadHelper(args,name);break;case"play":this._videoTag.play();this._controlBar.setPlay();this.onPlaying();break;case"rating":this.event("Rating "+(like?"like":"dislike"));break;case"repeat":this.onRepeatButton();break;case"seek":if(args.position!=null){this.event("Seek button("+name+")");if(args.interactiveClick!=null){this.interactiveEvent(name,args)}this._videoTag.setCurrentTime(args.position);this._controlBar.setTime(this._videoTag.getCurrentTime(),this._videoTag.getDuration());this._videoTag.play();this._controlBar.setPlay()}break;case"start":this.onStartButton();break;case"text":this.linkHelper(args,name,"Text link");this.ctaHelper(videoOid,blockOid,args,name);break}},onPauseCommand:function(command){this._videoTag.pause();this._controlBar.setPause();this.event("Pause command")},onSeekCommand:function(command){if(command.seekTo==null){return}this._videoTag.setCurrentTime(command.seekTo);this.event("Seek command")},onLoadedMetaData:function(){this._progress.disable();if(this._brandedStudio!=null){this._brandedStudio.setEndcardStart(this._videoTag)}},getPlayPercent:function(){if(this._videoTag==null||isNaN(this._videoTag.getDuration())){return 0}return this._videoTag.getCurrentTime()*100/this._videoTag.getDuration()},linkHelper:function(args,name,statsName){if(args.url!=null){var target="_top";if(args.target!=null){if(args.target=="blank"){target="_blank"}else{if(args.target=="top"){target="_top"}else{target=args.target}}}if(target=="_top"){this.event(statsName+' "'+name+'"');if(args.interactiveClick!=null){this.interactiveEvent(name,args)}this._videoTag.pause();this._progress.enable();haxe_Timer.delay(function(){window.open(args.url,target)},1500)}else{this.event(statsName+' "'+name+'" (new tab)');if(args.interactiveClick!=null){this.interactiveEvent(name,args)}window.open(args.url,target)}return true}return false},onLinkHelper:function(args,name,statsName){this.linkHelper(args,name,statsName)},loadHelper:function(args,name){var _gthis=this;if(args.video!=null){if(this._activeAudioDescription==true){var tempVideoName=this.getAdVersion(args.video);if(tempVideoName!=""){args.video=tempVideoName}}this.event('Load "'+name+'"');if(args.interactiveClick!=null){this.interactiveEvent(name,args)}this._lastFragmentUuid=this._videoScript.script().getFragmentVideoUuid(this._videoName);if(args.videoScriptName!=null){var videoScriptName=this._videoScript.name();this._videoScript.select(args.videoScriptName,function(){_gthis._videoPath.add(videoScriptName,_gthis._videoName);_gthis.loadFragment(args.video,false)},function(){});return true}this._videoPath.add(this._videoScript.name(),this._videoName);this.loadFragment(args.video,false);return true}return false},ctaHelper:function(videoOid,blockOid,args,name){this.event('CtaClick "'+name+'"');var _jqyCtaBlock=$("#pingVpBlock-"+videoOid+"-"+blockOid+"-ctaOpen");if(args.ctaToggle==true){if(_jqyCtaBlock.css("display")=="none"){_jqyCtaBlock.show();if(args.ctaOnOpen!=null&&args.ctaOnOpen=="pause"){this.onCtaAction(false,false)}else{if(args.ctaOnOpen!=null&&args.ctaOnOpen=="play"){this.onCtaAction(true,false)}}}else{_jqyCtaBlock.hide();if(args.ctaOnClose!=null&&args.ctaOnClose=="pause"){this.onCtaAction(false,false)}else{if(args.ctaOnClose!=null&&args.ctaOnClose=="play"){this.onCtaAction(true,false)}}}}else{_jqyCtaBlock.show();if(args.ctaOnOpen!=null&&args.ctaOnOpen=="pause"){this.onCtaAction(false,false)}else{if(args.ctaOnOpen!=null&&args.ctaOnOpen=="play"){this.onCtaAction(true,false)}}}},checkIsPlaying:function(){return this._videoTag.isPlaying()},__class__:pingvp_PingVpPlayer});var pingvp_PingVpPoster=function(videoOid,overlay,posterImage,posterPlayImage,controlsBelowVideo,theme,text,accessibilityTitlePoster,seo){var _gthis=this;this._controlsBelowVideo=controlsBelowVideo;this._tabIndexOverlay=theme.showPlay()?"":'tabindex="0"';this._tabIndexButton=theme.showPlay()?'tabindex="0"':"";this._text=text;this._seo=seo;this._mobileCheck=false;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._mobileCheck=true}var defaultColor=theme.getByKey("defaultcolor");var hoverColor=theme.getByKey("hovercolor");if(seo!=null){this._altText=this._text.get("altPosterPlay")+": "+Std.string(seo.name())+" "+this._text.get("altPosterPlay2")}else{this._altText=this._text.get("altPosterPlay")}if(accessibilityTitlePoster!=""){this._altText=accessibilityTitlePoster}overlay.get().append('<div alt="'+this._altText+'" role="button" id="pingVpPoster-'+videoOid+'" '+this._tabIndexOverlay+' class="pingVpPoster" style="background-image:url('+posterImage+');"></div>');this._poster=$("#pingVpPoster-"+videoOid);if(pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpod()){var orientation=window.orientation;if(orientation==90||orientation==-90){this._poster.css("backgroundSize","auto 100%")}else{this._poster.css("backgroundSize","100% auto")}}this._posterPlayImage=theme.getThumbIcon(theme.getByKey("svgset"),posterPlayImage+".svg",defaultColor);this._posterPlayImageHover=theme.getThumbIcon(theme.getByKey("svgset"),posterPlayImage+".svg",hoverColor);if(theme.showPlay()){this._poster.html('<img alt="'+this._altText+'" id="pingVpPosterPlayButton-'+videoOid+'" '+this._tabIndexButton+' class="pingVpPosterPlayButton" src="'+posterPlayImage+'"/>');this._poster.hover(function(e){_gthis._poster.children("img").attr("src",_gthis._posterPlayImageHover)},function(e1){_gthis._poster.children("img").attr("src",_gthis._posterPlayImage)})}this._poster.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onClick))};$hxClasses["pingvp.PingVpPoster"]=pingvp_PingVpPoster;pingvp_PingVpPoster.__name__=["pingvp","PingVpPoster"];pingvp_PingVpPoster.prototype={onClick:function(e){if(this._call!=null){this.removePoster();this._call()}},setClickHandler:function(call){this._call=call},removePoster:function(){this._poster.remove()},__class__:pingvp_PingVpPoster};var pingvp_PingVpPosterRatio=function(node,videoOid,container,overlay,posterImage,posterPlayImage,controlsBelowVideo,controlsBelowHeight,posterWidth,posterHeight,theme,text,accessibilityTitlePoster,seo){var _gthis=this;this._node=node;this._videoOid=videoOid;this._container=container;this._posterWidth=posterWidth;this._posterHeight=posterHeight;this._controlsBelowHeight=controlsBelowHeight;this._controlsBelowVideo=controlsBelowVideo;this._text=text;this._seo=seo;this._mobileCheck=false;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._mobileCheck=true}var defaultColor=theme.getByKey("defaultcolor");var hoverColor=theme.getByKey("hovercolor");if($("#pingVpPosterPlayButton-"+videoOid).length!=0){$("#pingVpPosterPlayButton-"+videoOid).remove()}if($("#pingVpPoster-"+videoOid).length!=0){$("#pingVpPoster-"+videoOid).remove()}if(seo!=null){this._altText=this._text.get("altPosterPlay")+": "+Std.string(seo.name())+" "+this._text.get("altPosterPlay2")}else{this._altText=this._text.get("altPosterPlay")}if(accessibilityTitlePoster!=""){this._altText=accessibilityTitlePoster}this._posterPlayImage=theme.getThumbIcon(theme.getByKey("svgset"),posterPlayImage+".svg",defaultColor);this._posterPlayImageHover=theme.getThumbIcon(theme.getByKey("svgset"),posterPlayImage+".svg",hoverColor);this._tabIndexOverlay=theme.showPlay()?"":'tabindex="0"';this._tabIndexButton=theme.showPlay()?'tabindex="0"':"";overlay.get().append('<div alt="'+this._altText+'" id="pingVpPoster-'+videoOid+'" class="pingVpPoster" '+this._tabIndexOverlay+' style="background-image:url('+posterImage+');"></div>');this._posterDiv=$("#pingVpPoster-"+videoOid);if(theme.showPlay()){this._posterDiv.html('<img alt="'+this._altText+'" id="pingVpPosterPlayButton-'+videoOid+'" class="pingVpPosterPlayButton" '+this._tabIndexButton+' src="'+this._posterPlayImage+'"/>');this._posterDiv.hover(function(e){_gthis._posterDiv.children("img").attr("src",_gthis._posterPlayImageHover)},function(e1){_gthis._posterDiv.children("img").attr("src",_gthis._posterPlayImage)})}this._buttonDiv=$("#pingVpPosterPlayButton-"+videoOid);$("#pingVpPoster-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onClick));this.resize(this._controlsBelowHeight)};$hxClasses["pingvp.PingVpPosterRatio"]=pingvp_PingVpPosterRatio;pingvp_PingVpPosterRatio.__name__=["pingvp","PingVpPosterRatio"];pingvp_PingVpPosterRatio.prototype={onClick:function(e){if(this._call!=null){this._call()}this.removePoster()},setClickHandler:function(call){this._call=call},resize:function(controlsBelowHeight){this._controlsBelowHeight=controlsBelowHeight;var containerWidth=this._container.getWidth();var containerHeight=this._container.getHeight();containerHeight-=this._controlsBelowHeight;var containerCenterX=containerWidth/2;var containerCenterY=containerHeight/2;var posterHalfWidth=this._posterWidth/2;var posterHalfHeigth=this._posterHeight/2;var scaleX=containerWidth/this._posterWidth;var scaleY=containerHeight/this._posterHeight;var scale=scaleX;if(scaleX>scaleY){scale=scaleY}this._posterDiv.css("left",containerCenterX-posterHalfWidth*scale+"px");this._posterDiv.css("top",containerCenterY-posterHalfHeigth*scale+"px");this._posterDiv.css("width",this._posterWidth*scale+"px");this._posterDiv.css("height",this._posterHeight*scale+"px")},removePoster:function(){this._focus=$(":focus");this._pingVpElement=$(".pingVpWebplayerSelector,#pingVpOverlayPlayContainer-"+this._videoOid+",.PingVP");this._posterDiv.remove();if((this._focus.hasClass("pingVpPoster")||this._focus.hasClass("pingVpPosterPlayButton"))&&this._pingVpElement.hasClass("pingVpIsTabbing")){this._node.find('[tabindex="0"]:visible, .pingVpControlBar [tabindex="0"]').first().focus()}},__class__:pingvp_PingVpPosterRatio};var pingvp_PingVpPreload=function(videoOid,baseUrl){this._loaded=0;this._videoOid=videoOid;this._baseUrl=baseUrl;this._queued=[]};$hxClasses["pingvp.PingVpPreload"]=pingvp_PingVpPreload;pingvp_PingVpPreload.__name__=["pingvp","PingVpPreload"];pingvp_PingVpPreload.prototype={preload:function(relativeUrl,funOnLoaded){var fullUrl=relativeUrl;fetch(fullUrl,{mode:"no-cors",cache:"force-cache"}).then(function(_){})["catch"](function(err){})},preloadBatch:function(urls,funLoadedAll){this._queued=urls;this._funLoadedAll=funLoadedAll;this._loaded=0;var _g=0;while(_g<urls.length){var url=urls[_g];++_g;this.preload(url,$bind(this,this.onBatchPreloadComplete))}},onBatchPreloadComplete:function(){this._loaded++;if(this._loaded>=this._queued.length&&this._funLoadedAll!=null){this._funLoadedAll()}},__class__:pingvp_PingVpPreload};var pingvp_PingVpProgress=function(videoOid,overlay,container,theme,controlsBelowHeight){this._container=container;this._loaderIcon=theme.getIcon(theme.getByKey("svgset"),"progress.svg",theme.getByKey("defaultcolor"));if($("#pingVpProgress-"+videoOid).length!=0){$("#pingVpProgress-"+videoOid).remove()}overlay.get().append('<div id="pingVpProgress-'+videoOid+'" class="pingVpProgress"><img class="pingVpResetSvg pingVpFullSvg" src='+this._loaderIcon+"></div>");this._progress=$("#pingVpProgress-"+videoOid);this.resize(controlsBelowHeight)};$hxClasses["pingvp.PingVpProgress"]=pingvp_PingVpProgress;pingvp_PingVpProgress.__name__=["pingvp","PingVpProgress"];pingvp_PingVpProgress.prototype={resize:function(controlsBelowHeight){this._progress.css("marginTop",-(controlsBelowHeight/2+50)+"px")},disable:function(){this._progress.css("display","none")},enable:function(){this._progress.css("display","block")},__class__:pingvp_PingVpProgress};var pingvp_PingVpSeo=function(seo){this._seo=seo};$hxClasses["pingvp.PingVpSeo"]=pingvp_PingVpSeo;pingvp_PingVpSeo.__name__=["pingvp","PingVpSeo"];pingvp_PingVpSeo.prototype={name:function(){return this.getStringField("name")},description:function(){return this.getStringField("description")},transcript:function(){return this.getStringField("transcript")},keywords:function(){return this.getStringField("keywords")},duration:function(){return this.getStringField("duration")},thumbnailURL:function(){return this.getStringField("thumbnailURL")},contentURL:function(){return this.getStringField("contentURL")},embedURL:function(){return this.getStringField("embedURL")},uploadDate:function(){return this.getStringField("uploadDate")},expires:function(){return this.getStringField("expires")},height:function(){return this.getStringField("height")},width:function(){return this.getStringField("width")},getStringField:function(field){if(this._seo==null){return null}var value=Reflect.field(this._seo,field);if(value==null){return null}return Std.string(value)},__class__:pingvp_PingVpSeo};var pingvp_PingVpSettingsMenu=function(videoOid,theme,text,controlsBelow,controlsDisabled,controlBar,controlBarOnShow,checkHideEnable,enableQuality,isHq,onLqButton,onHqButton,subs,subtitles,lastSubtitle,lastSpeedOption,enableSpeed,speed,enableShare,enableAd,activeAudioDescription,onAdButtonOn,onAdButtonOff,messages,mobileCheck,event){this._videoOid=videoOid;this._isSub=false;this._setOverlay=$("#pingVpOverlay-"+videoOid);this._setButton=$("#pingVpControlSettings-"+videoOid);this._container=$("#pingVpOverlayPlayContainer-"+videoOid);this._lowQualityCall=onLqButton;this._highQualityCall=onHqButton;this._adOnCall=onAdButtonOn;this._adOffCall=onAdButtonOff;this._controlsBelow=controlsBelow;this._controlsDisabled=controlsDisabled;this._controlBarOnShow=controlBarOnShow;this._checkHideEnable=checkHideEnable;this._theme=theme;this._text=text;this._language=text.getLanguage();this._controlBar=controlBar;this._isHq=isHq;this._subs=subs;this._subtitles=subtitles;this._speed=speed;this._messages=messages;this._menuIsActive=false;this._event=event;this._mobileCheck=mobileCheck;if(enableQuality||subs!=null&&subs.length>0||enableSpeed||enableShare||!controlsDisabled||enableAd){this._menuIsActive=true;var items="";var itemsSubs="";var languageClass="";this._goBackIcon='<img class="pingVpSettingsArrowBack" src="'+this._theme.getIcon(this._theme.getByKey("svgset"),"arrow_left.svg","ffffff")+'" alt="'+text.get("settingsGoBack")+'">';this._checkIcon='<img class="pingVpIsChecked" src="'+this._theme.getIcon(this._theme.getByKey("svgset"),"check.svg","ffffff")+'" alt="checked icon" >';if(this._mobileCheck){items+='<div id="pingVpSettingsMobileOverlay-'+videoOid+'" class="pingVpSettingsMobileOverlay">'}if(this._language=="de"){languageClass="pingVpSettingsLangDe"}items+='<div id="pingVpSettingsMenu-'+videoOid+'" class="pingVpSettingsMenu '+languageClass+'" role="menu" aria-label="'+text.get("settingsMenuLabel")+'">';items+='<div class="pingVpSettingsHeadMenu pingVpMenuFocus" id="pingVpSettingsHeadMenu-'+videoOid+'">';if(this._mobileCheck){this._closeModalIcon=theme.getIcon(theme.getByKey("svgset"),"cross.svg","fff");items+='<div tabindex="0" id="pingVpSettingsModalCloseHead-'+videoOid+'" class="pingVpSettingsModalClose"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}items+='<h2 class="pingVpSettingsMenuTitle pingVpReset pingVpSettingsMenuTitle-'+videoOid+'">'+text.get("settingsMenuTitle")+"</h2><hr>";items+="<ul>";if(enableQuality){var displayQuality=this._isHq?"("+this._text.get("settingsQualityHD")+")":"("+this._text.get("settingsQualitySD")+")";var qualityGoIcon="<img class='pingVpSettingsArrowNext' src='"+this._theme.getIcon(this._theme.getByKey("svgset"),"arrow_right.svg","ffffff")+"' alt='"+text.get("settingsGoTo")+text.get("settingsHeadQuality").toLowerCase()+"'>";items+='<li class="pingVpSettingsMenuItem pingVpSettingsMenuItemQuality" id="pingVpSettingsMenuItemQuality-'+videoOid+'" role="button" tabindex="-1" aria-label="'+text.get("settingsGoTo")+text.get("settingsHeadQuality").toLowerCase()+'">'+text.get("settingsHeadQuality")+' <span class="pingVpSettingsDisplayQuality">'+displayQuality+"</span>"+qualityGoIcon+"</li>";itemsSubs+=this.createQualitySubMenu()}this._subi=0;this._selectedSubs=-1;if(subs!=null&&subs.length>0){var subsGoIcon="<img class='pingVpSettingsArrowNext' src='"+this._theme.getIcon(this._theme.getByKey("svgset"),"arrow_right.svg","ffffff")+"' alt='"+text.get("settingsGoTo")+text.get("settingsHeadSubs").toLowerCase()+"'>";items+='<li class="pingVpSettingsMenuItem pingVpSettingsMenuItemSubs" id="pingVpSettingsMenuItemSubs-'+videoOid+'" role="button" tabindex="-1" aria-label="'+text.get("settingsGoTo")+text.get("settingsHeadSubs").toLowerCase()+'">'+text.get("settingsHeadSubs")+' <span class="pingVpSettingsDisplaySubs"></span>'+subsGoIcon+"</li>";itemsSubs+=this.createSubtitlesSubMenu()}if(enableAd){this._activeAudioDescription=activeAudioDescription;var displayAudioDescriptionStatus=this._activeAudioDescription?"("+text.get("settingsAdOn")+")":"("+text.get("settingsAdOff")+")";var adGoIcon="<img class='pingVpSettingsArrowNext' src='"+this._theme.getIcon(this._theme.getByKey("svgset"),"arrow_right.svg","ffffff")+"' alt='"+text.get("settingsGoTo")+text.get("settingsHeadAd").toLowerCase()+"'>";items+='<li class="pingVpSettingsMenuItem pingVpSettingsMenuItemAd" id="pingVpSettingsMenuItemAd-'+videoOid+'" role="button" tabindex="-1" aria-label="'+text.get("settingsGoTo")+text.get("settingsHeadAd").toLowerCase()+'">'+text.get("settingsHeadAd")+' <span class="pingVpSettingsDisplayAd">'+displayAudioDescriptionStatus+"</span>"+adGoIcon+"</li>";itemsSubs+=this.createAdSubMenu()}this._speedi=0;this._selectedSpeed=-1;if(enableSpeed){var speedGoIcon="<img class='pingVpSettingsArrowNext' src='"+this._theme.getIcon(this._theme.getByKey("svgset"),"arrow_right.svg","ffffff")+"' alt='"+text.get("settingsGoTo")+text.get("settingsHeadSpeed").toLowerCase()+"'>";items+='<li class="pingVpSettingsMenuItem pingVpSettingsMenuItemSpeed" id="pingVpSettingsMenuItemSpeed-'+videoOid+'" role="button" tabindex="-1" aria-label="'+text.get("settingsGoTo")+text.get("settingsHeadSpeed").toLowerCase()+'">'+text.get("settingsHeadSpeed")+' <span class="pingVpSettingsDisplaySpeed"></span>'+speedGoIcon+"</li>";itemsSubs+=this.createSpeedSubMenu()}if(enableShare){items+='<li class="pingVpSettingsMenuItem pingVpSettingsMenuItemShare" id="pingVpSettingsMenuItemShare-'+videoOid+'" role="button" tabindex="-1" aria-label="'+text.get("settingsOpen")+text.get("settingsHeadShare").toLowerCase()+text.get("settingsOpenWindow")+'">'+text.get("settingsHeadShare")+"</li>"}if(!controlsDisabled){items+='<li class="pingVpSettingsMenuItem pingVpSettingsMenuItemShortcut" id="pingVpSettingsMenuItemShortcut-'+videoOid+'" role="button" tabindex="-1" aria-label="'+text.get("settingsOpen")+text.get("settingsHeadShortcuts").toLowerCase()+text.get("settingsOpenWindow")+'">'+text.get("settingsHeadShortcuts")+"</li>"}items+='<li class="pingVpSettingsMenuItem pingVpSettingsMenuItemContext pingVpDisableContextClosing" id="pingVpSettingsMenuItemContext-'+videoOid+'" role="button" tabindex="-1" aria-label="'+text.get("settingsOpen")+text.get("settingsHeadContext").toLowerCase()+text.get("settingsOpenWindow")+'">'+text.get("settingsHeadContext")+"</li>";items+="</ul>";items+="</div>";items+=itemsSubs;if(this._mobileCheck){items+="</div>"}this._setOverlay.append(items);this._setMenu=$("#pingVpSettingsMenu-"+videoOid);this._setHeadMenu=$("#pingVpSettingsHeadMenu-"+videoOid);this._setMenu.css("background-color","#"+theme.getByKey("menubackcolor")).css("color","#"+theme.getByKey("menucolor"));this._setMenu.css("text-shadow","unset");$("body").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.checkFocus));if(this._mobileCheck){this._setSettingsOverlay=$("#pingVpSettingsMobileOverlay-"+videoOid);this._closeModal=$("#pingVpSettingsModalCloseHead-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hide));this._closeModal=$("#pingVpSettingsModalCloseQuality-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hide));this._closeModal=$("#pingVpSettingsModalCloseAd-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hide));this._closeModal=$("#pingVpSettingsModalCloseSubtitles-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hide));this._closeModal=$("#pingVpSettingsModalCloseSpeed-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hide))}$(".pingVpSettingsSubMenuReturn-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.closeSub));if(enableQuality){this.setQualitySelected();var f=$bind(this,this.openSub);$("#pingVpSettingsMenuItemQuality-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e){f("quality",e)});$(".pingVpSettingsSubMenuQualityItem-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setQuality))}if(subs!=null&&subs.length>0){this.setSubsSelected(lastSubtitle);var f1=$bind(this,this.openSub);$("#pingVpSettingsMenuItemSubs-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e1){f1("subs",e1)});while(true){$("#pingVpSettingsSubMenuSubsItem-"+this._videoOid+"-"+this._subi).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,this._subi,$bind(this,this.setSubs));if(!(this._subi-->0)){break}}}if(enableAd){this.setAdSelected();var f2=$bind(this,this.openSub);$("#pingVpSettingsMenuItemAd-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e2){f2("ad",e2)});$(".pingVpSettingsSubMenuAdItem-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setAd))}if(enableSpeed){this.setSpeedSelected(lastSpeedOption);var f3=$bind(this,this.openSub);$("#pingVpSettingsMenuItemSpeed-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e3){f3("speed",e3)});while(true){$("#pingVpSpeedMenuItem-"+this._videoOid+"-"+this._speedi).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,this._speedi,$bind(this,this.setSpeed));if(!(this._speedi-->0)){break}}}if(enableShare){$("#pingVpSettingsMenuItemShare-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onShareMenuClick))}if(!controlsDisabled){$("#pingVpSettingsMenuItemShortcut-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onShortcutMenuClick))}$("#pingVpSettingsMenuItemContext-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onContextMenuClick));if(!this._mobileCheck){var locationBottom=controlsBelow?57:69;this._setMenu.css("bottom",locationBottom+"px");if(controlsBelow){this._setMenu.css("right","7px")}this.hide()}}};$hxClasses["pingvp.PingVpSettingsMenu"]=pingvp_PingVpSettingsMenu;pingvp_PingVpSettingsMenu.__name__=["pingvp","PingVpSettingsMenu"];pingvp_PingVpSettingsMenu.prototype={setButtonHandler:function(call){this._buttonCall=call},getActive:function(){return this._menuIsActive},createQualitySubMenu:function(){var setMenu="";setMenu+='<div class="pingVpSettingsSubMenu pingVpMenuFocus pingVpSettingsSubMenuQuality" id="pingVpSettingsSubMenuQuality-'+this._videoOid+'">';if(this._mobileCheck){setMenu+='<div tabindex="0" id="pingVpSettingsModalCloseQuality-'+this._videoOid+'" class="pingVpSettingsModalClose"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}setMenu+='<h3 class="pingVpSettingsMenuItem pingVpSettingsSubMenuReturn pingVpSettingsSubMenuReturn-'+this._videoOid+' pingVpReset" data-return="pingVpSettingsMenuItemQuality" tabindex="-1" role="button" aria-label="'+this._text.get("settingsBackToHead")+'">'+this._goBackIcon+this._text.get("settingsQualityTitle")+"</h3><hr>";setMenu+='<ul class="pingVpSettingsSubMenuUl"><li class="pingVpSettingsMenuItem pingVpSettingsSubMenuQualityItem-'+this._videoOid+'" tabindex="-1" data-quality="Hq" aria-pressed="false" aria-label="'+this._text.get("settingsQualityHDSelect")+'">'+this._text.get("settingsQualityHDFull")+this._checkIcon+'</li><li class="pingVpSettingsMenuItem pingVpSettingsSubMenuQualityItem-'+this._videoOid+'" tabindex="-1" data-quality="Lq" aria-pressed="false" aria-label="'+this._text.get("settingsQualitySDSelect")+'">'+this._text.get("settingsQualitySDFull")+this._checkIcon+"</li></ul></div>";return setMenu},createSubtitlesSubMenu:function(){var setMenu="";setMenu+='<div class="pingVpSettingsSubMenu pingVpMenuFocus pingVpSettingsSubMenuSubs" id="pingVpSettingsSubMenuSubs-'+this._videoOid+'">';if(this._mobileCheck){setMenu+='<div tabindex="0" id="pingVpSettingsModalCloseSubtitles-'+this._videoOid+'" class="pingVpSettingsModalClose"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}setMenu+='<h3 class="pingVpSettingsMenuItem pingVpSettingsSubMenuReturn pingVpSettingsSubMenuReturn-'+this._videoOid+' pingVpReset" data-return="pingVpSettingsMenuItemSubs" tabindex="-1" role="button" aria-label="'+this._text.get("settingsBackToHead")+'">'+this._goBackIcon+this._text.get("settingsSubtitlesTitle")+"</h3><hr>";setMenu+='<ul class="pingVpSettingsSubMenuUl">';var _g=0;var _g1=this._subs;while(_g<_g1.length){var sub=_g1[_g];++_g;this._subi++;setMenu+='<li class="pingVpSettingsMenuItem pingVpSettingsSubMenuSubsItem-'+this._videoOid+'" data-return="pingVpSettingsMenuItemSubs" tabindex="-1" role="button" id="pingVpSettingsSubMenuSubsItem-'+this._videoOid+"-"+this._subi+'" aria-pressed="false" aria-label="'+this._text.get("settingsSubtitlesTurnOn1")+StringTools.htmlEscape(sub.name(),false).toLowerCase()+this._text.get("settingsSubtitlesTurnOn2")+'">'+StringTools.htmlEscape(sub.name(),false)+this._checkIcon+"</li>"}setMenu+='<li class="pingVpSettingsMenuItem pingVpSettingsSubMenuSubsItem-'+this._videoOid+'" data-return="pingVpSettingsMenuItemSubs" tabindex="-1" role="button" id="pingVpSettingsSubMenuSubsItem-'+this._videoOid+"-"+0+'" aria-pressed="false" aria-label="'+this._text.get("settingsSubtitlesTurnOff")+'">'+this._text.get("subtitlesNone")+this._checkIcon+"</li>";setMenu+="</ul>";setMenu+="</div>";return setMenu},createAdSubMenu:function(){var setMenu="";setMenu+='<div class="pingVpSettingsSubMenu pingVpMenuFocus pingVpSettingsSubMenuAd" id="pingVpSettingsSubMenuAd-'+this._videoOid+'">';if(this._mobileCheck){setMenu+='<div tabindex="0" id="pingVpSettingsModalCloseAd-'+this._videoOid+'" class="pingVpSettingsModalClose"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}setMenu+='<h3 class="pingVpSettingsMenuItem pingVpSettingsSubMenuReturn pingVpSettingsSubMenuReturn-'+this._videoOid+' pingVpReset" data-return="pingVpSettingsMenuItemAd" tabindex="-1" role="button" aria-label="'+this._text.get("settingsBackToHead")+'">'+this._goBackIcon+this._text.get("settingsAdTitle")+"</h3><hr>";setMenu+='<ul class="pingVpSettingsSubMenuUl">';setMenu+='<li class="pingVpSettingsMenuItem pingVpSettingsSubMenuAdItem-'+this._videoOid+'" tabindex="-1" role="button" data-ad="on" aria-pressed="false" aria-label="'+this._text.get("settingsAdOnLabel")+'">'+this._text.get("settingsAdOnFull")+this._checkIcon+"</li>";setMenu+='<li class="pingVpSettingsMenuItem pingVpSettingsSubMenuAdItem-'+this._videoOid+'" tabindex="-1" role="button" data-ad="off" aria-pressed="false" aria-label="'+this._text.get("settingsAdOffLabel")+'">'+this._text.get("settingsAdOffFull")+this._checkIcon+"</li>";setMenu+="</ul>";setMenu+="</div>";return setMenu},createSpeedSubMenu:function(){var setMenu="";setMenu+='<div class="pingVpSettingsSubMenu pingVpMenuFocus pingVpSettingsSubMenuSpeed" id="pingVpSettingsSubMenuSpeed-'+this._videoOid+'">';if(this._mobileCheck){setMenu+='<div tabindex="0" id="pingVpSettingsModalCloseSpeed-'+this._videoOid+'" class="pingVpSettingsModalClose"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}setMenu+='<h3 class="pingVpSettingsMenuItem pingVpSettingsSubMenuReturn pingVpSettingsSubMenuReturn-'+this._videoOid+' pingVpReset" data-return="pingVpSettingsMenuItemSpeed" tabindex="-1" role="button" aria-label="'+this._text.get("settingsBackToHead")+'">'+this._goBackIcon+this._text.get("settingsSpeedTitle")+"</h3><hr>";setMenu+='<ul class="pingVpSettingsSubMenuUl">';this._speedi++;setMenu+='<li class="pingVpSettingsMenuItem pingVpSettingsSubMenuSpeedItem-'+this._videoOid+'" data-return="pingVpSettingsMenuItemSpeed" tabindex="-1" role="button"id="pingVpSpeedMenuItem-'+this._videoOid+"-"+this._speedi+'" aria-pressed="false" aria-label="'+this._text.get("settingsSpeed05label")+'">x0.5'+this._checkIcon+"</li>";setMenu+='<li class="pingVpSettingsMenuItem pingVpSettingsSubMenuSpeedItem-'+this._videoOid+'" data-return="pingVpSettingsMenuItemSpeed" tabindex="-1" role="button" id="pingVpSpeedMenuItem-'+this._videoOid+"-"+0+'" aria-pressed="false" aria-label="'+this._text.get("settingsSpeed1label")+'">x1'+this._checkIcon+"</li>";this._speedi++;setMenu+='<li class="pingVpSettingsMenuItem pingVpSettingsSubMenuSpeedItem-'+this._videoOid+'" data-return="pingVpSettingsMenuItemSpeed" tabindex="-1" role="button" id="pingVpSpeedMenuItem-'+this._videoOid+"-"+this._speedi+'" aria-pressed="false" aria-label="'+this._text.get("settingsSpeed15label")+'">x1.5'+this._checkIcon+"</li>";this._speedi++;setMenu+='<li class="pingVpSettingsMenuItem pingVpSettingsSubMenuSpeedItem-'+this._videoOid+'" data-return="pingVpSettingsMenuItemSpeed" tabindex="-1" role="button" id="pingVpSpeedMenuItem-'+this._videoOid+"-"+this._speedi+'" aria-pressed="false" aria-label="'+this._text.get("settingsSpeed2label")+'">x2'+this._checkIcon+"</li>";setMenu+="</ul>";setMenu+="</div>";return setMenu},show:function(){this._isOn=true;this._controlBarOnShow(false);this._checkHideEnable(false);if(this._setCloseOthersCall!=null&&this._mobileCheck){this._setCloseOthersCall()}var _currentSubMenu=this.getJQuerySub();_currentSubMenu.stop().hide();if(this._isSub){this._isSub=false;this._currentSub=""}if(this._mobileCheck){this._setSettingsOverlay.stop().css("display","flex")}else{this._setMenu.stop().removeClass("pingVpShowCode").show();this.setHeight()}this._focus=$(":focus");if(this._focus.hasClass("pingVpControlSettings")){this.setHtmlFocus("head")}},hide:function(){this._isOn=false;this._focus=$(":focus");if(this._mobileCheck){this._setSettingsOverlay.stop().hide()}else{this._setMenu.stop().hide()}if(this._focus.parents(".pingVpSettingsMenu").length!=0){this.resetHtmlFocus();this._setButton.focus()}this._controlBarOnShow(true);this._checkHideEnable(true);if(this._isSub){var _currentSubMenu=this.getJQuerySub();var _currentHeadMenu=this.getJQueryHead();this._isSub=false;this._currentSub="";if(this._mobileCheck){_currentSubMenu.stop().hide();this._setHeadMenu.stop().show()}else{this._setMenu.stop().removeClass("pingVpShowCode");_currentSubMenu.stop().hide()}}if(this._buttonCall!=null){this._buttonCall(false)}},checkClose:function(e){e.preventDefault();this.hide()},checkFocus:function(e){if($(e.target).closest("#pingVpSettingsMenu-"+this._videoOid).length==0&&this._isOn&&$(e.target).closest("#pingVpControlSettings-"+this._videoOid).length==0){this.hide()}},openSub:function(type,e){var _gthis=this;e.stopPropagation();if(!this._isSub){this._isSub=true;this._currentSub=type;if(type=="ad"||type=="quality"||type=="subs"||type=="speed"||type=="share"){var _currentSubMenu=this.getJQuerySub();if(this._mobileCheck){this._setHeadMenu.stop().hide();_currentSubMenu.stop().show();this._focus=$(":focus");if(this._focus.parents(".pingVpSettingsMenu").length!=0){this.setHtmlFocus("sub")}}else{_currentSubMenu.stop().show(0,null,function(){_gthis._setMenu.stop().addClass("pingVpShowCode").animate({height:_currentSubMenu.outerHeight()},200,null,function(){_gthis._focus=$(":focus");if(_gthis._focus.parents(".pingVpSettingsMenu").length!=0){_gthis.setHtmlFocus("sub")}})})}}else{this._isSub=false;this._currentSub=""}}},closeSub:function(e){var _gthis=this;e.stopPropagation();var _currentSubMenu=this.getJQuerySub();var _currentHeadMenu=this.getJQueryHead();this._isSub=false;this._focus=$(":focus");if(this._mobileCheck){_currentSubMenu.stop().hide();this._setHeadMenu.stop().show();this._currentSub="";if(this._focus.parents(".pingVpSettingsMenu").length!=0){this.setHtmlFocus("head")}}else{this._setMenu.stop().removeClass("pingVpShowCode").animate({height:_currentHeadMenu.outerHeight()},200,null,function(){_currentSubMenu.stop().hide();_gthis._currentSub="";if(_gthis._focus.parents(".pingVpSettingsMenu").length!=0){_gthis.setHtmlFocus("head")}})}},closeSubManually:function(){var _gthis=this;var _currentSubMenu=this.getJQuerySub();var _currentHeadMenu=this.getJQueryHead();this._isSub=false;this._focus=$(":focus");if(this._mobileCheck){_currentSubMenu.stop().hide();this._setHeadMenu.stop().show();this._currentSub="";if(this._focus.parents(".pingVpSettingsMenu").length!=0){this.setHtmlFocus("head")}}else{this._setMenu.stop().removeClass("pingVpShowCode").animate({height:_currentHeadMenu.outerHeight()},200,null,function(){_currentSubMenu.stop().hide();_gthis._currentSub="";if(_gthis._focus.parents(".pingVpSettingsMenu").length!=0){_gthis.setHtmlFocus("head")}})}},isShown:function(){return this._isOn},isSub:function(){return this._isSub},getJQueryHead:function(){return $("#pingVpSettingsHeadMenu-"+this._videoOid)},getJQuerySub:function(){if(this._currentSub=="quality"){return $("#pingVpSettingsSubMenuQuality-"+this._videoOid)}else{if(this._currentSub=="subs"){return $("#pingVpSettingsSubMenuSubs-"+this._videoOid)}else{if(this._currentSub=="ad"){return $("#pingVpSettingsSubMenuAd-"+this._videoOid)}else{if(this._currentSub=="speed"){return $("#pingVpSettingsSubMenuSpeed-"+this._videoOid)}else{return $("#pingVpSettingsSubMenuShare-"+this._videoOid)}}}}},setHeight:function(){if(this.isSub()){var _currentSubMenu=this.getJQuerySub();var newHeight=_currentSubMenu.outerHeight();this._setMenu.css("height",newHeight+"px")}else{var newHeight1=$("#pingVpSettingsHeadMenu-"+this._videoOid).outerHeight();this._setMenu.css("height",newHeight1+"px")}},setHtmlFocus:function(element){this._focus=$(":focus");this._return=this._focus.attr("data-return");this._setMenu.find('[tabindex="0"]').attr("tabindex","-1");var allowFocus=element=="head"?this.getJQueryHead():this.getJQuerySub();allowFocus.find('[tabindex="-1"]').attr("tabindex","0");if(this._return!=null&&allowFocus.find("#"+this._return+"-"+this._videoOid+'[tabindex="0"]').length!=0){allowFocus.find("#"+this._return+"-"+this._videoOid+'[tabindex="0"]').focus()}else{allowFocus.find('[tabindex="0"]').first().focus()}},resetHtmlFocus:function(){this._setMenu.find('[tabindex="0"]').attr("tabindex","-1")},checkDownAndUpKeys:function(e){this._focus=$(":focus");if(e.which==38&&this._focus.parents(".pingVpSettingsMenu").length!=0){e.preventDefault();if(this._focus.parents(".pingVpSettingsSubMenuUl").length!=0&&this._focus.prevAll('.pingVpSettingsMenuItem[tabindex="0"]').length<1){this._focus.parents(".pingVpSettingsSubMenuUl").siblings(".pingVpSettingsSubMenuReturn").first().focus()}else{this._focus.prevAll('.pingVpSettingsMenuItem[tabindex="0"]').first().focus()}}if(e.which==40&&this._focus.parents(".pingVpSettingsMenu").length!=0){e.preventDefault();if(this._focus.hasClass("pingVpSettingsSubMenuReturn")){this._focus.siblings(".pingVpSettingsSubMenuUl").find('.pingVpSettingsMenuItem[tabindex="0"]').first().focus()}else{this._focus.nextAll('.pingVpSettingsMenuItem[tabindex="0"]').first().focus()}}},setQualitySelected:function(){$(".pingVpSettingsSubMenuQualityItem-"+this._videoOid+".pingVpSettingsSelected").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");var dataQualitySelected=this._isHq?"Hq":"Lq";$(".pingVpSettingsSubMenuQualityItem-"+this._videoOid+'[data-quality="'+dataQualitySelected+'"]').addClass("pingVpSettingsSelected").attr("aria-pressed","true")},setQuality:function(e){var selectedQuality=$(e.target).attr("data-quality");if(selectedQuality=="Hq"&&!this._isHq){this._isHq=true;this._highQualityCall();this.hide();this.setQualitySelected()}else{if(selectedQuality=="Lq"&&this._isHq){this._isHq=false;this._lowQualityCall();this.hide();this.setQualitySelected()}else{this.hide()}}},setAdSelected:function(){$(".pingVpSettingsSubMenuAdItem-"+this._videoOid+".pingVpSettingsSelected").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");var dataAdSelected=this._activeAudioDescription?"on":"off";$(".pingVpSettingsSubMenuAdItem-"+this._videoOid+'[data-ad="'+dataAdSelected+'"]').addClass("pingVpSettingsSelected").attr("aria-pressed","true");var displayAudioDescriptionStatus=this._activeAudioDescription?"("+this._text.get("settingsAdOn")+")":"("+this._text.get("settingsAdOff")+")";$("#pingVpSettingsMenuItemAd-"+this._videoOid+" .pingVpSettingsDisplayAd").html(displayAudioDescriptionStatus)},setAd:function(e){var selectedAd=$(e.target).attr("data-ad");if(selectedAd=="on"&&!this._activeAudioDescription){this._activeAudioDescription=true;this._adOnCall();this.hide();this.setAdSelected()}else{if(selectedAd=="off"&&this._activeAudioDescription){this._activeAudioDescription=false;this._adOffCall();this.hide();this.setAdSelected()}else{this.hide()}}},setSubsSelected:function(selected){if(selected==-1){selected=this._subtitles.getDefault()}if(this._selectedSubs!=selected){this._subtitles.onSubSelect(selected);this._selectedSubs=selected;if(this._subtitlesMenuCurrentSubsCall!=null){this._subtitlesMenuCurrentSubsCall(selected)}if(this._selectedSubs==0){$("#pingVpSettingsMenuItemSubs-"+this._videoOid+" .pingVpSettingsDisplaySubs").text("")}else{var sub=this._subtitles.getSelectedSub();if(sub!=null){var textSub=Std.string(sub.name());$("#pingVpSettingsMenuItemSubs-"+this._videoOid+" .pingVpSettingsDisplaySubs").text("("+HxOverrides.substr(textSub,0,3)+")")}else{selected=this._subtitles.getDefault();$("#pingVpSettingsMenuItemSubs-"+this._videoOid+" .pingVpSettingsDisplaySubs").text("")}}$(".pingVpSettingsSubMenuSubsItem-"+this._videoOid+".pingVpSettingsSelected").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$("#pingVpSettingsSubMenuSubsItem-"+this._videoOid+"-"+selected).addClass("pingVpSettingsSelected").attr("aria-pressed","true")}},setSubs:function(e){var currentSelectedSubs=this._selectedSubs;this.closeSubManually();this.setSubsSelected(e.data);if(currentSelectedSubs!=this._selectedSubs){if(this._selectedSubs==0){this._event("Subtitle turned off")}else{var sub=this._subtitles.getSelectedSub();this._event('Subtitle selected "'+Std.string(sub.name())+'"')}}},setSubtitlesMenuSubsHandler:function(call){this._subtitlesMenuCurrentSubsCall=call},setSubtitlesMenuHandler:function(call){this._subtitlesMenuCall=call},setSpeedSelected:function(selected){if(selected==-1){selected=this._speed.getDefault()}if(this._selectedSpeed!=selected){this._speed.onSubSelect(selected);var updateActiveText=this._speed.getSelectedText();$("#pingVpSettingsMenuItemSpeed-"+this._videoOid+" .pingVpSettingsDisplaySpeed").text("("+updateActiveText+")");$(".pingVpSettingsSubMenuSpeedItem-"+this._videoOid+".pingVpSettingsSelected").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$("#pingVpSpeedMenuItem-"+this._videoOid+"-"+selected).addClass("pingVpSettingsSelected").attr("aria-pressed","true");this._selectedSpeed=selected}},setSpeedSelectedByKeys:function(selected){if(this._selectedSpeed!=selected){var updateActiveText=this._speed.getSelectedText();$("#pingVpSettingsMenuItemSpeed-"+this._videoOid+" .pingVpSettingsDisplaySpeed").text("("+updateActiveText+")");$(".pingVpSettingsSubMenuSpeedItem-"+this._videoOid+".pingVpSettingsSelected").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$("#pingVpSpeedMenuItem-"+this._videoOid+"-"+selected).addClass("pingVpSettingsSelected").attr("aria-pressed","true");this._selectedSpeed=selected;this._event('Speed changed "'+this._speed.getSelectedText()+'"')}},setSpeed:function(e){this.closeSubManually();var currentSelectedSpeed=this._selectedSpeed;this.setSpeedSelected(e.data);if(currentSelectedSpeed!=this._selectedSpeed){this._event('Speed changed "'+this._speed.getSelectedText()+'"')}},onShareMenuClick:function(){if(this._shareMenuClickCall!=null){this._shareMenuClickCall();this._pauseVideoClickCall();if(this.isShown()){this.hide()}}},onShortcutMenuClick:function(){if(this._shortcutMenuClickCall!=null){this._shortcutMenuClickCall();this._pauseVideoClickCall();if(this.isShown()){this.hide()}}},onContextMenuClick:function(){if(this._contextMenuClickCall!=null){this._contextMenuClickCall();if(this.isShown()){this.hide()}}},onCopy:function(){this._event("Share - Copy url");var urlToCopy=this._share;function fallbackCopyTextToClipboard(o){var e=document.createElement("textarea");e.value=o,document.body.appendChild(e),e.focus(),e.select();document.execCommand("copy");document.body.removeChild(e)}function copyTextToClipboard(o){navigator.clipboard?navigator.clipboard.writeText(o):fallbackCopyTextToClipboard(o)}copyTextToClipboard(urlToCopy);this._messages.showMessage("ItemCopiedSucces",600)},onShareFacebook:function(e){this._event("Share - Facebook");var s=this._share;var url="https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(s);window.open(url,"newwindow")},onShareTwitter:function(e){this._event("Share - Twitter");var s=this._share;var url="https://www.twitter.com/share?url="+encodeURIComponent(s);window.open(url,"newwindow")},setShareMenuHandler:function(shareCall,pauseCall){this._shareMenuClickCall=shareCall;this._pauseVideoClickCall=pauseCall},setShortcutMenuHandler:function(shortcutCall,pauseCall){this._shortcutMenuClickCall=shortcutCall;this._pauseVideoClickCall=pauseCall},setContextMenuHandler:function(contextCall){this._contextMenuClickCall=contextCall},setCloseOthersCall:function(call){this._setCloseOthersCall=call},__class__:pingvp_PingVpSettingsMenu};var pingvp_PingVpSettingsMenuOverlay=function(videoOid,videoName,overlay,container,theme,text,controlsBelow,controlsDisabled,controlBar,controlBarOnShow,checkHideEnable,setSettingsButton,enableQuality,isHq,onLqButton,onHqButton,subs,subtitles,lastSubtitle,lastSpeedOption,enableSpeed,speed,enableShare,enableAd,activeAudioDescription,onAdButtonOn,onAdButtonOff,messages,event){this._container=container;this._videoOid=videoOid;this._videoName=videoName;this._controlBar=controlBar;this._mobileCheck=false;this._settings=null;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._mobileCheck=true}this._settingsMenu=new pingvp_PingVpSettingsMenu(videoOid,theme,text,controlsBelow,controlsDisabled,controlBar,controlBarOnShow,checkHideEnable,enableQuality,isHq,onLqButton,onHqButton,subs,subtitles,lastSubtitle,lastSpeedOption,enableSpeed,speed,enableShare,enableAd,activeAudioDescription,onAdButtonOn,onAdButtonOff,messages,this._mobileCheck,event);this._settingsMenu.setButtonHandler(setSettingsButton);if(this._mobileCheck){this._settings=$("#pingVpSettingsMobileOverlay-"+videoOid)}else{this._settings=$("#pingVpSettingsMenu-"+videoOid)}if(this._settingsMenu.getActive()){this.resize()}};$hxClasses["pingvp.PingVpSettingsMenuOverlay"]=pingvp_PingVpSettingsMenuOverlay;pingvp_PingVpSettingsMenuOverlay.__name__=["pingvp","PingVpSettingsMenuOverlay"];pingvp_PingVpSettingsMenuOverlay.prototype={showSettingsMenu:function(){if(this._settingsMenu.isShown()){this._settingsMenu.hide()}else{this._settingsMenu.show()}},forceHideSettingsMenu:function(){this._settingsMenu.hide()},resize:function(){this._overlay=$("#pingVpOverlay-"+this._videoOid);var definer=960;var definerW=640;var currentWidth=this._overlay.outerWidth();var percent=100;var percentW=0.25;if(currentWidth>definer){percent-=(definer-currentWidth)/32}else{if(currentWidth<definer){percent+=(currentWidth-definer)/32}}this._settings.css("font-size",percent+"%");if(this._mobileCheck){var width=this._container.getWidth();var height=this._container.getHeight();this._settings.css("width",width);this._settings.css("height",height)}else{if(currentWidth>definerW){percentW-=(currentWidth-definerW)/220/100}percentW=currentWidth*percentW;this._settings.css("min-width",percentW+"px");this._settingsMenu.setHeight()}},checkSettingsMenu:function(){return this._settingsMenu.isShown()},checkMenuActive:function(){return this._settingsMenu.getActive()},setSpeedSetting:function(selected){this._settingsMenu.setSpeedSelectedByKeys(selected)},checkUpAndDownKeys:function(e){this._settingsMenu.checkDownAndUpKeys(e)},checkCloseKeys:function(e){this._settingsMenu.checkClose(e)},setSubsMenuSelected:function(selected){this._settingsMenu.setSubsSelected(selected)},setSubtitlesMenuHandler:function(call){this._settingsMenu.setSubtitlesMenuHandler(call)},setSubtitlesMenuSubsHandler:function(call){this._settingsMenu.setSubtitlesMenuSubsHandler(call)},setShareMenuHandler:function(shareCall,pauseCall){this._settingsMenu.setShareMenuHandler(shareCall,pauseCall)},setShortcutMenuHandler:function(shortcutCall,pauseCall){this._settingsMenu.setShortcutMenuHandler(shortcutCall,pauseCall)},setContextMenuHandler:function(contextCall){this._settingsMenu.setContextMenuHandler(contextCall)},setCloseOthersCall:function(call){this._settingsMenu.setCloseOthersCall(call)},__class__:pingvp_PingVpSettingsMenuOverlay};var pingvp_PingVpShareOverlay=function(videoOid,theme,text,container,hoverFix,enableShare,controlBarOnShow,videoTitle,postersUri,event){this._videoOid=videoOid;this._container=container;this._theme=theme;this._enableShare=enableShare;this._controlBarOnShow=controlBarOnShow;this._videoTitle=videoTitle;this._postersUri=postersUri;this._text=text;this._event=event;this._overlayIsActive=false;this._isOn=false;if(this._enableShare){this._share=window.location.href;this._isMobile=false;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._isMobile=true}var mobileModalClass="";var mobileOverlayClass="";if(this._isMobile){mobileModalClass="pingVpShareModalMobile";mobileOverlayClass="pingVpShareOverlayMobile"}this._overlayIsActive=true;this._overlay=$("#pingVpOverlay-"+this._videoOid);this._overlay.append('<div id="pingVpShareOverlay-'+videoOid+'" class="pingVpShareOverlay '+mobileOverlayClass+'"><div id="pingVpShareModal-'+videoOid+'" class="pingVpMenuFocus pingVpShareModal '+mobileModalClass+'"></div>');this._shareOverlay=$("#pingVpShareOverlay-"+this._videoOid);this._shareModal=$("#pingVpShareModal-"+this._videoOid);this._shareModal.append('<h2 class="pingVpReset pingVpShareModalTitle">'+text.get("shareModalTitle")+"</h2>");this._shareModal.append('<div id="pingVpShareModalWrapper-'+videoOid+'" class="pingVpShareModalWrapper"><ul id="pingVpShareModalIcons-'+videoOid+'" class="pingVpShareModalIcons" role="list"></ul></div>');this._iconsRowScroller=$("#pingVpShareModalWrapper-"+videoOid);this._iconsWrapper=$("#pingVpShareModalIcons-"+videoOid);this._iconLinkedIn=theme.getIcon(theme.getByKey("svgset"),"linkedin.svg","");this._iconsWrapper.append('<li id="pingVpShareLinkedIn-'+videoOid+'" class="pingVpShareModalIcon"><div role="button" tabindex="0" aria-label="'+text.get("shareLabelOn")+'LinkedIn"><img class="pingVpReset pingVpShareModalIconSvg" alt="" src="'+this._iconLinkedIn+'"/><span class="pingVpReset pingVpShareModalIconText">LinkedIn</span></div></li>');this._shareLinkedIn=$("#pingVpShareLinkedIn-"+videoOid);this._iconTwitter=theme.getIcon(theme.getByKey("svgset"),"x.svg","");this._iconsWrapper.append('<li id="pingVpShareTwitter-'+videoOid+'" class="pingVpShareModalIcon"><div role="button" tabindex="0" aria-label="'+text.get("shareLabelOn")+'X" ><img class="pingVpReset pingVpShareModalIconSvg" alt="" src="'+this._iconTwitter+'"/><span class="pingVpReset pingVpShareModalIconText">X</span></div></li>');this._shareTwitter=$("#pingVpShareTwitter-"+videoOid);this._iconFacebook=theme.getIcon(theme.getByKey("svgset"),"facebook.svg","");this._iconsWrapper.append('<li id="pingVpShareFacebook-'+videoOid+'" class="pingVpShareModalIcon"><div role="button" tabindex="0" aria-label="'+text.get("shareLabelOn")+'Facebook"><img class="pingVpReset pingVpShareModalIconSvg" alt="" src="'+this._iconFacebook+'"/><span class="pingVpReset pingVpShareModalIconText">Facebook</span></div></li>');this._shareFacebook=$("#pingVpShareFacebook-"+videoOid);this._iconPinterest=theme.getIcon(theme.getByKey("svgset"),"pinterest.svg","");this._iconsWrapper.append('<li id="pingVpSharePinterest-'+videoOid+'" class="pingVpShareModalIcon"><div role="button" tabindex="0" aria-label="'+text.get("shareLabelOn")+'Pinterest"><img class="pingVpReset pingVpShareModalIconSvg" alt="" src="'+this._iconPinterest+'"/><span class="pingVpReset pingVpShareModalIconText">Pinterest</span></div></li>');this._sharePinterest=$("#pingVpSharePinterest-"+videoOid);this._iconEmail=theme.getIcon(theme.getByKey("svgset"),"email.svg","");this._iconsWrapper.append('<li id="pingVpShareEmail-'+videoOid+'" class="pingVpShareModalIcon"><div role="button" tabindex="0" aria-label="'+text.get("shareLabelVia")+'Email"><img class="pingVpReset pingVpShareModalIconSvg" alt="" src="'+this._iconEmail+'"/><span class="pingVpReset pingVpShareModalIconText">Email</span></div></li>');this._shareEmail=$("#pingVpShareEmail-"+videoOid);if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._iconArrowLeft=theme.getIcon(theme.getByKey("svgset"),"arrow_left.svg","fff");this._iconsRowScroller.append('<div id="pingVpShareIconsArrowLeft-'+videoOid+'" class="pingVpShareIconsArrowLeft"><img class="pingVpReset pingVpShareModalArrowIconSvg" src="'+this._iconArrowLeft+'"/></div>');this._iconLeftArrow=$("#pingVpShareIconsArrowLeft-"+videoOid);this._iconArrowRight=theme.getIcon(theme.getByKey("svgset"),"arrow_right.svg","fff");this._iconsRowScroller.append('<div id="pingVpShareIconsArrowRight-'+videoOid+'" class="pingVpShareIconsArrowRight"><img class="pingVpReset pingVpShareModalArrowIconSvg" src="'+this._iconArrowRight+'"/></div>');this._iconRightArrow=$("#pingVpShareIconsArrowRight-"+videoOid)}this._shareModal.append('<div id="pingVpShareCopyWrapper-'+videoOid+'" class="pingVpShareCopyWrapper"></div>');this._copyWrapper=$("#pingVpShareCopyWrapper-"+videoOid);if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._copyWrapper.append('<div id="pingVpShareCopyInputGroup-'+videoOid+'" class="pingVpShareCopyInputGroup"></div>');this._copyMobileInputGroup=$("#pingVpShareCopyInputGroup-"+videoOid);this._copyMobileInputGroup.append('<input tabindex="0" id="pingVpShareCopyMobileInput-'+videoOid+'" class="pingVpShareCopyMobileInput" value="'+this._share+'" aria-label="'+text.get("shareCopyLabel")+'" readonly/>');this._shareUrlInput=$("#pingVpShareCopyMobileInput-"+videoOid);this._iconCopyMobile=theme.getIcon(theme.getByKey("svgset"),"copy.svg","fff");this._copyMobileInputGroup.append('<button tabindex="0" aria-label="'+text.get("shareCopyButton")+'" title="'+text.get("shareCopyButton")+'" id="pingVpShareCopyMobileButton-'+videoOid+'" class="pingVpShareCopyMobileButton"><img class="pingVpReset pingVpShareModalArrowIconSvg" src="'+this._iconCopyMobile+'"/></button>');this._shareUrlButton=$("#pingVpShareCopyMobileButton-"+videoOid)}else{this._copyWrapper.append('<input tabindex="0" id="pingVpShareCopyInput-'+videoOid+'" class="pingVpShareCopyInput" value="'+this._share+'" aria-label="'+text.get("shareCopyLabel")+'" readonly/>');this._shareUrlInput=$("#pingVpShareCopyInput-"+videoOid);this._copyWrapper.append('<button tabindex="0" aria-label="'+text.get("shareCopyButton")+'" title="'+text.get("shareCopyButton")+'" id="pingVpShareCopyButton-'+videoOid+'" class="pingVpShareCopyButton">'+text.get("shareCopyButton")+"</button>");this._shareUrlButton=$("#pingVpShareCopyButton-"+videoOid)}this._closeModalIcon=theme.getIcon(theme.getByKey("svgset"),"cross.svg","fff");this._shareModal.append('<div tabindex="0" role="button" aria-label="'+text.get("closeModalImg")+'" id="pingVpShareModalClose-'+videoOid+'" class="pingVpShareModalClose"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'" alt="'+text.get("closeModalImg")+'"/></div>');this._setButton=$("#pingVpControlShare-"+videoOid);this._containerJquery=$("#pingVpOverlayPlayContainer-"+videoOid);this._closeModal=$("#pingVpShareModalClose-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hideShareOverlay));this._subtitlesWrapper=$("#pingVpSubtitles-"+this._videoOid);this._timeSlider=$("#pingVpTimeSlider-"+this._videoOid);this._shareOverlay.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onOverlayClick));this._shareLinkedIn.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onShareLinkedIn));this._shareTwitter.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onShareTwitter));this._shareFacebook.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onShareFacebook));this._sharePinterest.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onSharePinterest));this._shareEmail.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onShareEmail));if(this._iconLeftArrow!=null){this._iconLeftArrow.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onLeftArrow))}if(this._iconRightArrow!=null){this._iconRightArrow.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onRightArrow))}this._shareUrlButton.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onCopy));this.resize(hoverFix)}};$hxClasses["pingvp.PingVpShareOverlay"]=pingvp_PingVpShareOverlay;pingvp_PingVpShareOverlay.__name__=["pingvp","PingVpShareOverlay"];pingvp_PingVpShareOverlay.prototype={showShareOverlay:function(){if(this.isShown()){this._controlBarOnShow(true);if(!this._isMobile){this._subtitlesWrapper.show();this._timeSlider.show()}this._shareOverlay.hide();this.resetHtmlFocus();this._isOn=false}else{if(this._setCloseOthersCall!=null){this._setCloseOthersCall()}this._controlBarOnShow(false);if(!this._isMobile){this._subtitlesWrapper.hide();this._timeSlider.hide()}this._shareOverlay.css("display","flex");this.setHtmlFocus();this._isOn=true}},hideShareOverlay:function(){if(this.isShown()){this._isOn=false;if(!this._isMobile){this._subtitlesWrapper.show();this._timeSlider.show()}this._shareOverlay.hide();if(this._buttonCall!=null){this._buttonCall(false)}this._focus=$(":focus");if(this._focus.parents(".pingVpShareOverlay").length!=0){this._setButton.focus()}this.resetHtmlFocus();this._controlBarOnShow(true)}},manualShowShareOverlay:function(){if(!this.isShown()){if(this._setCloseOthersCall!=null){this._setCloseOthersCall()}this._isOn=true;if(!this._isMobile){this._subtitlesWrapper.hide();this._timeSlider.hide()}this._shareOverlay.css("display","flex");this.setHtmlFocus();this._controlBarOnShow(false)}},setHtmlFocus:function(){this._shareModal.find('[tabindex="-1"]').attr("tabindex","0");this._shareModal.find('[tabindex="0"]').first().focus()},resetHtmlFocus:function(){this._shareModal.find('[tabindex="0"]').attr("tabindex","-1")},checkCloseKeys:function(e){e.preventDefault();this.hideShareOverlay()},checkUpAndDownKeys:function(e){},resize:function(hoverFix){this._overlay=$("#pingVpOverlay-"+this._videoOid);var definer=960;var definerW=640;var currentWidth=this._overlay.outerWidth();var percent=100;var percentW=0.25;if(currentWidth>definer){percent-=(definer-currentWidth)/32}else{if(currentWidth<definer){percent+=(currentWidth-definer)/32}}this._shareOverlay.css("font-size",percent+"%");var width=this._container.getWidth();var height=this._container.getHeight();this._shareOverlay.css("width",width);this._shareOverlay.css("height",height-hoverFix)},checkMenuActive:function(){return this._overlayIsActive},isShown:function(){return this._isOn},onOverlayClick:function(e){var _currentClicked=$(e.target);if(_currentClicked.parents(".pingVpShareModal").length==0&&_currentClicked.hasClass("pingVpShareOverlay")&&this._isOn){this.hideShareOverlay()}},onShareLinkedIn:function(e){this._event("Share - LinkedIn");var s=this._share;var url="https://www.linkedin.com/sharing/share-offsite/?url="+encodeURIComponent(s);window.open(url,"newwindow")},onShareTwitter:function(e){this._event("Share - Twitter");var s=this._share;var url="https://www.twitter.com/share?url="+encodeURIComponent(s);window.open(url,"newwindow")},onShareFacebook:function(e){this._event("Share - Facebook");var s=this._share;var url="https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(s);window.open(url,"newwindow")},onSharePinterest:function(e){this._event("Share - Pinterest");var s=this._share;var url="https://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(s)+"&description=";var s1=this._videoTitle;var url1=url+encodeURIComponent(s1)+"&is_video=true&media=";var s2=this._postersUri;var url2=url1+encodeURIComponent(s2);window.open(url2,"newwindow")},onShareEmail:function(e){this._event("Share - Email");var s=this._text.get("shareEmailSubject");var url="mailto:?subject="+encodeURIComponent(s)+"&body=";var s1=this._share;var url1=url+encodeURIComponent(s1);window.open(url1,"newwindow")},onCopy:function(){this._event("Share - Copy url");var urlToCopy=this._shareUrlInput.attr("value");function fallbackCopyTextToClipboard(o){var e=document.createElement("textarea");e.value=o,document.body.appendChild(e),e.focus(),e.select();document.execCommand("copy");document.body.removeChild(e)}function copyTextToClipboard(o){navigator.clipboard?navigator.clipboard.writeText(o):fallbackCopyTextToClipboard(o)}copyTextToClipboard(urlToCopy)},onLeftArrow:function(e){var scrollWidth=this._iconsWrapper.outerWidth();var currentScroll=this._iconsWrapper.scrollLeft();this._iconsWrapper.stop().animate({scrollLeft:currentScroll-scrollWidth},800)},onRightArrow:function(e){var scrollWidth=this._iconsWrapper.outerWidth();var currentScroll=this._iconsWrapper.scrollLeft();this._iconsWrapper.stop().animate({scrollLeft:currentScroll+scrollWidth},800)},setButtonHandler:function(call){this._buttonCall=call},setCloseOthersCall:function(call){this._setCloseOthersCall=call},__class__:pingvp_PingVpShareOverlay};var pingvp_PingVpShortcutOverlay=function(videoOid,theme,text,container,hoverFix,enableShortcut,controlBarOnShow,videoTitle,postersUri,event){this._videoOid=videoOid;this._container=container;this._theme=theme;this._enableShortcut=enableShortcut;this._controlBarOnShow=controlBarOnShow;this._videoTitle=videoTitle;this._postersUri=postersUri;this._text=text;this._event=event;this._overlayIsActive=false;this._isOn=false;if(this._enableShortcut){this._isMobile=false;if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._isMobile=true}var mobileModalClass="";var mobileOverlayClass="";if(this._isMobile){mobileModalClass="pingVpShortcutModalMobile";mobileOverlayClass="pingVpShortcutOverlayMobile"}this._overlayIsActive=true;this._overlay=$("#pingVpOverlay-"+this._videoOid);this._overlay.append('<div id="pingVpShortcutOverlay-'+videoOid+'" class="pingVpShortcutOverlay '+mobileOverlayClass+'"><div id="pingVpShortcutModal-'+videoOid+'" class="pingVpShortcutModal '+mobileModalClass+'"></div>');this._shortcutOverlay=$("#pingVpShortcutOverlay-"+this._videoOid);this._shortcutModal=$("#pingVpShortcutModal-"+this._videoOid);if(this._overlay.outerWidth()<480){this._shortcutModal.addClass("pingVpShortcutModalMobile")}this._shortcutModal.append('<h2 class="pingVpReset pingVpShortcutModalTitle">'+text.get("shortcutModalTitle")+"</h2>");this._shortcutModal.append('<div id="pingVpShortcutModalWrapper-'+videoOid+'" class="pingVpShortcutModalWrapper"><div class="pingVpReset pingVpShortcutRow"></div></div>');this._shortcutRows=$("#pingVpShortcutModalWrapper-"+videoOid+" .pingVpShortcutRow");var setupIcons='<div class="pingVpReset pingVpShortcutCol"><ul class="pingVpReset pingVpShortcutList">';var tempIcon="";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_m.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="M is '+text.get("shortcutModalM")+'" /> <span class="pingVpReset">'+text.get("shortcutModalM")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_f.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="F is '+text.get("shortcutModalF")+'" /> <span class="pingVpReset">'+text.get("shortcutModalF")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_up.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="Arrow key up is '+text.get("shortcutModalUp")+'" /> <span class="pingVpReset">'+text.get("shortcutModalUp")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_down.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="Arrow key down is '+text.get("shortcutModalDown")+'" /> <span class="pingVpReset">'+text.get("shortcutModalDown")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_right.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="Arrow key right is '+text.get("shortcutModalRight")+'" /> <span class="pingVpReset">'+text.get("shortcutModalRight")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_left.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="Arrow key left is '+text.get("shortcutModalLeft")+'" /> <span class="pingVpReset">'+text.get("shortcutModalLeft")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_space_"+this._text.get("langCode")+".svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="Spacebar is '+text.get("shortcutModalSpace")+'" /> <span class="pingVpReset">'+text.get("shortcutModalSpace")+"</span></li>";if(!this._isMobile){setupIcons+="</ul></div>";setupIcons+='<div class="pingVpReset pingVpShortcutCol"><ul class="pingVpReset pingVpShortcutList">'}tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_c.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="C is '+text.get("shortcutModalC")+'" /> <span class="pingVpReset">'+text.get("shortcutModalC")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_chevron_right.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="Chevron right is '+text.get("shortcutModalChevRight")+'" /> <span class="pingVpReset">'+text.get("shortcutModalChevRight")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_chevron_left.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="Chevron left is '+text.get("shortcutModalChevLeft")+'" /> <span class="pingVpReset">'+text.get("shortcutModalChevLeft")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_s.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="S is '+text.get("shortcutModalS")+'" /> <span class="pingVpReset">'+text.get("shortcutModalS")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_t.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="T is '+text.get("shortcutModalT")+'" /> <span class="pingVpReset">'+text.get("shortcutModalT")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_a.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="A is '+text.get("shortcutModalA")+'" /> <span class="pingVpReset">'+text.get("shortcutModalA")+"</span></li>";tempIcon=theme.getShortcut(theme.getByKey("svgset"),"shortcut_esc.svg","fff");setupIcons+='<li class="pingVpReset"><img class="pingVpReset" src="'+tempIcon+'" alt="Escape is '+text.get("shortcutModalEsc")+'" /> <span class="pingVpReset">'+text.get("shortcutModalEsc")+"</span></li>";setupIcons+="</ul></div>";this._shortcutRows.append(setupIcons);this._closeModalIcon=theme.getIcon(theme.getByKey("svgset"),"cross.svg","fff");this._shortcutModal.append('<div tabindex="0" id="pingVpShortcutModalClose-'+videoOid+'" class="pingVpShortcutModalClose" aria-label="'+text.get("closeModalImg")+'" role="button"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'" alt="'+text.get("closeModalImg")+'"/></div>');this._setButton=$("#pingVpControlSettings-"+videoOid);this._containerJquery=$("#pingVpOverlayPlayContainer-"+videoOid);this._closeModal=$("#pingVpShortcutModalClose-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hideShortcutOverlay));this._subtitlesWrapper=$("#pingVpSubtitles-"+this._videoOid);this._timeSlider=$("#pingVpTimeSlider-"+this._videoOid);this._shortcutOverlay.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.onOverlayClick));this.resize(hoverFix)}};$hxClasses["pingvp.PingVpShortcutOverlay"]=pingvp_PingVpShortcutOverlay;pingvp_PingVpShortcutOverlay.__name__=["pingvp","PingVpShortcutOverlay"];pingvp_PingVpShortcutOverlay.prototype={showShortcutOverlay:function(){if(this.isShown()){this._controlBarOnShow(true);if(!this._isMobile){this._subtitlesWrapper.show();this._timeSlider.show()}this._shortcutOverlay.hide();this.resetHtmlFocus();this._isOn=false}else{if(this._setCloseOthersCall!=null){this._setCloseOthersCall()}this._controlBarOnShow(false);if(!this._isMobile){this._subtitlesWrapper.hide();this._timeSlider.hide()}this._shortcutOverlay.css("display","flex");this.setHtmlFocus();this._isOn=true}},hideShortcutOverlay:function(){if(this.isShown()){this._isOn=false;if(!this._isMobile){this._subtitlesWrapper.show();this._timeSlider.show()}this._shortcutOverlay.hide();this._focus=$(":focus");if(this._focus.parents(".pingVpShortcutOverlay").length!=0){this._setButton.focus()}this.resetHtmlFocus();this._controlBarOnShow(true)}},manualShowShortcutOverlay:function(){if(!this.isShown()){if(this._setCloseOthersCall!=null){this._setCloseOthersCall()}this._isOn=true;if(!this._isMobile){this._subtitlesWrapper.hide();this._timeSlider.hide()}this._shortcutOverlay.css("display","flex");this.setHtmlFocus();this._controlBarOnShow(false)}},setHtmlFocus:function(){this._shortcutModal.find('[tabindex="-1"]').attr("tabindex","0");this._shortcutModal.find('[tabindex="0"]').first().focus()},resetHtmlFocus:function(){this._shortcutModal.find('[tabindex="0"]').attr("tabindex","-1")},checkCloseKeys:function(e){e.preventDefault();this.hideShortcutOverlay()},resize:function(hoverFix){this._overlay=$("#pingVpOverlay-"+this._videoOid);var definer=960;var definerW=640;var currentWidth=this._overlay.outerWidth();var percent=100;var percentW=0.25;if(!this._isMobile){if(this._overlay.outerWidth()<480){this._shortcutModal.addClass("pingVpShortcutModalMobile")}else{this._shortcutModal.removeClass("pingVpShortcutModalMobile")}}if(currentWidth>definer){percent-=(definer-currentWidth)/32}else{if(currentWidth<definer){percent+=(currentWidth-definer)/32}}this._shortcutOverlay.css("font-size",percent+"%");var width=this._container.getWidth();var height=this._container.getHeight();this._shortcutOverlay.css("width",width);this._shortcutOverlay.css("height",height-hoverFix)},checkMenuActive:function(){return this._overlayIsActive},isShown:function(){return this._isOn},onOverlayClick:function(e){var _currentClicked=$(e.target);if(_currentClicked.parents(".pingVpShortcutModal").length==0&&_currentClicked.hasClass("pingVpShortcutOverlay")&&this._isOn){this.hideShortcutOverlay()}},setCloseOthersCall:function(call){this._setCloseOthersCall=call},__class__:pingvp_PingVpShortcutOverlay};var pingvp_PingVpSidebar=function(videoOid,container,videoScript,controlBar,controlBarOnShow,text,theme,onResize){this._isActive=true;this._isOn=false;this._videoOid=videoOid;this._controlBar=controlBar;this._controlBarOnShow=controlBarOnShow;this._text=text;this._theme=theme;this._onResize=onResize;var seo=videoScript.getSeo();container.get().append('<div id="pingVpSidebarContainer-'+videoOid+'" class="pingVpSidebarContainer pingVpReset"><div id="pingVpTranscriptMenu-'+videoOid+'" class="pingVpReset pingVpTranscriptMenu"></div><div tabindex="-1" class="pingVpTranscript"></div></div>');this._container=container;this._containerElem=container.get();this._containerElem.removeClass("pingVpShowSidebar");this._sidebarContainer=$("#pingVpSidebarContainer-"+videoOid);this._transcriptMenu=$("#pingVpTranscriptMenu-"+this._videoOid);this._transcriptMenu.append('<h2 class="pingVpReset pingVpTranscriptTitle">'+text.get("transcriptTitle")+"</h2>");this._closeModalIcon=theme.getIcon(theme.getByKey("svgset"),"cross.svg","fff");this._transcriptMenu.append('<div tabindex="-1" role="button" aria-label="'+text.get("closeModalImg")+'" id="pingVpTranscriptClose-'+videoOid+'" class="pingVpTranscriptClose"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'" alt="'+text.get("closeModalImg")+'"/></div>');this._closeModal=$("#pingVpTranscriptClose-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hideSidebar));this.addSidebarContent(seo,videoScript);this.resizeSidebar()};$hxClasses["pingvp.PingVpSidebar"]=pingvp_PingVpSidebar;pingvp_PingVpSidebar.__name__=["pingvp","PingVpSidebar"];pingvp_PingVpSidebar.prototype={addSidebarContent:function(seo,videoScript){if(seo!=null){var transcript=seo.transcript();if(transcript!=null){this._sidebarContainer.find(".pingVpTranscript").html(transcript)}}},showSidebar:function(){if(this.isShown()){this._controlBarOnShow(true);this._containerElem.removeClass("pingVpShowSidebar");this._transcriptMenu.find('[tabindex="0"]').attr("tabindex","-1");this._onResize(null);this._isOn=false}else{if(this._setCloseOthersCall!=null){this._setCloseOthersCall()}this._controlBarOnShow(false);this._containerElem.addClass("pingVpShowSidebar");this._transcriptMenu.find('[tabindex="-1"]').attr("tabindex","0");this._onResize(null);this._isOn=true}},hideSidebar:function(){if(this.isShown()){this._isOn=false;this._containerElem.removeClass("pingVpShowSidebar");this._transcriptMenu.find('[tabindex="0"]').attr("tabindex","-1");if(this._buttonCall!=null){this._buttonCall(false)}this._controlBarOnShow(true);this._onResize(null)}},manualShowSidebar:function(){if(!this.isShown()){if(this._setCloseOthersCall!=null){this._setCloseOthersCall()}this._isOn=true;this._containerElem.addClass("pingVpShowSidebar");this._transcriptMenu.find('[tabindex="-1"]').attr("tabindex","0");this._controlBarOnShow(false);this._onResize(null)}},resizeSidebar:function(){var docWidth=$(window.document).width();var playerWidth=$("#pingVpVideoContainer-"+this._videoOid).width();if(docWidth<=499||playerWidth<=499){this._containerElem.addClass("pingVpSidebarFullWidth")}else{this._containerElem.removeClass("pingVpSidebarFullWidth")}},isShown:function(){return this._isOn},setButtonHandler:function(call){this._buttonCall=call},setCloseOthersCall:function(call){this._setCloseOthersCall=call},isActive:function(){return this._isActive},__class__:pingvp_PingVpSidebar};var pingvp_PingVpSpeedOverlay=function(videoOid,videoName,overlay,container,text,controlsBelowHeight,event){this._container=container;this._videoOid=videoOid;this._videoName=videoName;this._selected=-1;this._event=event;this._text=text};$hxClasses["pingvp.PingVpSpeedOverlay"]=pingvp_PingVpSpeedOverlay;pingvp_PingVpSpeedOverlay.__name__=["pingvp","PingVpSpeedOverlay"];pingvp_PingVpSpeedOverlay.prototype={loadSelected:function(){var selected=0;this.onSubSelect(selected)},getDefault:function(){var selected=0;var i=1;return selected},setSpeedMenuHandler:function(call){this._menuCall=call},onSubSelect:function(selected){if(this._menuCall!=null){this._menuCall(selected)}this._selected=selected;this._video=window.document.getElementById("pingVpVideo-"+this._videoOid);if(this._selected==1){this._video.playbackRate=0.5;this._video.defaultPlaybackRate=0.5}else{if(this._selected==0){this._video.playbackRate=1;this._video.defaultPlaybackRate=1}else{if(this._selected==2){this._video.playbackRate=1.5;this._video.defaultPlaybackRate=1.5}else{if(this._selected==3){this._video.playbackRate=2;this._video.defaultPlaybackRate=2}else{this._video.playbackRate=1;this._video.defaultPlaybackRate=1}}}}},setSpeedUp:function(){var setSpeed=0;if(this._selected==1){setSpeed=0}else{if(this._selected==0){setSpeed=2}else{setSpeed=this._selected+1}}if(setSpeed>3){setSpeed=3}if(this._announcement!=null){this._announcement.setMessage(this._text.get("announceSpeed"+setSpeed))}this.onSubSelect(setSpeed)},setSpeedDown:function(){var setSpeed=0;if(this._selected==2){setSpeed=0}else{if(this._selected==0){setSpeed=1}else{if(this._selected==1){setSpeed=1}else{setSpeed=this._selected-1}}}if(setSpeed<0){setSpeed=0}if(this._announcement!=null){this._announcement.setMessage(this._text.get("announceSpeed"+setSpeed))}this.onSubSelect(setSpeed)},getSelected:function(){return this._selected},getSelectedText:function(){if(this._selected==1){return"x0.5"}else{if(this._selected==0){return"x1"}else{if(this._selected==2){return"x1.5"}else{if(this._selected==3){return"x2"}else{return"x1"}}}}},setAnnounceClass:function(announceClass){this._announcement=announceClass},__class__:pingvp_PingVpSpeedOverlay};var pingvp_PingVpStyle=function(styleUrl,id){if($("link[href='"+styleUrl+"']").length==0){$('<link rel="stylesheet" type="text/css" href="'+styleUrl+'" />').appendTo("head")}};$hxClasses["pingvp.PingVpStyle"]=pingvp_PingVpStyle;pingvp_PingVpStyle.__name__=["pingvp","PingVpStyle"];pingvp_PingVpStyle.prototype={__class__:pingvp_PingVpStyle};var pingvp_PingVpSubtitle=function(subtitle){this._subtitle=subtitle};$hxClasses["pingvp.PingVpSubtitle"]=pingvp_PingVpSubtitle;pingvp_PingVpSubtitle.__name__=["pingvp","PingVpSubtitle"];pingvp_PingVpSubtitle.prototype={name:function(){return this.getStringField("name")},lang:function(){return this.getStringField("lang")},file:function(){return this.getStringField("file")},format:function(){return this.getStringField("format")},default_:function(){return this.getBoolField("default")},getStringField:function(field){if(this._subtitle==null){return null}var value=Reflect.field(this._subtitle,field);if(value==null){return null}return Std.string(value)},getBoolField:function(field){if(this._subtitle==null){return null}var ret=Reflect.field(this._subtitle,field);return ret},__class__:pingvp_PingVpSubtitle};var pingvp_PingVpSubtitlesMenu=function(videoOid,theme,text,controlsBelow,controlBar,controlBarOnShow,checkHideEnable,subs,subtitles,lastSubtitle,enableShare,mobileCheck,lastSubtitlesSettings,event){this._currentSettings=new haxe_ds_StringMap();this._defaultSettings=new haxe_ds_StringMap();this._windowSettings=new haxe_ds_StringMap();this._backgroundSettings=new haxe_ds_StringMap();this._textSettings=new haxe_ds_StringMap();this._videoOid=videoOid;this._isSub=false;this._setOverlay=$("#pingVpOverlay-"+videoOid);this._setButton=$("#pingVpControlSubtitles-"+videoOid);this._container=$("#pingVpOverlayPlayContainer-"+videoOid);this._controlsBelow=controlsBelow;this._controlBarOnShow=controlBarOnShow;this._checkHideEnable=checkHideEnable;this._controlBar=controlBar;this._subtitles=subtitles;this._menuIsActive=true;this._layer=0;this._theme=theme;this._event=event;this._text=text;this._shareIsActive=enableShare;this._mobileCheck=mobileCheck;this._currentTextOpacity=1;this._currentBackgroundOpacity=0;this._currentWindowOpacity=0;this._goBackIcon='<img class="pingVpSettingsArrowBack" src="'+this._theme.getIcon(this._theme.getByKey("svgset"),"arrow_left.svg","ffffff")+'" alt="'+text.get("settingsGoBack")+'">';this._checkIcon='<img class="pingVpIsChecked" src="'+this._theme.getIcon(this._theme.getByKey("svgset"),"check.svg","ffffff")+'" alt="checked icon" >';this._arrowIcon="<img class='pingVpSettingsArrowNext' src='"+this._theme.getIcon(this._theme.getByKey("svgset"),"arrow_right.svg","ffffff")+"' alt='"+text.get("subtitlesArrowNext")+"'>";this._arrowIconMt1="<img class='pingVpSettingsArrowNext pingVpMt-n1' src='"+this._theme.getIcon(this._theme.getByKey("svgset"),"arrow_right.svg","ffffff")+"' alt='"+text.get("subtitlesArrowNext")+"'>";this._resetIcon='<img class="pingVpSettingsResetIcon" src="'+this._theme.getFull(this._theme.getByKey("svgset"),"setting_reset.svg","ffffff")+'" alt="'+text.get("subtitlesSettingsLabelReset")+'">';var _this=this._textSettings;var value=pingvp_PingVpConfigRead.get().subtitlesTextFontFamily;if(__map_reserved["font-family"]!=null){_this.setReserved("font-family",value)}else{_this.h["font-family"]=value}var _this1=this._textSettings;var value1=pingvp_PingVpConfigRead.get().subtitlesTextColor;if(__map_reserved.color!=null){_this1.setReserved("color",value1)}else{_this1.h.color=value1}var _this2=this._textSettings;var value2=pingvp_PingVpConfigRead.get().subtitlesTextSize;if(__map_reserved.size!=null){_this2.setReserved("size",value2)}else{_this2.h.size=value2}var _this3=this._textSettings;var value3=pingvp_PingVpConfigRead.get().subtitlesTextOpacity;if(__map_reserved.opacity!=null){_this3.setReserved("opacity",value3)}else{_this3.h.opacity=value3}var _this4=this._textSettings;var value4=pingvp_PingVpConfigRead.get().subtitlesTextOutline;if(__map_reserved.outline!=null){_this4.setReserved("outline",value4)}else{_this4.h.outline=value4}var _this5=this._backgroundSettings;var value5=pingvp_PingVpConfigRead.get().subtitlesBackgroundColor;if(__map_reserved.color!=null){_this5.setReserved("color",value5)}else{_this5.h.color=value5}var _this6=this._backgroundSettings;var value6=pingvp_PingVpConfigRead.get().subtitlesBackgroundBlur;if(__map_reserved.blur!=null){_this6.setReserved("blur",value6)}else{_this6.h.blur=value6}var _this7=this._backgroundSettings;var value7=pingvp_PingVpConfigRead.get().subtitlesBackgroundOpacity;if(__map_reserved.opacity!=null){_this7.setReserved("opacity",value7)}else{_this7.h.opacity=value7}var _this8=this._windowSettings;var value8=pingvp_PingVpConfigRead.get().subtitlesWindowColor;if(__map_reserved.color!=null){_this8.setReserved("color",value8)}else{_this8.h.color=value8}var _this9=this._windowSettings;var value9=pingvp_PingVpConfigRead.get().subtitlesWindowOpacity;if(__map_reserved.opacity!=null){_this9.setReserved("opacity",value9)}else{_this9.h.opacity=value9}var _this10=this._defaultSettings;var value10=this.cloneMap(this._textSettings);if(__map_reserved.text!=null){_this10.setReserved("text",value10)}else{_this10.h.text=value10}var _this11=this._defaultSettings;var value11=this.cloneMap(this._backgroundSettings);if(__map_reserved.background!=null){_this11.setReserved("background",value11)}else{_this11.h.background=value11}var _this12=this._defaultSettings;var value12=this.cloneMap(this._windowSettings);if(__map_reserved.window!=null){_this12.setReserved("window",value12)}else{_this12.h.window=value12}if(lastSubtitlesSettings.keys().hasNext()){this._currentSettings=lastSubtitlesSettings}else{var _this13=this._currentSettings;var value13=this.cloneMap(this._textSettings);if(__map_reserved.text!=null){_this13.setReserved("text",value13)}else{_this13.h.text=value13}var _this14=this._currentSettings;var value14=this.cloneMap(this._backgroundSettings);if(__map_reserved.background!=null){_this14.setReserved("background",value14)}else{_this14.h.background=value14}var _this15=this._currentSettings;var value15=this.cloneMap(this._windowSettings);if(__map_reserved.window!=null){_this15.setReserved("window",value15)}else{_this15.h.window=value15}}var items="";var itemsSubs="";this._closeModalIcon=theme.getIcon(theme.getByKey("svgset"),"cross.svg","fff");if(this._mobileCheck){items+='<div id="pingVpSubtitlesMobileOverlay-'+videoOid+'" class="pingVpSubtitlesMobileOverlay">'}items+='<div id="pingVpSubtitlesMenu-'+videoOid+'" class="pingVpSubtitlesMenu" role="menu" aria-label="'+text.get("settingsMenuLabel")+'">';items+='<div class="pingVpSubtitlesHeadMenu pingVpMenuFocus" id="pingVpSubtitlesHeadMenu-'+videoOid+'">';if(this._mobileCheck){items+='<div tabindex="0" id="pingVpSubtitlesModalClose-'+videoOid+'" class="pingVpSubtitlesModalClose pingVpSubtitlesModalClose-'+videoOid+'"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}items+='<h2 class="pingVpSubtitlesMenuTitle pingVpReset pingVpSubtitlesMenuTitle-'+videoOid+'">'+text.get("settingsSubtitlesTitle")+"</h2><hr>";items+="<ul>";if(this._mobileCheck){items+='<div class="pingVpSubtitlesScrollable">'}var subi=0;this._selectedSubs=-1;var _g=0;while(_g<subs.length){var sub=subs[_g];++_g;++subi;items+='<li class="pingVpSubtitlesMenuItem pingVpSubtitlesMenuItem-'+this._videoOid+'" tabindex="-1" role="button" id="pingVpSubtitlesMenuItem-'+videoOid+"-"+subi+'" aria-pressed="false" aria-label="'+this._text.get("settingsSubtitlesTurnOn1")+StringTools.htmlEscape(sub.name(),false).toLowerCase()+this._text.get("settingsSubtitlesTurnOn2")+'">'+StringTools.htmlEscape(sub.name(),false)+this._checkIcon+"</li>"}items+='<li class="pingVpSubtitlesMenuItem pingVpSubtitlesMenuItem-'+this._videoOid+'" tabindex="-1" role="button" id="pingVpSubtitlesMenuItem-'+videoOid+"-"+0+'" aria-pressed="false" aria-label="'+this._text.get("settingsSubtitlesTurnOff")+'">'+text.get("subtitlesNone")+this._checkIcon+"</li>";items+='<hr><li class="pingVpSubtitlesMenuSettings" tabindex="-1" role="button" id="pingVpSubtitlesMenuSettings-'+videoOid+'" aria-label="'+text.get("subtitlesSettingsLabel")+'">'+text.get("subtitlesSettings")+this._arrowIcon+"</li>";if(this._mobileCheck){items+="</div>"}items+="</div>";itemsSubs+='<div class="pingVpSubtitlesSubMenu pingVpMenuFocus" id="pingVpSubtitlesSubMenuSettings-'+videoOid+'">';if(this._mobileCheck){itemsSubs+='<div tabindex="0" id="pingVpSubtitlesModalCloseSettings-'+videoOid+'" class="pingVpSubtitlesModalClose pingVpSubtitlesModalClose-'+videoOid+'"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}itemsSubs+='<h3 class="pingVpSubtitlesMenuItem pingVpSettingsSubMenuReturn pingVpSubtitlesSubMenuReturn-'+videoOid+' pingVpReset" data-return="pingVpSubtitlesMenuSettings" tabindex="-1" role="button" aria-label="'+this._text.get("settingsGoBack")+'">'+this._goBackIcon+text.get("subtitlesSettings")+"</h3><hr><ul>";if(this._mobileCheck){itemsSubs+='<div class="pingVpSubtitlesScrollable">'}itemsSubs+='<li class="pingVpSubtitlesMenuSettingsItem pingVpSubtitlesSettingsOpenText" tabindex="-1" role="button" aria-label="'+text.get("subtitlesSettingsLabelGo")+text.get("subtitlesSettingsText").toLowerCase()+text.get("subtitlesSettingsLabelEdit")+'" id="pingVpSubtitlesSettingsOpenText-'+videoOid+'">'+text.get("subtitlesSettingsText")+this._arrowIcon+"</li>";itemsSubs+='<li class="pingVpSubtitlesMenuSettingsItem pingVpSubtitlesSettingsOpenBackground" tabindex="-1" role="button" aria-label="'+text.get("subtitlesSettingsLabelGo")+text.get("subtitlesSettingsBackground").toLowerCase()+text.get("subtitlesSettingsLabelEdit")+'" id="pingVpSubtitlesSettingsOpenBackground-'+videoOid+'">'+text.get("subtitlesSettingsBackground")+this._arrowIcon+"</li>";itemsSubs+='<li class="pingVpSubtitlesMenuSettingsItem pingVpSubtitlesSettingsOpenWindow" tabindex="-1" role="button" aria-label="'+text.get("subtitlesSettingsLabelGo")+text.get("subtitlesSettingsWindow").toLowerCase()+text.get("subtitlesSettingsLabelEdit")+'" id="pingVpSubtitlesSettingsOpenWindow-'+videoOid+'">'+text.get("subtitlesSettingsWindow")+this._arrowIcon+"</li>";itemsSubs+='<hr><li class="pingVpSubtitlesMenuSettingsItem" tabindex="-1" role="button" aria-label="'+text.get("subtitlesSettingsLabelReset")+'" id="pingVpSubtitlesMenuSettingsReset-'+videoOid+'">'+this._resetIcon+text.get("subtitlesSettingsReset")+"</li>";if(this._mobileCheck){itemsSubs+="</div>"}itemsSubs+="</ul></div>";itemsSubs+='<div class="pingVpSubtitlesSubMenuText pingVpMenuFocus pingVpSubtitlesSubSubMenu" id="pingVpSubtitlesSubMenuText-'+videoOid+'">';if(this._mobileCheck){itemsSubs+='<div tabindex="0" id="pingVpSubtitlesModalCloseSettingsText-'+videoOid+'" class="pingVpSubtitlesModalClose pingVpSubtitlesModalClose-'+videoOid+'"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}itemsSubs+='<h3 class="pingVpSubtitlesMenuItem pingVpSettingsSubMenuReturn pingVpSubtitlesSubMenuReturnSettings-'+videoOid+' pingVpReset" data-return="pingVpSubtitlesSettingsOpenText" tabindex="-1" role="button" aria-label="'+this._text.get("settingsGoBackToSubSettings")+'">'+this._goBackIcon+text.get("subtitlesSettingsText")+"</h3><hr><ul>";if(this._mobileCheck){itemsSubs+='<div class="pingVpSubtitlesScrollable">'}itemsSubs+='<li class="pingVpSubtitlesMenuSettingsItem pingVpSubtitlesTextFontFamily pingVpKeepFontSize" id="pingVpSubtitlesTextFontFamily-'+videoOid+'" tabindex="-1" role="button" aria-pressed="false" aria-label="'+text.get("subtitlesSettingsLabelGo")+text.get("subtitlesTextFontFamily").toLowerCase()+text.get("subtitlesSettingsLabelEdit")+'">'+text.get("subtitlesTextFontFamily")+' <span class="pingVpSubtitlesDisplayFontFamily pingVpSubtitlesMenuExtraLabel"></span>'+this._arrowIconMt1+"</li>";itemsSubs+='<li class="pingVpSubtitlesMenuSettingsLabel pingVpSubtitlesTextColor" id="pingVpSubtitlesTextColor-'+videoOid+'">'+text.get("subtitlesTextColor");itemsSubs+="<br/>"+this.setupHTMLColorPicker("Text");itemsSubs+="</li>";itemsSubs+='<li class="pingVpSubtitlesMenuSettingsLabel pingVpSubtitlesTextFontsize" id="pingVpSubtitlesTextFontsize-'+videoOid+'">'+text.get("subtitlesTextFontsize");itemsSubs+="<br/>"+this.setupHTMLFontSizePicker("Text");itemsSubs+="</li>";itemsSubs+='<li class="pingVpSubtitlesMenuSettingsLabel pingVpSubtitlesTextOpacity" id="pingVpSubtitlesTextOpacity-'+videoOid+'">'+text.get("subtitlesTextOpacity");itemsSubs+="<br/>"+this.setupHTMLOpacityPicker("Text",false);itemsSubs+="</li>";itemsSubs+='<li class="pingVpSubtitlesMenuSettingsItem pingVpSubtitlesTextOutline pingVpKeepFontSize" id="pingVpSubtitlesTextOutline-'+videoOid+'" tabindex="-1" role="button" aria-label="'+text.get("subtitlesSettingsLabelGo")+text.get("subtitlesTextOutline").toLowerCase()+text.get("subtitlesSettingsLabelEdit")+'">'+text.get("subtitlesTextOutline")+' <span class="pingVpSubtitlesDisplayOutline pingVpSubtitlesMenuExtraLabel"></span>'+this._arrowIconMt1+"</li>";itemsSubs+='<hr><li class="pingVpSubtitlesMenuSettingsItem" tabindex="-1" role="button" aria-label="'+this._text.get("subtitlesSettingsResetText")+'" id="pingVpSubtitlesMenuTextSettingsReset-'+videoOid+'">'+this._resetIcon+text.get("subtitlesSettingsResetText")+"</li>";if(this._mobileCheck){itemsSubs+="</div>"}itemsSubs+="</ul></div>";itemsSubs+='<div class="pingVpSubtitlesSubMenuFontFamily pingVpMenuFocus pingVpSubtitlesSubSubSubMenu" id="pingVpSubtitlesSubMenuFontFamily-'+videoOid+'">';if(this._mobileCheck){itemsSubs+='<div tabindex="0" role="button" id="pingVpSubtitlesModalCloseSettingsFontFamily-'+videoOid+'" class="pingVpSubtitlesModalClose pingVpSubtitlesModalClose-'+videoOid+'"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}itemsSubs+='<h3 class="pingVpSubtitlesMenuItem pingVpSettingsSubMenuReturn pingVpSubtitlesSubSubMenuReturnSettings-'+videoOid+' pingVpReset" data-return="pingVpSubtitlesTextFontFamily" tabindex="-1" role="button" aria-label="'+this._text.get("settingsGoBackToSubSettings")+'">'+this._goBackIcon+text.get("subtitlesTextFontFamily")+"</h3><hr><ul>";if(this._mobileCheck){itemsSubs+='<div class="pingVpSubtitlesScrollable">'}itemsSubs+=this.setupHTMLFontFamilyPicker("Text");if(this._mobileCheck){itemsSubs+="</div>"}itemsSubs+="</ul></div>";itemsSubs+='<div class="pingVpSubtitlesSubMenuOutline pingVpMenuFocus pingVpSubtitlesSubSubSubMenu" id="pingVpSubtitlesSubMenuOutline-'+videoOid+'">';if(this._mobileCheck){itemsSubs+='<div tabindex="0" role="button" id="pingVpSubtitlesModalCloseSettingsOutline-'+videoOid+'" class="pingVpSubtitlesModalClose pingVpSubtitlesModalClose-'+videoOid+'"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}itemsSubs+='<h3 class="pingVpSubtitlesMenuItem pingVpSettingsSubMenuReturn pingVpSubtitlesSubSubMenuReturnSettings-'+videoOid+' pingVpReset" data-return="pingVpSubtitlesTextOutline" tabindex="-1" role="button" aria-label="'+this._text.get("settingsGoBackToSubSettings")+'">'+this._goBackIcon+text.get("subtitlesTextOutline")+"</h3><hr></ul>";if(this._mobileCheck){itemsSubs+='<div class="pingVpSubtitlesScrollable">'}itemsSubs+=this.setupHTMLOutlinePicker("Text");if(this._mobileCheck){itemsSubs+="</div>"}itemsSubs+="</ul></div>";itemsSubs+='<div class="pingVpSubtitlesSubMenuBackground pingVpMenuFocus pingVpSubtitlesSubSubMenu" id="pingVpSubtitlesSubMenuBackground-'+videoOid+'">';if(this._mobileCheck){itemsSubs+='<div tabindex="0" role="button" id="pingVpSubtitlesModalCloseSettingsBackground-'+videoOid+'" class="pingVpSubtitlesModalClose pingVpSubtitlesModalClose-'+videoOid+'"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}itemsSubs+='<h3 class="pingVpSubtitlesMenuItem pingVpSettingsSubMenuReturn pingVpSubtitlesSubMenuReturnSettings-'+videoOid+' pingVpReset" data-return="pingVpSubtitlesSettingsOpenBackground" tabindex="-1" role="button" aria-label="'+this._text.get("settingsGoBackToSubSettings")+'">'+this._goBackIcon+text.get("subtitlesSettingsBackground")+"</h3><hr><ul>";if(this._mobileCheck){itemsSubs+='<div class="pingVpSubtitlesScrollable">'}itemsSubs+='<li class="pingVpSubtitlesMenuSettingsLabel pingVpSubtitlesBackgroundColor" id="pingVpSubtitlesBackgroundColor-'+videoOid+'">'+text.get("subtitlesBackgroundColor");itemsSubs+="<br/>"+this.setupHTMLColorPicker("Background");itemsSubs+="</li>";itemsSubs+='<li class="pingVpSubtitlesMenuSettingsLabel pingVpSubtitlesBackgroundOpacity" id="pingVpSubtitlesBackgroundOpacity-'+videoOid+'">'+text.get("subtitlesBackgroundOpacity");itemsSubs+="<br/>"+this.setupHTMLOpacityPicker("Background",true);itemsSubs+="</li>";itemsSubs+='<li class="pingVpSubtitlesMenuSettingsLabel pingVpSubtitlesBackgroundBlur" id="pingVpSubtitlesBackgroundBlur-'+videoOid+'">'+text.get("subtitlesBackgroundBlur");itemsSubs+='<br/><div id="pingVpBlurWrapperBackground-'+videoOid+'">';itemsSubs+='<span data-setting="blur" data-value="true" class="pingVpBlurPicker pingVpBlurPickTrue" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectBlurOn")+'">Aan</span>';itemsSubs+='<span data-setting="blur" data-value="false" class="pingVpBlurPicker pingVpBlurPickFalse" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectBlurOff")+'">Uit</span>';itemsSubs+="</div>";itemsSubs+="</li>";itemsSubs+='<hr><li class="pingVpSubtitlesMenuSettingsItem" tabindex="-1" role="button" aria-label="'+this._text.get("subtitlesSettingsResetBackground")+'" id="pingVpSubtitlesMenuBackgroundSettingsReset-'+videoOid+'">'+this._resetIcon+text.get("subtitlesSettingsResetBackground")+"</li>";if(this._mobileCheck){itemsSubs+="</div>"}itemsSubs+="<ul></div>";itemsSubs+='<div class="pingVpSubtitlesSubMenuWindow pingVpMenuFocus pingVpSubtitlesSubSubMenu" id="pingVpSubtitlesSubMenuWindow-'+videoOid+'">';if(this._mobileCheck){itemsSubs+='<div tabindex="0" role="button" id="pingVpSubtitlesModalCloseSettingsWindow-'+videoOid+'" class="pingVpSubtitlesModalClose pingVpSubtitlesModalClose-'+videoOid+'"><img class="pingVpReset pingVpCloseModalSvg" src="'+this._closeModalIcon+'"/></div>'}itemsSubs+='<h3 class="pingVpSubtitlesMenuItem pingVpSettingsSubMenuReturn pingVpSubtitlesSubMenuReturnSettings-'+videoOid+' pingVpReset" data-return="pingVpSubtitlesSettingsOpenWindow" tabindex="-1" role="button" aria-label="'+this._text.get("settingsGoBackToSubSettings")+'">'+this._goBackIcon+text.get("subtitlesSettingsWindow")+"</h3><hr><ul>";if(this._mobileCheck){itemsSubs+='<div class="pingVpSubtitlesScrollable">'}itemsSubs+='<li class="pingVpSubtitlesMenuSettingsLabel pingVpSubtitlesBackgroundColor" id="pingVpSubtitlesBackgroundColor-'+videoOid+'">'+text.get("subtitlesWindowColor");itemsSubs+="<br/>"+this.setupHTMLColorPicker("Window");itemsSubs+="</li>";itemsSubs+='<li class="pingVpSubtitlesMenuSettingsLabel pingVpSubtitlesBackgroundOpacity" id="pingVpSubtitlesBackgroundOpacity-'+videoOid+'">'+text.get("subtitlesWindowOpacity");itemsSubs+="<br/>"+this.setupHTMLOpacityPicker("Window",true);itemsSubs+="</li>";itemsSubs+='<hr><li class="pingVpSubtitlesMenuSettingsItem" tabindex="-1" role="button" aria-label="'+this._text.get("subtitlesSettingsResetWindow")+'" id="pingVpSubtitlesMenuWindowSettingsReset-'+videoOid+'">'+this._resetIcon+text.get("subtitlesSettingsResetWindow")+"</li>";if(this._mobileCheck){itemsSubs+="</div>"}itemsSubs+="</ul></div></div>";items+=itemsSubs;if(this._mobileCheck){items+="</div>"}this._setOverlay.append(items);this._setMenu=$("#pingVpSubtitlesMenu-"+videoOid);this._setMenu.css("background-color","#"+theme.getByKey("menubackcolor")).css("color","#"+theme.getByKey("menucolor"));this._setMenu.css("text-shadow","0 0 2px #"+theme.getByKey("menubackcolor"));$("body").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.checkFocus));if(this._mobileCheck){this._setSubtitlesOverlay=$("#pingVpSubtitlesMobileOverlay-"+videoOid);this._closeModal=$(".pingVpSubtitlesModalClose-"+this._videoOid);this._closeModal.on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.hide))}this.setSubsSelected(lastSubtitle);while(true){$("#pingVpSubtitlesMenuItem-"+this._videoOid+"-"+subi).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,subi,$bind(this,this.setSubs));if(subi--<=0){break}}var f=$bind(this,this.openSubMenu);$("#pingVpSubtitlesMenuSettings-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e){f("settings",1,e)});var f1=$bind(this,this.openSubMenu);$("#pingVpSubtitlesSettingsOpenText-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e1){f1("text",2,e1)});var f2=$bind(this,this.openSubMenu);$("#pingVpSubtitlesSettingsOpenBackground-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e2){f2("background",2,e2)});var f3=$bind(this,this.openSubMenu);$("#pingVpSubtitlesSettingsOpenWindow-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e3){f3("window",2,e3)});var f4=$bind(this,this.openSubMenu);$("#pingVpSubtitlesTextFontFamily-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e4){f4("font-family",3,e4)});var f5=$bind(this,this.openSubMenu);$("#pingVpSubtitlesTextOutline-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e5){f5("outline",3,e5)});var f6=$bind(this,this.closeSubMenu);$(".pingVpSubtitlesSubMenuReturnSettings-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e6){f6("settings",e6)});var f7=$bind(this,this.closeSubMenu);$(".pingVpSubtitlesSubSubMenuReturnSettings-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e7){f7("text",e7)});var f8=$bind(this,this.closeSubMenu);$(".pingVpSubtitlesSubMenuReturn-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,function(e8){f8("home",e8)});$("#pingVpColorPickerWrapperText-"+videoOid+" .pingVpColorPickerBox").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setTextSetting));$("#pingVpFontSizePickerWrapper-"+videoOid+" .pingVpFontsizePicker").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setTextSetting));$("#pingVpOpacityPickerWrapperText-"+videoOid+" .pingVpOpacityPicker").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setTextSetting));$("#pingVpSubtitlesSubMenuOutline-"+videoOid+" .pingVpSubtitlesSettingsSetTextOutline").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setTextSetting));$("#pingVpSubtitlesSubMenuFontFamily-"+videoOid+" .pingVpSubtitlesSettingsSetTextFontFamily").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setTextSetting));$("#pingVpColorPickerWrapperBackground-"+videoOid+" .pingVpColorPickerBox").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setBackgroundSetting));$("#pingVpOpacityPickerWrapperBackground-"+videoOid+" .pingVpOpacityPicker").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setBackgroundSetting));$("#pingVpBlurWrapperBackground-"+videoOid+" .pingVpBlurPicker").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setBackgroundSetting));$("#pingVpColorPickerWrapperWindow-"+videoOid+" .pingVpColorPickerBox").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setWindowSetting));$("#pingVpOpacityPickerWrapperWindow-"+videoOid+" .pingVpOpacityPicker").on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setWindowSetting));$("#pingVpSubtitlesMenuTextSettingsReset-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setResetText));$("#pingVpSubtitlesMenuBackgroundSettingsReset-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setResetBackground));$("#pingVpSubtitlesMenuWindowSettingsReset-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setResetWindow));$("#pingVpSubtitlesMenuSettingsReset-"+videoOid).on(pingvp_PingVpDevice.isTouchEventDevice()?"touchstart":"click",null,$bind(this,this.setResetAll));if(!this._mobileCheck){var locationBottom=controlsBelow?57:69;this._setMenu.css("bottom",locationBottom+"px");this.hide()}this._setCurrentMenu=$("#pingVpSubtitlesHeadMenu-"+videoOid);this.handleInitialSetup()};$hxClasses["pingvp.PingVpSubtitlesMenu"]=pingvp_PingVpSubtitlesMenu;pingvp_PingVpSubtitlesMenu.__name__=["pingvp","PingVpSubtitlesMenu"];pingvp_PingVpSubtitlesMenu.prototype={setupHTMLColorPicker:function(category){var setupPicker="";setupPicker+='<div id="pingVpColorPickerWrapper'+category+"-"+this._videoOid+'">';setupPicker+='<input data-setting="color" data-value="#ffffff" type="checkbox" class="pingVpReset pingVpColorPickerBox pingVpColorPickerWhite" aria-label="'+this._text.get("selectColorWhite")+'" name="pingVpSubtitlesMenu'+category+'Color" value="fff">';setupPicker+='<input data-setting="color" data-value="#ffff00" type="checkbox" class="pingVpReset pingVpColorPickerBox pingVpColorPickerYellow" aria-label="'+this._text.get("selectColorYellow")+'" name="pingVpSubtitlesMenu'+category+'Color" value="ffff00">';setupPicker+='<input data-setting="color" data-value="#00ff00" type="checkbox" class="pingVpReset pingVpColorPickerBox pingVpColorPickerGreen" aria-label="'+this._text.get("selectColorGreen")+'" name="pingVpSubtitlesMenu'+category+'Color" value="00ff00">';setupPicker+='<input data-setting="color" data-value="#00ffff" type="checkbox" class="pingVpReset pingVpColorPickerBox pingVpColorPickerCyan" aria-label="'+this._text.get("selectColorCyan")+'" name="pingVpSubtitlesMenu'+category+'Color" value="00ffff">';setupPicker+='<input data-setting="color" data-value="#0000ff" type="checkbox" class="pingVpReset pingVpColorPickerBox pingVpColorPickerBlue" aria-label="'+this._text.get("selectColorBlue")+'" name="pingVpSubtitlesMenu'+category+'Color" value="0000ff">';setupPicker+='<input data-setting="color" data-value="#ff00ff" type="checkbox" class="pingVpReset pingVpColorPickerBox pingVpColorPickerMagenta" aria-label="'+this._text.get("selectColorMagenta")+'" name="pingVpSubtitlesMenu'+category+'Color" value="ff00ff">';setupPicker+='<input data-setting="color" data-value="#ff0000" type="checkbox" class="pingVpReset pingVpColorPickerBox pingVpColorPickerRed" aria-label="'+this._text.get("selectColorRed")+'" name="pingVpSubtitlesMenu'+category+'Color" value="ff0000">';setupPicker+='<input data-setting="color" data-value="#000000" type="checkbox" class="pingVpReset pingVpColorPickerBox pingVpColorPickerBlack" aria-label="'+this._text.get("selectColorBlack")+'" name="pingVpSubtitlesMenu'+category+'Color" value="000000">';setupPicker+="</div>";return setupPicker},setupHTMLOpacityPicker:function(category,enableZero){var setupPicker="";setupPicker+='<div id="pingVpOpacityPickerWrapper'+category+"-"+this._videoOid+'">';if(enableZero){setupPicker+='<span data-setting="opacity" data-value="0" class="pingVpOpacityPicker pingVpOpacityPick0" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectOpacity0")+'">0%</span>'}setupPicker+='<span data-setting="opacity" data-value="25" class="pingVpOpacityPicker pingVpOpacityPick25" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectOpacity25")+'">25%</span>';setupPicker+='<span data-setting="opacity" data-value="50" class="pingVpOpacityPicker pingVpOpacityPick50" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectOpacity50")+'">50%</span>';setupPicker+='<span data-setting="opacity" data-value="75" class="pingVpOpacityPicker pingVpOpacityPick75" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectOpacity75")+'">75%</span>';setupPicker+='<span data-setting="opacity" data-value="100" class="pingVpOpacityPicker pingVpOpacityPick100" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectOpacity100")+'">100%</span>';setupPicker+="</div>";return setupPicker},setupHTMLFontSizePicker:function(category){var setupPicker="";setupPicker+='<div id="pingVpFontSizePickerWrapper-'+this._videoOid+'">';setupPicker+='<span data-setting="size" data-value="50" class="pingVpFontsizePicker pingVpFontsize50" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectFontSize50")+'">50%</span>';setupPicker+='<span data-setting="size" data-value="100" class="pingVpFontsizePicker pingVpFontsize100" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectFontSize100")+'">100%</span>';setupPicker+='<span data-setting="size" data-value="150" class="pingVpFontsizePicker pingVpFontsize150" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectFontSize150")+'">150%</span>';setupPicker+='<span data-setting="size" data-value="200" class="pingVpFontsizePicker pingVpFontsize200" tabindex="-1" role="button" aria-pressed="false" aria-label="'+this._text.get("selectFontSize200")+'">200%</span>';setupPicker+="</div>";return setupPicker},setupHTMLFontFamilyPicker:function(category){var setupPicker="";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"FontFamilyItem pingVpSubtitlesSettingsSet"+category+'FontFamily" aria-label="'+this._text.get("selectFontFamily")+this._text.get("subtitlesSettings"+category+"FontFamilyMonosaceSerif")+'" data-setting="font-family" data-value="Monosace Serif" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"FontFamilyItem-"+this._videoOid+'-MonosaceSerif">'+this._text.get("subtitlesSettings"+category+"FontFamilyMonosaceSerif")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"FontFamilyItem pingVpSubtitlesSettingsSet"+category+'FontFamily" aria-label="'+this._text.get("selectFontFamily")+this._text.get("subtitlesSettings"+category+"FontFamilyProportionalSerif")+'" data-setting="font-family" data-value="Proportional Serif" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"FontFamilyItem-"+this._videoOid+'-ProportionalSerif">'+this._text.get("subtitlesSettings"+category+"FontFamilyProportionalSerif")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"FontFamilyItem pingVpSubtitlesSettingsSet"+category+'FontFamily" aria-label="'+this._text.get("selectFontFamily")+this._text.get("subtitlesSettings"+category+"FontFamilyMonospaceSansSerif")+'" data-setting="font-family" data-value="Monospace Sans-Serif" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"FontFamilyItem-"+this._videoOid+'-MonospaceSansSerif">'+this._text.get("subtitlesSettings"+category+"FontFamilyMonospaceSansSerif")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"FontFamilyItem pingVpSubtitlesSettingsSet"+category+'FontFamily" aria-label="'+this._text.get("selectFontFamily")+this._text.get("subtitlesSettings"+category+"FontFamilyProportionalSansSerif")+'" data-setting="font-family" data-value="Proportional Sans-Serif" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"FontFamilyItem-"+this._videoOid+'-ProportionalSansSerif">'+this._text.get("subtitlesSettings"+category+"FontFamilyProportionalSansSerif")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"FontFamilyItem pingVpSubtitlesSettingsSet"+category+'FontFamily" aria-label="'+this._text.get("selectFontFamily")+this._text.get("subtitlesSettings"+category+"FontFamilyCasual")+'" data-setting="font-family" data-value="Casual" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"FontFamilyItem-"+this._videoOid+'-Casual">'+this._text.get("subtitlesSettings"+category+"FontFamilyCasual")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"FontFamilyItem pingVpSubtitlesSettingsSet"+category+'FontFamily" aria-label="'+this._text.get("selectFontFamily")+this._text.get("subtitlesSettings"+category+"FontFamilyCursive")+'" data-setting="font-family" data-value="Cursive" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"FontFamilyItem-"+this._videoOid+'-Cursive">'+this._text.get("subtitlesSettings"+category+"FontFamilyCursive")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"FontFamilyItem pingVpSubtitlesSettingsSet"+category+'FontFamily" aria-label="'+this._text.get("selectFontFamily")+this._text.get("subtitlesSettings"+category+"FontFamilySmallCapitals")+'" data-setting="font-family" data-value="Small Capitals" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"FontFamilyItem-"+this._videoOid+'-SmallCapitals">'+this._text.get("subtitlesSettings"+category+"FontFamilySmallCapitals")+this._checkIcon+"</li>";return setupPicker},setupHTMLOutlinePicker:function(category){var setupPicker="";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"OutlineItem pingVpSubtitlesSettingsSet"+category+'Outline" aria-label="'+this._text.get("selectOutline")+this._text.get("subtitlesSettings"+category+"OutlineNone")+'" data-setting="outline" data-value="none" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"OutlineItem-"+this._videoOid+'-none">'+this._text.get("subtitlesSettings"+category+"OutlineNone")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"OutlineItem pingVpSubtitlesSettingsSet"+category+'Outline" aria-label="'+this._text.get("selectOutline")+this._text.get("subtitlesSettings"+category+"OutlineDropShadow")+'" data-setting="outline" data-value="dropshadow" aria-pressed="false" tabindex="-1" role="button" id="pingVpSubtitlesMenu'+category+"OutlineItem-"+this._videoOid+'-dropshadow">'+this._text.get("subtitlesSettings"+category+"OutlineDropShadow")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"OutlineItem pingVpSubtitlesSettingsSet"+category+'Outline" aria-label="'+this._text.get("selectOutline")+this._text.get("subtitlesSettings"+category+"OutlineRaised")+'" data-setting="outline" data-value="raised" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"OutlineItem-"+this._videoOid+'-raised">'+this._text.get("subtitlesSettings"+category+"OutlineRaised")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"OutlineItem pingVpSubtitlesSettingsSet"+category+'Outline" aria-label="'+this._text.get("selectOutline")+this._text.get("subtitlesSettings"+category+"OutlineDepressed")+'" data-setting="outline" data-value="depressed" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"OutlineItem-"+this._videoOid+'-depressed">'+this._text.get("subtitlesSettings"+category+"OutlineDepressed")+this._checkIcon+"</li>";setupPicker+='<li class="pingVpSubtitlesMenu'+category+"OutlineItem pingVpSubtitlesSettingsSet"+category+'Outline" aria-label="'+this._text.get("selectOutline")+this._text.get("subtitlesSettings"+category+"OutlineOutline")+'" data-setting="outline" data-value="outline" tabindex="-1" aria-pressed="false" role="button" id="pingVpSubtitlesMenu'+category+"OutlineItem-"+this._videoOid+'-outline">'+this._text.get("subtitlesSettings"+category+"OutlineOutline")+this._checkIcon+"</li>";return setupPicker},setButtonHandler:function(call){this._buttonCall=call},getActive:function(){return this._menuIsActive},show:function(){if(!this._mobileCheck){this.setRight()}this._isOn=true;this._controlBarOnShow(false);this._checkHideEnable(false);if(this._setCloseOthersCall!=null&&this._mobileCheck){this._setCloseOthersCall()}if(this._mobileCheck){this._setSubtitlesOverlay.stop().css("display","flex")}else{this._setMenu.stop().show()}this.setHeight();this._focus=$(":focus");if(this._focus.hasClass("pingVpControlSubtitles")){this.setHtmlFocus()}},hide:function(){this._isOn=false;this._focus=$(":focus");if(this._mobileCheck){this._setSubtitlesOverlay.stop().hide()}else{this._setMenu.stop().hide()}if(this._focus.parents(".pingVpSubtitlesMenu").length!=0){this.resetHtmlFocus();this._setButton.focus()}if(this._isSub){var _currentHeadMenu=this.getJQueryHead();this._isSub=false;this._currentSub="";if(this._mobileCheck){this._setCurrentMenu.stop().hide();_currentHeadMenu.stop().show()}else{this._setMenu.find(".pingVpSubtitlesSubSubMenu,.pingVpSubtitlesSubSubSubMenu").stop().hide();this._setMenu.stop().removeClass(this.getLayerClass(this._layer));_currentHeadMenu.stop().show();this._layer=0}}this._setCurrentMenu=this.getJQueryHead();this._controlBarOnShow(true);this._checkHideEnable(true);if(this._buttonCall!=null){this._buttonCall(false)}},checkClose:function(e){this._focus=$(":focus");if(this._isOn&&e.which==27&&(this._container.hasClass("pingVpActive-"+this._videoOid)||(this._focus.length<1||this._focus.parents(".pingVpSubtitlesMenu").length!=0))){e.preventDefault();this.hide()}},checkFocus:function(e){if($(e.target).closest("#pingVpSubtitlesMenu-"+this._videoOid).length==0&&this._isOn&&$(e.target).closest("#pingVpControlSubtitles-"+this._videoOid).length==0){this.hide()}},openSubMenu:function(type,layer,e){var _gthis=this;e.stopPropagation();if(type=="settings"||type=="text"||type=="background"||type=="window"){this._event('Open subtitles submenu "'+type+'"')}if(type!="home"){this._isSub=true;this._currentSub=type}var _currentSubMenu=this.getJQuerySub();if(this._mobileCheck){this._setCurrentMenu.stop().hide();_currentSubMenu.stop().show();this._setCurrentMenu=_currentSubMenu;this._focus=$(":focus");if(this._focus.parents(".pingVpSubtitlesMenu").length!=0){this.setHtmlFocus()}}else{var oldLayerClass=this.getLayerClass(layer-1);var newLayerClass=this.getLayerClass(layer);this._layer=layer;_currentSubMenu.stop().show(0,null,function(){_gthis._setMenu.stop().removeClass(oldLayerClass).addClass(newLayerClass).animate({height:_currentSubMenu.outerHeight()},200,null,function(){_gthis._setCurrentMenu=_currentSubMenu;_gthis._focus=$(":focus");if(_gthis._focus.parents(".pingVpSubtitlesMenu").length!=0){_gthis.setHtmlFocus()}})})}},closeSubMenu:function(goTo,e){var _gthis=this;e.stopPropagation();this._currentSub=goTo;var _gotoSubMenu=this.getJQuerySub();if(goTo=="home"){this._isSub=false;this._currentSub=""}this._focus=$(":focus");if(this._mobileCheck){this._setCurrentMenu.stop().hide();_gotoSubMenu.stop().show();this._setCurrentMenu=_gotoSubMenu;if(this._focus.parents(".pingVpSubtitlesMenu").length!=0){this.setHtmlFocus()}}else{var oldLayerClass=this.getLayerClass(this._layer);var newLayerClass=this.getLayerClass(this._layer-1);this._layer-=1;this._setMenu.stop().removeClass(oldLayerClass).addClass(newLayerClass).animate({height:_gotoSubMenu.outerHeight()},200,null,function(){_gthis._setCurrentMenu.stop().hide();_gthis._setCurrentMenu=_gotoSubMenu;_gthis._currentSub="";if(_gthis._focus.parents(".pingVpSubtitlesMenu").length!=0){_gthis.setHtmlFocus()}})}},isShown:function(){return this._isOn},isSub:function(){return this._isSub},getJQueryHead:function(){return $("#pingVpSubtitlesHeadMenu-"+this._videoOid)},getJQuerySub:function(){if(this._currentSub=="home"){return $("#pingVpSubtitlesHeadMenu-"+this._videoOid)}else{if(this._currentSub=="text"){return $("#pingVpSubtitlesSubMenuText-"+this._videoOid)}else{if(this._currentSub=="font-family"){return $("#pingVpSubtitlesSubMenuFontFamily-"+this._videoOid)}else{if(this._currentSub=="outline"){return $("#pingVpSubtitlesSubMenuOutline-"+this._videoOid)}else{if(this._currentSub=="background"){return $("#pingVpSubtitlesSubMenuBackground-"+this._videoOid)}else{if(this._currentSub=="window"){return $("#pingVpSubtitlesSubMenuWindow-"+this._videoOid)}else{return $("#pingVpSubtitlesSubMenuSettings-"+this._videoOid)}}}}}}},getLayerClass:function(layer){if(layer==3){return"pingVpShowCodeLayer3"}else{if(layer==2){return"pingVpShowCodeLayer2"}else{if(layer==1){return"pingVpShowCodeLayer1"}else{return""}}}},getCurrentMenu:function(){return this._setCurrentMenu},setRight:function(){var currWidth=this._setMenu.width();var defaultMin=this._controlsBelow?7:10;var shareWidth=this._shareIsActive?40:0;var maxWidth=(80+shareWidth)*2+40;if(currWidth<maxWidth){var calcRight=(maxWidth-currWidth)/2+defaultMin;this._setMenu.css("right",calcRight+"px")}else{this._setMenu.css("right",defaultMin+"px")}},setHeight:function(){var newHeight=$("#pingVpSubtitlesHeadMenu-"+this._videoOid).outerHeight();this._setMenu.css("height",newHeight+"px")},setHtmlFocus:function(){this._focus=$(":focus");this._return=this._focus.attr("data-return");this._setMenu.find('[tabindex="0"]').attr("tabindex","-1");var allowFocus=this.getCurrentMenu();allowFocus.find('[tabindex="-1"]').attr("tabindex","0");if(this._return!=null&&allowFocus.find("#"+this._return+"-"+this._videoOid+'[tabindex="0"]').length!=0){allowFocus.find("#"+this._return+"-"+this._videoOid+'[tabindex="0"]').focus()}else{allowFocus.find('[tabindex="0"]').first().focus()}},resetHtmlFocus:function(){this._setMenu.find('[tabindex="0"]').attr("tabindex","-1")},checkDownAndUpKeys:function(e){this._focus=$(":focus");if(e.which==38&&this._focus.parents(".pingVpSubtitlesMenu").length!=0){e.preventDefault();this._focus.prevAll('.pingVpSubtitlesMenuItem[tabindex="0"]').first().focus()}if(e.which==40&&this._focus.parents(".pingVpSubtitlesMenu").length!=0){e.preventDefault();this._focus.nextAll('.pingVpSubtitlesMenuItem[tabindex="0"]').first().focus()}},setSubsSelected:function(selected){if(selected==-1||!this._subtitles.checkSubExists(selected)&&selected>0){selected=this._subtitles.getDefault()}if(this._selectedSubs!=selected){this._subtitles.onSubSelect(selected);this._selectedSubs=selected;if(this._settingsMenuCurrentSubsCall!=null){this._settingsMenuCurrentSubsCall(selected)}$(".pingVpSubtitlesMenuItem-"+this._videoOid+".pingVpSettingsSelected").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$("#pingVpSubtitlesMenuItem-"+this._videoOid+"-"+selected).addClass("pingVpSettingsSelected").attr("aria-pressed","true")}},setSubs:function(e){var currentSelectedSubs=this._selectedSubs;this.hide();this.setSubsSelected(e.data);if(currentSelectedSubs!=this._selectedSubs){if(this._selectedSubs==0){this._event("Subtitle turned off")}else{var sub=this._subtitles.getSelectedSub();this._event('Subtitle selected "'+Std.string(sub.name())+'"')}}},setSettingsMenuSubsHandler:function(call){this._settingsMenuCurrentSubsCall=call},setSettingsMenuHandler:function(call){this._settingsMenuCall=call},setCloseOthersCall:function(call){this._setCloseOthersCall=call},setTextSetting:function(e){var setSetting=$(e.target).attr("data-setting");var setValue=$(e.target).attr("data-value");if(setSetting=="size"){$("#pingVpFontSizePickerWrapper-"+this._videoOid+" .pingVpFontsizePicker").removeClass("pingVpSelected").attr("aria-pressed","false");$(e.target).addClass("pingVpSelected").attr("aria-pressed","true");this._subtitles.setFontSize(setValue)}else{if(setSetting=="color"){$("#pingVpColorPickerWrapperText-"+this._videoOid+" .pingVpColorPickerBox").removeClass("pingVpSelected");$(e.target).addClass("pingVpSelected");this.handleColorPicker(e,"pingVpColorPickerWrapperText");this._subtitles.setFontColor(this.hexToRgba(setValue,this._currentTextOpacity,false))}else{if(setSetting=="opacity"){$("#pingVpOpacityPickerWrapperText-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$(e.target).addClass("pingVpSelected").attr("aria-pressed","true");this._currentTextOpacity=setValue/100;this._subtitles.setFontColor(this.hexToRgba(this.getSettingValue("text","color"),this._currentTextOpacity,false))}else{if(setSetting=="outline"){$("#pingVpSubtitlesSubMenuOutline-"+this._videoOid+" .pingVpSubtitlesSettingsSetTextOutline").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$(e.target).addClass("pingVpSettingsSelected").attr("aria-pressed","true");$("#pingVpSubtitlesTextOutline-"+this._videoOid+" .pingVpSubtitlesDisplayOutline").text(this.outlineStringToType(setValue,"text"));this._subtitles.setFontOutline(this.outlineStringToType(setValue,"css"))}else{if(setSetting=="font-family"){$("#pingVpSubtitlesSubMenuFontFamily-"+this._videoOid+" .pingVpSubtitlesSettingsSetTextFontFamily").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$(e.target).addClass("pingVpSettingsSelected").attr("aria-pressed","true");$("#pingVpSubtitlesTextFontFamily-"+this._videoOid+" .pingVpSubtitlesDisplayFontFamily").text(this.fontFamilyStringToType(setValue,"text"));this._subtitles.setFontFamily(this.fontFamilyStringToType(setValue,"css"))}}}}}this.setTextSettingValue(setSetting,setValue)},setBackgroundSetting:function(e){var setSetting=$(e.target).attr("data-setting");var setValue=$(e.target).attr("data-value");var tempValue="";if(setSetting=="color"){if(this._currentBackgroundOpacity==0){this._currentBackgroundOpacity=1;tempValue=this._currentBackgroundOpacity*100;$("#pingVpOpacityPickerWrapperBackground-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected");$("#pingVpOpacityPickerWrapperBackground-"+this._videoOid+' .pingVpOpacityPicker[data-value="'+Std.string(tempValue)+'"]').addClass("pingVpSelected");this.setBackgroundSettingValue("opacity",tempValue)}$("#pingVpColorPickerWrapperBackground-"+this._videoOid+" .pingVpColorPickerBox").removeClass("pingVpSelected");$(e.target).addClass("pingVpSelected");this.handleColorPicker(e,"pingVpColorPickerWrapperBackground");this._subtitles.setBackgroundColor(this.hexToRgba(setValue,this._currentBackgroundOpacity,true))}else{if(setSetting=="opacity"){$("#pingVpOpacityPickerWrapperBackground-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$(e.target).addClass("pingVpSelected").attr("aria-pressed","true");this._currentBackgroundOpacity=setValue/100;this._subtitles.setBackgroundColor(this.hexToRgba(this.getSettingValue("background","color"),this._currentBackgroundOpacity,true))}else{if(setSetting=="blur"){$("#pingVpBlurWrapperBackground-"+this._videoOid+" .pingVpBlurPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$(e.target).addClass("pingVpSelected").attr("aria-pressed","true");this._subtitles.setBlur(setValue)}}}this.setBackgroundSettingValue(setSetting,setValue)},setWindowSetting:function(e){var setSetting=$(e.target).attr("data-setting");var setValue=$(e.target).attr("data-value");var tempValue="";if(setSetting=="color"){if(this._currentWindowOpacity==0){this._currentWindowOpacity=1;$("#pingVpOpacityPickerWrapperWindow-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected");$("#pingVpOpacityPickerWrapperWindow-"+this._videoOid+' .pingVpOpacityPicker[data-value="'+Std.string(tempValue)+'"]').addClass("pingVpSelected");this.setWindowSettingValue("opacity",tempValue)}$("#pingVpColorPickerWrapperWindow-"+this._videoOid+" .pingVpColorPickerBox").removeClass("pingVpSelected");$(e.target).addClass("pingVpSelected");this.handleColorPicker(e,"pingVpColorPickerWrapperWindow");this._subtitles.setWindowColor(this.hexToRgba(setValue,this._currentWindowOpacity,true))}else{if(setSetting=="opacity"){$("#pingVpOpacityPickerWrapperWindow-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$(e.target).addClass("pingVpSelected").attr("aria-pressed","true");this._currentWindowOpacity=setValue/100;this._subtitles.setWindowColor(this.hexToRgba(this.getSettingValue("window","color"),this._currentWindowOpacity,true))}}this.setWindowSettingValue(setSetting,setValue)},setTextSettingValue:function(setting,value){var _this=this._textSettings;var value1=value;if(__map_reserved[setting]!=null){_this.setReserved(setting,value1)}else{_this.h[setting]=value1}var _this1=this._currentSettings;var value2=this._textSettings;if(__map_reserved.text!=null){_this1.setReserved("text",value2)}else{_this1.h.text=value2}},setBackgroundSettingValue:function(setting,value){var _this=this._backgroundSettings;var value1=value;if(__map_reserved[setting]!=null){_this.setReserved(setting,value1)}else{_this.h[setting]=value1}var _this1=this._currentSettings;var value2=this._backgroundSettings;if(__map_reserved.background!=null){_this1.setReserved("background",value2)}else{_this1.h.background=value2}},setWindowSettingValue:function(setting,value){var _this=this._windowSettings;var value1=value;if(__map_reserved[setting]!=null){_this.setReserved(setting,value1)}else{_this.h[setting]=value1}var _this1=this._currentSettings;var value2=this._windowSettings;if(__map_reserved.window!=null){_this1.setReserved("window",value2)}else{_this1.h.window=value2}},handleColorPicker:function(e,wrapper){var clickedCheckbox=$(e.target);var isChecked=clickedCheckbox.prop("checked");if(isChecked){e.preventDefault()}var checkboxes=$("#"+wrapper+"-"+this._videoOid+" .pingVpColorPickerBox");checkboxes.each(function(index,element){var checkbox=$(element);if(checkbox!=clickedCheckbox){checkbox.prop("checked",false)}})},handleInitialSetup:function(){this._currentTextOpacity=this.getSettingValue("text","opacity")/100;this._currentBackgroundOpacity=this.getSettingValue("background","opacity")/100;this._currentWindowOpacity=this.getSettingValue("window","opacity")/100;$("#pingVpSubtitlesSubMenuOutline-"+this._videoOid+" .pingVpSubtitlesSettingsSetTextOutline").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$("#pingVpSubtitlesSubMenuOutline-"+this._videoOid+' .pingVpSubtitlesSettingsSetTextOutline[data-value="'+Std.string(this.getSettingValue("text","outline"))+'"]').addClass("pingVpSettingsSelected").attr("aria-pressed","true");$("#pingVpSubtitlesTextOutline-"+this._videoOid+" .pingVpSubtitlesDisplayOutline").text(this.outlineStringToType(this.getSettingValue("text","outline"),"text"));$("#pingVpSubtitlesSubMenuFontFamily-"+this._videoOid+" .pingVpSubtitlesSettingsSetTextFontFamily").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$("#pingVpSubtitlesSubMenuFontFamily-"+this._videoOid+' .pingVpSubtitlesSettingsSetTextFontFamily[data-value="'+Std.string(this.getSettingValue("text","font-family"))+'"]').addClass("pingVpSettingsSelected").attr("aria-pressed","true");$("#pingVpSubtitlesTextFontFamily-"+this._videoOid+" .pingVpSubtitlesDisplayFontFamily").text(this.fontFamilyStringToType(this.getSettingValue("text","outline"),"text"));$("#pingVpOpacityPickerWrapperText-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpFontSizePickerWrapper-"+this._videoOid+" .pingVpFontsizePicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpColorPickerWrapperText-"+this._videoOid+" .pingVpColorPickerBox").removeClass("pingVpSelected");$("#pingVpOpacityPickerWrapperText-"+this._videoOid+' .pingVpOpacityPicker[data-value="'+Std.string(this.getSettingValue("text","opacity"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");$("#pingVpFontSizePickerWrapper-"+this._videoOid+' .pingVpFontsizePicker[data-value="'+Std.string(this.getSettingValue("text","size"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");$("#pingVpColorPickerWrapperText-"+this._videoOid+' .pingVpColorPickerBox[data-value="'+Std.string(this.getSettingValue("text","color"))+'"]').addClass("pingVpSelected");$("#pingVpOpacityPickerWrapperBackground-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpColorPickerWrapperBackground-"+this._videoOid+" .pingVpColorPickerBox").removeClass("pingVpSelected");$("#pingVpBlurWrapperBackground-"+this._videoOid+" .pingVpBlurPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpOpacityPickerWrapperBackground-"+this._videoOid+' .pingVpOpacityPicker[data-value="'+Std.string(this.getSettingValue("background","opacity"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");$("#pingVpColorPickerWrapperBackground-"+this._videoOid+' .pingVpColorPickerBox[data-value="'+Std.string(this.getSettingValue("background","color"))+'"]').addClass("pingVpSelected");$("#pingVpBlurWrapperBackground-"+this._videoOid+' .pingVpBlurPicker[data-value="'+Std.string(this.getSettingValue("background","blur"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");$("#pingVpOpacityPickerWrapperWindow-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpColorPickerWrapperWindow-"+this._videoOid+" .pingVpColorPickerBox").removeClass("pingVpSelected");$("#pingVpOpacityPickerWrapperWindow-"+this._videoOid+' .pingVpOpacityPicker[data-value="'+Std.string(this.getSettingValue("background","opacity"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");$("#pingVpColorPickerWrapperWindow-"+this._videoOid+' .pingVpColorPickerBox[data-value="'+Std.string(this.getSettingValue("background","color"))+'"]').addClass("pingVpSelected");this._subtitles.setFontSize(this.getSettingValue("text","size"));this._subtitles.setFontColor(this.hexToRgba(this.getSettingValue("text","color"),this._currentTextOpacity,false));this._subtitles.setFontOutline(this.outlineStringToType(this.getSettingValue("text","outline"),"css"));this._subtitles.setFontFamily(this.fontFamilyStringToType(this.getSettingValue("text","font-family"),"css"));this._subtitles.setBackgroundColor(this.hexToRgba(this.getSettingValue("background","color"),this._currentBackgroundOpacity,true));this._subtitles.setBlur(this.getSettingValue("background","blur"));this._subtitles.setWindowColor(this.hexToRgba(this.getSettingValue("window","color"),this._currentWindowOpacity,true))},setResetText:function(e){this._currentTextOpacity=this.getSettingValueDefault("text","opacity")/100;$("#pingVpSubtitlesSubMenuOutline-"+this._videoOid+" .pingVpSubtitlesSettingsSetTextOutline").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$("#pingVpSubtitlesSubMenuOutline-"+this._videoOid+' .pingVpSubtitlesSettingsSetTextOutline[data-value="'+Std.string(this.getSettingValueDefault("text","outline"))+'"]').addClass("pingVpSettingsSelected").attr("aria-pressed","true");$("#pingVpSubtitlesTextOutline-"+this._videoOid+" .pingVpSubtitlesDisplayOutline").text(this.outlineStringToType(this.getSettingValueDefault("text","outline"),"text"));$("#pingVpSubtitlesSubMenuFontFamily-"+this._videoOid+" .pingVpSubtitlesSettingsSetTextFontFamily").removeClass("pingVpSettingsSelected").attr("aria-pressed","false");$("#pingVpSubtitlesSubMenuFontFamily-"+this._videoOid+' .pingVpSubtitlesSettingsSetTextFontFamily[data-value="'+Std.string(this.getSettingValueDefault("text","font-family"))+'"]').addClass("pingVpSettingsSelected").attr("aria-pressed","true");$("#pingVpSubtitlesTextFontFamily-"+this._videoOid+" .pingVpSubtitlesDisplayFontFamily").text(this.fontFamilyStringToType(this.getSettingValueDefault("text","outline"),"text"));$("#pingVpOpacityPickerWrapperText-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpFontSizePickerWrapper-"+this._videoOid+" .pingVpFontsizePicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpColorPickerWrapperText-"+this._videoOid+" .pingVpColorPickerBox").removeClass("pingVpSelected");$("#pingVpOpacityPickerWrapperText-"+this._videoOid+' .pingVpOpacityPicker[data-value="'+Std.string(this.getSettingValueDefault("text","opacity"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");$("#pingVpFontSizePickerWrapper-"+this._videoOid+' .pingVpFontsizePicker[data-value="'+Std.string(this.getSettingValueDefault("text","size"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");$("#pingVpColorPickerWrapperText-"+this._videoOid+' .pingVpColorPickerBox[data-value="'+Std.string(this.getSettingValueDefault("text","color"))+'"]').addClass("pingVpSelected");this._subtitles.setFontSize(this.getSettingValueDefault("text","size"));this._subtitles.setFontColor(this.hexToRgba(this.getSettingValueDefault("text","color"),this._currentTextOpacity,false));this._subtitles.setFontOutline(this.outlineStringToType(this.getSettingValueDefault("text","outline"),"css"));this._subtitles.setFontFamily(this.fontFamilyStringToType(this.getSettingValueDefault("text","font-family"),"css"));var _this=this._defaultSettings;var _this1=this._currentSettings;var value=__map_reserved.text!=null?_this.getReserved("text"):_this.h.text;if(__map_reserved.text!=null){_this1.setReserved("text",value)}else{_this1.h.text=value}},setResetBackground:function(e){this._currentBackgroundOpacity=this.getSettingValueDefault("background","opacity")/100;$("#pingVpOpacityPickerWrapperBackground-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpColorPickerWrapperBackground-"+this._videoOid+" .pingVpColorPickerBox").removeClass("pingVpSelected");$("#pingVpBlurWrapperBackground-"+this._videoOid+" .pingVpBlurPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpOpacityPickerWrapperBackground-"+this._videoOid+' .pingVpOpacityPicker[data-value="'+Std.string(this.getSettingValueDefault("background","opacity"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");$("#pingVpColorPickerWrapperBackground-"+this._videoOid+' .pingVpColorPickerBox[data-value="'+Std.string(this.getSettingValueDefault("background","color"))+'"]').addClass("pingVpSelected");$("#pingVpBlurWrapperBackground-"+this._videoOid+' .pingVpBlurPicker[data-value="'+Std.string(this.getSettingValueDefault("background","blur"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");this._subtitles.setBackgroundColor(this.hexToRgba(this.getSettingValueDefault("background","color"),this._currentBackgroundOpacity,true));this._subtitles.setBlur(this.getSettingValueDefault("background","blur"));var _this=this._defaultSettings;var _this1=this._currentSettings;var value=__map_reserved.background!=null?_this.getReserved("background"):_this.h.background;if(__map_reserved.background!=null){_this1.setReserved("background",value)}else{_this1.h.background=value}},setResetWindow:function(e){this._currentWindowOpacity=this.getSettingValueDefault("window","opacity")/100;$("#pingVpOpacityPickerWrapperWindow-"+this._videoOid+" .pingVpOpacityPicker").removeClass("pingVpSelected").attr("aria-pressed","false");$("#pingVpColorPickerWrapperWindow-"+this._videoOid+" .pingVpColorPickerBox").removeClass("pingVpSelected");$("#pingVpOpacityPickerWrapperWindow-"+this._videoOid+' .pingVpOpacityPicker[data-value="'+Std.string(this.getSettingValueDefault("background","opacity"))+'"]').addClass("pingVpSelected").attr("aria-pressed","true");$("#pingVpColorPickerWrapperWindow-"+this._videoOid+' .pingVpColorPickerBox[data-value="'+Std.string(this.getSettingValueDefault("background","color"))+'"]').addClass("pingVpSelected");this._subtitles.setWindowColor(this.hexToRgba(this.getSettingValueDefault("window","color"),this._currentWindowOpacity,true));var _this=this._defaultSettings;var _this1=this._currentSettings;var value=__map_reserved.window!=null?_this.getReserved("window"):_this.h.window;if(__map_reserved.window!=null){_this1.setReserved("window",value)}else{_this1.h.window=value}},setResetAll:function(e){this.setResetText(e);this.setResetBackground(e);this.setResetWindow(e)},getSettingValue:function(category,key){var _this=this._currentSettings;var innerMap=__map_reserved[category]!=null?_this.getReserved(category):_this.h[category];if(innerMap!=null){return __map_reserved[key]!=null?innerMap.getReserved(key):innerMap.h[key]}return null},getSettingValueDefault:function(category,key){var _this=this._defaultSettings;var innerMap=__map_reserved[category]!=null?_this.getReserved(category):_this.h[category];if(innerMap!=null){return __map_reserved[key]!=null?innerMap.getReserved(key):innerMap.h[key]}return null},returnCurrentSettings:function(){return this._currentSettings},hexToRgba:function(hex,opacityValue,enableTransparent){if(opacityValue==0&&enableTransparent){return"transparent"}var hex1=StringTools.replace(hex,"#","");var rgb="255, 255, 255";if(hex1=="ffff00"){rgb="255, 255, 0"}else{if(hex1=="00ff00"){rgb="0, 255, 0"}else{if(hex1=="00ffff"){rgb=" 0, 255, 255"}else{if(hex1=="0000ff"){rgb="0, 0, 255"}else{if(hex1=="ff00ff"){rgb="255, 0, 255"}else{if(hex1=="ff0000"){rgb=" 255, 0, 0"}else{if(hex1=="000000"){rgb="0, 0, 0"}else{if(hex1=="ffffff"){rgb="255, 255, 255"}}}}}}}}var a=opacityValue;return"rgba("+rgb+", "+a+")"},outlineStringToType:function(outline,returnType){var textOutlineClass=this._text.get("subtitlesSettingsTextOutlineNone");var cssOutlineClass="pingVpOutline-None";if(outline=="outline"){textOutlineClass=this._text.get("subtitlesSettingsTextOutlineOutline");cssOutlineClass="pingVpOutline-Default"}else{if(outline=="dropshadow"){textOutlineClass=this._text.get("subtitlesSettingsTextOutlineDropShadow");cssOutlineClass="pingVpOutline-DropShadow"}else{if(outline=="raised"){textOutlineClass=this._text.get("subtitlesSettingsTextOutlineRaised");cssOutlineClass="pingVpOutline-Raised"}else{if(outline=="depressed"){textOutlineClass=this._text.get("subtitlesSettingsTextOutlineDepressed");cssOutlineClass="pingVpOutline-Depressed"}else{if(outline=="none"){textOutlineClass=this._text.get("subtitlesSettingsTextOutlineNone");cssOutlineClass="pingVpOutline-None"}}}}}if(returnType=="css"){return cssOutlineClass}if(returnType=="text"){return textOutlineClass}return""},fontFamilyStringToType:function(FontFamily,returnType){var textFontFamilyClass=this._text.get("subtitlesSettingsTextFontFamilyProportionalSansSerif");var cssFontFamilyClass="pingVpFontFamily-ProportionalSansSerif";if(FontFamily=="Monosace Serif"){textFontFamilyClass=this._text.get("subtitlesSettingsTextFontFamilyMonosaceSerif");cssFontFamilyClass="pingVpFontFamily-MonosaceSerif"}else{if(FontFamily=="Proportional Serif"){textFontFamilyClass=this._text.get("subtitlesSettingsTextFontFamilyProportionalSerif");cssFontFamilyClass="pingVpFontFamily-ProportionalSerif"}else{if(FontFamily=="Monospace Sans-Serif"){textFontFamilyClass=this._text.get("subtitlesSettingsTextFontFamilyMonospaceSansSerif");cssFontFamilyClass="pingVpFontFamily-MonospaceSansSerif"}else{if(FontFamily=="Proportional Sans-Serif"){textFontFamilyClass=this._text.get("subtitlesSettingsTextFontFamilyProportionalSansSerif");cssFontFamilyClass="pingVpFontFamily-ProportionalSansSerif"}else{if(FontFamily=="Casual"){textFontFamilyClass=this._text.get("subtitlesSettingsTextFontFamilyCasual");cssFontFamilyClass="pingVpFontFamily-Casual"}else{if(FontFamily=="Cursive"){textFontFamilyClass=this._text.get("subtitlesSettingsTextFontFamilyCursive");cssFontFamilyClass="pingVpFontFamily-Cursive"}else{if(FontFamily=="Small Capitals"){textFontFamilyClass=this._text.get("subtitlesSettingsTextFontFamilySmallCapitals");cssFontFamilyClass="pingVpFontFamily-SmallCapitals"}}}}}}}if(returnType=="css"){return cssFontFamilyClass}if(returnType=="text"){return textFontFamilyClass}return""},cloneMap:function(original){var newMap=new haxe_ds_StringMap();var key=original.keys();while(key.hasNext()){var key1=key.next();var value=__map_reserved[key1]!=null?original.getReserved(key1):original.h[key1];if(__map_reserved[key1]!=null){newMap.setReserved(key1,value)}else{newMap.h[key1]=value}}return newMap},__class__:pingvp_PingVpSubtitlesMenu};var pingvp_PingVpSubtitlesMenuOverlay=function(videoOid,videoName,overlay,container,theme,text,controlsBelow,controlBar,controlBarOnShow,checkHideEnable,setSubtitlesButton,subs,subtitles,lastSubtitle,enableShare,lastSubtitlesSettings,event){this._container=container;this._videoOid=videoOid;this._videoName=videoName;this._mobileCheck=false;this._subtitlesMenuElement=null;if(subs!=null&&subs.length>0){if(pingvp_PingVpDevice.isIphone()||pingvp_PingVpDevice.isIpad()||pingvp_PingVpDevice.isAndroid()){this._mobileCheck=true}this._subtitlesMenu=new pingvp_PingVpSubtitlesMenu(videoOid,theme,text,controlsBelow,controlBar,controlBarOnShow,checkHideEnable,subs,subtitles,lastSubtitle,enableShare,this._mobileCheck,lastSubtitlesSettings,event);this._subtitlesMenu.setButtonHandler(setSubtitlesButton);if(this._mobileCheck){this._subtitlesMenuElement=$("#pingVpSubtitlesMobileOverlay-"+videoOid)}else{this._subtitlesMenuElement=$("#pingVpSubtitlesMenu-"+videoOid)}if(this._subtitlesMenu.getActive()){this.resize()}}};$hxClasses["pingvp.PingVpSubtitlesMenuOverlay"]=pingvp_PingVpSubtitlesMenuOverlay;pingvp_PingVpSubtitlesMenuOverlay.__name__=["pingvp","PingVpSubtitlesMenuOverlay"];pingvp_PingVpSubtitlesMenuOverlay.prototype={showSubtitlesMenu:function(){if(this._subtitlesMenu.isShown()){this._subtitlesMenu.hide()}else{this._subtitlesMenu.show()}},resize:function(){this._overlay=$("#pingVpOverlay-"+this._videoOid);var definer=960;var definerW=640;var currentWidth=this._overlay.outerWidth();var percent=100;var percentW=0.25;if(currentWidth>definer){percent-=(definer-currentWidth)/32}else{if(currentWidth<definer){percent+=(currentWidth-definer)/32}}this._subtitlesMenuElement.css("font-size",percent+"%");if(this._mobileCheck){var width=this._container.getWidth();var height=this._container.getHeight();this._subtitlesMenuElement.css("width",width);this._subtitlesMenuElement.css("height",height)}else{if(currentWidth>definerW){percentW-=(currentWidth-definerW)/220/100}percentW=currentWidth*percentW;this._subtitlesMenuElement.css("min-width",percentW+"px");this._subtitlesMenu.setRight();this._subtitlesMenu.setHeight()}},checkSubtitlesMenu:function(){if(this._subtitlesMenu!=null){return this._subtitlesMenu.isShown()}else{return false}},checkMenuActive:function(){if(this._subtitlesMenu!=null){return this._subtitlesMenu.getActive()}else{return false}},checkUpAndDownKeys:function(e){if(this._subtitlesMenu!=null){this._subtitlesMenu.checkDownAndUpKeys(e)}},checkCloseKeys:function(e){if(this._subtitlesMenu!=null){this._subtitlesMenu.checkClose(e)}},setSubsMenuSelected:function(selected){this._subtitlesMenu.setSubsSelected(selected)},setSettingsMenuHandler:function(call){this._subtitlesMenu.setSettingsMenuHandler(call)},setSettingsMenuSubsHandler:function(call){this._subtitlesMenu.setSettingsMenuSubsHandler(call)},setCloseOthersCall:function(call){this._subtitlesMenu.setCloseOthersCall(call)},getCurrentSettings:function(){if(this._subtitlesMenu!=null){return this._subtitlesMenu.returnCurrentSettings()}return""},__class__:pingvp_PingVpSubtitlesMenuOverlay};var pingvp_PingVpSubtitlesOverlay=function(videoOid,videoScript,videoScriptName,overlay,container,videoName,subs,text,controlsBelow,controlsBelowHeight,theme,controlBar,event){this._scriptWidth=videoScript.getFragmentVideoWidth(videoName);this._scriptHeight=videoScript.getFragmentVideoHeight(videoName);this._container=container;this._subs=subs;this._videoOid=videoOid;this._videoName=videoScriptName;this._text=text;this._subtitlesBg=videoScript.getHeaderSubtitlesBg();this._lastText=null;this._selected=-1;this._theme=theme;this._controlBar=controlBar;this._backGroundColor="transparent";this._windowColor="transparent";this._event=event;this._sizeModifier=100;if($("#pingVpSubtitles-"+videoOid).length!=0){$("#pingVpSubtitles-"+videoOid).remove()}if(this._subtitlesBg==null||this._subtitlesBg==""||this._subtitlesBg=="false"){$("#pingVpControlCollected-"+videoOid).prepend('<div id="pingVpSubtitles-'+videoOid+'" class="pingVpSubtitles"></div>')}else{$("#pingVpControlCollected-"+videoOid).prepend('<div id="pingVpSubtitles-'+videoOid+'" class="pingVpSubtitles"></div>')}if(controlsBelow){$("#pingVpControlCollected-"+this._videoOid+" .pingVpSubtitles").addClass("pingVpControlBarVisible");$("#pingVpControlCollected-"+this._videoOid).addClass("pingVpCollectedVisible")}this._subtitles=$("#pingVpSubtitles-"+videoOid);this.resize()};$hxClasses["pingvp.PingVpSubtitlesOverlay"]=pingvp_PingVpSubtitlesOverlay;pingvp_PingVpSubtitlesOverlay.__name__=["pingvp","PingVpSubtitlesOverlay"];pingvp_PingVpSubtitlesOverlay.prototype={getDefault:function(){var selected=0;var i=1;var _g=0;var _g1=this._subs;while(_g<_g1.length){var sub=_g1[_g];++_g;if(sub.default_()){selected=i;break}++i}if(selected==0){this._controlBar.setSubsOnIcon("subtitles")}else{this._controlBar.setSubsOnIcon("subtitles_on")}return selected},keyAssist:function(){var return_selected=0;var key_selected=this._selected+1;var i=1;var _g=0;var _g1=this._subs;while(_g<_g1.length){var sub=_g1[_g];++_g;if(key_selected==i){return_selected=i;break}++i}return return_selected},onSubSelect:function(selected){if(this._selected==selected){return}if(this._menuCall!=null){this._menuCall(selected)}if(selected==0){this._controlBar.setSubsOnIcon("subtitles")}else{this._controlBar.setSubsOnIcon("subtitles_on")}this._cues=[];this._subtitles.html("");this._selected=selected;if(selected<=0||selected>this._subs.length){if(this._announcement!=null){this._announcement.setMessage(this._text.get("announceSubOff"))}return}this.sub=this._subs[selected-1];if(this._announcement!=null){this._announcement.setMessage(this.sub.name()+" "+this._text.get("announceSubOn"))}this.load(this.sub)},setTime:function(currentTime){var timeMs=currentTime*1000;var text=null;var backgroundColorAttr='style="background-color:'+this._backGroundColor+'"';var windowColorAttr='style="background-color:'+this._windowColor+'"';if(this._cues!=null){var _g=0;var _g1=this._cues;while(_g<_g1.length){var cue=_g1[_g];++_g;if(timeMs>=cue.start&&timeMs<=cue.end){var formatText='<div class="pingVpReset pingVpSubtitlesBackground pingVpSubtitlesBackground-'+this._videoOid+'" '+backgroundColorAttr+">"+StringTools.replace(cue.text,"<br/>",'</div><br/><div class="pingVpReset pingVpSubtitlesBackground pingVpSubtitlesBackground-'+this._videoOid+'" '+backgroundColorAttr+">")+"</div>";if(text!=null){text="<div class='pingVpReset pingVpSubtitlesWindow pingVpSubtitlesWindow-"+this._videoOid+"' "+windowColorAttr+">"+formatText+"</div><br/><br/><div class='pingVpReset pingVpSubtitlesWindow pingVpSubtitlesWindow-"+this._videoOid+"' "+windowColorAttr+">"+text+"</div></div>"}else{text="<div class='pingVpReset pingVpSubtitlesWindow pingVpSubtitlesWindow-"+this._videoOid+"' "+windowColorAttr+">"+formatText+"</div>"}}}}if(this._lastText!=text){this._lastText=text;if(text!=null){this._subtitles.html(text)}else{this._subtitles.empty()}}},load:function(sub){var name=sub.name();var uri=Std.string(pingvp_PingVpConfigRead.get().playerUri)+"../../webplayer_tools_6_2/webvttp.php?name=";var s=sub.file();var uri1=uri+encodeURIComponent(s)+"&videoname=";var s1=this._videoName;var uri2=uri1+encodeURIComponent(s1);this.loadJsonp(name,uri2)},loadJsonp:function(name,uri){var _gthis=this;$.ajax({type:"GET",url:uri,contentType:"application/json",dataType:"jsonp",success:function(data){_gthis._cues=data.cues},error:{}})},resize:function(){var videoWidth=640;var devideModifier=this._scriptWidth/640;var videoHeight=this._scriptHeight/devideModifier;var containerWidth=this._container.getWidth();var containerHeight=this._container.getHeight();var scaleX=containerWidth/videoWidth;var scaleY=containerHeight/videoHeight;var centerX=containerWidth/2;var centerY=containerHeight/2;var scale=scaleX;if(scaleY<scaleX){scale=scaleY}var startX=centerX-videoWidth*scale/2;var startY=centerY-videoHeight*scale/2;var scaledWidth=videoWidth*scale;var scaledHeight=videoHeight*scale;var basis_percent=115;if(scaledWidth>videoWidth){basis_percent+=(scaledWidth-videoWidth)/5}else{if(scaledWidth<videoWidth){basis_percent-=(videoWidth-scaledWidth)/5}}basis_percent*=this._sizeModifier/100;if(basis_percent<63){basis_percent=63}this._subtitles.css("font-size",basis_percent+"%")},disable:function(){this._subtitles.css("display","none")},enable:function(){this._subtitles.css("display","block")},hasSubs:function(){if(this._subs!=null){return this._subs.length>0}else{return false}},getSelected:function(){return this._selected},getSelectedSub:function(){return this.sub},setFontSize:function(size){this._sizeModifier=size;this.resize()},setFontColor:function(color){this._subtitles.css("color",color)},setFontOutline:function(outlineClass){this._subtitles.removeClass("pingVpOutline-None");this._subtitles.removeClass("pingVpOutline-DropShadow");this._subtitles.removeClass("pingVpOutline-Raised");this._subtitles.removeClass("pingVpOutline-Depressed");this._subtitles.removeClass("pingVpOutline-Default");this._subtitles.addClass(outlineClass)},setFontFamily:function(fontFamilyClass){this._subtitles.removeClass("pingVpFontFamily-MonosaceSerif");this._subtitles.removeClass("pingVpFontFamily-ProportionalSerif");this._subtitles.removeClass("pingVpFontFamily-MonospaceSansSerif");this._subtitles.removeClass("pingVpFontFamily-ProportionalSansSerif");this._subtitles.removeClass("pingVpFontFamily-Casual");this._subtitles.removeClass("pingVpFontFamily-Cursive");this._subtitles.removeClass("pingVpFontFamily-SmallCapitals");this._subtitles.addClass(fontFamilyClass)},checkSubExists:function(selected){if(selected<=0||selected>this._subs.length){return false}return true},setBackgroundColor:function(color){this._subtitles.find(".pingVpSubtitlesBackground-"+this._videoOid).css("background-color",color);this._backGroundColor=color},setBlur:function(isOn){if((isOn==null?"null":""+isOn)=="true"){this._subtitles.addClass("pingVpSubtitlesBlur")}else{this._subtitles.removeClass("pingVpSubtitlesBlur")}},setWindowColor:function(color){this._subtitles.find(".pingVpSubtitlesWindow-"+this._videoOid).css("background-color",color);this._windowColor=color},setAnnounceClass:function(announceClass){this._announcement=announceClass},__class__:pingvp_PingVpSubtitlesOverlay};var pingvp_PingVpTheme=function(showPlay,controlsBelow,theme){if(showPlay==null){if(theme.indexOf("_playless")!=-1){showPlay=false}}if(theme.indexOf("_playless")!=-1){theme=StringTools.replace(theme,"_playless","")}this._controlsBelowVideo=controlsBelow;if(this._controlsBelowVideo){switch(theme){case"abnamro":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"00857A",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"f3c000",sliderbutton:"00857A",subtitlesbg:"676767",defaultcolor:"00857A",hovercolor:"5a5a5a",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"achmea":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"5b5b5b",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"0070b6",sliderbutton:"00609c",subtitlesbg:"8e8279cc",defaultcolor:"00609c",hovercolor:"5b5b5b",menubackcolor:"00609ce6",menucolor:"fff"};break;case"alphabet":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"005ca9",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"005ca9",sliderbutton:"ef7d00",subtitlesbg:"ffffffe6",defaultcolor:"005ca9",hovercolor:"ef7d00",menubackcolor:"ffffffe6",menucolor:"005ca9"};break;case"base":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"416267",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"416267",sliderbutton:"1c1c1c",subtitlesbg:"8e8279cc",defaultcolor:"416267",hovercolor:"98acb3",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"boip":this._values={theme:"default",svgset:"default",controlbarcolor:"f0efef",timecolor:"3c3c3c",sliderbg:"b6b6b6",sliderbuffer:"b6b6b6",sliderfg:"3c3c3c",sliderbutton:"000",subtitlesbg:"f0efef",defaultcolor:"3c3c3c",hovercolor:"b6b6b6",menubackcolor:"1c1c1ce6",menucolor:"fff",backgroundPlay:"FFFFFF99",backgroundPlayHover:"00000099"};break;case"brunel":this._values={theme:"default",svgset:"default",controlbarcolor:"353F49",timecolor:"F2E400",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"F2E400",sliderbutton:"353F49",subtitlesbg:"676767",defaultcolor:"F2E400",hovercolor:"FFFFFF",menubackcolor:"1c1c1ce6",menucolor:"F2E400"};break;case"budgetenergie":this._values={theme:"kpn",svgset:"default",controlbarcolor:"fff",timecolor:"3aaa35",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"3aaa35",sliderbutton:"3c3c3c",subtitlesbg:"242424",defaultcolor:"3aaa35",hovercolor:"3c3c3c",menubackcolor:"676767e6",menucolor:"fff"};break;case"cbs":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"759dcf",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"759dcf",sliderbutton:"1d3e73",subtitlesbg:"8e8279cc",defaultcolor:"759dcf",hovercolor:"1d3e73",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"elsevier":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"ff8200",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"ff8200",sliderbutton:"53565a",subtitlesbg:"ffffffe6",defaultcolor:"ff8200",hovercolor:"53565a",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"eurofiber":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"007681",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"007681",sliderbutton:"963821",subtitlesbg:"ffffffe6",defaultcolor:"007681",hovercolor:"963821",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"evivanlanschot":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"6c3987",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"6c3987",sliderbutton:"5a5a5a",subtitlesbg:"8e8279cc",defaultcolor:"6c3987",hovercolor:"5a5a5a",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"fnv":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"009cde",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"009cde",sliderbutton:"7fba25",subtitlesbg:"ffffffe6",defaultcolor:"009cde",hovercolor:"7fba25",menubackcolor:"ffffffe6",menucolor:"9a8f87"};break;case"goudse":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"660099",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"414141",sliderbutton:"660099",subtitlesbg:"676767",defaultcolor:"660099",hovercolor:"5a5a5a",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"kenter":this._values={theme:"kpn",svgset:"default",controlbarcolor:"fff",timecolor:"007D30",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"007D30",sliderbutton:"fff",subtitlesbg:"242424",defaultcolor:"007D30",hovercolor:"676767",menubackcolor:"676767e6",menucolor:"fff"};break;case"kpn":this._values={theme:"kpn",svgset:"default",controlbarcolor:"fff",timecolor:"008000",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"008000",sliderbutton:"fff",subtitlesbg:"242424",defaultcolor:"008000",hovercolor:"676767",menubackcolor:"676767e6",menucolor:"fff"};break;case"lotto":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"000000",sliderbg:"ced6da",sliderbuffer:"b5bdc1",sliderfg:"000000",sliderbutton:"7f7f7f",subtitlesbg:"ffffffe6",defaultcolor:"000000",hovercolor:"7f7f7f",menubackcolor:"7f7f7fe6",menucolor:"000000"};break;case"millen":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"ABC7FF",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"0070b6",sliderbutton:"ABC7FF",subtitlesbg:"8e8279cc",defaultcolor:"ABC7FF",hovercolor:"2c72ff",menubackcolor:"00609ce6",menucolor:"fff"};break;case"nhlstenden":this._values={theme:"kpn",svgset:"default",controlbarcolor:"fff",timecolor:"00294B",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"00294B",sliderbutton:"fff",subtitlesbg:"242424",defaultcolor:"00294B",hovercolor:"676767",menubackcolor:"fff",menucolor:"00294B"};break;case"onlinenl":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"5c2d91",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"5c2d91",sliderbutton:"a7a9ac",subtitlesbg:"8e8279cc",defaultcolor:"5c2d91",hovercolor:"a7a9ac",menubackcolor:"ffffffe6",menucolor:"fff"};break;case"phenc":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"38beee",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"38beee",sliderbutton:"123864",subtitlesbg:"8e8279cc",defaultcolor:"38beee",hovercolor:"123864",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"robeco":break;case"sensara":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"e5244b",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"e5244b",sliderbutton:"9d0833",subtitlesbg:"8e8279cc",defaultcolor:"e5244b",hovercolor:"9d0833",menubackcolor:"ffffffe6",menucolor:"9d0833"};break;case"simyo":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"ff8000",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"ff8000",sliderbutton:"ffb160",subtitlesbg:"8e8279cc",defaultcolor:"ff8000",hovercolor:"ffb160",menubackcolor:"ffffffe6",menucolor:"4f4f4f"};break;case"staatsloterij":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"ff8400",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"ff8400",sliderbutton:"ee5f00",subtitlesbg:"8e8279cc",defaultcolor:"ff8400",hovercolor:"ee5f00",menubackcolor:"ffffffe6",menucolor:"ee5f00"};break;case"telfort":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"2c3687",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"2c3687",sliderbutton:"5a5a5a",subtitlesbg:"8e8279cc",defaultcolor:"2c3687",hovercolor:"5a5a5a",menubackcolor:"ffffffe6",menucolor:"5a5a5a"};break;case"tmobile":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"7c7c7c",sliderbg:"1c1c1c",sliderbuffer:"b5bdc1",sliderfg:"676767",sliderbutton:"e20074",subtitlesbg:"8e8279cc",defaultcolor:"7c7c7c",hovercolor:"3bc3f2",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"vattenfall":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"050135",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"050135",sliderbutton:"050135",subtitlesbg:"676767",defaultcolor:"050135",hovercolor:"5a5a5a",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"xmas":this._values={theme:"default",svgset:"default",controlbarcolor:"d00f0d",timecolor:"fff",sliderbg:"b5bdc1",sliderbuffer:"b5bdc1",sliderfg:"fff",sliderbutton:"c13939",subtitlesbg:"8e8279cc",defaultcolor:"fff",hovercolor:"b5bdc1",menubackcolor:"d00f0de6",menucolor:"fff"};break;case"youfone":this._values={theme:"default",svgset:"default",controlbarcolor:"38155a",timecolor:"fff",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"99bf0f",sliderbutton:"751a5b",subtitlesbg:"8e8279cc",defaultcolor:"fff",hovercolor:"98acb3",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"yousee":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"003c28",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"3cb84d",sliderbutton:"003c28",subtitlesbg:"8e8279cc",defaultcolor:"003c28",hovercolor:"3cb84d",menubackcolor:"ffffffe6",menucolor:"003c28"};break;case"zz":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"5b5b5b",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"95c300",sliderbutton:"00609c",subtitlesbg:"8e8279cc",defaultcolor:"00609c",hovercolor:"5b5b5b",menubackcolor:"00609ce6",menucolor:"fff"};break;default:this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"050135",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"050135",sliderbutton:"050135",subtitlesbg:"676767",defaultcolor:"050135",hovercolor:"5a5a5a",menubackcolor:"1c1c1ce6",menucolor:"fff"}}}else{switch(theme){case"achmea":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"fff",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"fff",sliderbutton:"fff",subtitlesbg:"8e8279cc",defaultcolor:"fff",hovercolor:"b5bdc1",menubackcolor:"00609ce6",menucolor:"fff"};break;case"alphabet":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"005ca9",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"005ca9",sliderbutton:"ef7d00",subtitlesbg:"ffffffe6",defaultcolor:"005ca9",hovercolor:"ef7d00",menubackcolor:"ffffffe6",menucolor:"005ca9"};break;case"base":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"416267",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"416267",sliderbutton:"1c1c1c",subtitlesbg:"8e8279cc",defaultcolor:"416267",hovercolor:"98acb3",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"boip":this._values={theme:"default",svgset:"default",controlbarcolor:"f0efef",timecolor:"3c3c3c",sliderbg:"b6b6b6",sliderbuffer:"b6b6b6",sliderfg:"3c3c3c",sliderbutton:"000",subtitlesbg:"f0efef",defaultcolor:"3c3c3c",hovercolor:"b6b6b6",menubackcolor:"1c1c1ce6",menucolor:"fff",backgroundPlay:"FFFFFF99",backgroundPlayHover:"00000099"};break;case"brunel":this._values={theme:"default",svgset:"default",controlbarcolor:"353F49",timecolor:"F2E400",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"F2E400",sliderbutton:"353F49",subtitlesbg:"676767",defaultcolor:"F2E400",hovercolor:"FFFFFF",menubackcolor:"1c1c1ce6",menucolor:"F2E400"};break;case"budgetenergie":this._values={theme:"kpn",svgset:"default",controlbarcolor:"fff",timecolor:"3aaa35",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"3aaa35",sliderbutton:"3c3c3c",subtitlesbg:"242424",defaultcolor:"3aaa35",hovercolor:"3c3c3c",menubackcolor:"676767e6",menucolor:"fff"};break;case"cbs":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"759dcf",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"759dcf",sliderbutton:"1d3e73",subtitlesbg:"8e8279cc",defaultcolor:"759dcf",hovercolor:"1d3e73",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"elsevier":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"ff8200",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"ff8200",sliderbutton:"53565a",subtitlesbg:"ffffffe6",defaultcolor:"ff8200",hovercolor:"53565a",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"eurofiber":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"007681",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"007681",sliderbutton:"963821",subtitlesbg:"ffffffe6",defaultcolor:"007681",hovercolor:"963821",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"evivanlanschot":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"6c3987",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"6c3987",sliderbutton:"5a5a5a",subtitlesbg:"8e8279cc",defaultcolor:"6c3987",hovercolor:"5a5a5a",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"fnv":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"009cde",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"009cde",sliderbutton:"7fba25",subtitlesbg:"ffffffe6",defaultcolor:"009cde",hovercolor:"7fba25",menubackcolor:"ffffffe6",menucolor:"9a8f87"};break;case"goudse":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"660099",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"414141",sliderbutton:"660099",subtitlesbg:"676767",defaultcolor:"660099",hovercolor:"5a5a5a",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"kenter":this._values={theme:"kpn",svgset:"default",controlbarcolor:"fff",timecolor:"007D30",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"007D30",sliderbutton:"fff",subtitlesbg:"242424",defaultcolor:"007D30",hovercolor:"676767",menubackcolor:"676767e6",menucolor:"fff"};break;case"kpn":this._values={theme:"kpn",svgset:"default",controlbarcolor:"fff",timecolor:"008000",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"008000",sliderbutton:"fff",subtitlesbg:"242424",defaultcolor:"008000",hovercolor:"676767",menubackcolor:"676767e6",menucolor:"fff"};break;case"lotto":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"000000",sliderbg:"ced6da",sliderbuffer:"b5bdc1",sliderfg:"000000",sliderbutton:"7f7f7f",subtitlesbg:"ffffffe6",defaultcolor:"000000",hovercolor:"7f7f7f",menubackcolor:"7f7f7fe6",menucolor:"000000"};break;case"millen":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"ABC7FF",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"0070b6",sliderbutton:"ABC7FF",subtitlesbg:"8e8279cc",defaultcolor:"ABC7FF",hovercolor:"2c72ff",menubackcolor:"00609ce6",menucolor:"fff"};break;case"nhlstenden":this._values={theme:"kpn",svgset:"default",controlbarcolor:"fff",timecolor:"00294B",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"00294B",sliderbutton:"fff",subtitlesbg:"242424",defaultcolor:"00294B",hovercolor:"676767",menubackcolor:"fff",menucolor:"00294B"};break;case"onlinenl":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"5c2d91",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"5c2d91",sliderbutton:"a7a9ac",subtitlesbg:"8e8279cc",defaultcolor:"5c2d91",hovercolor:"a7a9ac",menubackcolor:"ffffffe6",menucolor:"fff"};break;case"phenc":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"38beee",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"38beee",sliderbutton:"123864",subtitlesbg:"8e8279cc",defaultcolor:"38beee",hovercolor:"123864",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"robeco":break;case"sensara":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"e5244b",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"e5244b",sliderbutton:"9d0833",subtitlesbg:"8e8279cc",defaultcolor:"e5244b",hovercolor:"9d0833",menubackcolor:"ffffffe6",menucolor:"9d0833"};break;case"simyo":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"ff8000",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"ff8000",sliderbutton:"ffb160",subtitlesbg:"8e8279cc",defaultcolor:"ff8000",hovercolor:"ffb160",menubackcolor:"ffffffe6",menucolor:"4f4f4f"};break;case"staatsloterij":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"ff8400",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"ff8400",sliderbutton:"ee5f00",subtitlesbg:"8e8279cc",defaultcolor:"ff8400",hovercolor:"ee5f00",menubackcolor:"ffffffe6",menucolor:"ee5f00"};break;case"telfort":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"2c3687",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"2c3687",sliderbutton:"5a5a5a",subtitlesbg:"8e8279cc",defaultcolor:"2c3687",hovercolor:"5a5a5a",menubackcolor:"ffffffe6",menucolor:"5a5a5a"};break;case"tmobile":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"7c7c7c",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"7c7c7c",sliderbutton:"e20074",subtitlesbg:"8e8279cc",defaultcolor:"7c7c7c",hovercolor:"3bc3f2",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"vattenfall":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"050135",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"050135",sliderbutton:"050135",subtitlesbg:"676767",defaultcolor:"050135",hovercolor:"5a5a5a",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"xmas":this._values={theme:"default",svgset:"default",controlbarcolor:"d00f0d",timecolor:"fff",sliderbg:"b5bdc1",sliderbuffer:"b5bdc1",sliderfg:"fff",sliderbutton:"c13939",subtitlesbg:"8e8279cc",defaultcolor:"fff",hovercolor:"b5bdc1",menubackcolor:"d00f0de6",menucolor:"fff"};break;case"youfone":this._values={theme:"default",svgset:"default",controlbarcolor:"38155a",timecolor:"fff",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"99bf0f",sliderbutton:"751a5b",subtitlesbg:"8e8279cc",defaultcolor:"fff",hovercolor:"98acb3",menubackcolor:"1c1c1ce6",menucolor:"fff"};break;case"yousee":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"003c28",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"3cb84d",sliderbutton:"003c28",subtitlesbg:"8e8279cc",defaultcolor:"003c28",hovercolor:"3cb84d",menubackcolor:"ffffffe6",menucolor:"003c28"};break;case"zz":this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"fff",sliderbg:"9a8f87",sliderbuffer:"b5bdc1",sliderfg:"95c300",sliderbutton:"fff",subtitlesbg:"8e8279cc",defaultcolor:"fff",hovercolor:"b5bdc1",menubackcolor:"00609ce6",menucolor:"fff"};break;default:this._values={theme:"default",svgset:"default",controlbarcolor:"fff",timecolor:"050135",sliderbg:"8c8c8c",sliderbuffer:"b5bdc1",sliderfg:"050135",sliderbutton:"050135",subtitlesbg:"676767",defaultcolor:"050135",hovercolor:"5a5a5a",menubackcolor:"1c1c1ce6",menucolor:"fff"}}}if(showPlay==null){this._showPlay=true}else{this._showPlay=showPlay}};$hxClasses["pingvp.PingVpTheme"]=pingvp_PingVpTheme;pingvp_PingVpTheme.__name__=["pingvp","PingVpTheme"];pingvp_PingVpTheme.prototype={set:function(key,value){if(value!=null&&value!=""){this._values[key]=value}},getByKey:function(key){var result=Reflect.field(this._values,key);if(result!=null){return result}else{return""}},showPlay:function(){return this._showPlay},getIcon:function(theme,icon,color,second_color){if(second_color==null){second_color=""}var uri=Std.string(pingvp_PingVpConfigRead.get().playerUri)+"../../webplayer_tools_6_2/icons.php?set="+theme+"&icon="+icon+"&size=icons";if(color!=null){uri=uri+"&color="+color}if(second_color!=null){uri=uri+"&sec_color="+second_color}return uri},getThumbIcon:function(theme,icon,color,second_color){if(second_color==null){second_color=""}var uri=Std.string(pingvp_PingVpConfigRead.get().playerUri)+"../../webplayer_tools_6_2/icons.php?set="+theme+"&icon="+icon+"&size=thumbs";if(color!=null){uri=uri+"&color="+color}if(second_color!=null){uri=uri+"&sec_color="+second_color}return uri},getPrefixIcon:function(theme,icon,color){var uri=Std.string(pingvp_PingVpConfigRead.get().playerUri)+"../../webplayer_tools_6_2/icons.php?set="+theme+"&icon="+icon+"&size=prefix";if(color!=null){uri=uri+"&color="+color}return uri},getSlider:function(theme,icon,color){var uri=Std.string(pingvp_PingVpConfigRead.get().playerUri)+"../../webplayer_tools_6_2/icons.php?set="+theme+"&icon="+icon+"&size=slider";if(color!=null){uri=uri+"&color="+color}return uri},getButton:function(theme,icon,color){var uri=Std.string(pingvp_PingVpConfigRead.get().playerUri)+"../../webplayer_tools_6_2/icons.php?set="+theme+"&icon="+icon+"&size=button";if(color!=null){uri=uri+"&color="+color}return uri},getFull:function(theme,icon,color){var uri=Std.string(pingvp_PingVpConfigRead.get().playerUri)+"../../webplayer_tools_6_2/icons.php?set="+theme+"&icon="+icon+"&size=full";if(color!=null){uri=uri+"&color="+color}return uri},getShare:function(theme,icon,color){var uri=Std.string(pingvp_PingVpConfigRead.get().playerUri)+"../../webplayer_tools_6_2/icons.php?set="+theme+"&icon="+icon+"&size=share";if(color!=null){uri=uri+"&color="+color}return uri},getShortcut:function(theme,icon,color){var uri=Std.string(pingvp_PingVpConfigRead.get().playerUri)+"../../webplayer_tools_6_2/icons.php?set="+theme+"&icon="+icon+"&size=shortcut";if(color!=null){uri=uri+"&color="+color}return uri},getSetDefaultColor:function(){return"e7e7e7"},getSetHoverColor:function(){return"ffffff"},__class__:pingvp_PingVpTheme};var pingvp_PingVpTimeline=function(getCurrentTime){};$hxClasses["pingvp.PingVpTimeline"]=pingvp_PingVpTimeline;pingvp_PingVpTimeline.__name__=["pingvp","PingVpTimeline"];pingvp_PingVpTimeline.prototype={add:function(block,start,styles){},addTo:function(block,start,time,styles){},update:function(time){},__class__:pingvp_PingVpTimeline};var pingvp_PingVpUserAgentSelect=function(){};$hxClasses["pingvp.PingVpUserAgentSelect"]=pingvp_PingVpUserAgentSelect;pingvp_PingVpUserAgentSelect.__name__=["pingvp","PingVpUserAgentSelect"];pingvp_PingVpUserAgentSelect.select=function(disableList){var config=pingvp_PingVpConfigRead.get();if(config==null){pingvp_PingVpUserAgentSelect.player=0;return false}if(config.uaList==null){pingvp_PingVpUserAgentSelect.player=0;return false}var keysSorted=[];var _g=0;var _g1=Reflect.fields(config.uaList);while(_g<_g1.length){var n=_g1[_g];++_g;keysSorted.push(n)}keysSorted.sort(function(a,b){var ai=Reflect.field(config.uaList,a);var bi=Reflect.field(config.uaList,b);return(ai.weight|0)-(bi.weight|0)});var _g2=0;while(_g2<keysSorted.length){var n1=keysSorted[_g2];++_g2;var i=Reflect.field(config.uaList,n1);if(i.regex!=null&&i.player!=null){if(disableList.indexOf(i.player)!=-1){continue}var r=new EReg(i.regex,"i");if(r.match(window.navigator.userAgent)){pingvp_PingVpUserAgentSelect.player=i.player;return true}}}return false};var pingvp_PingVpVideoContainer=function(videoOid,node,controlsBelowVideo,isOverlayPlay,videoScript){this._videoOid=videoOid;this._node=node;this._controlsBelowVideo=controlsBelowVideo;this._isOverlayPlay=isOverlayPlay;if(this._isOverlayPlay){this._overlayPlayBgDiv=window.document.createElement("div");this._overlayPlayBgDiv.id="pingVpOverlayPlayBg-"+this._videoOid;this._overlayPlayBgDiv.className+=" pingVpOverlayPlayBg";this._overlayPlayBgDiv.className+=" pingVpReset";this._overlayPlayBgDiv.style.display="none";window.document.body.insertBefore(this._overlayPlayBgDiv,window.document.body.firstChild);this._overlayPlayBgJq=$(this._overlayPlayBgDiv)}this._node.prepend('<div id="pingVpOverlayPlayContainer-'+this._videoOid+'" class="pingVpOverlayPlayContainer pingVpReset"><div id="pingVpVideoContainer-'+videoOid+'" class="pingVpVideoContainer pingVpReset"></div></div>');this.addAriaTags(this._node,videoScript);var seo=videoScript.getSeo();if(seo!=null){this.addSeoTags(this._node,seo,videoScript)}this._videoContainer=$("#pingVpVideoContainer-"+this._videoOid);this._overlayPlayContainer=$("#pingVpOverlayPlayContainer-"+this._videoOid);this._videoContainer.css("width","100%");this._videoContainer.css("height","100%");this._overlayPlayContainer.css("width","100%");this._overlayPlayContainer.css("height","100%")};$hxClasses["pingvp.PingVpVideoContainer"]=pingvp_PingVpVideoContainer;pingvp_PingVpVideoContainer.__name__=["pingvp","PingVpVideoContainer"];pingvp_PingVpVideoContainer.prototype={addAriaTags:function(_node,videoScript){_node.attr("role","application");_node.attr("aria-label","Videopplayer")},addSeoTags:function(_node,seo,videoScript){_node.attr("itemprop","video");_node.attr("itemscope","");_node.attr("itemtype","http://schema.org/VideoObject");var name=seo.name();var description=seo.description();var transcript=seo.transcript();transcript=this.stripTags(transcript);transcript=this.escapeForHtmlAttr(transcript);var keywords=seo.keywords();var thumbnailURL=seo.thumbnailURL();var contentURL=seo.contentURL();var embedURL=seo.embedURL();var uploadDate=seo.uploadDate();var duration=seo.duration();var expires=seo.expires();var height=seo.height();var width=seo.width();if(name==null){name=videoScript.getHeaderTitle()}if(thumbnailURL==null){thumbnailURL=videoScript.getHeaderPoster()}if(contentURL==null){var start=videoScript.getHeaderStart();contentURL=videoScript.getFragmentVideoMp4Hq(start);if(contentURL==null){contentURL=videoScript.getFragmentVideoMp4Lq(start)}}var videosUri=pingvp_PingVpConfigRead.get().videosUri;var deductEmbed=false;if(height!=null){_node.prepend('<meta itemprop="height" content="'+height+'" />')}if(width!=null){_node.prepend('<meta itemprop="width" content="'+width+'" />')}if(expires!=null){_node.prepend('<meta itemprop="expires" content="'+expires+'" />')}if(duration!=null){_node.prepend('<meta itemprop="duration" content="'+duration+'" />')}if(uploadDate!=null){_node.prepend('<meta itemprop="uploadDate" content="'+uploadDate+'" />')}if(deductEmbed){var debug=false;var language="English";var select="Flash";var scriptName="01_kpn_compleet_base_5euro";var playerUri=pingvp_PingVpConfigRead.get().playerUri;var embedUrl=playerUri+"embed.php?video="+encodeURIComponent(scriptName)+"&debug="+(debug?"true":"false")+"&language="+encodeURIComponent(language)+"&select="+encodeURIComponent(select)+"&controls="+(this._controlsBelowVideo?"below":"fade");_node.prepend('<meta itemprop="embedURL" content="'+embedUrl+'" />')}else{if(embedURL!=null){_node.prepend('<meta itemprop="embedURL" content="'+embedURL+'" />')}}if(contentURL!=null){_node.prepend('<meta itemprop="contentURL" content="'+videosUri+contentURL+'" />')}if(thumbnailURL!=null){_node.prepend('<meta itemprop="thumbnailURL" content="'+thumbnailURL+'" />')}if(keywords!=null){_node.prepend('<meta itemprop="keywords" content="'+keywords+'" />')}if(transcript!=null){_node.prepend('<meta itemprop="transcript" content="'+transcript+'" />')}if(description!=null){if(videoScript.getHeaderDescription()){_node.attr("alt",description)}_node.prepend('<meta itemprop="description" content="'+description+'" />')}if(name!=null){_node.prepend('<meta itemprop="name" content="'+name+'" />')}},setResponsiveSize:function(responsiveWidth,responsiveHeight){this._responsiveWidth=responsiveWidth;this._responsiveHeight=responsiveHeight},hide:function(){this._overlayPlayContainer.css("display","none")},show:function(){this._overlayPlayContainer.css("display","block")},enableOverlayPlay:function(funOverlayPlayReturn){if(!this._isOverlayPlay){return}if(this._overlayPlayEnable){return}this._overlayPlayBgJq.off();this._funOverlayPlayReturn=funOverlayPlayReturn;this._overlayPlayEnable=true;this._overlayPlayContainer.css("position","fixed");this._overlayPlayBgJq.click($bind(this,this.onDisable));this._overlayPlayContainer.css("zIndex","90001");this._overlayPlayBgJq.css("display","block");this._overlayPlayBgJq.css("zIndex","90000");this._overlayPlayBgJq.css("position","absolute");this._overlayPlayBgJq.css("backgroundColor","#000");this._overlayPlayBgJq.css("opacity","0.4");this.resize()},onDisable:function(e){if(!this._isOverlayPlay){return}this._overlayPlayBgJq.css("display","none");this._overlayPlayContainer.css("top","0");this._overlayPlayContainer.css("left","0");this._overlayPlayContainer.css("width","100%");this._overlayPlayContainer.css("height","100%");this._overlayPlayContainer.css("position","relative");this._overlayPlayContainer.css("zIndex","auto");this._overlayPlayBgJq.css("zIndex","auto");this._overlayPlayEnable=false;if(this._funOverlayPlayReturn!=null){this._funOverlayPlayReturn()}},setOverlayPlayEnable:function(newX){this._overlayPlayEnable=newX},getWidth:function(){return this._videoContainer.width()},getHeight:function(){return this._videoContainer.height()},get:function(){return this._videoContainer},getVideoContainer:function(){return this._videoContainer},reset:function(){this._overlayPlayContainer.append(this._videoContainer)},resizeContainer:function(containerHeight){this._overlayPlayContainer.height(containerHeight)},resize:function(){if(this._isOverlayPlay&&this._overlayPlayEnable){var controlsHeight=this._controlsBelowVideo?40:0;var docWidth=$(window.document).width();var docHeight=$(window.document).height();var windowWidth=$(window).width();var windowHeight=$(window).height();var padding=30;var playerWidth=0;var playerHeight=0;if(windowHeight-padding-padding-controlsHeight<(windowWidth-padding-padding)*this._responsiveHeight/this._responsiveWidth){playerHeight=windowHeight-padding-padding;playerWidth=playerHeight*this._responsiveWidth/this._responsiveHeight;playerHeight+=controlsHeight}else{playerWidth=windowWidth-padding-padding;playerHeight=playerWidth*this._responsiveHeight/this._responsiveWidth+controlsHeight}var finPlayerWidth=playerWidth+0.5|0;this._overlayPlayContainer.css("top",(windowHeight-playerHeight)/2+"px");this._overlayPlayContainer.css("left",(windowWidth-playerWidth)/2+"px");this._overlayPlayContainer.css("width",(playerWidth+0.5|0)+"px");this._overlayPlayContainer.css("height",(playerHeight+0.5|0)+"px");this._overlayPlayBgJq.css("width",docWidth+"px");this._overlayPlayBgJq.css("height",docHeight+"px")}},stripTags:function(input){var regex_r=new RegExp("<[^>]+>","g".split("u").join(""));return input.replace(regex_r,"")},escapeForHtmlAttr:function(input){return input.split("&").join("&amp;").split('"').join("&quot;").split("'").join("&#39;").split("<").join("&lt;").split(">").join("&gt;")},__class__:pingvp_PingVpVideoContainer};var pingvp_PingVpVideoScript=function(videoOid,videoScript,successCall,failedCall){this._videoScript=videoScript;this._successCall=successCall;this._failedCall=failedCall;this._videoOid=videoOid};$hxClasses["pingvp.PingVpVideoScript"]=pingvp_PingVpVideoScript;pingvp_PingVpVideoScript.__name__=["pingvp","PingVpVideoScript"];pingvp_PingVpVideoScript.prototype={jsonObject:function(){return this._data},setJsonObject:function(data){this._data=data},load:function(){$.ajax({type:"GET",url:this._videoScript,contentType:"application/json",dataType:"jsonp",success:$bind(this,this.onJsonRetrieve),error:$bind(this,this.onFailure)})},onJsonRetrieve:function(data){this._data=data;this._successCall(data)},onFailure:function(e){this._failedCall()},getLinkedVideoScriptList:function(){var linkedVideoScriptList=[];if(this._data==null){return[]}var _g=0;var _g1=Reflect.fields(this._data);while(_g<_g1.length){var fragmentKey=_g1[_g];++_g;if(fragmentKey=="header"){continue}if(fragmentKey=="branding_studio"){continue}var fragmentValue=Reflect.field(this._data,fragmentKey);if(fragmentValue==null){return[]}if(fragmentValue.commands==null){return[]}var _g2=0;var _g3=Reflect.fields(fragmentValue.commands);while(_g2<_g3.length){var commandKey=_g3[_g2];++_g2;var commandValue=Reflect.field(fragmentValue.commands,commandKey);if(commandValue.videoScriptName!=null){linkedVideoScriptList.push(commandValue.videoScriptName)}}}return linkedVideoScriptList},getHeaderBrandName:function(defaultValue){return this.getHeaderHelper("brandName",defaultValue)},getHeaderBrandUrl:function(defaultValue){return this.getHeaderHelper("brandUrl",defaultValue)},getVideoName:function(){return this.getFragmentSuccessHelper("_videoScriptName")},getHeaderUuid:function(){return this.getHeaderHelper("uuid","")},getHeaderTitle:function(){return this.getHeaderHelper("title","")},getHeaderStart:function(){return this.getHeaderHelper("start","")},getHeaderPoster:function(){return this.getHeaderHelper("poster","")},getHeaderPosterRatio:function(){return this.getHeaderHelper("posterRatio","")},getHeaderSpeed:function(){return this.getHeaderBoolHelper("speed")},getHeaderShare:function(){return this.getHeaderBoolHelper("share")},getHeaderAI:function(){return this.getHeaderBoolHelper("hasAI")},getHeaderTheme:function(){return this.getHeaderHelper("theme","")},getShowPlay:function(){return this.getHeaderBoolHelper("showPlay")},getHeaderTimeColor:function(){return this.getHeaderHelper("timeColor","")},getHeaderSubtitlesBg:function(){return this.getHeaderHelper("subtitlesBg","")},getHeaderDefaultColor:function(){return this.getHeaderHelper("defaultColor","")},getHeaderHoverColor:function(){return this.getHeaderHelper("hoverColor","")},getHeaderAnalytics:function(){return this.getHeaderHelper("analytics","")},getHeaderFallbackPoster:function(){return this.getHeaderHelper("fallbackPoster","")},getHeaderSelect:function(){return this.getHeaderHelper("select","")},getHeaderTranscript:function(){return this.getHeaderBoolHelper("transcript")},getHeaderDebug:function(){return this.getHeaderBoolHelper("debug")},getHeaderControlsBelow:function(){return this.getHeaderHelper("controls","")=="below"},getHeaderControlsDisable:function(){return this.getHeaderHelper("controls","")=="disable"},getHeaderAutoStart:function(){return this.getHeaderBoolHelper("autoStart")},getHeaderAutoHeight:function(){return this.getHeaderBoolHelper("autoHeight")},getHeaderOverlayPlay:function(){return this.getHeaderBoolHelper("overlayPlay")},getHeaderInlinePlay:function(){return this.getHeaderBoolHelper("inlinePlay")},getHeaderVideoQuality:function(){return this.getHeaderHelper("videoQuality","HQ")},getHeaderDescription:function(){return this.getHeaderBoolHelper("description")},checktHeader:function(header){if(this._data==null){return false}if(this._data.header==null){return false}return Reflect.field(this._data.header,header)!=null},getHeaderFallbackImage:function(){return this.getHeaderHelper("fallbackImage","")},getHeaderFallbackMp4:function(){return this.getHeaderHelper("fallbackVideoMp4","")},getHeaderFallbackWebm:function(){return this.getHeaderHelper("fallbackVideoWebm","")},getHeaderFallbackOgv:function(){return this.getHeaderHelper("fallbackVideoOgv","")},checkFragment:function(fragment){if(this._data==null){return false}return Reflect.field(this._data,fragment)!=null},getFragmentOnEndRepeat:function(fragment){return this.getFragmentHeaderBoolHelper(fragment,"endRepeat",false)},getFragmentOnEndVideoLoad:function(fragment){return this.getFragmentHeaderHelper(fragment,"endVideoLoad")},getFragmentOnEndVideoScript:function(fragment){return this.getFragmentHeaderHelper(fragment,"endVideoScript")},getFragmentVideoTitle:function(fragment){return this.getFragmentHeaderHelper(fragment,"title")},getFragmentVideoUuid:function(fragment){return this.getFragmentHeaderHelper(fragment,"uuid")},getFragmentVideoMp4Lq:function(fragment){return this.getFragmentHeaderHelper(fragment,"mp4Lq")},getFragmentVideoWebmLq:function(fragment){return this.getFragmentHeaderHelper(fragment,"webmLq")},getFragmentVideoOgvLq:function(fragment){return this.getFragmentHeaderHelper(fragment,"ogvLq")},getFragmentVideoMp4Hq:function(fragment){return this.getFragmentHeaderHelper(fragment,"mp4Hq")},getFragmentVideoWebmHq:function(fragment){return this.getFragmentHeaderHelper(fragment,"webmHq")},getFragmentVideoOgvHq:function(fragment){return this.getFragmentHeaderHelper(fragment,"ogvHq")},getFragmentBackgroundImage:function(fragment){return this.getFragmentHeaderHelper(fragment,"backgroundImage")},getFragmentVideoWidth:function(fragment){return this.getFragmentHeaderFloatHelper(fragment,"width",640)},getFragmentVideoHeight:function(fragment){return this.getFragmentHeaderFloatHelper(fragment,"height",360)},getFragmentCanvasVideoWidth:function(fragment){return this.getFragmentHeaderFloatHelper(fragment,"canvasVideoWidth",640)},getFragmentCanvasVideoHeight:function(fragment){return this.getFragmentHeaderFloatHelper(fragment,"canvasVideoHeight",360)},getFragmentHeaderCanvasFramesPerSec:function(fragment,defaultValue){return this.getFragmentHeaderFloatHelper(fragment,"canvasFramesPerSec",defaultValue)|0},getFragmentHeaderCanvasAudioVideoSync:function(fragment,defaultValue){return this.getFragmentHeaderFloatHelper(fragment,"canvasAudioVideoSync",defaultValue)|0},getFragmentHeaderCanvasBufferSize:function(fragment,defaultValue){return this.getFragmentHeaderFloatHelper(fragment,"canvasBufferSize",defaultValue)|0},getFragmentHeaderCanvasVideo:function(fragment){return this.getFragmentHeaderHelper(fragment,"canvasVideo")},getFragmentHeaderFlashSync:function(fragment){return this.getFragmentHeaderFloatHelper(fragment,"flashSync",0)},getFragmentHeaderHtml5Sync:function(fragment){return this.getFragmentHeaderFloatHelper(fragment,"html5Sync",0)},getFragmentHeaderCanvasSync:function(fragment){return this.getFragmentHeaderFloatHelper(fragment,"canvasSync",0)},getFragmentHeaderHtml5DurationCorrection:function(fragment){return this.getFragmentHeaderFloatHelper(fragment,"html5DurationCorrection",0)},getFragmentHeaderCanvasDurationCorrection:function(fragment){return this.getFragmentHeaderFloatHelper(fragment,"canvasDurationCorrection",0)},getFragmentHeaderNumberFramesPerChunk:function(fragment,defaultValue){return this.getFragmentHeaderIntHelper(fragment,"numberFramesPerChunk",defaultValue)},getFragmentCommands:function(fragment){if(this._data==null){return""}return Reflect.field(this._data,fragment).commands},getFragmentSubtitles:function(fragment){var result=[];if(this._data==null){return result}var arr=Reflect.field(this._data,fragment).subtitles;if(arr==null){return result}if(!((arr instanceof Array)&&arr.__enum__==null)){return result}var array=arr;var _g=0;while(_g<array.length){var sub=array[_g];++_g;result.push(new pingvp_PingVpSubtitle(sub))}return result},getFragmentLoop:function(fragment){if(this._data==null){return null}var obj=Reflect.field(this._data,fragment).loop;if(obj==null){return null}return new pingvp_PingVpLoop(obj)},getFragmentVideoEndCallback:function(fragment){return this.getFragmentHeaderHelper(fragment,"videoEndCallback")},getHeaderHelper:function(header,defaultValue){if(this._data==null){return defaultValue}if(this._data.header==null){return defaultValue}var ret=Reflect.field(this._data.header,header);if(ret==null){return defaultValue}if(ret==null){return"null"}else{return""+ret}},getHeaderFloatHelper:function(header,defaultValue){if(this._data==null){return defaultValue}if(this._data.header==null){return defaultValue}var ret=Reflect.field(this._data.header,header);if(ret==null){return defaultValue}return ret},getHeaderBoolHelper:function(header){if(this._data==null){return null}if(this._data.header==null){return null}var ret=Reflect.field(this._data.header,header);if(ret==null){return null}return ret},getBrandedstudioHelper:function(){if(this._data==null){return null}if(this._data.branding_studio==null){return null}return this._data.branding_studio!=null},getBrandedstudioCheckHelper:function(key){if(this._data==null){return null}if(this._data.branding_studio==null){return null}var ret=Reflect.field(this._data.branding_studio,key);if(ret==null){return null}return ret!=null},getBrandedstudioLogoHelper:function(key){if(this._data==null){return null}if(this._data.branding_studio.logo==null){return null}var ret=Reflect.field(this._data.branding_studio.logo,key);if(ret==null){return null}if(ret==null){return"null"}else{return""+ret}},getBrandedstudioEndcardHelper:function(key){if(this._data==null){return null}if(this._data.branding_studio.endcard==null){return null}var ret=Reflect.field(this._data.branding_studio.endcard,key);if(ret==null){return null}if(ret==null){return"null"}else{return""+ret}},getBrandedstudioEndcardCommandHelper:function(key){if(this._data==null){return null}if(this._data.branding_studio.endcard==null){return null}var ret=Reflect.field(this._data.branding_studio.endcard,key);if(ret==null){return null}return ret},getFragmentHeaderHelper:function(fragment,header){if(this._data==null){return""}if(fragment=="header"){return""}var frag=Reflect.field(this._data,fragment);if(frag==null){return""}if(frag.video==null){return""}var ret=Reflect.field(frag.video,header);if(ret==null){return""}if(ret==null){return"null"}else{return""+ret}},getFragmentHeaderFloatHelper:function(fragment,header,defaultValue){if(this._data==null){return defaultValue}if(fragment=="header"){return defaultValue}var frag=Reflect.field(this._data,fragment);if(frag==null){return defaultValue}if(frag.video==null){return defaultValue}var ret=Reflect.field(frag.video,header);if(ret==null){return defaultValue}return ret},getFragmentSuccessHelper:function(header){if(this._successCall==null){return""}var scope=Reflect.field(this._successCall,"scope");if(scope==null){return""}var ret=Reflect.field(scope,header);if(ret==null){return""}if(ret==null){return"null"}else{return""+ret}},getFragmentHeaderIntHelper:function(fragment,header,defaultValue){if(this._data==null){return defaultValue}if(fragment=="header"){return defaultValue}var value=Reflect.field(this._data,fragment);if(value==null){return defaultValue}if(value.video==null){return defaultValue}var ret=Reflect.field(value.video,header);if(ret==null){return defaultValue}return ret},getFragmentHeaderBoolHelper:function(fragment,header,defaultValue){if(this._data==null){return defaultValue}if(fragment=="header"){return defaultValue}var value=Reflect.field(this._data,fragment);if(value==null){return defaultValue}if(value.video==null){return defaultValue}var ret=Reflect.field(value.video,header);if(ret==null){return defaultValue}return ret},getSeo:function(){if(this._data==null){return null}if(this._data.seo==null){return null}return new pingvp_PingVpSeo(this._data.seo)},__class__:pingvp_PingVpVideoScript};var pingvp_PingVpVideoScriptSelect=function(videoOid,videoScritpUri,hash,iv){this._hash=hash;this._iv=iv;this._videoOid=videoOid;pingvp_PingVpVideoScriptsCollection.init(videoScritpUri)};$hxClasses["pingvp.PingVpVideoScriptSelect"]=pingvp_PingVpVideoScriptSelect;pingvp_PingVpVideoScriptSelect.__name__=["pingvp","PingVpVideoScriptSelect"];pingvp_PingVpVideoScriptSelect.prototype={select:function(videoScriptName,funOnSuccess,funOnFailure){this._videoScriptName=videoScriptName;this._funOnSuccess=funOnSuccess;pingvp_PingVpVideoScriptsCollection.select(this._videoOid,this._videoScriptName,this._hash,this._iv,$bind(this,this.onSuccess),funOnFailure)},script:function(){return pingvp_PingVpVideoScriptsCollection.script(this._videoScriptName,this._hash)},name:function(){return this._videoScriptName},onSuccess:function(data){if(this.script()._data==null){this.script().setJsonObject(data)}if(pingvp_PingVpDevice.isAllMobileDevices()){var videoScript=this.script();var videoScriptNameList=videoScript.getLinkedVideoScriptList();var _g=0;while(_g<videoScriptNameList.length){var videoScriptName=videoScriptNameList[_g];++_g;pingvp_PingVpVideoScriptsCollection.select(this._videoOid,videoScriptName,this._hash,this._iv,function(){},function(){})}}if(this._funOnSuccess!=null){this._funOnSuccess()}},__class__:pingvp_PingVpVideoScriptSelect};var pingvp_PingVpVideoScriptsCollection=$hx_exports.pingvp["PingVpVideoScriptsCollection"]=function(){};$hxClasses["pingvp.PingVpVideoScriptsCollection"]=pingvp_PingVpVideoScriptsCollection;pingvp_PingVpVideoScriptsCollection.__name__=["pingvp","PingVpVideoScriptsCollection"];pingvp_PingVpVideoScriptsCollection.init=function(videoScriptsUri){pingvp_PingVpVideoScriptsCollection._videoScriptsUri=videoScriptsUri};pingvp_PingVpVideoScriptsCollection.select=function(videoOid,name,hash,iv,successCall,failedCall){var urlIV="";if(iv!=null){urlIV="&iv="+encodeURIComponent(iv)}var videoScriptAdrress=pingvp_PingVpVideoScriptsCollection._videoScriptsUri+"jsonp.php?name="+encodeURIComponent(name)+"&hash="+encodeURIComponent(hash)+urlIV;var mapId=name+"::"+hash;var this1=pingvp_PingVpVideoScriptsCollection._scripts;var v=new pingvp_PingVpVideoScript(videoOid,videoScriptAdrress,successCall,failedCall);var _this=this1;if(__map_reserved[mapId]!=null){_this.setReserved(mapId,v)}else{_this.h[mapId]=v}var _this1=pingvp_PingVpVideoScriptsCollection._scripts;(__map_reserved[mapId]!=null?_this1.getReserved(mapId):_this1.h[mapId]).load()};pingvp_PingVpVideoScriptsCollection.script=function(name,hash){var mapId=name+"::"+hash;var _this=pingvp_PingVpVideoScriptsCollection._scripts;if(__map_reserved[mapId]!=null){return _this.getReserved(mapId)}else{return _this.h[mapId]}};pingvp_PingVpVideoScriptsCollection.jsonObject=function(name,hash){var mapId=name+"::"+hash;var _this=pingvp_PingVpVideoScriptsCollection._scripts;if((__map_reserved[mapId]!=null?_this.getReserved(mapId):_this.h[mapId])==null){return null}var _this1=pingvp_PingVpVideoScriptsCollection._scripts;return(__map_reserved[mapId]!=null?_this1.getReserved(mapId):_this1.h[mapId]).jsonObject()};var pingvp_PingVpWebSocketSender=function(playerOid){this._playerOid=playerOid;this._events=[];this._errorsCount=0;this._logEnabled=true;this.reset()};$hxClasses["pingvp.PingVpWebSocketSender"]=pingvp_PingVpWebSocketSender;pingvp_PingVpWebSocketSender.__name__=["pingvp","PingVpWebSocketSender"];pingvp_PingVpWebSocketSender.prototype={reset:function(){this._productionUuid=null;this._productionTitle=null;this._fragmentUuid=null;this._fragmentTitle=null;this._percent=-1},update:function(productionUuid,productionTitle,fragmentUuid,fragmentTitle,percent,action){var info={};var hasData=false;if(this._productionUuid!=productionUuid){this._productionUuid=productionUuid;info.pid=productionUuid}if(this._productionTitle!=productionTitle){this._productionTitle=productionTitle;info.ptitle=productionTitle}if(this._fragmentUuid!=fragmentUuid){this._fragmentUuid=fragmentUuid;info.fid=fragmentUuid}if(this._fragmentTitle!=fragmentTitle){this._fragmentTitle=fragmentTitle;info.ftitle=fragmentTitle}if(this._percent!=percent){this._percent=percent;info.pct=percent}if(this._screenWidth!=window.screen.width){this._screenWidth=window.screen.width;info.sw=window.screen.width}if(this._screenHeight!=window.screen.height){this._screenHeight=window.screen.height;info.sh=window.screen.height}if(JSON.stringify(info).length<=2){return}info.act=action;this.pushEvent(JSON.stringify(info))},pushEvent:function(json){if(json.length<=2){return}this._events.push(json);this.sendEvents()},sendEvents:function(){if(this._webSocket==null){var delay=this._errorsCount*2*1000;if(delay==0){this.createConnection()}else{haxe_Timer.delay($bind(this,this.createConnection),delay)}return}while(this._events.length>0){this._webSocket.send(this._events.pop())}},createConnection:function(){var _gthis=this;var hostname=window.location.hostname;var ws=new WebSocket("ws://"+hostname+":9090");ws.onopen=function(){if(_gthis._logEnabled){window.console.log("CONNECT")}_gthis._webSocket=ws;_gthis._errorsCount=0;_gthis.sendEvents()};ws.onmessage=function(e){};ws.onclose=function(){if(_gthis._logEnabled){window.console.log("DISCONNECT")}_gthis._webSocket=null;_gthis._errorsCount++;_gthis.reset()};ws.onerror=function(){if(_gthis._logEnabled){window.console.log("FAILURE")}ws.close();_gthis._webSocket=null;_gthis._errorsCount++;_gthis.reset()}},__class__:pingvp_PingVpWebSocketSender};var pingvp_PreloadedImage=function(imageUrl,hover){this._hover=hover;this._image=window.document.createElement("img");this._imageContainer=window.document.createElement("div");this._image.style.position="absolute";this._image.src=imageUrl;if(hover){this._imageContainer.style.width="300%";this._image.onmouseover=$bind(this,this.hoverIn);this._image.onmouseleave=$bind(this,this.hoverOut);this._image.onclick=$bind(this,this.onClick)}else{this._imageContainer.style.width="100%"}this._image.style.width="100%";this._image.style.height="100%";this._imageContainer.style.height="100%";this._image.onload=$bind(this,this.onImageLoad);this._imageContainer.style.position="absolute";this._imageContainer.appendChild(this._image)};$hxClasses["pingvp.PreloadedImage"]=pingvp_PreloadedImage;pingvp_PreloadedImage.__name__=["pingvp","PreloadedImage"];pingvp_PreloadedImage.prototype={opacity:function(value){this._image.style.opacity=value+""},hoverIn:function(e){this._imageContainer.style.left="-100%"},hoverOut:function(e){this._imageContainer.style.left=0+"px"},onClick:function(e){this._imageContainer.style.left="-200%"},onImageLoad:function(){},getDivElement:function(){return this._imageContainer},__class__:pingvp_PreloadedImage};var pingvp_VsyncTimer=function(){};$hxClasses["pingvp.VsyncTimer"]=pingvp_VsyncTimer;pingvp_VsyncTimer.__name__=["pingvp","VsyncTimer"];pingvp_VsyncTimer.prototype={start:function(call){this._call=call;this._loop=true;if(window.requestAnimationFrame){this._requestAnimationFrame=window.requestAnimationFrame}else{if(window.webkitRequestAnimationFrame){this._requestAnimationFrame=window.webkitRequestAnimationFrame}else{if(window.mozRequestAnimationFrame){this._requestAnimationFrame=window.mozRequestAnimationFrame}else{return}}}var temp=this._requestAnimationFrame;temp($bind(this,this.render))},isSupported:function(){if(!(window.requestAnimationFrame||(window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame))){return false}return true},render:function(){if(this._loop){var temp=this._requestAnimationFrame;temp($bind(this,this.render));this._call()}},stop:function(){this._loop=false},__class__:pingvp_VsyncTimer};var pingvp_Webplayer=$hx_exports.pingvp["Webplayer"]=function(elementId,width,height,video,hash,language,controlsBelow,autoStart,autoHeight,overlayPlay,inlinePlay,debug,startFragment,startSubs,iv){if(iv==null){iv=""}if(startSubs==null){startSubs=""}if(startFragment==null){startFragment=""}if(debug==null){debug=false}if(inlinePlay==null){inlinePlay=false}if(overlayPlay==null){overlayPlay=false}if(autoHeight==null){autoHeight=true}if(autoStart==null){autoStart=false}if(controlsBelow==null){controlsBelow=false}if(language==null){language="English"}if(hash==null){hash=""}if(video==null){video=""}if(height==null){height=0}if(width==null){width=0}pingvp_Webplayer._playerSerial++;this.pingVpFunctions=window.pingVpFunctions;var elementJq=$("#"+elementId);elementJq.empty();elementJq.addClass("pingVpWebplayerSelector");if(elementJq.css("position")!="relative"||elementJq.css("position")!="absolute"){elementJq.css("position","relative")}if(width!=0){elementJq.width(width)}if(height!=0){elementJq.height(height)}this._loader=new pingvp_PingVpLoader(pingvp_Webplayer._playerSerial,elementJq,video,hash,iv,debug,language,startFragment,startSubs,"flash",controlsBelow,false,false,autoStart,autoHeight,overlayPlay,inlinePlay,this.pingVpFunctions)};$hxClasses["pingvp.Webplayer"]=pingvp_Webplayer;pingvp_Webplayer.__name__=["pingvp","Webplayer"];pingvp_Webplayer.prototype={__class__:pingvp_Webplayer};var pingvp_canvasplayer_CanvasAudio=function(videoOid,baseUrl,funLoadedMetaData,funOnBeginBuffering,funOnEndBuffering,funOnEnd){this._audioElement=window.document.createElement("audio");this._audioElement.id="pingVpAudio-"+videoOid;this._audioElement.preload="auto";this._audioElement.src=baseUrl+"audio.mp3";this._funLoadedMetaData=funLoadedMetaData;this._funOnBeginBuffering=funOnBeginBuffering;this._funOnEndBuffering=funOnEndBuffering;this._funOnEnd=funOnEnd;this._audioElement.addEventListener("loadedmetadata ",$bind(this,this.onLoadedMetaData),false);this._audioElement.addEventListener("waiting",$bind(this,this.onBeginBuffering),false);this._audioElement.addEventListener("playing",$bind(this,this.onEndBuffering),false);this._audioElement.addEventListener("ended",$bind(this,this.onEnd),false);if(pingvp_PingVpDevice.isIpad()){var f=$bind(this,this.onLoadedMetaData);haxe_Timer.delay(function(){f(null)},1000)}};$hxClasses["pingvp.canvasplayer.CanvasAudio"]=pingvp_canvasplayer_CanvasAudio;pingvp_canvasplayer_CanvasAudio.__name__=["pingvp","canvasplayer","CanvasAudio"];pingvp_canvasplayer_CanvasAudio.prototype={cleanup:function(){this._audioElement.pause();this._audioElement=null},play:function(){this._audioElement.play()},pause:function(){this._audioElement.pause()},setCurrentTime:function(time){this._audioElement.currentTime=time},getFrame:function(fps){return Math.floor(this._audioElement.currentTime.toFixed(5)*fps)+1},getCurrentTime:function(){if(this._audioElement.currentTime==null){return 0}else{return this._audioElement.currentTime}},setVolume:function(volume){this._audioElement.volume=volume},getVolume:function(){return this._audioElement.volume},muted:function(value){this._audioElement.muted=value},getDuration:function(){if(this._audioElement.duration==null){return 0}else{return this._audioElement.duration}},onLoadedMetaData:function(e){if(this._funLoadedMetaData==null){return}this._funLoadedMetaData()},onEnd:function(e){if(this._funOnEnd==null){return}this._funOnEnd()},onBeginBuffering:function(e){if(this._funOnBeginBuffering==null){return}this._funOnBeginBuffering()},onEndBuffering:function(e){if(this._funOnEndBuffering==null){return}this._funOnEndBuffering()},__class__:pingvp_canvasplayer_CanvasAudio};var pingvp_canvasplayer_CanvasBuffer=function(size,videoBaseUri,funBufferCheck){this.bufferSize=size;this.arraySize=size*2;this.lastBuffredFrame=0;this.baseUri=videoBaseUri;this.buffer=[];this._funBufferCheck=funBufferCheck};$hxClasses["pingvp.canvasplayer.CanvasBuffer"]=pingvp_canvasplayer_CanvasBuffer;pingvp_canvasplayer_CanvasBuffer.__name__=["pingvp","canvasplayer","CanvasBuffer"];pingvp_canvasplayer_CanvasBuffer.prototype={buffering:function(currentFrame,totalFrames){var i=this.lastBuffredFrame;var tmp=this.lastBuffredFrame<currentFrame;if(currentFrame<this.lastBuffredFrame-this.bufferSize){i=currentFrame}if(currentFrame>this.lastBuffredFrame){i=currentFrame}while(i<currentFrame+this.bufferSize&&i<totalFrames){this.buffer[i%this.arraySize]=new pingvp_PingVpCanvasFrame(this.baseUri,i,this._funBufferCheck);++i}this.lastBuffredFrame=i},getSequenceImage:function(frame){if(this.buffer[frame%this.arraySize]==null){return null}if(this.buffer[frame%this.arraySize].getFrameNo()!=frame){this.buffer[frame%this.arraySize]=new pingvp_PingVpCanvasFrame(this.baseUri,frame,this._funBufferCheck);this.lastBuffredFrame=frame+1}if(!this.buffer[frame%this.arraySize].getReady()){return null}return this.buffer[frame%this.arraySize].getFrameImage()},bufferCheck:function(frame){var i=0;while(i<this.bufferSize){if(!(this.buffer[(frame+i)%this.arraySize]!=null&&this.buffer[(frame+i)%this.arraySize].getReady())){return false}++i}return true},__class__:pingvp_canvasplayer_CanvasBuffer};var pingvp_commons_Command=function(name,time,command,call){this._name=name;this._time=time;this._command=command;this._call=call;this._once=true};$hxClasses["pingvp.commons.Command"]=pingvp_commons_Command;pingvp_commons_Command.__name__=["pingvp","commons","Command"];pingvp_commons_Command.prototype={update:function(currendTime){if(currendTime>=this._time&&currendTime<this._time+0.5){if(this._once){this._call(this._command);this._once=false}}else{this._once=true}},__class__:pingvp_commons_Command};var pingvp_fallbackplayer_FallbackVideo=function(node,videoOid,poster,videoMp4,videoWebm,videoOgg,fallbackImg){this._videoElement=window.document.createElement("video");this._videoElement.id="pingVpFallbackVideo-"+videoOid;this._videoElement.className+=" pingVpFallbackVideo";this._videoElement.className+=" pingVpReset";this._videoElement.controls=true;this._videoElement.poster=poster;this._videoElement.preload="auto";this._videoMp4=window.document.createElement("source");this._videoMp4.className+=" pingVpReset";this._videoMp4.src=videoMp4;this._videoMp4Type=window.document.createElement("source");this._videoMp4Type.className+=" pingVpReset";this._videoMp4Type.type="video/mp4";this._videoMp4Type.src=videoMp4;this._videoWebmType=window.document.createElement("source");this._videoWebmType.className+=" pingVpReset";this._videoWebmType.type="video/webm";this._videoWebmType.src=videoWebm;this._videoOgvType=window.document.createElement("source");this._videoOgvType.className+=" pingVpReset";this._videoOgvType.type="video/ogg";this._videoOgvType.src=videoOgg;this._fallbackImage=window.document.createElement("img");this._fallbackImage.className+=" pingVpReset";this._fallbackImage.style.width="100%";this._fallbackImage.style.height="100%";this._fallbackImage.alt="";this._fallbackImage.src=fallbackImg;this._videoElement.appendChild(this._videoMp4);this._videoElement.appendChild(this._videoMp4Type);this._videoElement.appendChild(this._videoWebmType);this._videoElement.appendChild(this._videoOgvType);this._videoElement.appendChild(this._fallbackImage);this._videoElement.disablePictureInPicture=true;var fc=node.firstChild;while(fc!=null){node.removeChild(fc);fc=node.firstChild}node.appendChild(this._videoElement)};$hxClasses["pingvp.fallbackplayer.FallbackVideo"]=pingvp_fallbackplayer_FallbackVideo;pingvp_fallbackplayer_FallbackVideo.__name__=["pingvp","fallbackplayer","FallbackVideo"];pingvp_fallbackplayer_FallbackVideo.prototype={resize:function(width,height){this._videoElement.style.width=width+"px";this._videoElement.style.height=height+"px"},cleanUp:function(){this._videoElement.removeChild(this._fallbackImage);this._videoElement.removeChild(this._videoOgvType);this._videoElement.removeChild(this._videoWebmType);this._videoElement.removeChild(this._videoMp4Type);this._videoElement.removeChild(this._videoMp4);this._videoElement.remove();this._fallbackImage=null;this._videoOgvType=null;this._videoWebmType=null;this._videoMp4Type=null;this._videoMp4=null;this._videoElement=null},__class__:pingvp_fallbackplayer_FallbackVideo};var pingvp_gui_fullscreen_FullScreen=function(videoOid){this._fullScreenApi=new pingvp_gui_fullscreen_PingVpFullScreenApi(videoOid);this._fullWindow=new pingvp_gui_fullscreen_FullWindow(videoOid);this._supportFullScreenApi=!pingvp_PingVpDevice.isAndroidNativeBrowser()&&this._fullScreenApi.support()};$hxClasses["pingvp.gui.fullscreen.FullScreen"]=pingvp_gui_fullscreen_FullScreen;pingvp_gui_fullscreen_FullScreen.__name__=["pingvp","gui","fullscreen","FullScreen"];pingvp_gui_fullscreen_FullScreen.prototype={claenUp:function(){this._fullWindow.claenUp();this._fullWindow=null},setFullScreenEventHandler:function(call){this._fullScreenApi.setFullScreenEventHandler(call);this._fullWindow.setOnFullWindow(call)},setWindowedEventHandler:function(call){this._fullScreenApi.setWindowedEventHandler(call);this._fullWindow.setOnWindowed(call)},support:function(){return true},isFullWindowSelected:function(){return !this._supportFullScreenApi},request:function(){if(this._supportFullScreenApi){return this._fullScreenApi.request()}this._fullWindow.request();return true},cancel:function(){if(this._supportFullScreenApi){this._fullScreenApi.cancel()}this._fullWindow.cancel()},setChild:function(child){if(!this._supportFullScreenApi){this._fullWindow.set(child)}},removeChild:function(){if(!this._supportFullScreenApi){this._fullWindow.removeAll()}},zIndex:function(videoOid,blocksAll,z){if(this._supportFullScreenApi){this._fullScreenApi.zIndex(videoOid,blocksAll,z);return}},isNotFramed:function(){return window.self==window.top},setContainerAbsolute:function(videoOid){if(this._supportFullScreenApi){this._fullScreenApi.setContainerAbsolute(videoOid);return}},setContainerRelative:function(videoOid){if(this._supportFullScreenApi){this._fullScreenApi.setContainerRelative(videoOid);return}},getContainerWidth:function(videoOid){if(this._supportFullScreenApi){return this._fullScreenApi.getContainerWidth(videoOid)}return window.innerWidth},getContainerHeight:function(videoOid){if(this._supportFullScreenApi){return this._fullScreenApi.getContainerHeight(videoOid)}return window.innerHeight},setContainerWidth:function(videoOid,width){if(this._supportFullScreenApi){this._fullScreenApi.setContainerWidth(videoOid,width);return}},setContainerHeight:function(videoOid,height){if(this._supportFullScreenApi){this._fullScreenApi.setContainerHeight(videoOid,height);return}},getVars:function(key){var qs=document.location.search;qs=qs.split("+").join(" ");var params={},tokens,re=/[?&]?([^=]+)=([^&]*)/g;while(tokens=re.exec(qs)){params[decodeURIComponent(tokens[1])]=decodeURIComponent(tokens[2])}return params[key]},__class__:pingvp_gui_fullscreen_FullScreen};var pingvp_gui_fullscreen_FullWindow=function(videoOid){this._fullWindowContainer=window.document.createElement("div");this._fullWindowContainer.id="pingVpFullWindowContainer-"+videoOid;this._fullWindowContainer.className+=" pingVpFullWindowContainer";this._fullWindowContainer.className+=" pingVpReset";this._fullWindowContainer.style.display="none";this._fullWindowContainer.style.position="fixed";this._fullWindowContainer.style.top="0px";this._fullWindowContainer.style.right="0px";this._fullWindowContainer.style.bottom="0px";this._fullWindowContainer.style.left="0px";this._fullWindowContainer.style.width="100%";this._fullWindowContainer.style.height="100%";this._fullWindowContainer.style.backgroundColor="#000000";this._fullWindowContainer.style.zIndex="2147483646";window.document.body.insertBefore(this._fullWindowContainer,window.document.body.firstChild)};$hxClasses["pingvp.gui.fullscreen.FullWindow"]=pingvp_gui_fullscreen_FullWindow;pingvp_gui_fullscreen_FullWindow.__name__=["pingvp","gui","fullscreen","FullWindow"];pingvp_gui_fullscreen_FullWindow.prototype={claenUp:function(){this._fullWindowContainer.parentElement.removeChild(this._fullWindowContainer);this._fullWindowContainer=null},setOnFullWindow:function(call){this._funOnFullWindow=call},setOnWindowed:function(call){this._funOnWindowed=call},request:function(){this._fullWindowContainer.style.display="block";if(this._funOnFullWindow!=null){haxe_Timer.delay(this._funOnFullWindow,0)}},cancel:function(){this._fullWindowContainer.style.display="none";if(this._funOnWindowed!=null){haxe_Timer.delay(this._funOnWindowed,0)}},set:function(child){var node=this._fullWindowContainer;var fc=node.firstChild;while(fc!=null){node.removeChild(fc);fc=node.firstChild}this._fullWindowContainer.appendChild(child)},removeAll:function(){var node=this._fullWindowContainer;var fc=node.firstChild;while(fc!=null){node.removeChild(fc);fc=node.firstChild}},__class__:pingvp_gui_fullscreen_FullWindow};var pingvp_gui_fullscreen_PingVpFullScreenApi=function(videoOid){this._videoOid=videoOid;this._isFullScreen=false;var element=document.getElementById("pingVpVideoContainer-"+this._videoOid);var parent=this;element.addEventListener(this.fullScreenEventName(),function(e){if(parent._isFullScreen){parent.onWindowed()}else{parent.onFullScreen()}parent._isFullScreen=!parent._isFullScreen},false)};$hxClasses["pingvp.gui.fullscreen.PingVpFullScreenApi"]=pingvp_gui_fullscreen_PingVpFullScreenApi;pingvp_gui_fullscreen_PingVpFullScreenApi.__name__=["pingvp","gui","fullscreen","PingVpFullScreenApi"];pingvp_gui_fullscreen_PingVpFullScreenApi.prototype={onFullScreen:function(){if(this._fullScreenCall!=null){this._fullScreenCall()}},onWindowed:function(){if(this._windowedCall!=null){this._windowedCall()}},setFullScreenEventHandler:function(call){this._fullScreenCall=call},setWindowedEventHandler:function(call){this._windowedCall=call},fullScreenEventName:function(){if(typeof document.mozCancelFullScreen!="undefined"){return"mozfullscreenchange"}else{if(typeof document.webkitCancelFullScreen!="undefined"){return"webkitfullscreenchange"}else{if(typeof document.oCancelFullScreen!="undefined"){return"ofullscreenchange"}else{if(typeof document.msExitFullscreen!="undefined"){return"msfullscreenchange"}else{if(typeof document.khtmlCancelFullScreen!="undefined"){return"khtmlfullscreenchange"}else{return"fullscreenchange"}}}}}},support:function(){return !(typeof document.cancelFullScreen=="undefined"&&typeof document.webkitCancelFullScreen=="undefined"&&typeof document.mozCancelFullScreen=="undefined"&&typeof document.oCancelFullScreen=="undefined"&&typeof document.msExitFullscreen=="undefined"&&typeof document.khtmlCancelFullScreen=="undefined")},request:function(){var element=document.getElementById("pingVpVideoContainer-"+this._videoOid);if(typeof document.cancelFullScreen!="undefined"){element.requestFullScreen()}else{if(typeof document.webkitCancelFullScreen!="undefined"){element.webkitRequestFullScreen()}else{if(typeof document.mozCancelFullScreen!="undefined"){element.mozRequestFullScreen()}else{if(typeof document.oCancelFullScreen!="undefined"){element.oRequestFullScreen()}else{if(typeof document.msExitFullscreen!="undefined"){element.msRequestFullscreen()}else{if(typeof document.khtmlCancelFullScreen!="undefined"){element.khtmlRequestFullScreen()}else{return false}}}}}}return true},cancel:function(){if(typeof document.cancelFullScreen!="undefined"){document.cancelFullScreen()}else{if(typeof document.webkitCancelFullScreen!="undefined"){document.webkitCancelFullScreen()}else{if(typeof document.mozCancelFullScreen!="undefined"){document.mozCancelFullScreen()}else{if(typeof document.oCancelFullScreen!="undefined"){document.oCancelFullScreen()}else{if(typeof document.msExitFullscreen!="undefined"){document.msExitFullscreen()}else{if(typeof document.khtmlCancelFullScreen!="undefined"){document.khtmlCancelFullScreen()}else{return false}}}}}}return true},zIndex:function(videoOid,blocksAll,z){var blocks=blocksAll.getBlocks();var i;if(z=="auto"){this.resetZIndexHelper("#pingVpVideoContainer-"+videoOid);this.resetZIndexHelper("#pingVpVideo-"+videoOid);this.resetZIndexHelper("#pingVpOverlay-"+videoOid);i=0;while(i<blocks.length){blocks[i].zIndex("auto");++i}this.resetZIndexHelper("#pingVpControlBar-"+videoOid);this.resetZIndexHelper("#pingVpControlShare-"+videoOid);this.resetZIndexHelper("#pingVpSubtitles-"+videoOid);this.resetZIndexHelper("#pingVpSubtitlesMenu-"+videoOid);this.resetZIndexHelper("#pingVpSettingsMenu-"+videoOid);this.resetZIndexHelper("#pingVpControlOverlayMobile-"+videoOid)}else{var zIndex=Std.parseInt(z);if(zIndex!=null){this.setZIndexHelper("#pingVpVideoContainer-"+videoOid,zIndex);this.setZIndexHelper("#pingVpVideo-"+videoOid,zIndex+1);this.setZIndexHelper("#pingVpOverlay-"+videoOid,zIndex+2);i=0;while(i<blocks.length){blocks[i].zIndex(Std.string(zIndex+i+3));++i}this.setZIndexHelper("#pingVpControlBar-"+videoOid,zIndex+i+4);this.setZIndexHelper("#pingVpControlShare-"+videoOid,zIndex+i+5);this.setZIndexHelper("#pingVpSubtitles-"+videoOid,zIndex+i+7);this.setZIndexHelper("#pingVpSubtitlesMenu-"+videoOid,zIndex+i+8);this.setZIndexHelper("#pingVpSettingsMenu-"+videoOid,zIndex+i+9);this.setZIndexHelper("#pingVpControlOverlayMobile-"+videoOid,zIndex+i+10)}}},resetZIndexHelper:function(elementName){var jqElement=$(elementName);jqElement.css("zIndex","auto")},setZIndexHelper:function(elementName,index){var jqElement=$(elementName);jqElement.css("zIndex",index)},getVars:function(key){var qs=document.location.search;qs=qs.split("+").join(" ");var params={},tokens,re=/[?&]?([^=]+)=([^&]*)/g;while(tokens=re.exec(qs)){params[decodeURIComponent(tokens[1])]=decodeURIComponent(tokens[2])}return params[key]},isNotFramed:function(){var notFramed=window.self===window.top;return notFramed},setContainerAbsolute:function(videoOid){$("#pingVpVideoContainer-"+videoOid).parent().css("position","fixed");$("body").parent().css("overflow","hidden")},setContainerRelative:function(videoOid){$("#pingVpVideoContainer-"+videoOid).parent().css("position","relative");$("body").parent().css("overflow","visible")},getContainerWidth:function(videoOid){return $("#pingVpVideoContainer-"+videoOid).parent().width()|0},getContainerHeight:function(videoOid){return $("#pingVpVideoContainer-"+videoOid).parent().height()|0},setContainerWidth:function(videoOid,width){$("#pingVpVideoContainer-"+videoOid).parent().css("width",width)},setContainerHeight:function(videoOid,height){$("#pingVpVideoContainer-"+videoOid).parent().css("height",height)},__class__:pingvp_gui_fullscreen_PingVpFullScreenApi};var pingvp_html5player_VideoTag=function(videoOid,node,videoMp4,videoWebm,videoOgv,funOnBeginBuffering,funOnEndBuffering,funOnPlay,autoStart){this._videoOid=videoOid;this._funOnBeginBuffering=funOnBeginBuffering;this._funOnEndBuffering=funOnEndBuffering;this._funOnPlay=funOnPlay;this._autoStart=autoStart;this._videoElement=window.document.createElement("video");this._videoElement.id="pingVpVideo-"+videoOid;this._videoElement.className+=" pingVpVideo";this._videoElement.className+=" pingVpReset";this._videoElement.setAttribute("playsinline","");var tmp=this._autoStart;this._videoElement.setAttribute("disablePictureInPicture","true");this._videoElement.disablePictureInPicture=true;this._videoElement.style.width="100%";this._videoElement.style.height="100%";this._videoElement.preload="auto";if(videoMp4!=""&&videoMp4!=null){this._videoMp4=window.document.createElement("source");this._videoMp4.className+=" pingVpReset";this._videoMp4.src=videoMp4;this._videoMp4Type=window.document.createElement("source");this._videoMp4Type.className+=" pingVpReset";this._videoMp4Type.type="video/mp4";this._videoMp4Type.src=videoMp4;this._videoElement.appendChild(this._videoMp4);this._videoElement.appendChild(this._videoMp4Type)}this._videoElement.onpause=$bind(this,this.onPause);this._videoElement.onended=$bind(this,this.onEnd);this._videoElement.onplay=$bind(this,this.onPlay);this._videoElement.onloadedmetadata=$bind(this,this.onLoadedMetaData);this._videoElement.onwaiting=$bind(this,this.onBeginBuffering);this._videoElement.onplaying=$bind(this,this.onEndBuffering);this._videoElement.ontimeupdate=$bind(this,this.onEndBuffering);var fc=node.firstChild;while(fc!=null){node.removeChild(fc);fc=node.firstChild}node.appendChild(this._videoElement)};$hxClasses["pingvp.html5player.VideoTag"]=pingvp_html5player_VideoTag;pingvp_html5player_VideoTag.__name__=["pingvp","html5player","VideoTag"];pingvp_html5player_VideoTag.prototype={cleanUp:function(){if(this._videoOgvType!=null){this._videoElement.removeChild(this._videoOgvType);this._videoOgvType=null}if(this._videoWebmType!=null){this._videoElement.removeChild(this._videoWebmType);this._videoWebmType=null}if(this._videoMp4Type!=null){this._videoElement.removeChild(this._videoMp4Type);this._videoMp4Type=null}if(this._videoMp4!=null){this._videoElement.removeChild(this._videoMp4);this._videoMp4=null}if(this._videoElement!=null){this._videoElement.pause();this._videoElement.parentElement.removeChild(this._videoElement);this._videoElement=null}},onPlaySuccess:function(){},onPlayFailed:function(){},play:function(){var promise=null;promise=this._videoElement.play();if(promise!==undefined){function successFunction(){}function failureFunction(err){}promise.then(successFunction,failureFunction)}if(this._funOnPlay!=null){this._funOnPlay()}},pause:function(){this._videoElement.pause()},getDuration:function(){return this._videoElement.duration},getFrame:function(fps){return Math.floor(this._videoElement.currentTime*fps)+1},getCurrentTime:function(){return this._videoElement.currentTime},supportBuffered:function(){return this._videoElement.buffered!=null},getBuffered:function(){var last=0;var length=this._videoElement.buffered.length;var _g1=0;var _g=length;while(_g1<_g){var i=_g1++;var rangeEnd=this._videoElement.buffered.end(i);if(last<rangeEnd){last=rangeEnd}}return last},setCurrentTime:function(time){var calculation=new pingvp_PingVpCalculations();time=calculation.trim(time,6);this._videoElement.currentTime=time;var tmp=this.getCurrentTime()!=time},setCurrentTimeDelay:function(time){var _gthis=this;this._videoElement.addEventListener("loadeddata",function(){_gthis._videoElement.currentTime=time},false)},onPause:function(e){if(this._pauseCall!=null){this._pauseCall()}},setPauseHandler:function(call){this._pauseCall=call},onEnd:function(e){if(this._endCall!=null){this._endCall()}},setEndHandler:function(call){this._endCall=call},onPlay:function(e){if(this._playCall!=null){this._playCall()}},setPlayHandler:function(call){this._playCall=call},onLoadedMetaData:function(e){if(this._loadedMetaDataCall!=null){this._loadedMetaDataCall()}},setLoadedMetaData:function(call){this._loadedMetaDataCall=call},muted:function(value){this._videoElement.muted=value},setVolume:function(volume){this._videoElement.volume=volume},getVolume:function(){return this._videoElement.volume},getPosLeft:function(){return this._videoElement.offsetLeft},getPosTop:function(){return this._videoElement.offsetTop},getWidth:function(){return this._videoElement.videoWidth},getHeight:function(){return this._videoElement.videoHeight},load:function(){this._videoElement.load()},paddingBottom:function(container,width,height,pixels){this._videoElement.style.marginBottom=pixels+"px";this._videoElement.style.bottom=pixels+"px";var lHeight=height-pixels;this._videoElement.style.width=(width+0.5|0)+"px";this._videoElement.style.height=(lHeight+0.5|0)+"px"},onBeginBuffering:function(){if(this._funOnBeginBuffering==null){return}this._funOnBeginBuffering()},onEndBuffering:function(){if(this._funOnEndBuffering==null){return}this._funOnEndBuffering()},setOnTimeUpdate:function(fun){this._videoElement.addEventListener("timeupdate",function(e){fun()},false)},isPlaying:function(){if(this._videoElement!=null){return !this._videoElement.paused}else{return false}},__class__:pingvp_html5player_VideoTag};var $_,$fid=0;function $bind(o,m){if(m==null){return null}if(m.__id__==null){m.__id__=$fid++}var f;if(o.hx__closures__==null){o.hx__closures__={}}else{f=o.hx__closures__[m.__id__]}if(f==null){f=function(){return f.method.apply(f.scope,arguments)};f.scope=o;f.method=m;o.hx__closures__[m.__id__]=f}return f}$hxClasses.Math=Math;String.prototype.__class__=$hxClasses.String=String;String.__name__=["String"];$hxClasses.Array=Array;Array.__name__=["Array"];Date.prototype.__class__=$hxClasses.Date=Date;Date.__name__=["Date"];var Int=$hxClasses.Int={__name__:["Int"]};var Dynamic=$hxClasses.Dynamic={__name__:["Dynamic"]};var Float=$hxClasses.Float=Number;Float.__name__=["Float"];var Bool=$hxClasses.Bool=Boolean;Bool.__ename__=["Bool"];var Class=$hxClasses.Class={__name__:["Class"]};var Enum={};var __map_reserved={};var ArrayBuffer=$global.ArrayBuffer||js_html_compat_ArrayBuffer;if(ArrayBuffer.prototype.slice==null){ArrayBuffer.prototype.slice=js_html_compat_ArrayBuffer.sliceImpl}var Uint8Array=$global.Uint8Array||js_html_compat_Uint8Array._new;haxe_Serializer.USE_CACHE=false;haxe_Serializer.USE_ENUM_INDEX=false;haxe_Serializer.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";haxe_Unserializer.DEFAULT_RESOLVER=new haxe__$Unserializer_DefaultResolver();haxe_Unserializer.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";haxe_ds_ObjectMap.count=0;haxe_remoting_ExternalConnection.connections=new haxe_ds_StringMap();js_Boot.__toStr=({}).toString;js_html_compat_Uint8Array.BYTES_PER_ELEMENT=1;pingvp_PingVpEach._oid=1;pingvp_PingVpUserAgentSelect.player=0;pingvp_PingVpUserAgentSelect.NONE=0;pingvp_PingVpUserAgentSelect.FLASH=1;pingvp_PingVpUserAgentSelect.HTML5=2;pingvp_PingVpUserAgentSelect.CANVAS=3;pingvp_PingVpUserAgentSelect.FALLBACK=4;pingvp_PingVpVideoScriptsCollection._scripts=new haxe_ds_StringMap();pingvp_Webplayer._playerSerial=1000;Main.main()})(typeof exports!="undefined"?exports:typeof window!="undefined"?window:typeof self!="undefined"?self:this,typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this);// *** 

 } 
