diff --git a/modules/hotspots/resources/hotspots.js b/modules/hotspots/resources/hotspots.js index 359d49ab8a..20346c4024 100644 --- a/modules/hotspots/resources/hotspots.js +++ b/modules/hotspots/resources/hotspots.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("hotspots",[],t):"object"==typeof exports?exports.hotspots=t():(e.KalturaPlayer=e.KalturaPlayer||{},e.KalturaPlayer.plugins=e.KalturaPlayer.plugins||{},e.KalturaPlayer.plugins.hotspots=t())}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";n.r(t),n.d(t,"h",function(){return s}),n.d(t,"createElement",function(){return s}),n.d(t,"cloneElement",function(){return d}),n.d(t,"createRef",function(){return V}),n.d(t,"Component",function(){return R}),n.d(t,"render",function(){return I}),n.d(t,"rerender",function(){return g}),n.d(t,"options",function(){return i});var o=function(){},i={},r=[],a=[];function s(e,t){var n,s,l,u,p=a;for(u=arguments.length;u-- >2;)r.push(arguments[u]);for(t&&null!=t.children&&(r.length||r.push(t.children),delete t.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else"boolean"==typeof s&&(s=null),(l="function"!=typeof e)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(l=!1)),l&&n?p[p.length-1]+=s:p===a?p=[s]:p.push(s),n=l;var d=new o;return d.nodeName=e,d.children=p,d.attributes=null==t?void 0:t,d.key=null==t?void 0:t.key,void 0!==i.vnode&&i.vnode(d),d}function l(e,t){for(var n in t)e[n]=t[n];return e}function u(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}var p="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function d(e,t){return s(e.nodeName,l(l({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}var c=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function f(e){!e._dirty&&(e._dirty=!0)&&1==h.push(e)&&(i.debounceRendering||p)(g)}function g(){for(var e;e=h.pop();)e._dirty&&L(e)}function y(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function v(e){var t=l({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n,o,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)u(n,null),u(o,e);else if("class"!==t||i)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var r in n)r in o||(e.style[r]="");for(var r in o)e.style[r]="number"==typeof o[r]&&!1===c.test(r)?o[r]+"px":o[r]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,_,a):e.removeEventListener(t,_,a),(e._listeners||(e._listeners={}))[t]=o}else if("list"!==t&&"type"!==t&&!i&&t in e){try{e[t]=null==o?"":o}catch(e){}null!=o&&!1!==o||"spellcheck"==t||e.removeAttribute(t)}else{var s=i&&t!==(t=t.replace(/^xlink:?/,""));null==o||!1===o?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function _(e){return this._listeners[e.type](i.event&&i.event(e)||e)}var C=[],w=0,T=!1,S=!1;function x(){for(var e;e=C.shift();)i.afterMount&&i.afterMount(e),e.componentDidMount&&e.componentDidMount()}function P(e,t,n,o,i,r){w++||(T=null!=i&&void 0!==i.ownerSVGElement,S=null!=e&&!("__preactattr_"in e));var a=k(e,t,n,o,r);return i&&a.parentNode!==i&&i.appendChild(a),--w||(S=!1,r||x()),a}function k(e,t,n,o,i){var r=e,a=T;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||i)?e.nodeValue!=t&&(e.nodeValue=t):(r=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(r,e),O(e,!0))),r.__preactattr_=!0,r;var s,l,u=t.nodeName;if("function"==typeof u)return function(e,t,n,o){var i=e&&e._component,r=i,a=e,s=i&&e._componentConstructor===t.nodeName,l=s,u=v(t);for(;i&&!l&&(i=i._parentComponent);)l=i.constructor===t.nodeName;i&&l&&(!o||i._component)?(N(i,u,3,n,o),e=i.base):(r&&!s&&(M(r),e=a=null),i=H(t.nodeName,u,n),e&&!i.nextBase&&(i.nextBase=e,a=null),N(i,u,1,n,o),e=i.base,a&&e!==a&&(a._component=null,O(a,!1)));return e}(e,t,n,o);if(T="svg"===u||"foreignObject"!==u&&T,u=String(u),(!e||!y(e,u))&&(s=u,(l=T?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s)).normalizedNodeName=s,r=l,e)){for(;e.firstChild;)r.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(r,e),O(e,!0)}var p=r.firstChild,d=r.__preactattr_,c=t.children;if(null==d){d=r.__preactattr_={};for(var h=r.attributes,f=h.length;f--;)d[h[f].name]=h[f].value}return!S&&c&&1===c.length&&"string"==typeof c[0]&&null!=p&&void 0!==p.splitText&&null==p.nextSibling?p.nodeValue!=c[0]&&(p.nodeValue=c[0]):(c&&c.length||null!=p)&&function(e,t,n,o,i){var r,a,s,l,u,p=e.childNodes,d=[],c={},h=0,f=0,g=p.length,v=0,b=t?t.length:0;if(0!==g)for(var _=0;_e||e-r>2e3),s=n||null!==this.lastHandledTime&&this.lastHandledTime>e||null!=this.nextTimeToHandle&&e>=this.nextTimeToHandle,l=this.findClosestLastIndexByTime(e),u=l<0?0:this.cuepointChanges[l].time;if(!s)return t?{snapshot:this.createCuepointSnapshot(l)}:{delta:this.createEmptyDelta()};if(i.log("debug","CuepointEngine:updateTime","has changes to handle. check if need to return snapshot instead of delta based on provided new time",{currentTime:e,closestChangeIndex:l,closestChangeTime:u,lastHandledTime:o,nextTimeToHandle:r,isFirstTime:n}),n||t||a){i.log("debug","CuepointEngine:updateTime","some conditions doesn't allow returning delta, return snapshot instead",{isFirstTime:n,userSeeked:a,forceSnapshot:t});var p=this.createCuepointSnapshot(l);return this.updateInternals(u,l),{snapshot:p}}var d=this.createCuepointDelta(l);return this.updateInternals(u,l),{delta:d}},e.prototype.getCurrentCuepointSnapshot=function(){return this.lastHandledTimeIndex?this.createCuepointSnapshot(this.lastHandledTimeIndex):[]},e.prototype.createCuepointSnapshot=function(e){if(!this.enabled||e<0||!this.cuepointChanges||0===this.cuepointChanges.length)return i.log("log","CuepointEngine:createCuepointSnapshot","resulted with empty snapshot",{targetIndex:e,enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}),[];for(var t=[],n=0;n<=e;n++){var r=this.cuepointChanges[n],a=t.indexOf(r.cuePoint);r.type===o.Show?-1===a&&t.push(r.cuePoint):-1!==a&&t.splice(a,1)}return i.log("log","CuepointEngine:createCuepointSnapshot","resulted snapshot",{snapshot:t}),t},e.prototype.createCuepointDelta=function(e){if(!this.enabled||!this.cuepointChanges||0===this.cuepointChanges.length)return i.log("log","CuepointEngine:createCuepointDelta","resulted with empty delta",{enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}),this.createEmptyDelta();var t=this.lastHandledTimeIndex;if(null===t)return i.log("log","CuepointEngine:createCuepointDelta","invalid internal state. resulted with empty delta"),this.createEmptyDelta();var n=[],r=[];i.log("log","CuepointEngine:createCuepointDelta","find cuepoint that were added or removed");for(var a=t+1;a<=e;a++){var s=this.cuepointChanges[a],l=n.indexOf(s.cuePoint);s.type===o.Show?-1===l&&n.push(s.cuePoint):-1!==l?(i.log("log","CuepointEngine:createCuepointDelta","cuepoint was marked with type "+s.type+" at "+s.time+". remove from new cuepoint list as it wasn't visible yet",{cuepoint:s.cuePoint}),n.splice(l,1)):-1===r.indexOf(s.cuePoint)&&(i.log("log","CuepointEngine:createCuepointDelta","cuepoint was marked with type "+s.type+" at "+s.time+". add to removed cuepoint list",{cuepoint:s.cuePoint}),r.push(s.cuePoint))}return i.log("log","CuepointEngine:createCuepointDelta","resulted delta",{newCuepoint:n,removedCuepoint:r}),{show:n,hide:r}},e.prototype.updateInternals=function(e,t){var n=this.cuepointChanges;if(n&&0!==n.length){var o=t>=n.length-1,r=null===t;this.lastHandledTime=e,this.lastHandledTimeIndex=t,this.nextTimeToHandle=r?n[0].time:o?n[n.length-1].time:n[t+1].time,this.isFirstTime=!1,i.log("debug","CuepointEngine:updateInternals","update inner state with new time and index",{lastHandledTime:this.lastHandledTime,lastHandledTimeIndex:this.lastHandledTimeIndex,nextTimeToHandle:this.nextTimeToHandle})}},e.prototype.createEmptyDelta=function(){return{show:[],hide:[]}},e.prototype.binarySearch=function(e,t){if(!e||0===e.length)return null;if(te[e.length-1].time)return e.length-1;for(var n=0,o=e.length-1;n<=o;){var i=Math.floor((o+n+1)/2);if(te[i].time))return i;n=i+1}}return Math.min(n,o)},e.prototype.findClosestLastIndexByTime=function(e){var t=this.cuepointChanges,n=this.binarySearch(t,e);if(null===n)return-1;for(var o=t.length;n=0&&e.cuepointChanges.push({time:t.startTime,type:o.Show,cuePoint:t}),null!==t.endTime&&void 0!==t.endTime&&t.endTime>=0&&e.cuepointChanges.push({time:t.endTime,type:o.Hide,cuePoint:t})}),this.cuepointChanges.sort(function(e,t){return e.timen;return(p=p?i:!i)?(r.width=Math.abs(a),r.height=Math.abs(s),r.scaleToTargetWidth=!0):(r.width=Math.abs(l),r.height=Math.abs(u),r.scaleToTargetWidth=!1),r.left=Math.abs((n-r.width)/2),r.top=Math.abs((o-r.height)/2),r}},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(1)),o(n(4)),o(n(2)),o(n(0))},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(0),s=n(2),l=n(1);!function(e){e.Show="show",e.Hide="hide"}(r||(r={}));var u=function(e){function t(t){var n=e.call(this,t)||this;return n.playerSize=null,n.videoSize=null,n}return i(t,e),t.prototype.updateLayout=function(e,t){return this.videoSize=t,this.playerSize=e,this.recalculateCuepointLayout(),this.getCurrentCuepointSnapshot()},t.prototype._calculateLayout=function(e,t){var n=e.rawLayout;return{x:t.left+n.relativeX*t.width,y:t.top+n.relativeY*t.height,width:n.relativeWidth*t.width,height:n.relativeHeight*t.height}},t.prototype.recalculateCuepointLayout=function(){var e=this;if(a.log("debug","CuepointLayoutEngine::recalculateCuepointLayout","calculating cuepoint layout based on video/player sizes"),!this.playerSize||!this.videoSize)return a.log("debug","CuepointLayoutEngine::recalculateCuepointLayout","missing video/player sizes, hide all cuepoint"),void(this.enabled=!1);var t=this.playerSize,n=t.width,o=t.height,i=this.videoSize,r=i.width,l=i.height;if(!(n&&o&&r&&l))return a.log("debug","CuepointLayoutEngine::recalculateCuepointLayout","missing video/player sizes, hide all cuepoint"),void(this.enabled=!1);var u=s.scaleVideo(r,l,n,o,!0);a.log("debug","CuepointLayoutEngine::recalculateCuepointLayout","recalculate cuepoint layout based on new sizes",u),(this.cuepoints||[]).forEach(function(t){t.layout=e._calculateLayout(t,u)}),this.enabled=!0},t}(l.CuepointEngine);t.CuepointLayoutEngine=u}])},function(e,t,n){"use strict";t.__esModule=!0,n(3)},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n").attr("id","hotspotsOverlay").css({position:"absolute",height:"0",width:"0",top:0,left:0,overflow:"visible","z-index":"2"})),this.$el}}))})}(window.mw,window.jQuery)},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n2;)r.push(arguments[u]);for(t&&null!=t.children&&(r.length||r.push(t.children),delete t.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else"boolean"==typeof s&&(s=null),(l="function"!=typeof e)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(l=!1)),l&&n?p[p.length-1]+=s:p===a?p=[s]:p.push(s),n=l;var d=new o;return d.nodeName=e,d.children=p,d.attributes=null==t?void 0:t,d.key=null==t?void 0:t.key,void 0!==i.vnode&&i.vnode(d),d}function l(e,t){for(var n in t)e[n]=t[n];return e}function u(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}var p="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function d(e,t){return s(e.nodeName,l(l({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}var c=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function f(e){!e._dirty&&(e._dirty=!0)&&1==h.push(e)&&(i.debounceRendering||p)(g)}function g(){for(var e;e=h.pop();)e._dirty&&L(e)}function y(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function v(e){var t=l({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n,o,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)u(n,null),u(o,e);else if("class"!==t||i)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var r in n)r in o||(e.style[r]="");for(var r in o)e.style[r]="number"==typeof o[r]&&!1===c.test(r)?o[r]+"px":o[r]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,_,a):e.removeEventListener(t,_,a),(e._listeners||(e._listeners={}))[t]=o}else if("list"!==t&&"type"!==t&&!i&&t in e){try{e[t]=null==o?"":o}catch(e){}null!=o&&!1!==o||"spellcheck"==t||e.removeAttribute(t)}else{var s=i&&t!==(t=t.replace(/^xlink:?/,""));null==o||!1===o?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function _(e){return this._listeners[e.type](i.event&&i.event(e)||e)}var C=[],w=0,T=!1,S=!1;function x(){for(var e;e=C.shift();)i.afterMount&&i.afterMount(e),e.componentDidMount&&e.componentDidMount()}function P(e,t,n,o,i,r){w++||(T=null!=i&&void 0!==i.ownerSVGElement,S=null!=e&&!("__preactattr_"in e));var a=k(e,t,n,o,r);return i&&a.parentNode!==i&&i.appendChild(a),--w||(S=!1,r||x()),a}function k(e,t,n,o,i){var r=e,a=T;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||i)?e.nodeValue!=t&&(e.nodeValue=t):(r=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(r,e),O(e,!0))),r.__preactattr_=!0,r;var s,l,u=t.nodeName;if("function"==typeof u)return function(e,t,n,o){var i=e&&e._component,r=i,a=e,s=i&&e._componentConstructor===t.nodeName,l=s,u=v(t);for(;i&&!l&&(i=i._parentComponent);)l=i.constructor===t.nodeName;i&&l&&(!o||i._component)?(N(i,u,3,n,o),e=i.base):(r&&!s&&(M(r),e=a=null),i=H(t.nodeName,u,n),e&&!i.nextBase&&(i.nextBase=e,a=null),N(i,u,1,n,o),e=i.base,a&&e!==a&&(a._component=null,O(a,!1)));return e}(e,t,n,o);if(T="svg"===u||"foreignObject"!==u&&T,u=String(u),(!e||!y(e,u))&&(s=u,(l=T?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s)).normalizedNodeName=s,r=l,e)){for(;e.firstChild;)r.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(r,e),O(e,!0)}var p=r.firstChild,d=r.__preactattr_,c=t.children;if(null==d){d=r.__preactattr_={};for(var h=r.attributes,f=h.length;f--;)d[h[f].name]=h[f].value}return!S&&c&&1===c.length&&"string"==typeof c[0]&&null!=p&&void 0!==p.splitText&&null==p.nextSibling?p.nodeValue!=c[0]&&(p.nodeValue=c[0]):(c&&c.length||null!=p)&&function(e,t,n,o,i){var r,a,s,l,u,p=e.childNodes,d=[],c={},h=0,f=0,g=p.length,v=0,b=t?t.length:0;if(0!==g)for(var _=0;_e||e-r>2e3),s=n||null!==this.lastHandledTime&&this.lastHandledTime>e||null!=this.nextTimeToHandle&&e>=this.nextTimeToHandle,l=this.findClosestLastIndexByTime(e),u=l<0?0:this.cuepointChanges[l].time;if(!s)return t?{snapshot:this.createCuepointSnapshot(l)}:{delta:this.createEmptyDelta()};if(i.log("debug","CuepointEngine:updateTime","has changes to handle. check if need to return snapshot instead of delta based on provided new time",{currentTime:e,closestChangeIndex:l,closestChangeTime:u,lastHandledTime:o,nextTimeToHandle:r,isFirstTime:n}),n||t||a){i.log("debug","CuepointEngine:updateTime","some conditions doesn't allow returning delta, return snapshot instead",{isFirstTime:n,userSeeked:a,forceSnapshot:t});var p=this.createCuepointSnapshot(l);return this.updateInternals(u,l),{snapshot:p}}var d=this.createCuepointDelta(l);return this.updateInternals(u,l),{delta:d}},e.prototype.getCurrentCuepointSnapshot=function(){return this.lastHandledTimeIndex?this.createCuepointSnapshot(this.lastHandledTimeIndex):[]},e.prototype.createCuepointSnapshot=function(e){if(!this.enabled||e<0||!this.cuepointChanges||0===this.cuepointChanges.length)return i.log("log","CuepointEngine:createCuepointSnapshot","resulted with empty snapshot",{targetIndex:e,enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}),[];for(var t=[],n=0;n<=e;n++){var r=this.cuepointChanges[n],a=t.indexOf(r.cuePoint);r.type===o.Show?-1===a&&t.push(r.cuePoint):-1!==a&&t.splice(a,1)}return i.log("log","CuepointEngine:createCuepointSnapshot","resulted snapshot",{snapshot:t}),t},e.prototype.createCuepointDelta=function(e){if(!this.enabled||!this.cuepointChanges||0===this.cuepointChanges.length)return i.log("log","CuepointEngine:createCuepointDelta","resulted with empty delta",{enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}),this.createEmptyDelta();var t=this.lastHandledTimeIndex;if(null===t)return i.log("log","CuepointEngine:createCuepointDelta","invalid internal state. resulted with empty delta"),this.createEmptyDelta();var n=[],r=[];i.log("log","CuepointEngine:createCuepointDelta","find cuepoint that were added or removed");for(var a=t+1;a<=e;a++){var s=this.cuepointChanges[a],l=n.indexOf(s.cuePoint);s.type===o.Show?-1===l&&n.push(s.cuePoint):-1!==l?(i.log("log","CuepointEngine:createCuepointDelta","cuepoint was marked with type "+s.type+" at "+s.time+". remove from new cuepoint list as it wasn't visible yet",{cuepoint:s.cuePoint}),n.splice(l,1)):-1===r.indexOf(s.cuePoint)&&(i.log("log","CuepointEngine:createCuepointDelta","cuepoint was marked with type "+s.type+" at "+s.time+". add to removed cuepoint list",{cuepoint:s.cuePoint}),r.push(s.cuePoint))}return i.log("log","CuepointEngine:createCuepointDelta","resulted delta",{newCuepoint:n,removedCuepoint:r}),{show:n,hide:r}},e.prototype.updateInternals=function(e,t){var n=this.cuepointChanges;if(n&&0!==n.length){var o=t>=n.length-1,r=null===t;this.lastHandledTime=e,this.lastHandledTimeIndex=t,this.nextTimeToHandle=r?n[0].time:o?n[n.length-1].time:n[t+1].time,this.isFirstTime=!1,i.log("debug","CuepointEngine:updateInternals","update inner state with new time and index",{lastHandledTime:this.lastHandledTime,lastHandledTimeIndex:this.lastHandledTimeIndex,nextTimeToHandle:this.nextTimeToHandle})}},e.prototype.createEmptyDelta=function(){return{show:[],hide:[]}},e.prototype.binarySearch=function(e,t){if(!e||0===e.length)return null;if(te[e.length-1].time)return e.length-1;for(var n=0,o=e.length-1;n<=o;){var i=Math.floor((o+n+1)/2);if(te[i].time))return i;n=i+1}}return Math.min(n,o)},e.prototype.findClosestLastIndexByTime=function(e){var t=this.cuepointChanges,n=this.binarySearch(t,e);if(null===n)return-1;for(var o=t.length;n=0&&e.cuepointChanges.push({time:t.startTime,type:o.Show,cuePoint:t}),null!==t.endTime&&void 0!==t.endTime&&t.endTime>=0&&e.cuepointChanges.push({time:t.endTime,type:o.Hide,cuePoint:t})}),this.cuepointChanges.sort(function(e,t){return e.timen;return(p=p?i:!i)?(r.width=Math.abs(a),r.height=Math.abs(s),r.scaleToTargetWidth=!0):(r.width=Math.abs(l),r.height=Math.abs(u),r.scaleToTargetWidth=!1),r.left=Math.abs((n-r.width)/2),r.top=Math.abs((o-r.height)/2),r}},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(1)),o(n(4)),o(n(2)),o(n(0))},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(0),s=n(2),l=n(1);!function(e){e.Show="show",e.Hide="hide"}(r||(r={}));var u=function(e){function t(t){var n=e.call(this,t)||this;return n.playerSize=null,n.videoSize=null,n}return i(t,e),t.prototype.updateLayout=function(e,t){return this.videoSize=t,this.playerSize=e,this.recalculateCuepointLayout(),this.getCurrentCuepointSnapshot()},t.prototype._calculateLayout=function(e,t){var n=e.rawLayout;return{x:t.left+n.relativeX*t.width,y:t.top+n.relativeY*t.height,width:n.relativeWidth*t.width,height:n.relativeHeight*t.height}},t.prototype.recalculateCuepointLayout=function(){var e=this;if(a.log("debug","CuepointLayoutEngine::recalculateCuepointLayout","calculating cuepoint layout based on video/player sizes"),!this.playerSize||!this.videoSize)return a.log("debug","CuepointLayoutEngine::recalculateCuepointLayout","missing video/player sizes, hide all cuepoint"),void(this.enabled=!1);var t=this.playerSize,n=t.width,o=t.height,i=this.videoSize,r=i.width,l=i.height;if(!(n&&o&&r&&l))return a.log("debug","CuepointLayoutEngine::recalculateCuepointLayout","missing video/player sizes, hide all cuepoint"),void(this.enabled=!1);var u=s.scaleVideo(r,l,n,o,!0);a.log("debug","CuepointLayoutEngine::recalculateCuepointLayout","recalculate cuepoint layout based on new sizes",u),(this.cuepoints||[]).forEach(function(t){t.layout=e._calculateLayout(t,u)}),this.enabled=!0},t}(l.CuepointEngine);t.CuepointLayoutEngine=u}])},function(e,t,n){"use strict";t.__esModule=!0,n(3)},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n").attr("id","hotspotsOverlay").css({position:"absolute",height:"0",width:"0",top:0,left:0,overflow:"visible",zIndex:2})),this.$el}}))})}(window.mw,window.jQuery)},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n 2;) {\n\t\tstack.push(arguments[i]);\n\t}\n\tif (attributes && attributes.children != null) {\n\t\tif (!stack.length) stack.push(attributes.children);\n\t\tdelete attributes.children;\n\t}\n\twhile (stack.length) {\n\t\tif ((child = stack.pop()) && child.pop !== undefined) {\n\t\t\tfor (i = child.length; i--;) {\n\t\t\t\tstack.push(child[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tif (typeof child === 'boolean') child = null;\n\n\t\t\tif (simple = typeof nodeName !== 'function') {\n\t\t\t\tif (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n\t\t\t}\n\n\t\t\tif (simple && lastSimple) {\n\t\t\t\tchildren[children.length - 1] += child;\n\t\t\t} else if (children === EMPTY_CHILDREN) {\n\t\t\t\tchildren = [child];\n\t\t\t} else {\n\t\t\t\tchildren.push(child);\n\t\t\t}\n\n\t\t\tlastSimple = simple;\n\t\t}\n\t}\n\n\tvar p = new VNode();\n\tp.nodeName = nodeName;\n\tp.children = children;\n\tp.attributes = attributes == null ? undefined : attributes;\n\tp.key = attributes == null ? undefined : attributes.key;\n\n\tif (options.vnode !== undefined) options.vnode(p);\n\n\treturn p;\n}\n\nfunction extend(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\nfunction applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value);else ref.current = value;\n }\n}\n\nvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\nvar items = [];\n\nfunction enqueueRender(component) {\n\tif (!component._dirty && (component._dirty = true) && items.push(component) == 1) {\n\t\t(options.debounceRendering || defer)(rerender);\n\t}\n}\n\nfunction rerender() {\n\tvar p;\n\twhile (p = items.pop()) {\n\t\tif (p._dirty) renderComponent(p);\n\t}\n}\n\nfunction isSameNodeType(node, vnode, hydrating) {\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\t\treturn node.splitText !== undefined;\n\t}\n\tif (typeof vnode.nodeName === 'string') {\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n\t}\n\treturn hydrating || node._componentConstructor === vnode.nodeName;\n}\n\nfunction isNamedNode(node, nodeName) {\n\treturn node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\nfunction getNodeProps(vnode) {\n\tvar props = extend({}, vnode.attributes);\n\tprops.children = vnode.children;\n\n\tvar defaultProps = vnode.nodeName.defaultProps;\n\tif (defaultProps !== undefined) {\n\t\tfor (var i in defaultProps) {\n\t\t\tif (props[i] === undefined) {\n\t\t\t\tprops[i] = defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn props;\n}\n\nfunction createNode(nodeName, isSvg) {\n\tvar node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);\n\tnode.normalizedNodeName = nodeName;\n\treturn node;\n}\n\nfunction removeNode(node) {\n\tvar parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nfunction setAccessor(node, name, old, value, isSvg) {\n\tif (name === 'className') name = 'class';\n\n\tif (name === 'key') {} else if (name === 'ref') {\n\t\tapplyRef(old, null);\n\t\tapplyRef(value, node);\n\t} else if (name === 'class' && !isSvg) {\n\t\tnode.className = value || '';\n\t} else if (name === 'style') {\n\t\tif (!value || typeof value === 'string' || typeof old === 'string') {\n\t\t\tnode.style.cssText = value || '';\n\t\t}\n\t\tif (value && typeof value === 'object') {\n\t\t\tif (typeof old !== 'string') {\n\t\t\t\tfor (var i in old) {\n\t\t\t\t\tif (!(i in value)) node.style[i] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i in value) {\n\t\t\t\tnode.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\n\t\t\t}\n\t\t}\n\t} else if (name === 'dangerouslySetInnerHTML') {\n\t\tif (value) node.innerHTML = value.__html || '';\n\t} else if (name[0] == 'o' && name[1] == 'n') {\n\t\tvar useCapture = name !== (name = name.replace(/Capture$/, ''));\n\t\tname = name.toLowerCase().substring(2);\n\t\tif (value) {\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\n\t\t} else {\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\n\t\t}\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\n\t} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n\t\ttry {\n\t\t\tnode[name] = value == null ? '' : value;\n\t\t} catch (e) {}\n\t\tif ((value == null || value === false) && name != 'spellcheck') node.removeAttribute(name);\n\t} else {\n\t\tvar ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n\n\t\tif (value == null || value === false) {\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n\t\t} else if (typeof value !== 'function') {\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n\t\t}\n\t}\n}\n\nfunction eventProxy(e) {\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\n}\n\nvar mounts = [];\n\nvar diffLevel = 0;\n\nvar isSvgMode = false;\n\nvar hydrating = false;\n\nfunction flushMounts() {\n\tvar c;\n\twhile (c = mounts.shift()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}\n\nfunction diff(dom, vnode, context, mountAll, parent, componentRoot) {\n\tif (!diffLevel++) {\n\t\tisSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n\t\thydrating = dom != null && !('__preactattr_' in dom);\n\t}\n\n\tvar ret = idiff(dom, vnode, context, mountAll, componentRoot);\n\n\tif (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n\tif (! --diffLevel) {\n\t\thydrating = false;\n\n\t\tif (!componentRoot) flushMounts();\n\t}\n\n\treturn ret;\n}\n\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t prevSvgMode = isSvgMode;\n\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t}\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t props = out['__preactattr_'],\n\t vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t} else if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\tdiffAttributes(out, vnode.attributes, props);\n\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}\n\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\n\tvar originalChildren = dom.childNodes,\n\t children = [],\n\t keyed = {},\n\t keyedLen = 0,\n\t min = 0,\n\t len = originalChildren.length,\n\t childrenLen = 0,\n\t vlen = vchildren ? vchildren.length : 0,\n\t j,\n\t c,\n\t f,\n\t vchild,\n\t child;\n\n\tif (len !== 0) {\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar _child = originalChildren[i],\n\t\t\t props = _child['__preactattr_'],\n\t\t\t key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n\t\t\tif (key != null) {\n\t\t\t\tkeyedLen++;\n\t\t\t\tkeyed[key] = _child;\n\t\t\t} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n\t\t\t\tchildren[childrenLen++] = _child;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (vlen !== 0) {\n\t\tfor (var i = 0; i < vlen; i++) {\n\t\t\tvchild = vchildren[i];\n\t\t\tchild = null;\n\n\t\t\tvar key = vchild.key;\n\t\t\tif (key != null) {\n\t\t\t\tif (keyedLen && keyed[key] !== undefined) {\n\t\t\t\t\tchild = keyed[key];\n\t\t\t\t\tkeyed[key] = undefined;\n\t\t\t\t\tkeyedLen--;\n\t\t\t\t}\n\t\t\t} else if (min < childrenLen) {\n\t\t\t\t\tfor (j = min; j < childrenLen; j++) {\n\t\t\t\t\t\tif (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n\t\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\t\tif (j === childrenLen - 1) childrenLen--;\n\t\t\t\t\t\t\tif (j === min) min++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\tf = originalChildren[i];\n\t\t\tif (child && child !== dom && child !== f) {\n\t\t\t\tif (f == null) {\n\t\t\t\t\tdom.appendChild(child);\n\t\t\t\t} else if (child === f.nextSibling) {\n\t\t\t\t\tremoveNode(f);\n\t\t\t\t} else {\n\t\t\t\t\tdom.insertBefore(child, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (keyedLen) {\n\t\tfor (var i in keyed) {\n\t\t\tif (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n\t\t}\n\t}\n\n\twhile (min <= childrenLen) {\n\t\tif ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n\t}\n}\n\nfunction recollectNodeTree(node, unmountOnly) {\n\tvar component = node._component;\n\tif (component) {\n\t\tunmountComponent(component);\n\t} else {\n\t\tif (node['__preactattr_'] != null) applyRef(node['__preactattr_'].ref, null);\n\n\t\tif (unmountOnly === false || node['__preactattr_'] == null) {\n\t\t\tremoveNode(node);\n\t\t}\n\n\t\tremoveChildren(node);\n\t}\n}\n\nfunction removeChildren(node) {\n\tnode = node.lastChild;\n\twhile (node) {\n\t\tvar next = node.previousSibling;\n\t\trecollectNodeTree(node, true);\n\t\tnode = next;\n\t}\n}\n\nfunction diffAttributes(dom, attrs, old) {\n\tvar name;\n\n\tfor (name in old) {\n\t\tif (!(attrs && attrs[name] != null) && old[name] != null) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n\t\t}\n\t}\n\n\tfor (name in attrs) {\n\t\tif (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n\t\t}\n\t}\n}\n\nvar recyclerComponents = [];\n\nfunction createComponent(Ctor, props, context) {\n\tvar inst,\n\t i = recyclerComponents.length;\n\n\tif (Ctor.prototype && Ctor.prototype.render) {\n\t\tinst = new Ctor(props, context);\n\t\tComponent.call(inst, props, context);\n\t} else {\n\t\tinst = new Component(props, context);\n\t\tinst.constructor = Ctor;\n\t\tinst.render = doRender;\n\t}\n\n\twhile (i--) {\n\t\tif (recyclerComponents[i].constructor === Ctor) {\n\t\t\tinst.nextBase = recyclerComponents[i].nextBase;\n\t\t\trecyclerComponents.splice(i, 1);\n\t\t\treturn inst;\n\t\t}\n\t}\n\n\treturn inst;\n}\n\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n\nfunction setComponentProps(component, props, renderMode, context, mountAll) {\n\tif (component._disable) return;\n\tcomponent._disable = true;\n\n\tcomponent.__ref = props.ref;\n\tcomponent.__key = props.key;\n\tdelete props.ref;\n\tdelete props.key;\n\n\tif (typeof component.constructor.getDerivedStateFromProps === 'undefined') {\n\t\tif (!component.base || mountAll) {\n\t\t\tif (component.componentWillMount) component.componentWillMount();\n\t\t} else if (component.componentWillReceiveProps) {\n\t\t\tcomponent.componentWillReceiveProps(props, context);\n\t\t}\n\t}\n\n\tif (context && context !== component.context) {\n\t\tif (!component.prevContext) component.prevContext = component.context;\n\t\tcomponent.context = context;\n\t}\n\n\tif (!component.prevProps) component.prevProps = component.props;\n\tcomponent.props = props;\n\n\tcomponent._disable = false;\n\n\tif (renderMode !== 0) {\n\t\tif (renderMode === 1 || options.syncComponentUpdates !== false || !component.base) {\n\t\t\trenderComponent(component, 1, mountAll);\n\t\t} else {\n\t\t\tenqueueRender(component);\n\t\t}\n\t}\n\n\tapplyRef(component.__ref, component);\n}\n\nfunction renderComponent(component, renderMode, mountAll, isChild) {\n\tif (component._disable) return;\n\n\tvar props = component.props,\n\t state = component.state,\n\t context = component.context,\n\t previousProps = component.prevProps || props,\n\t previousState = component.prevState || state,\n\t previousContext = component.prevContext || context,\n\t isUpdate = component.base,\n\t nextBase = component.nextBase,\n\t initialBase = isUpdate || nextBase,\n\t initialChildComponent = component._component,\n\t skip = false,\n\t snapshot = previousContext,\n\t rendered,\n\t inst,\n\t cbase;\n\n\tif (component.constructor.getDerivedStateFromProps) {\n\t\tstate = extend(extend({}, state), component.constructor.getDerivedStateFromProps(props, state));\n\t\tcomponent.state = state;\n\t}\n\n\tif (isUpdate) {\n\t\tcomponent.props = previousProps;\n\t\tcomponent.state = previousState;\n\t\tcomponent.context = previousContext;\n\t\tif (renderMode !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {\n\t\t\tskip = true;\n\t\t} else if (component.componentWillUpdate) {\n\t\t\tcomponent.componentWillUpdate(props, state, context);\n\t\t}\n\t\tcomponent.props = props;\n\t\tcomponent.state = state;\n\t\tcomponent.context = context;\n\t}\n\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\n\tcomponent._dirty = false;\n\n\tif (!skip) {\n\t\trendered = component.render(props, state, context);\n\n\t\tif (component.getChildContext) {\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\n\t\t}\n\n\t\tif (isUpdate && component.getSnapshotBeforeUpdate) {\n\t\t\tsnapshot = component.getSnapshotBeforeUpdate(previousProps, previousState);\n\t\t}\n\n\t\tvar childComponent = rendered && rendered.nodeName,\n\t\t toUnmount,\n\t\t base;\n\n\t\tif (typeof childComponent === 'function') {\n\n\t\t\tvar childProps = getNodeProps(rendered);\n\t\t\tinst = initialChildComponent;\n\n\t\t\tif (inst && inst.constructor === childComponent && childProps.key == inst.__key) {\n\t\t\t\tsetComponentProps(inst, childProps, 1, context, false);\n\t\t\t} else {\n\t\t\t\ttoUnmount = inst;\n\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\n\t\t\t\tinst._parentComponent = component;\n\t\t\t\tsetComponentProps(inst, childProps, 0, context, false);\n\t\t\t\trenderComponent(inst, 1, mountAll, true);\n\t\t\t}\n\n\t\t\tbase = inst.base;\n\t\t} else {\n\t\t\tcbase = initialBase;\n\n\t\t\ttoUnmount = initialChildComponent;\n\t\t\tif (toUnmount) {\n\t\t\t\tcbase = component._component = null;\n\t\t\t}\n\n\t\t\tif (initialBase || renderMode === 1) {\n\t\t\t\tif (cbase) cbase._component = null;\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\n\t\t\t}\n\t\t}\n\n\t\tif (initialBase && base !== initialBase && inst !== initialChildComponent) {\n\t\t\tvar baseParent = initialBase.parentNode;\n\t\t\tif (baseParent && base !== baseParent) {\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\n\n\t\t\t\tif (!toUnmount) {\n\t\t\t\t\tinitialBase._component = null;\n\t\t\t\t\trecollectNodeTree(initialBase, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (toUnmount) {\n\t\t\tunmountComponent(toUnmount);\n\t\t}\n\n\t\tcomponent.base = base;\n\t\tif (base && !isChild) {\n\t\t\tvar componentRef = component,\n\t\t\t t = component;\n\t\t\twhile (t = t._parentComponent) {\n\t\t\t\t(componentRef = t).base = base;\n\t\t\t}\n\t\t\tbase._component = componentRef;\n\t\t\tbase._componentConstructor = componentRef.constructor;\n\t\t}\n\t}\n\n\tif (!isUpdate || mountAll) {\n\t\tmounts.push(component);\n\t} else if (!skip) {\n\n\t\tif (component.componentDidUpdate) {\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, snapshot);\n\t\t}\n\t\tif (options.afterUpdate) options.afterUpdate(component);\n\t}\n\n\twhile (component._renderCallbacks.length) {\n\t\tcomponent._renderCallbacks.pop().call(component);\n\t}if (!diffLevel && !isChild) flushMounts();\n}\n\nfunction buildComponentFromVNode(dom, vnode, context, mountAll) {\n\tvar c = dom && dom._component,\n\t originalComponent = c,\n\t oldDom = dom,\n\t isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n\t isOwner = isDirectOwner,\n\t props = getNodeProps(vnode);\n\twhile (c && !isOwner && (c = c._parentComponent)) {\n\t\tisOwner = c.constructor === vnode.nodeName;\n\t}\n\n\tif (c && isOwner && (!mountAll || c._component)) {\n\t\tsetComponentProps(c, props, 3, context, mountAll);\n\t\tdom = c.base;\n\t} else {\n\t\tif (originalComponent && !isDirectOwner) {\n\t\t\tunmountComponent(originalComponent);\n\t\t\tdom = oldDom = null;\n\t\t}\n\n\t\tc = createComponent(vnode.nodeName, props, context);\n\t\tif (dom && !c.nextBase) {\n\t\t\tc.nextBase = dom;\n\n\t\t\toldDom = null;\n\t\t}\n\t\tsetComponentProps(c, props, 1, context, mountAll);\n\t\tdom = c.base;\n\n\t\tif (oldDom && dom !== oldDom) {\n\t\t\toldDom._component = null;\n\t\t\trecollectNodeTree(oldDom, false);\n\t\t}\n\t}\n\n\treturn dom;\n}\n\nfunction unmountComponent(component) {\n\tif (options.beforeUnmount) options.beforeUnmount(component);\n\n\tvar base = component.base;\n\n\tcomponent._disable = true;\n\n\tif (component.componentWillUnmount) component.componentWillUnmount();\n\n\tcomponent.base = null;\n\n\tvar inner = component._component;\n\tif (inner) {\n\t\tunmountComponent(inner);\n\t} else if (base) {\n\t\tif (base['__preactattr_'] != null) applyRef(base['__preactattr_'].ref, null);\n\n\t\tcomponent.nextBase = base;\n\n\t\tremoveNode(base);\n\t\trecyclerComponents.push(component);\n\n\t\tremoveChildren(base);\n\t}\n\n\tapplyRef(component.__ref, null);\n}\n\nfunction Component(props, context) {\n\tthis._dirty = true;\n\n\tthis.context = context;\n\n\tthis.props = props;\n\n\tthis.state = this.state || {};\n\n\tthis._renderCallbacks = [];\n}\n\nextend(Component.prototype, {\n\tsetState: function setState(state, callback) {\n\t\tif (!this.prevState) this.prevState = this.state;\n\t\tthis.state = extend(extend({}, this.state), typeof state === 'function' ? state(this.state, this.props) : state);\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t},\n\tforceUpdate: function forceUpdate(callback) {\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\trenderComponent(this, 2);\n\t},\n\trender: function render() {}\n});\n\nfunction render(vnode, parent, merge) {\n return diff(merge, vnode, {}, false, parent, false);\n}\n\nfunction createRef() {\n\treturn {};\n}\n\nvar preact = {\n\th: h,\n\tcreateElement: h,\n\tcloneElement: cloneElement,\n\tcreateRef: createRef,\n\tComponent: Component,\n\trender: render,\n\trerender: rerender,\n\toptions: options\n};\n\nexport default preact;\nexport { h, h as createElement, cloneElement, createRef, Component, render, rerender, options };\n//# sourceMappingURL=preact.mjs.map\n","!function(e,t){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)(\"object\"==typeof exports?exports:e)[i]=n[i]}}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=3)}([function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var i=!1,o=\"\";function a(e){o=e||\"\",i=!0}t.enableLog=a,t.log=function(e,t,n){for(var a=[],r=3;re||e-a>2e3),u=n||null!==this.lastHandledTime&&this.lastHandledTime>e||null!=this.nextTimeToHandle&&e>=this.nextTimeToHandle,s=this.findClosestLastIndexByTime(e),l=s<0?0:this.cuepointChanges[s].time;if(!u)return t?{snapshot:this.createCuepointSnapshot(s)}:{delta:this.createEmptyDelta()};if(o.log(\"debug\",\"CuepointEngine:updateTime\",\"has changes to handle. check if need to return snapshot instead of delta based on provided new time\",{currentTime:e,closestChangeIndex:s,closestChangeTime:l,lastHandledTime:i,nextTimeToHandle:a,isFirstTime:n}),n||t||r){o.log(\"debug\",\"CuepointEngine:updateTime\",\"some conditions doesn't allow returning delta, return snapshot instead\",{isFirstTime:n,userSeeked:r,forceSnapshot:t});var p=this.createCuepointSnapshot(s);return this.updateInternals(l,s),{snapshot:p}}var h=this.createCuepointDelta(s);return this.updateInternals(l,s),{delta:h}},e.prototype.getCurrentCuepointSnapshot=function(){return this.lastHandledTimeIndex?this.createCuepointSnapshot(this.lastHandledTimeIndex):[]},e.prototype.createCuepointSnapshot=function(e){if(!this.enabled||e<0||!this.cuepointChanges||0===this.cuepointChanges.length)return o.log(\"log\",\"CuepointEngine:createCuepointSnapshot\",\"resulted with empty snapshot\",{targetIndex:e,enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}),[];for(var t=[],n=0;n<=e;n++){var a=this.cuepointChanges[n],r=t.indexOf(a.cuePoint);a.type===i.Show?-1===r&&t.push(a.cuePoint):-1!==r&&t.splice(r,1)}return o.log(\"log\",\"CuepointEngine:createCuepointSnapshot\",\"resulted snapshot\",{snapshot:t}),t},e.prototype.createCuepointDelta=function(e){if(!this.enabled||!this.cuepointChanges||0===this.cuepointChanges.length)return o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"resulted with empty delta\",{enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}),this.createEmptyDelta();var t=this.lastHandledTimeIndex;if(null===t)return o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"invalid internal state. resulted with empty delta\"),this.createEmptyDelta();var n=[],a=[];o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"find cuepoint that were added or removed\");for(var r=t+1;r<=e;r++){var u=this.cuepointChanges[r],s=n.indexOf(u.cuePoint);u.type===i.Show?-1===s&&n.push(u.cuePoint):-1!==s?(o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"cuepoint was marked with type \"+u.type+\" at \"+u.time+\". remove from new cuepoint list as it wasn't visible yet\",{cuepoint:u.cuePoint}),n.splice(s,1)):-1===a.indexOf(u.cuePoint)&&(o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"cuepoint was marked with type \"+u.type+\" at \"+u.time+\". add to removed cuepoint list\",{cuepoint:u.cuePoint}),a.push(u.cuePoint))}return o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"resulted delta\",{newCuepoint:n,removedCuepoint:a}),{show:n,hide:a}},e.prototype.updateInternals=function(e,t){var n=this.cuepointChanges;if(n&&0!==n.length){var i=t>=n.length-1,a=null===t;this.lastHandledTime=e,this.lastHandledTimeIndex=t,this.nextTimeToHandle=a?n[0].time:i?n[n.length-1].time:n[t+1].time,this.isFirstTime=!1,o.log(\"debug\",\"CuepointEngine:updateInternals\",\"update inner state with new time and index\",{lastHandledTime:this.lastHandledTime,lastHandledTimeIndex:this.lastHandledTimeIndex,nextTimeToHandle:this.nextTimeToHandle})}},e.prototype.createEmptyDelta=function(){return{show:[],hide:[]}},e.prototype.binarySearch=function(e,t){if(!e||0===e.length)return null;if(te[e.length-1].time)return e.length-1;for(var n=0,i=e.length-1;n<=i;){var o=Math.floor((i+n+1)/2);if(te[o].time))return o;n=o+1}}return Math.min(n,i)},e.prototype.findClosestLastIndexByTime=function(e){var t=this.cuepointChanges,n=this.binarySearch(t,e);if(null===n)return-1;for(var i=t.length;n=0&&e.cuepointChanges.push({time:t.startTime,type:i.Show,cuePoint:t}),null!==t.endTime&&void 0!==t.endTime&&t.endTime>=0&&e.cuepointChanges.push({time:t.endTime,type:i.Hide,cuePoint:t})}),this.cuepointChanges.sort(function(e,t){return e.timen;return(p=p?o:!o)?(a.width=Math.abs(r),a.height=Math.abs(u),a.scaleToTargetWidth=!0):(a.width=Math.abs(s),a.height=Math.abs(l),a.scaleToTargetWidth=!1),a.left=Math.abs((n-a.width)/2),a.top=Math.abs((i-a.height)/2),a}},function(e,t,n){\"use strict\";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,\"__esModule\",{value:!0}),i(n(1)),i(n(4)),i(n(2)),i(n(0))},function(e,t,n){\"use strict\";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,\"__esModule\",{value:!0});var a,r=n(0),u=n(2),s=n(1);!function(e){e.Show=\"show\",e.Hide=\"hide\"}(a||(a={}));var l=function(e){function t(t){var n=e.call(this,t)||this;return n.playerSize=null,n.videoSize=null,n}return o(t,e),t.prototype.updateLayout=function(e,t){return this.videoSize=t,this.playerSize=e,this.recalculateCuepointLayout(),this.getCurrentCuepointSnapshot()},t.prototype._calculateLayout=function(e,t){var n=e.rawLayout;return{x:t.left+n.relativeX*t.width,y:t.top+n.relativeY*t.height,width:n.relativeWidth*t.width,height:n.relativeHeight*t.height}},t.prototype.recalculateCuepointLayout=function(){var e=this;if(r.log(\"debug\",\"CuepointLayoutEngine::recalculateCuepointLayout\",\"calculating cuepoint layout based on video/player sizes\"),!this.playerSize||!this.videoSize)return r.log(\"debug\",\"CuepointLayoutEngine::recalculateCuepointLayout\",\"missing video/player sizes, hide all cuepoint\"),void(this.enabled=!1);var t=this.playerSize,n=t.width,i=t.height,o=this.videoSize,a=o.width,s=o.height;if(!(n&&i&&a&&s))return r.log(\"debug\",\"CuepointLayoutEngine::recalculateCuepointLayout\",\"missing video/player sizes, hide all cuepoint\"),void(this.enabled=!1);var l=u.scaleVideo(a,s,n,i,!0);r.log(\"debug\",\"CuepointLayoutEngine::recalculateCuepointLayout\",\"recalculate cuepoint layout based on new sizes\",l),(this.cuepoints||[]).forEach(function(t){t.layout=e._calculateLayout(t,l)}),this.enabled=!0},t}(s.CuepointEngine);t.CuepointLayoutEngine=l}])});\n//# sourceMappingURL=index.js.map","import \"./plugin\";\r\n","import { h, render } from \"preact\";\r\nimport Stage, { Props as StageProps } from \"@plugin/shared/components/Stage\";\r\nimport { log, enableLogIfNeeded } from \"@playkit-js/playkit-js-ovp\";\r\nimport { AnalyticsEvents } from \"@plugin/shared/analyticsEvents\";\r\nimport { convertToHotspots } from \"@plugin/shared/cuepoints\";\r\n\r\n(function(mw, $) {\r\n enableLogIfNeeded(\"hotspots\");\r\n\r\n function isIpad() {\r\n return navigator.userAgent.indexOf(\"iPad\") != -1;\r\n }\r\n\r\n function isIphone() {\r\n return navigator.userAgent.indexOf(\"iPhone\") != -1 && !isIpad();\r\n }\r\n\r\n mw.kalturaPluginWrapper(function() {\r\n mw.PluginManager.add(\r\n \"hotspots\",\r\n mw.KBaseComponent.extend({\r\n _hotspots: [],\r\n _root: null,\r\n _videoSize: null,\r\n _wasPlayed: false,\r\n stage: null,\r\n defaultConfig: {\r\n parent: \"videoHolder\",\r\n order: 1\r\n },\r\n\r\n handleVideoSizeChange: function(e: any) {\r\n const { width, height } = this.getPlayer().evaluate(\"{mediaProxy.entry}\");\r\n log(\r\n \"debug\",\r\n \"plugin::handleVideoSizeChange\",\r\n \"use entry size provided by player to calculate actual stage size\",\r\n { width, height }\r\n );\r\n\r\n if (!width || !height) {\r\n this._videoSize = null;\r\n } else {\r\n this._videoSize = { width, height };\r\n }\r\n\r\n this.renderRoot(true);\r\n },\r\n\r\n setup: function() {\r\n if (isIphone()) {\r\n log(\"log\", \"plugin::setup\", \"iphone detected, disable plugin\");\r\n return;\r\n }\r\n\r\n this.addBindings();\r\n },\r\n\r\n pauseVideo: function() {\r\n this.getPlayer().sendNotification(\"doPause\");\r\n },\r\n\r\n seekTo: function(time: number) {\r\n this.getPlayer().seek(time);\r\n },\r\n\r\n getCuePoints: function() {\r\n return this.cuePoints;\r\n },\r\n\r\n loadCuePoints: function() {\r\n // do the api request\r\n this.getKalturaClient().doRequest(\r\n {\r\n service: \"cuepoint_cuepoint\",\r\n action: \"list\",\r\n \"filter:entryIdEqual\": this.getPlayer().kentryid,\r\n \"filter:objectType\": \"KalturaCuePointFilter\",\r\n \"filter:cuePointTypeEqual\": \"annotation.Annotation\",\r\n \"filter:tagsLike\": \"hotspots\"\r\n },\r\n (data: any) => {\r\n // if an error pop out:\r\n const hasError = !data || data.code;\r\n\r\n if (hasError) {\r\n console.warn(\r\n `failed to load hotspots with code '${data.code || \"failure\"}'`\r\n );\r\n return;\r\n }\r\n\r\n this._hotspots = convertToHotspots(data);\r\n this.renderRoot(false);\r\n }\r\n );\r\n },\r\n\r\n getPlayerSize: function() {\r\n const videoHolder = this.getPlayer().getVideoHolder();\r\n if (!videoHolder) {\r\n return null;\r\n }\r\n\r\n const width = videoHolder.width();\r\n const height = videoHolder.height();\r\n\r\n return {\r\n width,\r\n height\r\n };\r\n },\r\n\r\n sendAnalytics: function(event: AnalyticsEvents) {\r\n try {\r\n const kanalonyPlugin = this.getPlayer().plugins.kAnalony;\r\n if (!kanalonyPlugin) {\r\n log(\r\n \"warn\",\r\n \"plugin::sendAnalytics\",\r\n `cannot send analytics event, missing kAnalony plugin`,\r\n event\r\n );\r\n return;\r\n }\r\n const { eventNumber, ...rest } = event;\r\n\r\n kanalonyPlugin.sendAnalytics(eventNumber, rest);\r\n } catch (e) {\r\n log(\r\n \"error\",\r\n \"plugin::sendAnalytics\",\r\n `cannot send analytics event with error '${e.message}'`,\r\n event\r\n );\r\n }\r\n },\r\n\r\n getVideoSize: function() {\r\n if (!this._videoSize) {\r\n return null;\r\n }\r\n\r\n return {\r\n ...this._videoSize\r\n };\r\n },\r\n\r\n _onRootResized: function() {\r\n this.renderRoot(false);\r\n },\r\n\r\n renderRoot: function(shouldHandleResize: boolean) {\r\n const props: StageProps = {\r\n hotspots: this._hotspots,\r\n currentTime: this._getCurrentTime(),\r\n shouldHandleResize,\r\n onResize: this._onRootResized.bind(this),\r\n getPlayerSize: this.getPlayerSize.bind(this),\r\n getVideoSize: this.getVideoSize.bind(this),\r\n pauseVideo: this.pauseVideo.bind(this),\r\n seekTo: this.seekTo.bind(this),\r\n sendAnalytics: this.sendAnalytics.bind(this)\r\n };\r\n\r\n const parentElement = this.getComponent()[0];\r\n\r\n if (!this._root) {\r\n log(\"debug\", \"plugin::renderStage\", \"create root component\", {\r\n parentElement,\r\n root: this._root\r\n });\r\n }\r\n\r\n this._root = render(\r\n (this.stage = ref)} />,\r\n parentElement,\r\n this._root\r\n );\r\n },\r\n\r\n addBindings: function() {\r\n this.bind(\"updateLayout\", () => {\r\n log(\"debug\", \"plugin::bind(updateLayout)\", \"invoked\");\r\n this.renderRoot(true);\r\n });\r\n\r\n this.bind(\"firstPlay\", () => {\r\n log(\"debug\", \"plugin::bind(firstPlay)\", \"invoked\");\r\n\r\n if (!this._wasPlayed) {\r\n this.renderRoot(false);\r\n this._wasPlayed = true;\r\n }\r\n });\r\n\r\n this.bind(\"seeked\", () => {\r\n log(\"debug\", \"plugin::bind(seeked)\", \"invoked\");\r\n\r\n if (!this._wasPlayed) {\r\n this.renderRoot(false);\r\n this._wasPlayed = true;\r\n }\r\n });\r\n\r\n this.bind(\"onChangeMedia\", () => {\r\n log(\"debug\", \"plugin::bind(onChangeMedia)\", \"invoked\");\r\n\r\n // DEVELOPER NOTICE: this is the destruction place.\r\n this._wasPlayed = false;\r\n this._videoSize = null;\r\n this._hotspots = [];\r\n\r\n const parentElement = jQuery('[id=\"hotspotsOverlay\"]')[0];\r\n\r\n render(\r\n // @ts-ignore\r\n h(null),\r\n parentElement,\r\n this._root\r\n );\r\n\r\n this._root = null;\r\n this.stage = null;\r\n });\r\n\r\n this.bind(\"monitorEvent\", () => {\r\n this.renderRoot(false);\r\n });\r\n\r\n this.bind(\"mediaLoaded\", () => {\r\n this.loadCuePoints();\r\n this.handleVideoSizeChange();\r\n });\r\n\r\n this.bind(\"seeked\", () => {\r\n this.renderRoot(false);\r\n });\r\n },\r\n\r\n _getCurrentTime() {\r\n return this.getPlayer().currentTime * 1000;\r\n },\r\n\r\n getComponent: function() {\r\n if (!this.$el) {\r\n this.$el = jQuery(\"
\")\r\n .attr(\"id\", \"hotspotsOverlay\")\r\n .css({\r\n position: \"absolute\",\r\n height: \"0\",\r\n width: \"0\",\r\n top: 0,\r\n left: 0,\r\n overflow: \"visible\",\r\n \"z-index\": \"2\"\r\n });\r\n }\r\n\r\n return this.$el;\r\n }\r\n })\r\n );\r\n });\r\n})((window as any).mw, (window as any).jQuery);\r\n","import { h, Component } from \"preact\";\r\nimport { RawLayoutHotspot, LayoutHotspot } from \"../hotspot\";\r\nimport Hotspot from \"./Hotspot\";\r\nimport { CuepointLayoutEngine, RawLayoutCuepoint } from \"@playkit-js/playkit-js-ovp\";\r\nimport { AnalyticsEvents } from \"../analyticsEvents\";\r\n\r\nexport type PlayerSize = { width: number; height: number };\r\nexport type VideoSize = { width: number; height: number };\r\n\r\nexport interface Props {\r\n hotspots: RawLayoutHotspot[];\r\n currentTime: number;\r\n shouldHandleResize: boolean;\r\n getPlayerSize(): PlayerSize;\r\n getVideoSize(): VideoSize;\r\n pauseVideo(): void;\r\n seekTo(time: number): void;\r\n sendAnalytics(event: AnalyticsEvents): void;\r\n onResize(): void;\r\n}\r\n\r\ninterface State {\r\n playerSize: PlayerSize;\r\n videoSize: VideoSize;\r\n visibleHotspots: LayoutHotspot[];\r\n}\r\n\r\nconst PlayerUpdateEvent = \"updatePlayHeadPercent:hotspots\";\r\n\r\nexport default class Stage extends Component {\r\n engine: CuepointLayoutEngine | null = null;\r\n\r\n initialState = {\r\n playerSize: this.props.getPlayerSize(),\r\n videoSize: this.props.getVideoSize(),\r\n visibleHotspots: []\r\n };\r\n\r\n state: State = {\r\n ...this.initialState\r\n };\r\n\r\n componentDidUpdate(\r\n previousProps: Readonly,\r\n previousState: Readonly,\r\n previousContext: any\r\n ): void {\r\n if (previousProps.hotspots !== this.props.hotspots) {\r\n this._createEngine();\r\n }\r\n\r\n if (previousProps.currentTime !== this.props.currentTime) {\r\n this.syncVisibleHotspots();\r\n }\r\n\r\n if (previousProps.shouldHandleResize !== this.props.shouldHandleResize) {\r\n this.handleResize();\r\n }\r\n }\r\n\r\n private _createEngine() {\r\n const { hotspots } = this.props;\r\n\r\n if (!hotspots || hotspots.length === 0) {\r\n this.engine = null;\r\n return;\r\n }\r\n\r\n this.engine = new CuepointLayoutEngine(hotspots);\r\n this.engine.updateLayout(this.state.playerSize, this.state.videoSize);\r\n }\r\n\r\n componentDidMount() {\r\n this.reset();\r\n this._createEngine();\r\n }\r\n\r\n private syncVisibleHotspots(forceSnapshot = false) {\r\n const { currentTime } = this.props;\r\n\r\n this.setState((state: State) => {\r\n if (!this.engine) {\r\n return {\r\n visibleHotspots: []\r\n };\r\n }\r\n\r\n const hotspotsUpdate = this.engine.updateTime(currentTime, forceSnapshot);\r\n if (hotspotsUpdate.snapshot) {\r\n return {\r\n visibleHotspots: hotspotsUpdate.snapshot\r\n };\r\n }\r\n\r\n if (!hotspotsUpdate.delta) {\r\n return {\r\n visibleHotspots: []\r\n };\r\n }\r\n\r\n const { show, hide } = hotspotsUpdate.delta;\r\n\r\n if (show.length !== 0 || hide.length !== 0) {\r\n let visibleHotspots: LayoutHotspot[] = state.visibleHotspots;\r\n show.forEach((hotspot: LayoutHotspot) => {\r\n const index = visibleHotspots.indexOf(hotspot);\r\n if (index === -1) {\r\n visibleHotspots.push(hotspot);\r\n }\r\n });\r\n\r\n hide.forEach((hotspot: LayoutHotspot) => {\r\n const index = visibleHotspots.indexOf(hotspot);\r\n if (index !== -1) {\r\n visibleHotspots.splice(index, 1);\r\n }\r\n });\r\n\r\n return {\r\n visibleHotspots\r\n };\r\n }\r\n });\r\n }\r\n\r\n handleResize = (): void => {\r\n const { getPlayerSize, getVideoSize, onResize } = this.props;\r\n\r\n if (!this.props.shouldHandleResize) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n playerSize: getPlayerSize(),\r\n videoSize: getVideoSize()\r\n },\r\n () => {\r\n if (this.engine) {\r\n this.engine.updateLayout(this.state.playerSize, this.state.videoSize);\r\n this.syncVisibleHotspots(true);\r\n }\r\n\r\n onResize();\r\n }\r\n );\r\n };\r\n\r\n private reset = () => {\r\n this.engine = null;\r\n\r\n this.setState({\r\n ...this.initialState\r\n });\r\n };\r\n\r\n private renderHotspots = (visualHotspot: LayoutHotspot[]) => {\r\n if (!visualHotspot) {\r\n return null;\r\n }\r\n\r\n const { seekTo, pauseVideo, sendAnalytics } = this.props;\r\n\r\n return visualHotspot.map(hotspotData => (\r\n \r\n ));\r\n };\r\n\r\n render() {\r\n const { visibleHotspots } = this.state;\r\n const hotspotsElements = this.renderHotspots(visibleHotspots);\r\n\r\n const style = {\r\n position: \"absolute\",\r\n display: \"block\",\r\n overflow: \"visible\",\r\n top: 0,\r\n left: 0,\r\n width: 0,\r\n height: 0\r\n };\r\n\r\n return
{hotspotsElements}
;\r\n }\r\n}\r\n","import { h, Component } from \"preact\";\r\nimport { LayoutHotspot } from \"../hotspot\";\r\nimport { AnalyticsEvents } from \"../analyticsEvents\";\r\n\r\nconst defaultContainerStyles = {\r\n position: \"absolute\",\r\n display: \"table\",\r\n boxSizing: \"border-box\"\r\n};\r\n\r\nconst defaultButtonsStyles = {\r\n position: \"relative\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n appearance: \"none\",\r\n border: \"none\",\r\n display: \"table-cell\",\r\n verticalAlign: \"middle\",\r\n textAlign: \"center\",\r\n cursor: \"pointer\",\r\n wordBreak: \"break-all\",\r\n textRendering: \"geometricPrecision\"\r\n};\r\n\r\ntype Props = {\r\n visible: boolean;\r\n hotspot: LayoutHotspot;\r\n styles?: { [key: string]: any };\r\n pauseVideo(): void;\r\n seekTo(time: number): void;\r\n sendAnalytics(event: AnalyticsEvents): void;\r\n};\r\n\r\ntype State = {\r\n disableClick: boolean;\r\n isReady: boolean;\r\n};\r\n\r\nconst defaultProps = {\r\n styles: {}\r\n};\r\n\r\nfunction prepareUrl(url: string): string {\r\n if (!url.match(/^https?:\\/\\//i)) {\r\n url = \"http://\" + url;\r\n }\r\n return url;\r\n}\r\n\r\nexport default class Hotspot extends Component {\r\n static defaultProps = defaultProps;\r\n\r\n state = {\r\n disableClick: true,\r\n isReady: false\r\n };\r\n\r\n componentDidMount() {\r\n const { hotspot } = this.props;\r\n\r\n if (!hotspot || !hotspot.onClick) {\r\n this.setState({\r\n isReady: true\r\n });\r\n return;\r\n }\r\n\r\n const { type, url } = hotspot.onClick;\r\n\r\n const disableClick = !type || !url || type.length == 0 || url.length === 0;\r\n\r\n this.setState({\r\n isReady: true,\r\n disableClick: !this.isClickable()\r\n });\r\n }\r\n\r\n handleKeyUp = (event: any) => {\r\n if (event.keyCode === 13) {\r\n this.handleClick();\r\n }\r\n };\r\n\r\n isClickable = (): boolean => {\r\n const {\r\n hotspot: { onClick }\r\n } = this.props;\r\n\r\n if (!onClick) {\r\n return false;\r\n }\r\n\r\n switch (onClick.type) {\r\n case \"jumpToTime\":\r\n return typeof onClick.jumpToTime !== \"undefined\";\r\n case \"openUrl\":\r\n case \"openUrlInNewTab\":\r\n return !!onClick.url;\r\n default:\r\n return false;\r\n }\r\n };\r\n\r\n handleClick = () => {\r\n const { hotspot } = this.props;\r\n const { disableClick } = this.state;\r\n\r\n if (!hotspot.onClick || disableClick) {\r\n return;\r\n }\r\n\r\n switch (hotspot.onClick.type) {\r\n case \"jumpToTime\":\r\n if (typeof hotspot.onClick.jumpToTime === \"undefined\") {\r\n return;\r\n }\r\n\r\n this.props.seekTo(hotspot.onClick.jumpToTime / 1000);\r\n break;\r\n case \"openUrl\":\r\n {\r\n if (!hotspot.onClick.url) {\r\n return;\r\n }\r\n const url = prepareUrl(hotspot.onClick.url);\r\n window.open(url, \"_top\");\r\n this.props.sendAnalytics({\r\n eventNumber: 47,\r\n target: url,\r\n hotspotId: hotspot.id\r\n });\r\n }\r\n break;\r\n case \"openUrlInNewTab\":\r\n {\r\n if (!hotspot.onClick.url) {\r\n return;\r\n }\r\n\r\n this.props.pauseVideo();\r\n\r\n const url = prepareUrl(hotspot.onClick.url);\r\n try {\r\n window.open(url, \"_blank\");\r\n this.props.sendAnalytics({\r\n eventNumber: 47,\r\n target: url,\r\n hotspotId: hotspot.id\r\n });\r\n } catch (e) {\r\n // do nothing\r\n }\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n };\r\n\r\n render() {\r\n const { hotspot } = this.props;\r\n const { layout, label } = hotspot;\r\n const { isReady, disableClick } = this.state;\r\n\r\n if (!isReady || !this.props.visible) {\r\n return null;\r\n }\r\n\r\n const containerStyles = {\r\n ...defaultContainerStyles,\r\n top: layout.y,\r\n left: layout.x,\r\n height: layout.height,\r\n width: layout.width\r\n };\r\n\r\n const buttonStyles = {\r\n ...defaultButtonsStyles,\r\n ...hotspot.styles,\r\n cursor: disableClick ? \"default\" : \"pointer\"\r\n };\r\n\r\n return (\r\n \r\n
{label}
\r\n \r\n );\r\n }\r\n}\r\n","import { RawLayoutHotspot } from \"./hotspot\";\r\n//import { log } from \"@playkit-js/playkit-js-ovp\";\r\n\r\nfunction toObject(\r\n jsonAsString: string,\r\n defaultValue: { [key: string]: any } = {}\r\n): { error?: Error; result?: { [key: string]: any } } {\r\n if (!jsonAsString) {\r\n return defaultValue;\r\n }\r\n\r\n try {\r\n return { result: JSON.parse(jsonAsString) };\r\n } catch (e) {\r\n return { error: e };\r\n }\r\n}\r\n\r\nexport function convertToHotspots(response: any): RawLayoutHotspot[] {\r\n const result: RawLayoutHotspot[] = [];\r\n\r\n (response.objects || []).forEach((cuepoint: any) => {\r\n const { result: partnerData, error } = toObject(cuepoint.partnerData);\r\n\r\n if (!partnerData || !partnerData.schemaVersion) {\r\n // log(\r\n // \"warn\",\r\n // \"loadCuePoints\",\r\n // `annotation '${cuepoint.id}' has no schema version, skip annotation`\r\n // );\r\n return;\r\n }\r\n\r\n const rawLayout = {\r\n ...partnerData.layout\r\n };\r\n\r\n result.push({\r\n id: cuepoint.id,\r\n startTime: cuepoint.startTime,\r\n endTime: cuepoint.endTime,\r\n label: cuepoint.text,\r\n styles: partnerData.styles,\r\n onClick: partnerData.onClick,\r\n rawLayout: rawLayout\r\n });\r\n });\r\n\r\n return result;\r\n}\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["./hotspots/webpack/universalModuleDefinition","./hotspots/webpack/bootstrap","./hotspots//Users/yair.ansbacher/Desktop/repos/playkit/playkit-js-hotspots/node_modules/preact/dist/preact.mjs","./hotspots//Users/yair.ansbacher/Desktop/repos/playkit/playkit-js-hotspots/node_modules/@playkit-js/playkit-js-ovp/lib/index.js","./hotspots/./src/index.ts","./hotspots/./src/plugin.tsx","./hotspots/../shared/components/Stage.tsx","./hotspots/../shared/components/Hotspot.tsx","./hotspots/../shared/cuepoints.ts"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","h","cloneElement","createRef","Component","render","rerender","options","VNode","stack","EMPTY_CHILDREN","nodeName","attributes","lastSimple","child","simple","children","arguments","length","push","pop","undefined","String","vnode","extend","obj","props","applyRef","ref","current","defer","Promise","resolve","then","setTimeout","slice","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","renderComponent","isNamedNode","node","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","removeNode","parentNode","removeChild","setAccessor","old","isSvg","style","cssText","test","innerHTML","__html","useCapture","replace","substring","addEventListener","eventProxy","removeEventListener","_listeners","e","removeAttribute","removeAttributeNS","setAttributeNS","setAttribute","className","this","type","event","mounts","diffLevel","isSvgMode","hydrating","flushMounts","shift","afterMount","componentDidMount","diff","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","splitText","_component","nodeValue","document","createTextNode","replaceChild","recollectNodeTree","vnodeName","originalComponent","oldDom","isDirectOwner","_componentConstructor","isOwner","_parentComponent","constructor","setComponentProps","base","unmountComponent","createComponent","nextBase","buildComponentFromVNode","createElementNS","createElement","firstChild","fc","vchildren","a","nextSibling","isHydrating","j","f","vchild","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","_child","__key","trim","insertBefore","innerDiffNode","dangerouslySetInnerHTML","attrs","diffAttributes","unmountOnly","removeChildren","lastChild","next","previousSibling","recyclerComponents","Ctor","inst","doRender","splice","state","renderMode","_disable","__ref","getDerivedStateFromProps","componentWillMount","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","rendered","cbase","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","snapshot","shouldComponentUpdate","componentWillUpdate","getChildContext","getSnapshotBeforeUpdate","toUnmount","childComponent","childProps","baseParent","componentRef","componentDidUpdate","afterUpdate","_renderCallbacks","beforeUnmount","componentWillUnmount","inner","merge","setState","callback","forceUpdate","preact","default","enableLog","log","console","apply","concat","enableLogIfNeeded","URL","indexOf","Show","Hide","isFirstTime","enabled","lastHandledTime","lastHandledTimeIndex","nextTimeToHandle","cuepointChanges","cuepoints","prepareCuepoint","getSnapshot","findClosestLastIndexByTime","timeIndex","createCuepointSnapshot","updateTime","u","time","delta","createEmptyDelta","currentTime","closestChangeIndex","closestChangeTime","userSeeked","forceSnapshot","updateInternals","createCuepointDelta","getCurrentCuepointSnapshot","targetIndex","cuepointCount","cuePoint","cuepoint","newCuepoint","removedCuepoint","show","hide","binarySearch","Math","floor","forEach","startTime","endTime","sort","CuepointEngine","scaleVideo","width","height","left","top","scaleToTargetWidth","abs","__extends","setPrototypeOf","__proto__","Array","playerSize","videoSize","updateLayout","recalculateCuepointLayout","_calculateLayout","rawLayout","x","relativeX","y","relativeY","relativeWidth","relativeHeight","layout","CuepointLayoutEngine","preact_1","Stage_1","playkit_js_ovp_1","cuepoints_1","mw","$","isIphone","navigator","userAgent","kalturaPluginWrapper","PluginManager","add","KBaseComponent","_hotspots","_root","_videoSize","_wasPlayed","stage","defaultConfig","order","handleVideoSizeChange","_a","getPlayer","evaluate","renderRoot","setup","addBindings","pauseVideo","sendNotification","seekTo","seek","getCuePoints","cuePoints","loadCuePoints","_this","getKalturaClient","doRequest","service","action","filter:entryIdEqual","kentryid","filter:objectType","filter:cuePointTypeEqual","filter:tagsLike","data","code","warn","convertToHotspots","getPlayerSize","videoHolder","getVideoHolder","sendAnalytics","kanalonyPlugin","plugins","kAnalony","eventNumber","rest","__rest","message","getVideoSize","__assign","_onRootResized","shouldHandleResize","hotspots","_getCurrentTime","onResize","parentElement","getComponent","jQuery","$el","attr","css","position","overflow","zIndex","Hotspot_1","Stage","_super","engine","initialState","visibleHotspots","handleResize","syncVisibleHotspots","reset","renderHotspots","visualHotspot","map","hotspotData","id","visible","hotspot","_createEngine","hotspotsUpdate","visibleHotspots_1","index","hotspotsElements","display","defaultContainerStyles","boxSizing","defaultButtonsStyles","appearance","border","verticalAlign","textAlign","cursor","wordBreak","textRendering","styles","prepareUrl","url","match","Hotspot","disableClick","isReady","handleKeyUp","keyCode","handleClick","isClickable","onClick","jumpToTime","open","target","hotspotId","label","containerStyles","buttonStyles","onKeyUp","tabIndex","aria-label","aria-disabled","aria-live","role","response","result","objects","jsonAsString","defaultValue","JSON","parse","error","toObject","partnerData","schemaVersion","text"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,cAAAH,GACA,iBAAAC,QACAA,QAAA,SAAAD,KAEAD,EAAA,cAAAA,EAAA,kBAAqDA,EAAA,sBAAAA,EAAA,0BAA2EA,EAAA,+BAAAC,KARhI,CASCK,OAAA,WACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAT,QAAA,IAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR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,CACRsV,GAAI9H,EAAS8H,GACbrH,UAAWT,EAASS,UACpBC,QAASV,EAASU,QAClBuJ,MAAOjK,EAASqL,KAChBpC,OAAQkC,EAAYlC,OACpBW,QAASuB,EAAYvB,QACrB/H,UAAWA,OAIZ8I","file":"playkit-js-hotspots.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"hotspots\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"hotspots\"] = factory();\n\telse\n\t\troot[\"KalturaPlayer\"] = root[\"KalturaPlayer\"] || {}, root[\"KalturaPlayer\"][\"plugins\"] = root[\"KalturaPlayer\"][\"plugins\"] || {}, root[\"KalturaPlayer\"][\"plugins\"][\"hotspots\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","var VNode = function VNode() {};\n\nvar options = {};\n\nvar stack = [];\n\nvar EMPTY_CHILDREN = [];\n\nfunction h(nodeName, attributes) {\n\tvar children = EMPTY_CHILDREN,\n\t lastSimple,\n\t child,\n\t simple,\n\t i;\n\tfor (i = arguments.length; i-- > 2;) {\n\t\tstack.push(arguments[i]);\n\t}\n\tif (attributes && attributes.children != null) {\n\t\tif (!stack.length) stack.push(attributes.children);\n\t\tdelete attributes.children;\n\t}\n\twhile (stack.length) {\n\t\tif ((child = stack.pop()) && child.pop !== undefined) {\n\t\t\tfor (i = child.length; i--;) {\n\t\t\t\tstack.push(child[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tif (typeof child === 'boolean') child = null;\n\n\t\t\tif (simple = typeof nodeName !== 'function') {\n\t\t\t\tif (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n\t\t\t}\n\n\t\t\tif (simple && lastSimple) {\n\t\t\t\tchildren[children.length - 1] += child;\n\t\t\t} else if (children === EMPTY_CHILDREN) {\n\t\t\t\tchildren = [child];\n\t\t\t} else {\n\t\t\t\tchildren.push(child);\n\t\t\t}\n\n\t\t\tlastSimple = simple;\n\t\t}\n\t}\n\n\tvar p = new VNode();\n\tp.nodeName = nodeName;\n\tp.children = children;\n\tp.attributes = attributes == null ? undefined : attributes;\n\tp.key = attributes == null ? undefined : attributes.key;\n\n\tif (options.vnode !== undefined) options.vnode(p);\n\n\treturn p;\n}\n\nfunction extend(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\nfunction applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value);else ref.current = value;\n }\n}\n\nvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\nvar items = [];\n\nfunction enqueueRender(component) {\n\tif (!component._dirty && (component._dirty = true) && items.push(component) == 1) {\n\t\t(options.debounceRendering || defer)(rerender);\n\t}\n}\n\nfunction rerender() {\n\tvar p;\n\twhile (p = items.pop()) {\n\t\tif (p._dirty) renderComponent(p);\n\t}\n}\n\nfunction isSameNodeType(node, vnode, hydrating) {\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\t\treturn node.splitText !== undefined;\n\t}\n\tif (typeof vnode.nodeName === 'string') {\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n\t}\n\treturn hydrating || node._componentConstructor === vnode.nodeName;\n}\n\nfunction isNamedNode(node, nodeName) {\n\treturn node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\nfunction getNodeProps(vnode) {\n\tvar props = extend({}, vnode.attributes);\n\tprops.children = vnode.children;\n\n\tvar defaultProps = vnode.nodeName.defaultProps;\n\tif (defaultProps !== undefined) {\n\t\tfor (var i in defaultProps) {\n\t\t\tif (props[i] === undefined) {\n\t\t\t\tprops[i] = defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn props;\n}\n\nfunction createNode(nodeName, isSvg) {\n\tvar node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);\n\tnode.normalizedNodeName = nodeName;\n\treturn node;\n}\n\nfunction removeNode(node) {\n\tvar parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nfunction setAccessor(node, name, old, value, isSvg) {\n\tif (name === 'className') name = 'class';\n\n\tif (name === 'key') {} else if (name === 'ref') {\n\t\tapplyRef(old, null);\n\t\tapplyRef(value, node);\n\t} else if (name === 'class' && !isSvg) {\n\t\tnode.className = value || '';\n\t} else if (name === 'style') {\n\t\tif (!value || typeof value === 'string' || typeof old === 'string') {\n\t\t\tnode.style.cssText = value || '';\n\t\t}\n\t\tif (value && typeof value === 'object') {\n\t\t\tif (typeof old !== 'string') {\n\t\t\t\tfor (var i in old) {\n\t\t\t\t\tif (!(i in value)) node.style[i] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i in value) {\n\t\t\t\tnode.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\n\t\t\t}\n\t\t}\n\t} else if (name === 'dangerouslySetInnerHTML') {\n\t\tif (value) node.innerHTML = value.__html || '';\n\t} else if (name[0] == 'o' && name[1] == 'n') {\n\t\tvar useCapture = name !== (name = name.replace(/Capture$/, ''));\n\t\tname = name.toLowerCase().substring(2);\n\t\tif (value) {\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\n\t\t} else {\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\n\t\t}\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\n\t} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n\t\ttry {\n\t\t\tnode[name] = value == null ? '' : value;\n\t\t} catch (e) {}\n\t\tif ((value == null || value === false) && name != 'spellcheck') node.removeAttribute(name);\n\t} else {\n\t\tvar ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n\n\t\tif (value == null || value === false) {\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n\t\t} else if (typeof value !== 'function') {\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n\t\t}\n\t}\n}\n\nfunction eventProxy(e) {\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\n}\n\nvar mounts = [];\n\nvar diffLevel = 0;\n\nvar isSvgMode = false;\n\nvar hydrating = false;\n\nfunction flushMounts() {\n\tvar c;\n\twhile (c = mounts.shift()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}\n\nfunction diff(dom, vnode, context, mountAll, parent, componentRoot) {\n\tif (!diffLevel++) {\n\t\tisSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n\t\thydrating = dom != null && !('__preactattr_' in dom);\n\t}\n\n\tvar ret = idiff(dom, vnode, context, mountAll, componentRoot);\n\n\tif (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n\tif (! --diffLevel) {\n\t\thydrating = false;\n\n\t\tif (!componentRoot) flushMounts();\n\t}\n\n\treturn ret;\n}\n\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t prevSvgMode = isSvgMode;\n\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t}\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t props = out['__preactattr_'],\n\t vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t} else if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\tdiffAttributes(out, vnode.attributes, props);\n\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}\n\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\n\tvar originalChildren = dom.childNodes,\n\t children = [],\n\t keyed = {},\n\t keyedLen = 0,\n\t min = 0,\n\t len = originalChildren.length,\n\t childrenLen = 0,\n\t vlen = vchildren ? vchildren.length : 0,\n\t j,\n\t c,\n\t f,\n\t vchild,\n\t child;\n\n\tif (len !== 0) {\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar _child = originalChildren[i],\n\t\t\t props = _child['__preactattr_'],\n\t\t\t key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n\t\t\tif (key != null) {\n\t\t\t\tkeyedLen++;\n\t\t\t\tkeyed[key] = _child;\n\t\t\t} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n\t\t\t\tchildren[childrenLen++] = _child;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (vlen !== 0) {\n\t\tfor (var i = 0; i < vlen; i++) {\n\t\t\tvchild = vchildren[i];\n\t\t\tchild = null;\n\n\t\t\tvar key = vchild.key;\n\t\t\tif (key != null) {\n\t\t\t\tif (keyedLen && keyed[key] !== undefined) {\n\t\t\t\t\tchild = keyed[key];\n\t\t\t\t\tkeyed[key] = undefined;\n\t\t\t\t\tkeyedLen--;\n\t\t\t\t}\n\t\t\t} else if (min < childrenLen) {\n\t\t\t\t\tfor (j = min; j < childrenLen; j++) {\n\t\t\t\t\t\tif (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n\t\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\t\tif (j === childrenLen - 1) childrenLen--;\n\t\t\t\t\t\t\tif (j === min) min++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\tf = originalChildren[i];\n\t\t\tif (child && child !== dom && child !== f) {\n\t\t\t\tif (f == null) {\n\t\t\t\t\tdom.appendChild(child);\n\t\t\t\t} else if (child === f.nextSibling) {\n\t\t\t\t\tremoveNode(f);\n\t\t\t\t} else {\n\t\t\t\t\tdom.insertBefore(child, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (keyedLen) {\n\t\tfor (var i in keyed) {\n\t\t\tif (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n\t\t}\n\t}\n\n\twhile (min <= childrenLen) {\n\t\tif ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n\t}\n}\n\nfunction recollectNodeTree(node, unmountOnly) {\n\tvar component = node._component;\n\tif (component) {\n\t\tunmountComponent(component);\n\t} else {\n\t\tif (node['__preactattr_'] != null) applyRef(node['__preactattr_'].ref, null);\n\n\t\tif (unmountOnly === false || node['__preactattr_'] == null) {\n\t\t\tremoveNode(node);\n\t\t}\n\n\t\tremoveChildren(node);\n\t}\n}\n\nfunction removeChildren(node) {\n\tnode = node.lastChild;\n\twhile (node) {\n\t\tvar next = node.previousSibling;\n\t\trecollectNodeTree(node, true);\n\t\tnode = next;\n\t}\n}\n\nfunction diffAttributes(dom, attrs, old) {\n\tvar name;\n\n\tfor (name in old) {\n\t\tif (!(attrs && attrs[name] != null) && old[name] != null) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n\t\t}\n\t}\n\n\tfor (name in attrs) {\n\t\tif (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n\t\t}\n\t}\n}\n\nvar recyclerComponents = [];\n\nfunction createComponent(Ctor, props, context) {\n\tvar inst,\n\t i = recyclerComponents.length;\n\n\tif (Ctor.prototype && Ctor.prototype.render) {\n\t\tinst = new Ctor(props, context);\n\t\tComponent.call(inst, props, context);\n\t} else {\n\t\tinst = new Component(props, context);\n\t\tinst.constructor = Ctor;\n\t\tinst.render = doRender;\n\t}\n\n\twhile (i--) {\n\t\tif (recyclerComponents[i].constructor === Ctor) {\n\t\t\tinst.nextBase = recyclerComponents[i].nextBase;\n\t\t\trecyclerComponents.splice(i, 1);\n\t\t\treturn inst;\n\t\t}\n\t}\n\n\treturn inst;\n}\n\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n\nfunction setComponentProps(component, props, renderMode, context, mountAll) {\n\tif (component._disable) return;\n\tcomponent._disable = true;\n\n\tcomponent.__ref = props.ref;\n\tcomponent.__key = props.key;\n\tdelete props.ref;\n\tdelete props.key;\n\n\tif (typeof component.constructor.getDerivedStateFromProps === 'undefined') {\n\t\tif (!component.base || mountAll) {\n\t\t\tif (component.componentWillMount) component.componentWillMount();\n\t\t} else if (component.componentWillReceiveProps) {\n\t\t\tcomponent.componentWillReceiveProps(props, context);\n\t\t}\n\t}\n\n\tif (context && context !== component.context) {\n\t\tif (!component.prevContext) component.prevContext = component.context;\n\t\tcomponent.context = context;\n\t}\n\n\tif (!component.prevProps) component.prevProps = component.props;\n\tcomponent.props = props;\n\n\tcomponent._disable = false;\n\n\tif (renderMode !== 0) {\n\t\tif (renderMode === 1 || options.syncComponentUpdates !== false || !component.base) {\n\t\t\trenderComponent(component, 1, mountAll);\n\t\t} else {\n\t\t\tenqueueRender(component);\n\t\t}\n\t}\n\n\tapplyRef(component.__ref, component);\n}\n\nfunction renderComponent(component, renderMode, mountAll, isChild) {\n\tif (component._disable) return;\n\n\tvar props = component.props,\n\t state = component.state,\n\t context = component.context,\n\t previousProps = component.prevProps || props,\n\t previousState = component.prevState || state,\n\t previousContext = component.prevContext || context,\n\t isUpdate = component.base,\n\t nextBase = component.nextBase,\n\t initialBase = isUpdate || nextBase,\n\t initialChildComponent = component._component,\n\t skip = false,\n\t snapshot = previousContext,\n\t rendered,\n\t inst,\n\t cbase;\n\n\tif (component.constructor.getDerivedStateFromProps) {\n\t\tstate = extend(extend({}, state), component.constructor.getDerivedStateFromProps(props, state));\n\t\tcomponent.state = state;\n\t}\n\n\tif (isUpdate) {\n\t\tcomponent.props = previousProps;\n\t\tcomponent.state = previousState;\n\t\tcomponent.context = previousContext;\n\t\tif (renderMode !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {\n\t\t\tskip = true;\n\t\t} else if (component.componentWillUpdate) {\n\t\t\tcomponent.componentWillUpdate(props, state, context);\n\t\t}\n\t\tcomponent.props = props;\n\t\tcomponent.state = state;\n\t\tcomponent.context = context;\n\t}\n\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\n\tcomponent._dirty = false;\n\n\tif (!skip) {\n\t\trendered = component.render(props, state, context);\n\n\t\tif (component.getChildContext) {\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\n\t\t}\n\n\t\tif (isUpdate && component.getSnapshotBeforeUpdate) {\n\t\t\tsnapshot = component.getSnapshotBeforeUpdate(previousProps, previousState);\n\t\t}\n\n\t\tvar childComponent = rendered && rendered.nodeName,\n\t\t toUnmount,\n\t\t base;\n\n\t\tif (typeof childComponent === 'function') {\n\n\t\t\tvar childProps = getNodeProps(rendered);\n\t\t\tinst = initialChildComponent;\n\n\t\t\tif (inst && inst.constructor === childComponent && childProps.key == inst.__key) {\n\t\t\t\tsetComponentProps(inst, childProps, 1, context, false);\n\t\t\t} else {\n\t\t\t\ttoUnmount = inst;\n\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\n\t\t\t\tinst._parentComponent = component;\n\t\t\t\tsetComponentProps(inst, childProps, 0, context, false);\n\t\t\t\trenderComponent(inst, 1, mountAll, true);\n\t\t\t}\n\n\t\t\tbase = inst.base;\n\t\t} else {\n\t\t\tcbase = initialBase;\n\n\t\t\ttoUnmount = initialChildComponent;\n\t\t\tif (toUnmount) {\n\t\t\t\tcbase = component._component = null;\n\t\t\t}\n\n\t\t\tif (initialBase || renderMode === 1) {\n\t\t\t\tif (cbase) cbase._component = null;\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\n\t\t\t}\n\t\t}\n\n\t\tif (initialBase && base !== initialBase && inst !== initialChildComponent) {\n\t\t\tvar baseParent = initialBase.parentNode;\n\t\t\tif (baseParent && base !== baseParent) {\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\n\n\t\t\t\tif (!toUnmount) {\n\t\t\t\t\tinitialBase._component = null;\n\t\t\t\t\trecollectNodeTree(initialBase, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (toUnmount) {\n\t\t\tunmountComponent(toUnmount);\n\t\t}\n\n\t\tcomponent.base = base;\n\t\tif (base && !isChild) {\n\t\t\tvar componentRef = component,\n\t\t\t t = component;\n\t\t\twhile (t = t._parentComponent) {\n\t\t\t\t(componentRef = t).base = base;\n\t\t\t}\n\t\t\tbase._component = componentRef;\n\t\t\tbase._componentConstructor = componentRef.constructor;\n\t\t}\n\t}\n\n\tif (!isUpdate || mountAll) {\n\t\tmounts.push(component);\n\t} else if (!skip) {\n\n\t\tif (component.componentDidUpdate) {\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, snapshot);\n\t\t}\n\t\tif (options.afterUpdate) options.afterUpdate(component);\n\t}\n\n\twhile (component._renderCallbacks.length) {\n\t\tcomponent._renderCallbacks.pop().call(component);\n\t}if (!diffLevel && !isChild) flushMounts();\n}\n\nfunction buildComponentFromVNode(dom, vnode, context, mountAll) {\n\tvar c = dom && dom._component,\n\t originalComponent = c,\n\t oldDom = dom,\n\t isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n\t isOwner = isDirectOwner,\n\t props = getNodeProps(vnode);\n\twhile (c && !isOwner && (c = c._parentComponent)) {\n\t\tisOwner = c.constructor === vnode.nodeName;\n\t}\n\n\tif (c && isOwner && (!mountAll || c._component)) {\n\t\tsetComponentProps(c, props, 3, context, mountAll);\n\t\tdom = c.base;\n\t} else {\n\t\tif (originalComponent && !isDirectOwner) {\n\t\t\tunmountComponent(originalComponent);\n\t\t\tdom = oldDom = null;\n\t\t}\n\n\t\tc = createComponent(vnode.nodeName, props, context);\n\t\tif (dom && !c.nextBase) {\n\t\t\tc.nextBase = dom;\n\n\t\t\toldDom = null;\n\t\t}\n\t\tsetComponentProps(c, props, 1, context, mountAll);\n\t\tdom = c.base;\n\n\t\tif (oldDom && dom !== oldDom) {\n\t\t\toldDom._component = null;\n\t\t\trecollectNodeTree(oldDom, false);\n\t\t}\n\t}\n\n\treturn dom;\n}\n\nfunction unmountComponent(component) {\n\tif (options.beforeUnmount) options.beforeUnmount(component);\n\n\tvar base = component.base;\n\n\tcomponent._disable = true;\n\n\tif (component.componentWillUnmount) component.componentWillUnmount();\n\n\tcomponent.base = null;\n\n\tvar inner = component._component;\n\tif (inner) {\n\t\tunmountComponent(inner);\n\t} else if (base) {\n\t\tif (base['__preactattr_'] != null) applyRef(base['__preactattr_'].ref, null);\n\n\t\tcomponent.nextBase = base;\n\n\t\tremoveNode(base);\n\t\trecyclerComponents.push(component);\n\n\t\tremoveChildren(base);\n\t}\n\n\tapplyRef(component.__ref, null);\n}\n\nfunction Component(props, context) {\n\tthis._dirty = true;\n\n\tthis.context = context;\n\n\tthis.props = props;\n\n\tthis.state = this.state || {};\n\n\tthis._renderCallbacks = [];\n}\n\nextend(Component.prototype, {\n\tsetState: function setState(state, callback) {\n\t\tif (!this.prevState) this.prevState = this.state;\n\t\tthis.state = extend(extend({}, this.state), typeof state === 'function' ? state(this.state, this.props) : state);\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t},\n\tforceUpdate: function forceUpdate(callback) {\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\trenderComponent(this, 2);\n\t},\n\trender: function render() {}\n});\n\nfunction render(vnode, parent, merge) {\n return diff(merge, vnode, {}, false, parent, false);\n}\n\nfunction createRef() {\n\treturn {};\n}\n\nvar preact = {\n\th: h,\n\tcreateElement: h,\n\tcloneElement: cloneElement,\n\tcreateRef: createRef,\n\tComponent: Component,\n\trender: render,\n\trerender: rerender,\n\toptions: options\n};\n\nexport default preact;\nexport { h, h as createElement, cloneElement, createRef, Component, render, rerender, options };\n//# sourceMappingURL=preact.mjs.map\n","!function(e,t){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)(\"object\"==typeof exports?exports:e)[i]=n[i]}}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=3)}([function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var i=!1,o=\"\";function a(e){o=e||\"\",i=!0}t.enableLog=a,t.log=function(e,t,n){for(var a=[],r=3;re||e-a>2e3),u=n||null!==this.lastHandledTime&&this.lastHandledTime>e||null!=this.nextTimeToHandle&&e>=this.nextTimeToHandle,s=this.findClosestLastIndexByTime(e),l=s<0?0:this.cuepointChanges[s].time;if(!u)return t?{snapshot:this.createCuepointSnapshot(s)}:{delta:this.createEmptyDelta()};if(o.log(\"debug\",\"CuepointEngine:updateTime\",\"has changes to handle. check if need to return snapshot instead of delta based on provided new time\",{currentTime:e,closestChangeIndex:s,closestChangeTime:l,lastHandledTime:i,nextTimeToHandle:a,isFirstTime:n}),n||t||r){o.log(\"debug\",\"CuepointEngine:updateTime\",\"some conditions doesn't allow returning delta, return snapshot instead\",{isFirstTime:n,userSeeked:r,forceSnapshot:t});var p=this.createCuepointSnapshot(s);return this.updateInternals(l,s),{snapshot:p}}var h=this.createCuepointDelta(s);return this.updateInternals(l,s),{delta:h}},e.prototype.getCurrentCuepointSnapshot=function(){return this.lastHandledTimeIndex?this.createCuepointSnapshot(this.lastHandledTimeIndex):[]},e.prototype.createCuepointSnapshot=function(e){if(!this.enabled||e<0||!this.cuepointChanges||0===this.cuepointChanges.length)return o.log(\"log\",\"CuepointEngine:createCuepointSnapshot\",\"resulted with empty snapshot\",{targetIndex:e,enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}),[];for(var t=[],n=0;n<=e;n++){var a=this.cuepointChanges[n],r=t.indexOf(a.cuePoint);a.type===i.Show?-1===r&&t.push(a.cuePoint):-1!==r&&t.splice(r,1)}return o.log(\"log\",\"CuepointEngine:createCuepointSnapshot\",\"resulted snapshot\",{snapshot:t}),t},e.prototype.createCuepointDelta=function(e){if(!this.enabled||!this.cuepointChanges||0===this.cuepointChanges.length)return o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"resulted with empty delta\",{enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}),this.createEmptyDelta();var t=this.lastHandledTimeIndex;if(null===t)return o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"invalid internal state. resulted with empty delta\"),this.createEmptyDelta();var n=[],a=[];o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"find cuepoint that were added or removed\");for(var r=t+1;r<=e;r++){var u=this.cuepointChanges[r],s=n.indexOf(u.cuePoint);u.type===i.Show?-1===s&&n.push(u.cuePoint):-1!==s?(o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"cuepoint was marked with type \"+u.type+\" at \"+u.time+\". remove from new cuepoint list as it wasn't visible yet\",{cuepoint:u.cuePoint}),n.splice(s,1)):-1===a.indexOf(u.cuePoint)&&(o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"cuepoint was marked with type \"+u.type+\" at \"+u.time+\". add to removed cuepoint list\",{cuepoint:u.cuePoint}),a.push(u.cuePoint))}return o.log(\"log\",\"CuepointEngine:createCuepointDelta\",\"resulted delta\",{newCuepoint:n,removedCuepoint:a}),{show:n,hide:a}},e.prototype.updateInternals=function(e,t){var n=this.cuepointChanges;if(n&&0!==n.length){var i=t>=n.length-1,a=null===t;this.lastHandledTime=e,this.lastHandledTimeIndex=t,this.nextTimeToHandle=a?n[0].time:i?n[n.length-1].time:n[t+1].time,this.isFirstTime=!1,o.log(\"debug\",\"CuepointEngine:updateInternals\",\"update inner state with new time and index\",{lastHandledTime:this.lastHandledTime,lastHandledTimeIndex:this.lastHandledTimeIndex,nextTimeToHandle:this.nextTimeToHandle})}},e.prototype.createEmptyDelta=function(){return{show:[],hide:[]}},e.prototype.binarySearch=function(e,t){if(!e||0===e.length)return null;if(te[e.length-1].time)return e.length-1;for(var n=0,i=e.length-1;n<=i;){var o=Math.floor((i+n+1)/2);if(te[o].time))return o;n=o+1}}return Math.min(n,i)},e.prototype.findClosestLastIndexByTime=function(e){var t=this.cuepointChanges,n=this.binarySearch(t,e);if(null===n)return-1;for(var i=t.length;n=0&&e.cuepointChanges.push({time:t.startTime,type:i.Show,cuePoint:t}),null!==t.endTime&&void 0!==t.endTime&&t.endTime>=0&&e.cuepointChanges.push({time:t.endTime,type:i.Hide,cuePoint:t})}),this.cuepointChanges.sort(function(e,t){return e.timen;return(p=p?o:!o)?(a.width=Math.abs(r),a.height=Math.abs(u),a.scaleToTargetWidth=!0):(a.width=Math.abs(s),a.height=Math.abs(l),a.scaleToTargetWidth=!1),a.left=Math.abs((n-a.width)/2),a.top=Math.abs((i-a.height)/2),a}},function(e,t,n){\"use strict\";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,\"__esModule\",{value:!0}),i(n(1)),i(n(4)),i(n(2)),i(n(0))},function(e,t,n){\"use strict\";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,\"__esModule\",{value:!0});var a,r=n(0),u=n(2),s=n(1);!function(e){e.Show=\"show\",e.Hide=\"hide\"}(a||(a={}));var l=function(e){function t(t){var n=e.call(this,t)||this;return n.playerSize=null,n.videoSize=null,n}return o(t,e),t.prototype.updateLayout=function(e,t){return this.videoSize=t,this.playerSize=e,this.recalculateCuepointLayout(),this.getCurrentCuepointSnapshot()},t.prototype._calculateLayout=function(e,t){var n=e.rawLayout;return{x:t.left+n.relativeX*t.width,y:t.top+n.relativeY*t.height,width:n.relativeWidth*t.width,height:n.relativeHeight*t.height}},t.prototype.recalculateCuepointLayout=function(){var e=this;if(r.log(\"debug\",\"CuepointLayoutEngine::recalculateCuepointLayout\",\"calculating cuepoint layout based on video/player sizes\"),!this.playerSize||!this.videoSize)return r.log(\"debug\",\"CuepointLayoutEngine::recalculateCuepointLayout\",\"missing video/player sizes, hide all cuepoint\"),void(this.enabled=!1);var t=this.playerSize,n=t.width,i=t.height,o=this.videoSize,a=o.width,s=o.height;if(!(n&&i&&a&&s))return r.log(\"debug\",\"CuepointLayoutEngine::recalculateCuepointLayout\",\"missing video/player sizes, hide all cuepoint\"),void(this.enabled=!1);var l=u.scaleVideo(a,s,n,i,!0);r.log(\"debug\",\"CuepointLayoutEngine::recalculateCuepointLayout\",\"recalculate cuepoint layout based on new sizes\",l),(this.cuepoints||[]).forEach(function(t){t.layout=e._calculateLayout(t,l)}),this.enabled=!0},t}(s.CuepointEngine);t.CuepointLayoutEngine=l}])});\n//# sourceMappingURL=index.js.map","import \"./plugin\";\n","import { h, render } from \"preact\";\nimport Stage, { Props as StageProps } from \"@plugin/shared/components/Stage\";\nimport { log, enableLogIfNeeded } from \"@playkit-js/playkit-js-ovp\";\nimport { AnalyticsEvents } from \"@plugin/shared/analyticsEvents\";\nimport { convertToHotspots } from \"@plugin/shared/cuepoints\";\n\n(function(mw, $) {\n enableLogIfNeeded(\"hotspots\");\n\n function isIpad() {\n return navigator.userAgent.indexOf(\"iPad\") != -1;\n }\n\n function isIphone() {\n return navigator.userAgent.indexOf(\"iPhone\") != -1 && !isIpad();\n }\n\n mw.kalturaPluginWrapper(function() {\n mw.PluginManager.add(\n \"hotspots\",\n mw.KBaseComponent.extend({\n _hotspots: [],\n _root: null,\n _videoSize: null,\n _wasPlayed: false,\n stage: null,\n defaultConfig: {\n parent: \"videoHolder\",\n order: 1\n },\n\n handleVideoSizeChange: function(e: any) {\n const { width, height } = this.getPlayer().evaluate(\"{mediaProxy.entry}\");\n log(\n \"debug\",\n \"plugin::handleVideoSizeChange\",\n \"use entry size provided by player to calculate actual stage size\",\n { width, height }\n );\n\n if (!width || !height) {\n this._videoSize = null;\n } else {\n this._videoSize = { width, height };\n }\n\n this.renderRoot(true);\n },\n\n setup: function() {\n if (isIphone()) {\n log(\"log\", \"plugin::setup\", \"iphone detected, disable plugin\");\n return;\n }\n\n this.addBindings();\n },\n\n pauseVideo: function() {\n this.getPlayer().sendNotification(\"doPause\");\n },\n\n seekTo: function(time: number) {\n this.getPlayer().seek(time);\n },\n\n getCuePoints: function() {\n return this.cuePoints;\n },\n\n loadCuePoints: function() {\n // do the api request\n this.getKalturaClient().doRequest(\n {\n service: \"cuepoint_cuepoint\",\n action: \"list\",\n \"filter:entryIdEqual\": this.getPlayer().kentryid,\n \"filter:objectType\": \"KalturaCuePointFilter\",\n \"filter:cuePointTypeEqual\": \"annotation.Annotation\",\n \"filter:tagsLike\": \"hotspots\"\n },\n (data: any) => {\n // if an error pop out:\n const hasError = !data || data.code;\n\n if (hasError) {\n console.warn(\n `failed to load hotspots with code '${data.code || \"failure\"}'`\n );\n return;\n }\n\n this._hotspots = convertToHotspots(data);\n this.renderRoot(false);\n }\n );\n },\n\n getPlayerSize: function() {\n const videoHolder = this.getPlayer().getVideoHolder();\n if (!videoHolder) {\n return null;\n }\n\n const width = videoHolder.width();\n const height = videoHolder.height();\n\n return {\n width,\n height\n };\n },\n\n sendAnalytics: function(event: AnalyticsEvents) {\n try {\n const kanalonyPlugin = this.getPlayer().plugins.kAnalony;\n if (!kanalonyPlugin) {\n log(\n \"warn\",\n \"plugin::sendAnalytics\",\n `cannot send analytics event, missing kAnalony plugin`,\n event\n );\n return;\n }\n const { eventNumber, ...rest } = event;\n\n kanalonyPlugin.sendAnalytics(eventNumber, rest);\n } catch (e) {\n log(\n \"error\",\n \"plugin::sendAnalytics\",\n `cannot send analytics event with error '${e.message}'`,\n event\n );\n }\n },\n\n getVideoSize: function() {\n if (!this._videoSize) {\n return null;\n }\n\n return {\n ...this._videoSize\n };\n },\n\n _onRootResized: function() {\n this.renderRoot(false);\n },\n\n renderRoot: function(shouldHandleResize: boolean) {\n const props: StageProps = {\n hotspots: this._hotspots,\n currentTime: this._getCurrentTime(),\n shouldHandleResize,\n onResize: this._onRootResized.bind(this),\n getPlayerSize: this.getPlayerSize.bind(this),\n getVideoSize: this.getVideoSize.bind(this),\n pauseVideo: this.pauseVideo.bind(this),\n seekTo: this.seekTo.bind(this),\n sendAnalytics: this.sendAnalytics.bind(this)\n };\n\n const parentElement = this.getComponent()[0];\n\n if (!this._root) {\n log(\"debug\", \"plugin::renderStage\", \"create root component\", {\n parentElement,\n root: this._root\n });\n }\n\n this._root = render(\n (this.stage = ref)} />,\n parentElement,\n this._root\n );\n },\n\n addBindings: function() {\n this.bind(\"updateLayout\", () => {\n log(\"debug\", \"plugin::bind(updateLayout)\", \"invoked\");\n this.renderRoot(true);\n });\n\n this.bind(\"firstPlay\", () => {\n log(\"debug\", \"plugin::bind(firstPlay)\", \"invoked\");\n\n if (!this._wasPlayed) {\n this.renderRoot(false);\n this._wasPlayed = true;\n }\n });\n\n this.bind(\"seeked\", () => {\n log(\"debug\", \"plugin::bind(seeked)\", \"invoked\");\n\n if (!this._wasPlayed) {\n this.renderRoot(false);\n this._wasPlayed = true;\n }\n });\n\n this.bind(\"onChangeMedia\", () => {\n log(\"debug\", \"plugin::bind(onChangeMedia)\", \"invoked\");\n\n // DEVELOPER NOTICE: this is the destruction place.\n this._wasPlayed = false;\n this._videoSize = null;\n this._hotspots = [];\n\n const parentElement = jQuery('[id=\"hotspotsOverlay\"]')[0];\n\n render(\n // @ts-ignore\n h(null),\n parentElement,\n this._root\n );\n\n this._root = null;\n this.stage = null;\n });\n\n this.bind(\"monitorEvent\", () => {\n this.renderRoot(false);\n });\n\n this.bind(\"mediaLoaded\", () => {\n this.loadCuePoints();\n this.handleVideoSizeChange();\n });\n\n this.bind(\"seeked\", () => {\n this.renderRoot(false);\n });\n },\n\n _getCurrentTime() {\n return this.getPlayer().currentTime * 1000;\n },\n\n getComponent: function() {\n if (!this.$el) {\n this.$el = jQuery(\"
\")\n .attr(\"id\", \"hotspotsOverlay\")\n .css({\n position: \"absolute\",\n height: \"0\",\n width: \"0\",\n top: 0,\n left: 0,\n overflow: \"visible\",\n zIndex: 2\n });\n }\n\n return this.$el;\n }\n })\n );\n });\n})((window as any).mw, (window as any).jQuery);\n","import { h, Component } from \"preact\";\nimport { RawLayoutHotspot, LayoutHotspot } from \"../hotspot\";\nimport Hotspot from \"./Hotspot\";\nimport { CuepointLayoutEngine, RawLayoutCuepoint } from \"@playkit-js/playkit-js-ovp\";\nimport { AnalyticsEvents } from \"../analyticsEvents\";\n\nexport type PlayerSize = { width: number; height: number };\nexport type VideoSize = { width: number; height: number };\n\nexport interface Props {\n hotspots: RawLayoutHotspot[];\n currentTime: number;\n shouldHandleResize: boolean;\n getPlayerSize(): PlayerSize;\n getVideoSize(): VideoSize;\n pauseVideo(): void;\n seekTo(time: number): void;\n sendAnalytics(event: AnalyticsEvents): void;\n onResize(): void;\n}\n\ninterface State {\n playerSize: PlayerSize;\n videoSize: VideoSize;\n visibleHotspots: LayoutHotspot[];\n}\n\nconst PlayerUpdateEvent = \"updatePlayHeadPercent:hotspots\";\n\nexport default class Stage extends Component {\n engine: CuepointLayoutEngine | null = null;\n\n initialState = {\n playerSize: this.props.getPlayerSize(),\n videoSize: this.props.getVideoSize(),\n visibleHotspots: []\n };\n\n state: State = {\n ...this.initialState\n };\n\n componentDidUpdate(\n previousProps: Readonly,\n previousState: Readonly,\n previousContext: any\n ): void {\n if (previousProps.hotspots !== this.props.hotspots) {\n this._createEngine();\n }\n\n if (previousProps.currentTime !== this.props.currentTime) {\n this.syncVisibleHotspots();\n }\n\n if (previousProps.shouldHandleResize !== this.props.shouldHandleResize) {\n this.handleResize();\n }\n }\n\n private _createEngine() {\n const { hotspots } = this.props;\n\n if (!hotspots || hotspots.length === 0) {\n this.engine = null;\n return;\n }\n\n this.engine = new CuepointLayoutEngine(hotspots);\n this.engine.updateLayout(this.state.playerSize, this.state.videoSize);\n }\n\n componentDidMount() {\n this.reset();\n this._createEngine();\n }\n\n private syncVisibleHotspots(forceSnapshot = false) {\n const { currentTime } = this.props;\n\n this.setState((state: State) => {\n if (!this.engine) {\n return {\n visibleHotspots: []\n };\n }\n\n const hotspotsUpdate = this.engine.updateTime(currentTime, forceSnapshot);\n if (hotspotsUpdate.snapshot) {\n return {\n visibleHotspots: hotspotsUpdate.snapshot\n };\n }\n\n if (!hotspotsUpdate.delta) {\n return {\n visibleHotspots: []\n };\n }\n\n const { show, hide } = hotspotsUpdate.delta;\n\n if (show.length !== 0 || hide.length !== 0) {\n let visibleHotspots: LayoutHotspot[] = state.visibleHotspots;\n show.forEach((hotspot: LayoutHotspot) => {\n const index = visibleHotspots.indexOf(hotspot);\n if (index === -1) {\n visibleHotspots.push(hotspot);\n }\n });\n\n hide.forEach((hotspot: LayoutHotspot) => {\n const index = visibleHotspots.indexOf(hotspot);\n if (index !== -1) {\n visibleHotspots.splice(index, 1);\n }\n });\n\n return {\n visibleHotspots\n };\n }\n });\n }\n\n handleResize = (): void => {\n const { getPlayerSize, getVideoSize, onResize } = this.props;\n\n if (!this.props.shouldHandleResize) {\n return;\n }\n\n this.setState(\n {\n playerSize: getPlayerSize(),\n videoSize: getVideoSize()\n },\n () => {\n if (this.engine) {\n this.engine.updateLayout(this.state.playerSize, this.state.videoSize);\n this.syncVisibleHotspots(true);\n }\n\n onResize();\n }\n );\n };\n\n private reset = () => {\n this.engine = null;\n\n this.setState({\n ...this.initialState\n });\n };\n\n private renderHotspots = (visualHotspot: LayoutHotspot[]) => {\n if (!visualHotspot) {\n return null;\n }\n\n const { seekTo, pauseVideo, sendAnalytics } = this.props;\n\n return visualHotspot.map(hotspotData => (\n \n ));\n };\n\n render() {\n const { visibleHotspots } = this.state;\n const hotspotsElements = this.renderHotspots(visibleHotspots);\n\n const style = {\n position: \"absolute\",\n display: \"block\",\n overflow: \"visible\",\n top: 0,\n left: 0,\n width: 0,\n height: 0\n };\n\n return
{hotspotsElements}
;\n }\n}\n","import { h, Component } from \"preact\";\nimport { LayoutHotspot } from \"../hotspot\";\nimport { AnalyticsEvents } from \"../analyticsEvents\";\n\nconst defaultContainerStyles = {\n position: \"absolute\",\n display: \"table\",\n boxSizing: \"border-box\"\n};\n\nconst defaultButtonsStyles = {\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n appearance: \"none\",\n border: \"none\",\n display: \"table-cell\",\n verticalAlign: \"middle\",\n textAlign: \"center\",\n cursor: \"pointer\",\n wordBreak: \"break-all\",\n textRendering: \"geometricPrecision\"\n};\n\ntype Props = {\n visible: boolean;\n hotspot: LayoutHotspot;\n styles?: { [key: string]: any };\n pauseVideo(): void;\n seekTo(time: number): void;\n sendAnalytics(event: AnalyticsEvents): void;\n};\n\ntype State = {\n disableClick: boolean;\n isReady: boolean;\n};\n\nconst defaultProps = {\n styles: {}\n};\n\nfunction prepareUrl(url: string): string {\n if (!url.match(/^https?:\\/\\//i)) {\n url = \"http://\" + url;\n }\n return url;\n}\n\nexport default class Hotspot extends Component {\n static defaultProps = defaultProps;\n\n state = {\n disableClick: true,\n isReady: false\n };\n\n componentDidMount() {\n const { hotspot } = this.props;\n\n if (!hotspot || !hotspot.onClick) {\n this.setState({\n isReady: true\n });\n return;\n }\n\n const { type, url } = hotspot.onClick;\n\n const disableClick = !type || !url || type.length == 0 || url.length === 0;\n\n this.setState({\n isReady: true,\n disableClick: !this.isClickable()\n });\n }\n\n handleKeyUp = (event: any) => {\n if (event.keyCode === 13) {\n this.handleClick();\n }\n };\n\n isClickable = (): boolean => {\n const {\n hotspot: { onClick }\n } = this.props;\n\n if (!onClick) {\n return false;\n }\n\n switch (onClick.type) {\n case \"jumpToTime\":\n return typeof onClick.jumpToTime !== \"undefined\";\n case \"openUrl\":\n case \"openUrlInNewTab\":\n return !!onClick.url;\n default:\n return false;\n }\n };\n\n handleClick = () => {\n const { hotspot } = this.props;\n const { disableClick } = this.state;\n\n if (!hotspot.onClick || disableClick) {\n return;\n }\n\n switch (hotspot.onClick.type) {\n case \"jumpToTime\":\n if (typeof hotspot.onClick.jumpToTime === \"undefined\") {\n return;\n }\n\n this.props.seekTo(hotspot.onClick.jumpToTime / 1000);\n break;\n case \"openUrl\":\n {\n if (!hotspot.onClick.url) {\n return;\n }\n const url = prepareUrl(hotspot.onClick.url);\n window.open(url, \"_top\");\n this.props.sendAnalytics({\n eventNumber: 47,\n target: url,\n hotspotId: hotspot.id\n });\n }\n break;\n case \"openUrlInNewTab\":\n {\n if (!hotspot.onClick.url) {\n return;\n }\n\n this.props.pauseVideo();\n\n const url = prepareUrl(hotspot.onClick.url);\n try {\n window.open(url, \"_blank\");\n this.props.sendAnalytics({\n eventNumber: 47,\n target: url,\n hotspotId: hotspot.id\n });\n } catch (e) {\n // do nothing\n }\n }\n break;\n default:\n break;\n }\n };\n\n render() {\n const { hotspot } = this.props;\n const { layout, label } = hotspot;\n const { isReady, disableClick } = this.state;\n\n if (!isReady || !this.props.visible) {\n return null;\n }\n\n const containerStyles = {\n ...defaultContainerStyles,\n top: layout.y,\n left: layout.x,\n height: layout.height,\n width: layout.width\n };\n\n const buttonStyles = {\n ...defaultButtonsStyles,\n ...hotspot.styles,\n cursor: disableClick ? \"default\" : \"pointer\"\n };\n\n return (\n \n
{label}
\n \n );\n }\n}\n","import { RawLayoutHotspot } from \"./hotspot\";\n//import { log } from \"@playkit-js/playkit-js-ovp\";\n\nfunction toObject(\n jsonAsString: string,\n defaultValue: { [key: string]: any } = {}\n): { error?: Error; result?: { [key: string]: any } } {\n if (!jsonAsString) {\n return defaultValue;\n }\n\n try {\n return { result: JSON.parse(jsonAsString) };\n } catch (e) {\n return { error: e };\n }\n}\n\nexport function convertToHotspots(response: any): RawLayoutHotspot[] {\n const result: RawLayoutHotspot[] = [];\n\n (response.objects || []).forEach((cuepoint: any) => {\n const { result: partnerData, error } = toObject(cuepoint.partnerData);\n\n if (!partnerData || !partnerData.schemaVersion) {\n // log(\n // \"warn\",\n // \"loadCuePoints\",\n // `annotation '${cuepoint.id}' has no schema version, skip annotation`\n // );\n return;\n }\n\n const rawLayout = {\n ...partnerData.layout\n };\n\n result.push({\n id: cuepoint.id,\n startTime: cuepoint.startTime,\n endTime: cuepoint.endTime,\n label: cuepoint.text,\n styles: partnerData.styles,\n onClick: partnerData.onClick,\n rawLayout: rawLayout\n });\n });\n\n return result;\n}\n"],"sourceRoot":""} \ No newline at end of file